Presentation 9
Presentation 9
Md.Jamil Hossain
Introductio ID – 0242220005101219
n to MPLS
Department of CSE
Daffodil International
Unversity
Introduction to MPLS
Lesson Contents
Conclusion
•To understand MPLS there are two questions we
need to answer:
• What is MPLS?
• Why do we need MPLS?
•I’m going to start this lesson with an explanation
of why we need it and how MPLS solves some of
the issues of other protocols, this will help you to
understand why we use MPLS. In the second part
of this lesson you will learn what MPLS is and how
it actually works.
•When you want to learn MPLS, you need to be
very familiar with the following topics before you
continue:
• IGPs (like OSPF and EIGRP)
• Tunneling (GRE)
• CEF (Cisco Express Forwarding)
• BGP (Border Gateway Protocol)
•Having said that, let’s get started!
Why do we need MPLS?
Take a look at the following picture:
•Above we have an example of an ISP with two
customers called “A” and “B”. The ISP
only offers Internet connectivity and no other
services. Each customer uses the ISP to have
connectivity between their sites.
•To accomplish our goal, the ISP is running
eBGP between the CE (Customer Edge) and PE
(Provider Edge) to exchange prefixes. This
means all internal (P) routers of the ISP have to
run iBGP or they don’t know where to forward
their packets to.
•A full internet routing table currently has >
500.000 prefixes and with 8 ISP routers running
iBGP, we need 28 iBGP peerings. We can
reduce this number by using route reflectors or
a confederation. All routers have to do lookups
in the routing table for any possible
destination.
•Now here’s something to think about…when
our goal is to have connectivity between two
customer sites, why should all internal P
routers know about this? The only routers that
need to know how to reach the customer sites
are the PE routers of the provider. Why not
build a tunnel between the PE routers? Take a
look at the picture below:
•In the picture above I
added two GRE tunnels:
• The two PE routers at
the top will use a GRE
tunnel for the customer
A sites.
• The two PE routers at
the bottom will use a
GRE tunnel for the
customer B sites.
•With a solution like this,
we can have a BGP free
core! There’s only two
places where we need
BGP:
• eBGP between the PE
and CE router.
• iBGP between two PE
routers.
•Let’s take a closer look at
the solution I described
above.
Tunnel between PE
routers
Let’s take a look at
the example above
in action. I will use
the following
topology for this:
•The topology above is a
smaller version of the topology
I showed you before. This is
the ISP with only one
customer. We’ll use a GRE
tunnel between PE1 and PE2
so that we don’t need iBGP on
the P router. Let me walk you
through the entire
configuration…
PE1(config)#router ospf 1
PE1(config-
router)#network
192.168.23.0 0.0.0.255
area 0 PE1(config-
router)#network 2.2.2.2
0.0.0.0 area
0P(config)#router ospf 1
P(config-router)#network
First we will configure OSPF
192.168.23.0 0.0.0.255
on all ISP routes so that
area 0 P(config-
PE1 and PE2 are able to
router)#network
reach each other. I’ve
1.1.1 OSPF Configuration 192.168.34.0 0.0.0.255
added some loopback
area 0 P(config-
interfaces on the ISP
router)#network 3.3.3.3
routers that will be
0.0.0.0 area
advertised as well:
0PE2(config)#router ospf
1 PE2(config-
router)#network
192.168.34.0 0.0.0.255
area 0 PE2(config-
router)#network 4.4.4.4
0.0.0.0 area 0That takes
care of all internal routing
for the ISP.
CE1(config)#router bgp 10
CE1(config-router)#neighbor
192.168.12.2 remote-as
1234 CE1(config-
router)#network 1.1.1.1
mask
255.255.255.255PE1(config)#
router bgp 1234 PE1(config-
router)#neighbor
Let’s continue by configuring
192.168.12.1 remote-as
eBGP between the CE and PE
1.1.2 eBGP Configuration 10PE2(config)#router bgp
routers. We will advertise a
1234 PE2(config-
loopback on each CE router:
router)#neighbor
192.168.45.5 remote-as
20CE2(config)#router bgp 20
CE2(config-router)#neighbor
192.168.45.4 remote-as
1234 CE2(config-
router)#network 5.5.5.5
mask 255.255.255.255That
takes care of eBGP.
•1.1.3 GRE Tunnel Configuration
•Now we can configure the GRE tunnel between PE1 and PE2. I will use their loopback interfaces as
the source and destination. We will use the 192.168.24.0 /24 subnet on the tunnel interfaces:
•PE1(config)#interface tunnel 0
•PE1(config-if)#tunnel source 2.2.2.2
•PE1(config-if)#tunnel destination 4.4.4.4
• PE1(config-if)#ip address 192.168.24.2 255.255.255.0
•PE2(config)#interface tunnel 0
•PE2(config-if)#tunnel source 4.4.4.4
• PE2(config-if)#tunnel destination 2.2.2.2
• PE2(config-if)#ip address 192.168.24.4 255.255.255.0
•Now we have a working GRE tunnel.
•1.1.4 iBGP Configuration
•With the GRE tunnel up and running, we can configure iBGP between the two PE routers:
•Our PE routers will establish an iBGP peering using the IP addresses on the GRE tunnel.
•1.1.5 Verification
•Once again I will configure iBGP between PE1 and PE2 but this time I will use their loopback
interfaces. You will see why in a minute:
This is the exciting part, let’s enable MPLS. We’ll do this on all interfaces that connect
PE1, PE2 and the P router:
PE1(config-if)#mpls ip
P(config-if)#mpls ip
P(config-if)#mpls ip
PE2(config-if)#mpls ip
That’s pretty simple…only one command to activate MPLS on our interfaces. In the next
lesson I will explain what exactly happens when you use this command, for now I want
to focus on the labels.
•2.3 Verification
I hope this lesson has been useful to get a basic understanding of why we use MPLS and how it
uses labels as a tunneling mechanism to create a BGP free core. There’s a lot more to this
story. In other lessons you will learn:
How MPLS routers generate/exchange labels using LDP.
And more…
If you have any questions, feel free to leave a comment in our forum.