0% found this document useful (0 votes)
12 views24 pages

Presentation 9

Uploaded by

2kawserahmed7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views24 pages

Presentation 9

Uploaded by

2kawserahmed7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Present By ,

Md.Jamil Hossain

Introductio ID – 0242220005101219
n to MPLS
Department of CSE

Daffodil International
Unversity
Introduction to MPLS

Lesson Contents

• Why do we need MPLS?


• Tunnel between PE routers
• OSPF Configuration
• eBGP Configuration
• GRE Tunnel Configuration
• iBGP Configuration
• Verification
• What is MPLS?
• iBGP configuration
• MPLS Configuration
• Verification

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:

•PE1(config)#router bgp 1234


• PE1(config-router)#neighbor 192.168.24.4 remote-as 1234
•PE1(config-router)#neighbor 192.168.24.4 next-hop-self
•PE2(config)#router bgp 1234
•PE2(config-router)#neighbor 192.168.24.2 remote-as 1234
• PE2(config-router)#neighbor 192.168.24.2 next-hop-self

•Our PE routers will establish an iBGP peering using the IP addresses on the GRE tunnel.
•1.1.5 Verification

•I’ll do a trace from CE1 to CE2:

CE1#traceroute 5.5.5.5 source loopback 0


Type escape sequence to abort.
Tracing the route to 5.5.5.5
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.12.2 0 msec 0 msec 0 msec
2 192.168.24.4 0 msec 0 msec 4 msec
• 3 192.168.45.5 0 msec 0 msec *
•Great, it’s working! The ISP has a BGP-free core. Here’s what an IP packet from CE1 to CE2 looks like
to the P router:
•The outer IP header has source address 2.2.2.2 and destination address 4.4.4.4, the P router knows how to
route these since it learned these addresses through OSPF.
•2 What is MPLS?
•In the previous example I used a GRE tunnel but I could have used any tunneling mechanism. Besides
GRE, there’s IP-in-IP, Q-in-Q and…
•MPLS (Multi Protocol Label Switching).
•What does multi protocol label switching mean?
•Multi protocol: besides IP you can tunnel pretty much anything…IP, IPv6, Ethernet, PPP, frame-relay,
etc.
•Label switching: forwarding is done based on labels, not by looking up the destination in the routing
table.
•MPLS can do anything that any of the other tunneling protocols support and it can do a lot more than
that.
•Let’s start with something simple, let’s replace the GRE tunnel from the previous example with MPLS
so I can explain how MPLS uses labels.
•First let’s get rid of the GRE tunnel and the BGP peering between PE1 and PE2:
•PE1 & PE2 (config)#no interface tunnel 0PE1(config)#router bgp 1234 PE1(config-router)#no
neighbor 192.168.24.4 remote-as 1234PE2(config)#router bgp 1234 PE2(config-router)#no
neighbor 192.168.24.2 remote-as 1234Now we can start with the MPLS configuration.
•2.1 iBGP configuration

•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:

•PE1(config)#router bgp 1234


•PE1(config-router)#neighbor 4.4.4.4 remote-as 1234
•PE1(config-router)#neighbor 4.4.4.4 update-source loopback 0
• PE1(config-router)#neighbor 4.4.4.4 next-hop-self
•PE2(config)#router bgp 1234
•PE2(config-router)#neighbor 2.2.2.2 remote-as 1234
• PE2(config-router)#neighbor 2.2.2.2 update-source loopback 0
•PE2(config-router)#neighbor 2.2.2.2 next-hop-self

•That takes care of iBGP.


2.2 MPLS Configuration

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)#interface GigabitEthernet 0/2

PE1(config-if)#mpls ip

P(config)#interface GigabitEthernet 0/1

P(config-if)#mpls ip

P(config)#interface GigabitEthernet 0/2

P(config-if)#mpls ip

PE2(config)#interface GigabitEthernet 0/2

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

•Let’s try a quick ping between CE1 and CE2:

•CE1#ping 5.5.5.5 source loopback 0


• Type escape sequence to abort.
• Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
• Packet sent with a source address of 1.1.1.1
• !!!!!
•Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

•Great, it works.Why does it work? Keep in mind there is no iBGP on the P


router:

•P#show ip cef 5.5.5.5


•0.0.0.0/0
• no route
•Normally this traffic should be dropped since this router has no idea how it
can reach 5.5.5.5. However, since we enabled MPLS we are now using
labels for our forwarding decisions. Let me explain how that works.

•Let’s start with PE1:

•PE1#show ip route 5.5.5.5


• Routing entry for 5.5.5.5/32
• Known via "bgp 1234", distance 200, metric 0
• Tag 5, type internal
• Last update from 4.4.4.4 00:20:16 ago
• Routing Descriptor Blocks:
• * 4.4.4.4, from 4.4.4.4, 00:20:16 ago
• Route metric is 0, traffic share count is 1
• AS Hops 1
•Route tag 5
•MPLS label: none
01 02 03
When the P router PE2 will receive a When CE2 receives
receives something regular IP packet the packet, it will
that is tagged with (without label) with create an ICMP echo
label 17, then it has to destination 5.5.5.5 reply which will end up
be forwarded to and it will forward it at PE2. Here’s what
4.4.4.4. It’s outgoing using the routing table PE2 will do with it:
label says “pop label” towards CE2.
which means to
remove the label.
•PE2#show ip route 1.1.1.1
•Routing entry for 1.1.1.1/32
• Known via "bgp 1234", distance 200, metric 0
•Tag 1, type internal
•Last update from 2.2.2.2 00:31:34 ago
•Routing Descriptor Blocks:
• * 2.2.2.2, from 2.2.2.2, 00:31:34 ago
• Route metric is 0, traffic share count is 1
• AS Hops 1
• Route tag 1
•MPLS label: none
PE2 knows that it has to use next hop 2.2.2.2 to reach 1.1.1.1. Let’s check what
label we will use to reach 2.2.2.2:

PE2#show mpls forwarding-table

Local Outgoing Prefix Bytes Label Outgoing Next Hop

Label Label or Tunnel Id Switched interface


16 16 2.2.2.2/32 0 Gi0/2 192.168.34.3

17 Pop Label 192.168.23.0/24 0 Gi0/2 192.168.34.3


18 Pop Label 3.3.3.3/32 0 Gi0/2 192.168.34.3
3 Conclusion

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.

How to build MPLS VPNs

How to tunnel Ethernet or frame-relay over your MPLS network.

And more…

If you have any questions, feel free to leave a comment in our forum.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy