Introduction Of MPLS

Introduction Of MPLS
MPLS defines protocol that make different paradigm for a way routers forward packets. rather than forwarding packets based on the packets destination IP address, MPLS defines how router can forward packets based on MPLS label.

What Is OSPF Sham Links? How To Configure OSPF Sham Links?

What Is OSPF Sham Links? How To Configure OSPF Sham Links?
OSPF Sham links is a logical inter-area link carried by the super backbone. A Sham links is required only between two VPN sites that belong to the same area and have a backdoor link for backup purposes. OSPF adjacency is established across the sham link.

How To Configure MPLS L3 With BGP AS OVERRIDE?

How To Configure MPLS L3 With BGP AS OVERRIDE?
BGP has a simple loop prevention mechanism for external BGP. When you see your own Autonomous system number in the AS path, we do not accept the prefix. This mechanism is fine for Internet routing but there are some other scenarios where this might be an issue

What Is MPLS L3 VPN ? How To Configure?

What Is MPLS L3 VPN ? How To Configure?
In MPLS Layer 3 the service provider will participate in routing with the customers. The customers will run static, OSPF, EIGRP, BGP or any other routing protocol with the service provider; these routes can be shared with other sites of the customers. In VPN routing information from one customer is completely separated from other customers and tunneled over the service provider MPLS network.

Latest Posts

What is DMVPN (Dynamic Multipoint VPN), NHRP, mGRE and How to configure DMVPN Phase 1?

Internetworks

 

 DMVPN (Dynamic Multipoint VPN) Introduced by Cisco in late 2000 is a routing technology you can use to build a VPN network with multiple sites (spokes) without having to statically configure all devices. It’s a “hub and spoke” network, where the spokes will, can to communicate with each other directly without having to go through the hub. Encryption is supported through IPsec which makes DMVPN a popular choice for connecting different sites using regular Internet connections. It’s a great backup or alternative to private networks like MPLS VPN.










 

This technology has been developed to address the needs for automatically created VPN tunnels when dynamic IP addresses on the spokes are in use. This pure hub-and-spoke topology where all branches may communicate with each other securely through the hub.

There are four topics you need to know.

Multipoint GRE (mGRE)

NHRP (Next Hop Resolution Protocol)

Routing (RIP, EIGRP, OSPF, BGP, etc.)

IPsec (not required but recommended)


 

Multipoint GRE (mGRE)

Our regular GRE tunnels are point-to-point and don’t scale well. It becomes messy quickly so much point to point tunnels. but When we use GRE Multipoint, there will be only one tunnel interface on each router. mGRE interfaces do not have a tunnel destination. its keeping cost low, minimizing configuration complexity, and increasing flexibility. Multipoint GRE(Mgre) Uses tunnel source and tunnel mode (mgre). the Tunnel can have many endpoints by using a single tunnel interface. The endpoint can be configured as GRE or MGRE and Mapping is done by NHRP Protocol.


NHRP (Next Hop Resolution Protocol)

We want something which can help us our router to figure out what the public IP address is of the other router, we do this with the help of a protocol called NHRP (Next Hop Resolution Protocol). Next hop resolution protocol (NHRP)  Maps the tunnel IP with NBMA address (public IP ) (static or dynamic). NHRP Provides layer 2 address resolution protocol and caching services similar to ARP and inverse ARP. All it does is building a dynamic database store on the hub with information about spokes IP addresses.

How NHRP works:

  • One router will be the NHRP server next-hop server (NHS).
  • All other routers will be the NHRP client's next-hop client (NHC).
  • NHRP clients register themselves with the NHRP server and report their public IP address NHC send a query to the NHS if they want to communicate with another NHC.
  • The NHRP server keeps track of all public IP addresses in its cache, NHS acts as a mapping agent and stores all registered mappings NHS reply to queries made by NHC.
  • When one router wants to tunnel something to another router, it will request the NHRP server for the public IP address of the other router.

 

DMVPN has different three versions. we call phases.

Phase 1

Phase 2

Phase 3

 

DMVPN phase 1

Phase 1

before we started I want to let you know Phase 1 is  Not used nowadays, In phase 1 we use NHRP so that spokes can register themselves with the hub (NHRP  needed for spokes to register with hub). The hub is the only router that is using a multipoint GRE (mGRE) interface, all spokes will be using regular point-to-point GRE tunnel interfaces.No spokes hub and spokes topology were dynamic IP address on the spokes may be used. All your traffic goes through the hub. This means that there will be no direct spoke-to-spoke communication; all traffic has to go through the hub.

So our traffic has to go through the hub, our routing configuration will be quite simple. Spoke routers only need a summary or default route to the hub to reach other spoke routers.

DMVPN Phase 2 and 3 we will talk about in the next chapter.

let see the configuration:

Topology:




Goal:
  • configure the topology as per the diagram 
  • assign the IP addresses to their port as per the topology 
  • configure static routing on router 2 
  • configure default routing on router 1 3 4
  • configure DMVPN Phase 1 on router 1, 3 and 4
  • configure router 1 Hub and  router 3 and 4 should be spokes routers
  • configure tunnel interfaces 192.168.1.0/24
  • configure NHRP using Stating mapping.




R1(config)#interface serial 4/0

R1(config-if)#ip address 1.1.1.1 255.0.0.0

R1(config-if)#no shutdown

R1(config-if)#ip address 10.1.1.1 255.0.0.0

R1(config-if)#no shutdown

R1(config-if)#no keepalive

R1(config-if)#exit


R2(config)#interface serial 4/0

R2(config-if)#ip address 1.1.1.2 255.0.0.0

R2(config-if)#no shutdown

R2(config-if)#interface serial 4/1

R2(config-if)#ip address 3.3.3.1 255.0.0.0

R2(config-if)#no shutdown

R2(config-if)#interface serial 4/2

R2(config-if)#ip address 4.4.4.1 255.0.0.0

R2(config-if)#no shutdown

R2(config-if)#interface fastethernet 0/0

R2(config-if)#ip address 20.1.1.1 255.0.0.0

R2(config-if)#no shutdown

R2(config-if)#no keepalive

R2(config-if)#exit


R3(config)#interface serial 4/1
R3(config-if)#ip address 3.3.3.2 255.0.0.0
R3(config-if)#no shutdown
R3(config-if)#interface fastethernet 0/0
R3(config-if)#ip address 30.1.1.1 255.0.0.0
R3(config-if)#no shutdown
R3(config-if)#no keepalive
R3(config-if)#exit


R4(config)#interface serial 4/2
R4(config-if)#ip address 4.4.4.2 255.0.0.0
R4(config-if)#no shutdown
R4(config-if)#interface fastethernet 0/0
R4(config-if)#ip address 40.1.1.1 255.0.0.0
R4(config-if)#no shutdown
R4(config-if)#no keepalive
R4(config-if)#exit


R1#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        10.1.1.1        YES manual up                    up
Serial4/0                    1.1.1.1         YES manual up                    up

R2#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        20.1.1.1        YES manual up                    up
Serial4/0              1.1.1.2         YES manual up                    up
Serial4/1              3.3.3.1         YES manual up                    up
Serial4/2              4.4.4.1         YES manual up                    up

R3#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        30.1.1.1        YES manual up                    up
Serial4/1                     3.3.3.2         YES manual up                    up

R4#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        40.1.1.1        YES manual up                    up
Serial4/2                    4.4.4.2         YES manual up                    up


R1(config)#ip route 0.0.0.0 0.0.0.0 serial 4/0

R1(config)#exit

R2(config)#ip route 1.0.0.0 255.0.0.0 serial 4/0

R2(config)#ip route 10.0.0.0 255.0.0.0 serial 4/0

R2(config)#ip route 30.0.0.0 255.0.0.0 serial 4/1
R2(config)#ip route 3.0.0.0 255.0.0.0 serial 4/1
R2(config)#ip route 4.0.0.0 255.0.0.0 serial 4/2
R2(config)#ip route 40.0.0.0 255.0.0.0 serial 4/2
R2(config)#exit

R3(config)#ip route 0.0.0.0 0.0.0.0 serial 4/1
R3(config)#exit

R4(config)#ip route 0.0.0.0 0.0.0.0 serial 4/2
R4(config)#exit


R1#show ip route static

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

S*    0.0.0.0/0 is directly connected, Serial4/0

R2#show ip route static
Gateway of last resort is not set

S     10.0.0.0/8 is directly connected, Serial4/0
S     30.0.0.0/8 is directly connected, Serial4/1
S     40.0.0.0/8 is directly connected, Serial4/2

 

R3#show ip route static

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

S*    0.0.0.0/0 is directly connected, Serial4/1


R4#show ip route static

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

S*    0.0.0.0/0 is directly connected, Serial4/2

R1(config)#interface tunnel 999
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#tunnel source 1.1.1.1
R1(config-if)#tunnel mode GRE multipoint

R1(config-if)#ip NHRP network-id 01
R1(config-if)#ip NHRP map 192.168.1.2 3.3.3.2
R1(config-if)#ip NHRP map 192.168.1.3 4.4.4.2
R1(config-if)#exit

R3(config)#interface tunnel 999
R3(config-if)#ip address 192.168.1.2 255.255.255.0
R3(config-if)#tunnel source 3.3.3.2
R3(config-if)#tunnel destination 1.1.1.1

R3(config-if)#ip NHRP network-id 02
R3(config-if)#ip NHRP map 192.168.1.1 1.1.1.1
R3(config-if)#exit


R4(config)#interface tunnel 999
R4(config-if)#ip address 192.168.1.3 255.255.255.0
R4(config-if)#tunnel source 4.4.4.2
R4(config-if)#tunnel destination 1.1.1.1

R4(config-if)#ip NHRP network-id 03
R4(config-if)#ip NHRP map 192.168.1.1 1.1.1.1
R4(config-if)#exit
R4(config)#end

R1#show ip nhrp
192.168.1.2/32 via 192.168.1.2
   Tunnel999 created 00:44:20, never expire
   Type: static, Flags: used
   NBMA address: 3.3.3.2
192.168.1.3/32 via 192.168.1.3
   Tunnel999 created 00:44:04, never expire
   Type: static, Flags: used
   NBMA address: 4.4.4.2

R3#show ip NHRP
192.168.1.1/32 via 192.168.1.1
   Tunnel999 created 00:29:11, never expire
   Type: static, Flags:
   NBMA address: 1.1.1.1


R4#show ip NHRP
192.168.1.1/32 via 192.168.1.1
   Tunnel999 created 00:23:36, never expire
   Type: static, Flags:
   NBMA address: 1.1.1.1


 
R4#traceroute 192.168.1.1
Type escape sequence to abort.
Tracing the route to 192.168.1.1
VRF info: (vrf in name/id, vrf out name/id)
  1 192.168.1.1 1616 msec 92 msec 36 msec

R4#traceroute 192.168.1.2
Type escape sequence to abort.
Tracing the route to 192.168.1.2
VRF info: (vrf in name/id, vrf out name/id)
  1 192.168.1.1 12 msec 48 msec 40 msec
  2 192.168.1.2 700 msec 328 msec 84 msec

R3#traceroute 192.168.1.1
Type escape sequence to abort.
Tracing the route to 192.168.1.1
VRF info: (vrf in name/id, vrf out name/id)
  1 192.168.1.1 80 msec 72 msec 72 msec


R3#traceroute 192.168.1.3
Type escape sequence to abort.
Tracing the route to 192.168.1.3
VRF info: (vrf in name/id, vrf out name/id)
  1 192.168.1.1 72 msec 56 msec 96 msec
  2 192.168.1.3 240 msec 188 msec 188 msec

R1#traceroute 192.168.1.2
Type escape sequence to abort.
Tracing the route to 192.168.1.2
VRF info: (vrf in name/id, vrf out name/id)
  1 192.168.1.2 8 msec 72 msec 96 msec

R1#traceroute 192.168.1.3
Type escape sequence to abort.
Tracing the route to 192.168.1.3
VRF info: (vrf in name/id, vrf out name/id)
  1 192.168.1.3 72 msec 100 msec 100 msec



What is Network Tunneling and how to configure Generic Routing Encapsulation (GRE) Tunnels?

Internetworks

Generic Routing Encapsulation (GRE) is a network tunneling protocol developed by Cisco Systems that can encapsulate a wide variety of network layer protocols inside virtual point-to-point links or point-to-multipoint links over an Internet Protocol network.


When we use GRE? 

GRE is used when packets need to be sent from one network to another over the internet.

Generic Routing Encapsulation (GRE) have some disadvantages:-

GRE tunnel is an encapsulation protocol and does not perform any encryption.

When we create GRE point to point tunnel without any encryption is extremely risky as sensitive data can easily be extracting from the tunnel and misused by others.( That’s the reason we used IPSec to add an encryption layer and secure the GRE tunnel with the help of IPSec we get army level encryption).  

 Classic GRE tunnel is point to point, Manual tunnel, Not scalable, Static IP on all end points

GRE tunnel uses a ‘tunnel’ interfaces a logical interfaces configured on the router with an IP address where packets are encapsulate and decapsulate as they enter or exit the GRE tunnel.

All tunnel interfaces of participated routers must always be configured with an IP address which is not used anywhere else in the network.Each tunnel interface is assigned an IP address within the same network as other Tunnel interfaces.Before you configure you must adjust (MTU) maximum transfer unit and MSS maximum segment size. 

Let see the configuration:-


Topology_




Goal:

  • configure the topology as per the diagram.
  • assign IP addresses respectivly to their interfaces as per the topology.
  • configure default and static routing.
  • configure point - to - point tunnels between router 1 to 3 and router 1 to router 4

R1(config)#interface serial 4/0

R1(config-if)#ip address 1.1.1.1 255.0.0.0

R1(config-if)#no shutdown

R1(config-if)#interface fastethernet 0/0

R1(config-if)#ip address 10.1.1.1 255.0.0.0

R1(config-if)#no shutdown

R1(config-if)#no keepalive

R1(config-if)#exit



R2(config)#interface serial 4/0

R2(config-if)#ip address 1.1.1.2 255.0.0.0

R2(config-if)#no shutdown


R2(config-if)#interface serial 4/1

R2(config-if)#ip address 3.3.3.1 255.0.0.0

R2(config-if)#no shutdown


R2(config-if)#interface serial 4/2

R2(config-if)#ip address 4.4.4.1 255.0.0.0

R2(config-if)#no shutdown


R2(config-if)#interface fastethernet 0/0

R2(config-if)#ip address 20.1.1.1 255.0.0.0

R2(config-if)#no shutdown

R2(config-if)#no keepalive

R2(config-if)#exit


R3(config)#interface serial 4/1
R3(config-if)#ip address 3.3.3.2 255.0.0.0
R3(config-if)#no shutdown

R3(config-if)#interface fastethernet 0/0
R3(config-if)#ip address 30.1.1.1 255.0.0.0
R3(config-if)#no shutdown
R3(config-if)#no keepalive
R3(config-if)#exit

R4(config)#interface serial 4/2
R4(config-if)#ip address 4.4.4.2 255.0.0.0
R4(config-if)#no shutdown

R4(config-if)#interface fastethernet 0/0
R4(config-if)#ip address 40.1.1.1 255.0.0.0
R4(config-if)#no shutdown
R4(config-if)#no keepalive
R4(config-if)#exit

R1#show ip interface brief

Interface              IP-Address      OK? Method Status                Protocol

FastEthernet0/0        10.1.1.1        YES manual up                    up

Serial4/0                    1.1.1.1         YES manual up                    up

R2#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        20.1.1.1        YES manual up                    up
Serial4/0                    1.1.1.2         YES manual up                    up
Serial4/1                    3.3.3.1         YES manual up                    up
Serial4/2                    4.4.4.1         YES manual up                    up

R3#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        30.1.1.1        YES manual up                    up
Serial4/1                    3.3.3.2         YES manual up                    up

R4#show ip interface brief

Interface              IP-Address      OK? Method Status                Protocol

FastEthernet0/0        40.1.1.1        YES manual up                    up

Serial4/2                    4.4.4.2         YES manual up                    up


R1(config)#ip route 0.0.0.0 0.0.0.0 serial 4/0

R1(config)#exit

R2(config)#ip route 1.0.0.0 255.0.0.0 serial 4/0

R2(config)#ip route 10.0.0.0 255.0.0.0 serial 4/0

R2(config)#ip route 30.0.0.0 255.0.0.0 serial 4/1

R2(config)#ip route 3.0.0.0 255.0.0.0 serial 4/1

R2(config)#ip route 4.0.0.0 255.0.0.0 serial 4/2

R2(config)#ip route 40.0.0.0 255.0.0.0 serial 4/2

R2(config)#exit

R3(config)#ip route 0.0.0.0 0.0.0.0 serial 4/1
R3(config)#exit

R4(config)#ip route 0.0.0.0 0.0.0.0 serial 4/2


R1#ping 20.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 20.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 16/33/60 ms

R1#ping 30.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 30.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 16/38/68 ms

R1#ping 40.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 40.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 16/23/36 ms


R1(config)#interface tunnel 21

R1(config-if)#ip address 192.168.1.1 255.255.255.0

R1(config-if)#ip mtu 1400

R1(config-if)#ip tcp adjust-mss 1360

R1(config-if)#tunnel source 1.1.1.1

R1(config-if)#tunnel destination 3.3.3.2

R1(config-if)#exit

R1(config)#end


R3(config)#interface tunnel 21
R3(config-if)#ip address 192.168.1.2 255.255.255.0
R3(config-if)#ip mtu 1400
R3(config-if)#ip tcp adjust-mss 1360
R3(config-if)#tunnel source 3.3.3.2
R3(config-if)#tunnel destination 1.1.1.1
R3(config-if)#exit
R3(config)#end

R1(config)#router eigrp 6123

R1(config-router)#network 192.168.1.0

R1(config-router)#network 10.0.0.0

R1(config-router)#no auto-summary

R1(config-router)#exit

R3(config)#router eigrp 6123
R3(config-router)#network 192.168.1.0
R3(config-router)#no auto-summary                                                           cy
R3(config-router)#network 30.0.0.0
R3(config-router)#exit


R1#ping 192.168.1.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 24/28/32 ms

 R1#show ip interface brief | exclude ?

  LINE  Regular Expression


R1#show ip interface brief | exclude unass

Interface              IP-Address      OK? Method Status                Protocol

FastEthernet0/0        10.1.1.1        YES manual up                    up

Serial4/0              1.1.1.1         YES manual up                    up

Tunnel21               192.168.1.1     YES manual up                    up

  


R1#traceroute 30.1.1.1

Type escape sequence to abort.

Tracing the route to 30.1.1.1

VRF info: (vrf in name/id, vrf out name/id)

  1 192.168.1.2 56 msec 52 msec 20 msec


R1#traceroute 30.1.1.1 source 1.1.1.1

Type escape sequence to abort.

Tracing the route to 30.1.1.1

VRF info: (vrf in name/id, vrf out name/id)

  1 192.168.1.2 24 msec 32 msec 24 msec


R1#traceroute 40.1.1.1

Type escape sequence to abort.

Tracing the route to 40.1.1.1

VRF info: (vrf in name/id, vrf out name/id)

  1 1.1.1.2 16 msec 16 msec 20 msec

  2 4.4.4.2 16 msec 32 msec 40 msec


R1(config)#interface tunnel 41

R1(config-if)#ip address 192.168.40.1 255.255.255.0

R1(config-if)#ip mtu 1400

R1(config-if)#ip tcp adjust-mss 1360

R1(config-if)#tunnel source 1.1.1.1

R1(config-if)#tunnel destination 4.4.4.2

R1(config-if)#exit

R1(config)#end


R4(config)#interface tunnel 41
R4(config-if)#ip address 192.168.40.2 255.255.255.0
R4(config-if)#ip mtu 1400
R4(config-if)#ip tcp adjust-mss 1360
R4(config-if)#tunnel source 4.4.4.2
R4(config-if)#tunnel destination 1.1.1.1
R4(config-if)#end



R1(config)#router eigrp 6123

R1(config-router)#network 192.168.40.0

R1(config-router)#exit

R1(config)#end


R4(config)#router eigrp 6123

R4(config-router)#network 192.168.40.0                                             

R4(config-router)#network 40.0.0.0

R4(config-router)#no auto-summary

R4(config-router)#end


R1#traceroute 40.1.1.1

*Feb 11 12:46:27.511: %SYS-5-CONFIG_I: Configured from console by console

R1#traceroute 40.1.1.1

Type escape sequence to abort.

Tracing the route to 40.1.1.1

VRF info: (vrf in name/id, vrf out name/id)

  1 192.168.40.2 20 msec 52 msec 40 msec


R2#traceroute 40.1.1.1 source 20.1.1.1

Type escape sequence to abort.

Tracing the route to 40.1.1.1

VRF info: (vrf in name/id, vrf out name/id)

  1 4.4.4.2 28 msec 28 msec 16 msec


R2#ping 30.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 30.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 16/16/20 ms


R2#ping 40.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 40.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/12 ms


R2#ping 10.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/15/28 ms












How to configure MPLS L3 with BGP AS OVERRIDE?

Internetworks

BGP has a simple loop prevention mechanism for external BGP. When you see your own Autonomous system number in the AS path, we do not accept the prefix. This mechanism is fine for Internet routing but there are some other scenarios where this might be an issue. 








In our topology no routes get installed because the CE routers receive the routes with its own AS coming from other sites.(5500). So as per BGP it will not install the routes in the BGP table. Its simple if the customer has the same ASN at different sites, the CE routers drop the BGP routes.
The CE routers drop the BGP update as it sees that its own ASN 5500 is in the update.This behavior is the default behavior of BGP and is a prevention mechanism against loops in BGP


However, we have an easier solution is available and it involves having the PE router replace the customer ASN in the AS path with the ASN of the service provider. The command that you need to configure on the PE router to override the ASN is neighbor-address as-override.  

What is OSPF Sham Links? how to configure OSPF Sham Links?

Internetworks


OSPF Sham Links are required when we try to use a backdoor link between two CE routers in MPLS VPN PE CE scenarios.






What is OSPF sham link ?
OSPF Sham links is a logical inter-area link carried by the super backbone. A Sham links is required only between two VPN sites that belong to the same area and have a backdoor link for backup purposes. OSPF adjacency is established across the sham link.  


How to configure MPLS L3 VPN with OSPF ?

Internetworks
In MPLS Layer 3 the service provider will participate in routing with the customers. The customers will run static, OSPF, EIGRP, BGP or any other routing protocol with the service provider; these routes can be shared with other sites of the customers.





In VPN routing information from one customer is completely separated from other customers and tunneled over the service provider MPLS network.



we have already discus what is MPLS? how MPLS work? and What is MPLS L3 VPN ? in this section we see how to configure MPLS L3 VPN supports OSPF sites. Before we start our configuration you must familiar with these topics.

1. Introduction of MPLS

2.What is MPLS Label distributing protocol (LDP) ? How LDP works?

3.how to configure MPLS LDP Peering ?

4.What is MPLS L3 VPN ? How to configure?

5.How to configure MPLS L3 VPN with RIPv2 ?

6.How to configure MPLS L3 VPN with EIGRP ?

7.How to configure MPLS L3 VPN with OSPF ?

8.What is OSPF Sham Links? how to configure OSPF Sham Links?


What we need to know before applying this configuration?

  1. we need to assign separate process ID because its required  each VRF that receive VPN routes via OSPF from CE. in our topology we are running OSPF for multiple VRF and also running OSPF inside our core network. its need to distinguished which routes belong to which VRF and which interface belong to which OSPF process. in simple word use separate process ID. 
  2. When its comes to redistribute OSPF into BGP by Default only  OSPF inter-area and inter-area routes are redistribute into BGP. We need to use EXTERNAL key with the redistribute command under BGP  to redistribute OSPF external routes into BGP. in simple words use external keyword. 


Let see the configuration to get better understanding:-

Topology:


Goal:
  • configure the topology as per the diagram 
  • assign the IP addresses to their interfaces
  • configure IGP (OSPF 1) inside MPLS SP core 
  • configure MPLS LDP on router 1_2_3 
  • configure labels (99-199_200-299_300-399)
  • configure VRF A-1 on router 1 and VRF A-2 on router 3
  • configure RD and RT  value 500:1 on both the sites
  • configure on router 1 assign fastethernet facing CE under VRF A-1
  • configure on router 3 assign fastethernet facing CE under VRF A-2
  • Configure the loopbacks with exact mask to exchange the routes 
  • configure OSPF 1 on both CE routers  
  • configure OSPF 11 on PE router 1 under VRF A-1 and OSPF 13 on PE router 3 under VRF A-2
  • make sure PE and CE routers can ping 
  • configure VPNv4 peering between PE routers. 
  • Configure redistribution on PE routers between OSPF and BGP under VRF.
  • make sure both the  CEs routers able to ping.


R1(config)#Interface fastethernet 0/0
R1(config-if)#Ip address 10.1.1.1   255.0.0.0
R1(config-if)#No shutdown
R1(config-if)# keepalive
R1(config-if)#Exit

R1(config)#Interface serial 4/0
R1(config-if)#Ip address  1.1.1.1 255.0.0.0
R1(config-if)#No shutdown
R1(config-if)#Exit

R1(config)#Interface serial 4/2
R1(config-if)#Ip address  3.3.3.2 255.0.0.0
R1(config-if)#No shutdown
R1(config-if)#Exit

R1(config)#Interface loopback 0
R1(config-if)#Ip address 192.168.10.1 255.255.255.0
R1(config-if)#Exit

R1(config)#Interface loopback  1
R1(config-if)#Ip address 192.168.11.1 255.255.255.0
R1(config-if)#Exit
R1(config)#Interface loopback  2
R1(config-if)#Ip address 192.168.12.1 255.255.255.0
R1(config-if)#Exit
R1(config)#Interface loopback 3
R1(config-if)#Ip address 192.168.13.1  255.255.255.0
R1(config-if)#Exit

R2(config)#Interface fastethernet 0/0
R2(config-if)#Ip address 20.1.1.1   255.0.0.0
R2(config-if)#No shutdown
R2(config-if)#keepalive
R2(config-if)#Exit




R2(config)#Interface serial 4/0
R2(config-if)#Ip address  1.1.1.2 255.0.0.0
R2(config-if)#No shutdown
R2(config-if)#Exit

R2(config)#Interface serial 4/1
R2(config-if)#Ip address  2.2.2.1 255.0.0.0
R2(config-if)#No shutdown
R2(config-if)#Exit


R2(config)#Interface loopback 0
R2(config-if)#Ip address 192.168.20.1 255.255.255.0
R2(config-if)#Exit
R2(config)#Interface loopback  1
R2(config-if)#Ip address 192.168.21.1 255.255.255.0
R2(config-if)#Exit
R2(config)#Interface loopback  2
R2(config-if)#Ip address 192.168.22.1 255.255.255.0
R2(config-if)#Exit
R2(config)#Interface loopback 3
R2(config-if)#Ip address 192.168.23.1  255.255


  
R3(config)#Interface fastethernet 0/0
R3(config-if)#Ip address 30.1.1.1   255.0.0.0
R3(config-if)#No shutdown
R3(config-if)# keepalive
R3(config-if)#Exit

R3(config)#Interface serial 4/1
R3(config-if)#Ip address  2.2.2.2 255.0.0.0
R3(config-if)#No shutdown
R3(config-if)#Exit

R3(config)#Interface serial 4/2
R3(config-if)#Ip address  3.3.3.1 255.0.0.0
R3(config-if)#No shutdown
R3(config-if)#Exit

R3(config)#Interface loopback 0
R3(config-if)#Ip address 192.168.30.1 255.255.255.0
R3(config-if)#Exit
R3(config)#
R3(config)#Interface loopback  1
R3(config-if)#Ip address 192.168.31.1 255.255.255.0
R3(config-if)#Exit
R3(config)#Interface loopback  2
R3(config-if)#Ip address 192.168.32.1 255.255.255.0
R3(config-if)#Exit
R3(config)#Interface loopback 3
R3(config-if)#Ip address 192.168.33.1  255.255.
R3(config-if)#Exit


R4(config)#interface fastEthernet 0/0
R4(config-if)#ip address 30.1.1.2 255.0.0.0
R4(config-if)#no shutdown
R4(config-if)#exit

R4(config)#interface loopback 0
R4(config-if)#ip address 192.168.40.1 255.255.255.0
R4(config-if)#exit

R5(config)#Interface fastethernet 0/0
R5(config-if)#Ip address 10.1.1.2   255.0.0.0
R5(config-if)#shutdown
R5(config-if)#Exit

R5(config)#Interface loopback 0
R5(config-if)#Ip address 192.168.50.1  255.255.255.0
R5(config-if)#Exit

R1#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        10.1.1.1        YES manual up                    up

Serial4/0              1.1.1.1         YES manual up                    up

Serial4/2              3.3.3.2         YES manual up                    up
Loopback0              192.168.10.1    YES manual up                    up
Loopback1              192.168.11.1    YES manual up                    up
Loopback2              192.168.12.1    YES manual up                    up
Loopback3              192.168.13.1    YES manual up                    up




R2#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        20.1.1.1        YES manual up                    up
Serial4/0              1.1.1.2         YES manual up                    up
Serial4/1              2.2.2.1         YES manual up                    up
Loopback0              192.168.20.1    YES manual up                    up
Loopback1              192.168.21.1    YES manual up                    up
Loopback2              192.168.22.1    YES manual up                    up
Loopback3              192.168.23.1    YES manual up                    up


R3#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        30.1.1.1        YES manual up                    up
Serial4/1              2.2.2.2         YES manual up                    up
Serial4/2              3.3.3.1         YES manual up                    up
Loopback0              192.168.30.1    YES manual up                    up
Loopback1              192.168.31.1    YES manual up                    up
Loopback2              192.168.32.1    YES manual up                    up
Loopback3              192.168.33.1    YES manual up                    up



R4#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        10.1.1.2        YES manual up                    up
Loopback0              192.168.40.1    YES manual up                    up


R5#show ip interface  brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        30.1.1.2        YES manual up                    up
Loopback0              192.168.50.1    YES manual up                    up

R1(config)#router ospf 1
R1(config-router)#network 1.0.0.0 0.255.255.255 area 0
R1(config-router)#network 3.0.0.0 0.255.255.255 area 0
R1(config-router)#network 192.168.10.0 255.0.0.0 area 0
R1(config-router)#network 192.168.11.0 255.0.0.0 area 0
R1(config-router)#network 192.168.12.0 255.0.0.0 area 0
R1(config-router)#network 192.168.13.0 255.0.0.0 area 0
R1(config-router)#end

R2(config)#router ospf 1
R2(config-router)#network 20.0.0.0 0.255.255.255 area 0
R2(config-router)#network 1.0.0.0 0.255.255.255 area 0
R2(config-router)#network 2.0.0.0 0.255.255.255 area 0
R2(config-router)#network 192.168.20.0 255.0.0.0 area 0
R2(config-router)#network 192.168.21.0 255.0.0.0 area 0
R2(config-router)#network 192.168.22.0 255.0.0.0 area 0
R2(config-router)#network 192.168.23.0 255.0.0.0 area 0
R2(config-router)#end


R3(config)#router ospf 1
R3(config-router)#network 2.0.0.0 0.255.255.255 area 0
R3(config-router)#network 3.0.0.0 0.255.255.255 area 0
R3(config-router)#network 192.168.30.0 255.0.0.0 area 0
R3(config-router)#network 192.168.31.0 255.0.0.0 area 0
R3(config-router)#network 192.168.32.0 255.0.0.0 area 0
R3(config-router)#network 192.168.33.0 255.0.0.0 area 0
R3(config-router)#end

R1#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override


Gateway of last resort is not set

O     2.0.0.0/8 [110/128] via 3.3.3.1, 01:14:38, Serial4/2
                [110/128] via 1.1.1.2, 01:14:38, Serial4/0
O     20.0.0.0/8 [110/65] via 1.1.1.2, 01:14:38, Serial4/0
      192.168.20.0/32 is subnetted, 1 subnets
O        192.168.20.1 [110/65] via 1.1.1.2, 01:14:38, Serial4/0
      192.168.21.0/32 is subnetted, 1 subnets
O        192.168.21.1 [110/65] via 1.1.1.2, 01:14:38, Serial4/0
      192.168.22.0/32 is subnetted, 1 subnets
O        192.168.22.1 [110/65] via 1.1.1.2, 01:14:38, Serial4/0
      192.168.23.0/32 is subnetted, 1 subnets
O        192.168.23.1 [110/65] via 1.1.1.2, 01:14:38, Serial4/0
O     192.168.30.0/24 [110/65] via 3.3.3.1, 01:14:38, Serial4/2
      192.168.31.0/32 is subnetted, 1 subnets
O        192.168.31.1 [110/65] via 3.3.3.1, 01:14:38, Serial4/2
      192.168.32.0/32 is subnetted, 1 subnets
O        192.168.32.1 [110/65] via 3.3.3.1, 01:14:38, Serial4/2
      192.168.33.0/32 is subnetted, 1 subnets
O        192.168.33.1 [110/65] via 3.3.3.1, 01:14:38, Serial4/2



R3#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

O     1.0.0.0/8 [110/128] via 3.3.3.2, 01:18:05, Serial4/2
                [110/128] via 2.2.2.1, 01:18:05, Serial4/1
O     20.0.0.0/8 [110/65] via 2.2.2.1, 01:18:05, Serial4/1
O     192.168.10.0/24 [110/65] via 3.3.3.2, 01:18:05, Serial4/2
      192.168.11.0/32 is subnetted, 1 subnets
O        192.168.11.1 [110/65] via 3.3.3.2, 01:18:05, Serial4/2
      192.168.12.0/32 is subnetted, 1 subnets
O        192.168.12.1 [110/65] via 3.3.3.2, 01:18:05, Serial4/2
      192.168.13.0/32 is subnetted, 1 subnets
O        192.168.13.1 [110/65] via 3.3.3.2, 01:18:05, Serial4/2
      192.168.20.0/32 is subnetted, 1 subnets
O        192.168.20.1 [110/65] via 2.2.2.1, 01:18:05, Serial4/1
      192.168.21.0/32 is subnetted, 1 subnets
O        192.168.21.1 [110/65] via 2.2.2.1, 01:18:05, Serial4/1
      192.168.22.0/32 is subnetted, 1 subnets
O        192.168.22.1 [110/65] via 2.2.2.1, 01:18:05, Serial4/1
      192.168.23.0/32 is subnetted, 1 subnets
O        192.168.23.1 [110/65] via 2.2.2.1, 01:18:05, Serial4/1


R1(config)#mpls label protocol ldp
R1(config)#mpls label range 99 199
R1(config)#mpls ldp router-id loopback 0
R1(config)#exit

R1(config)#interface serial 4/0
R1(config-if)#mpls ip
R1(config-if)#exit

R1(config)#interface serial 4/2
R1(config-if)#mpls ip
R1(config-if)#exit



R2(config)#mpls label protocol ldp
R2(config)#mpls label range 200 299
R2(config)#mpls ldp router-id loopback 0
R2(config)#exit

R2(config)#interface serial 4/0
R2(config-if)#mpls ip
R2(config-if)#exit

R2(config)#interface serial 4/1
R2(config-if)#mpls ip
R2(config-if)#exit


R3(config)#mpls label protocol ldp
R3(config)#mpls label range 300 399
R3(config)#mpls ldp router-id loopback 0
R3(config)#exit

R3(config)#interface serial 4/1
R3(config-if)#mpls ip
R3(config-if)#exit


R3(config)#interface serial 4/2
R3(config-if)#mpls ip
R3(config-if)#exit


R1#show mpls ldp neighbor
    Peer LDP Ident: 192.168.20.1:0; Local LDP Ident 192.168.10.1:0
        TCP connection: 192.168.20.1.41723 - 192.168.10.1.646
        State: Oper; Msgs sent/rcvd: 190/188; Downstream
        Up time: 02:23:12
        LDP discovery sources:
          Serial4/0, Src IP addr: 1.1.1.2
        Addresses bound to peer LDP Ident:
          20.1.1.1        1.1.1.2         2.2.2.1         192.168.20.1
          192.168.21.1    192.168.22.1    192.168.23.1
    Peer LDP Ident: 192.168.30.1:0; Local LDP Ident 192.168.10.1:0
        TCP connection: 192.168.30.1.27403 - 192.168.10.1.646
        State: Oper; Msgs sent/rcvd: 186/184; Downstream
        Up time: 02:20:31
        LDP discovery sources:
          Serial4/2, Src IP addr: 3.3.3.1
        Addresses bound to peer LDP Ident:
          2.2.2.2         3.3.3.1         192.168.30.1    192.168.31.1
          192.168.32.1    192.168.33.1



R2#show mpls ldp neighbor
    Peer LDP Ident: 192.168.10.1:0; Local LDP Ident 192.168.20.1:0
        TCP connection: 192.168.10.1.646 - 192.168.20.1.41723
        State: Oper; Msgs sent/rcvd: 189/192; Downstream
        Up time: 02:24:22
        LDP discovery sources:
          Serial4/0, Src IP addr: 1.1.1.1
        Addresses bound to peer LDP Ident:
          1.1.1.1         3.3.3.2         192.168.10.1    192.168.11.1
          192.168.12.1    192.168.13.1
    Peer LDP Ident: 192.168.30.1:0; Local LDP Ident 192.168.20.1:0
        TCP connection: 192.168.30.1.64637 - 192.168.20.1.646
        State: Oper; Msgs sent/rcvd: 187/189; Downstream
        Up time: 02:22:00
        LDP discovery sources:
          Serial4/1, Src IP addr: 2.2.2.2
        Addresses bound to peer LDP Ident:
          2.2.2.2         3.3.3.1         192.168.30.1    192.168.31.1
          192.168.32.1    192.168.33.1


R3#show mpls ldp neighbor
    Peer LDP Ident: 192.168.20.1:0; Local LDP Ident 192.168.30.1:0
        TCP connection: 192.168.20.1.646 - 192.168.30.1.64637
        State: Oper; Msgs sent/rcvd: 190/188; Downstream
        Up time: 02:22:52
        LDP discovery sources:
          Serial4/1, Src IP addr: 2.2.2.1
        Addresses bound to peer LDP Ident:
          20.1.1.1        1.1.1.2         2.2.2.1         192.168.20.1
          192.168.21.1    192.168.22.1    192.168.23.1
    Peer LDP Ident: 192.168.10.1:0; Local LDP Ident 192.168.30.1:0
        TCP connection: 192.168.10.1.646 - 192.168.30.1.27403
        State: Oper; Msgs sent/rcvd: 187/189; Downstream
        Up time: 02:22:33
        LDP discovery sources:
          Serial4/2, Src IP addr: 3.3.3.2
        Addresses bound to peer LDP Ident:
          1.1.1.1         3.3.3.2         192.168.10.1    192.168.11.1
          192.168.12.1    192.168.13.1

R(config)#ip vrf A-1
R1(config-vrf)#rd 500:1
R1(config-vrf)#route-target import 500:1
R1(config-vrf)#route-target export 500:1
R1(config-vrf)#exit


R3(config)#ip vrf A-2
R3(config-vrf)#rd 500:1
R3(config-vrf)#route-target both 500:1
R3(config-vrf)#exit

R1(config)#interface fastethernet 0/0
R1(config-if)#ip vrf forwarding A-1

% Interface FastEthernet0/0 IPv4 disabled and address(es) removed due to enabling VRF A-1

R1(config-if)#ip address 10.1.1.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#exit


R3(config)#interface fastethernet 0/0
R3(config-if)#ip vrf forwarding A-2

% Interface FastEthernet0/0 IPv4 disabled and address(es) removed due to enabling VRF A-2

R3(config-if)#ip address 30.1.1.1 255.0.0.0
R3(config-if)#exit

R1#show run | section vrf
ip vrf A-1
 rd 500:1
 route-target export 500:1
 route-target import 500:1
 ip vrf forwarding A-1


R3#show run | section vrf
ip vrf A-2
 rd 500:1
 route-target export 500:1
 route-target import 500:1
 ip vrf forwarding A-2

R1(config)#interface loopback 0
R1(config-if)# ip ospf network point-to-point
R1(config-if)#end

R3(config)#interface loopback 0
R3(config-if)# ip ospf network point-to-point
R3(config-if)#end


R4(config)#router ospf 1
R4(config-router)#network 192.168.40.0 255.0.0.0 area 0
R4(config-router)#network 10.0.0.0 0.255.255.255 area 0
R4(config-router)#end

R1(config)#router ospf 11 vrf A-1
R1(config-router)#network 10.0.0.0 0.255.255.255 area 0
R1(config-router)#exit

*Mar 20 00:18:20.379: %OSPF-5-ADJCHG: Process 11, Nbr 192.168.40.1 on FastEthernet0/0 from LOADING to FULL, Loading Done



R1#show ip ospf 1 neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.33.1      0   FULL/  -        00:00:33    3.3.3.1         Serial4/2
192.168.23.1      0   FULL/  -        00:00:38    1.1.1.2         Serial4/0
R1#show ip ospf 11 neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.40.1      1   FULL/DR         00:00:33    10.1.1.2        FastEthernet0/0

R1#show ip route vrf A-1 ospf

Routing Table: A-1
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      192.168.40.0/32 is subnetted, 1 subnets
O        192.168.40.1 [110/2] via 10.1.1.2, 00:01:43, FastEthernet0/0

R1#ping vrf A-1 192.168.40.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.40.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/46/100 ms



R5(config)#router ospf 1
R5(config-router)#network 192.168.50.0 255.0.0.0 area 0
R5(config-router)#network 30.0.0.0 0.255.255.255 area 0
R5(config-router)#end



R3(config)#router ospf 13 vrf A-2
R3(config-router)#network 30.0.0.0 0.255.255.255 area 0
R3(config-router)#end

*Mar 20 00:28:16.623: %OSPF-5-ADJCHG: Process 13, Nbr 192.168.50.1 on FastEthernet0/0 from LOADING to FULL, Loading Done




R3#show ip ospf 13 neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.50.1      1   FULL/DR         00:00:33    30.1.1.2        FastEthernet0/0


R3#show ip route vrf A-2 ospf

Routing Table: A-2
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      192.168.50.0/32 is subnetted, 1 subnets
O        192.168.50.1 [110/2] via 30.1.1.2, 00:01:24, FastEthernet0/0


R1(config)#router bgp 6500
R1(config-router)#no bgp default ipv4-unicast
R1(config-router)#neighbor 192.168.30.1 remote-as 6500
R1(config-router)#neighbor 192.168.30.1 update-source loopback 0
R1(config-router)#address-family vpnv4 unicast
R1(config-router-af)#neighbor 192.168.30.1 activate
R1(config-router-af)#neighbor 192.168.30.1 send-community extended
R1(config-router-af)#neighbor 192.168.30.1 next-hop-self
R1(config-router-af)#end


R3(config)#router bgp 6500
R3(config-router)#no bgp default ipv4-unicast
R3(config-router)#neighbor 192.168.10.1 remote-as 6500
R3(config-router)#neighbor 192.168.10.1 update-source loopback 0
R3(config-router)#address-family vpnv4 unicast
R3(config-router-af)#neighbor 192.168.10.1 activate
R3(config-router-af)#neighbor 192.168.10.1 send-community extended
R3(config-router-af)#neighbor 192.168.10.1 next-hop-self
R3(config-router-af)#end

*Mar 20 00:59:36.259: %BGP-5-ADJCHANGE: neighbor 192.168.10.1 Up



R1(config)#router bgp 6500
R1(config-router)#address-family ipv4 vrf A-1
R1(config-router-af)#redistribute ospf 11 vrf A-1 match ?
  external       Redistribute OSPF external routes
  internal       Redistribute OSPF internal routes
  nssa-external  Redistribute OSPF NSSA external routes

R1(config-router-af)#redistribute ospf 11 vrf A-1 match internal ?
  external       Redistribute OSPF external routes
  metric         Metric for redistributed routes
  nssa-external  Redistribute OSPF NSSA external routes
  route-map      Route map reference
  <cr>

R1(config-router-af)#redistribute ospf 11 vrf A-1 match internal external ?
  1              Redistribute external type 1 routes
  2              Redistribute external type 2 routes
  metric         Metric for redistributed routes
  nssa-external  Redistribute OSPF NSSA external routes
  route-map      Route map reference
  <cr>

R1(config-router-af)#$e ospf 11 vrf A-1 match internal external 1 external 2
R1(config-router-af)#end


R1(config)#router ospf 11 vrf A-1
R1(config-router)#redistribute bgp 6500 subnets
R1(config-router)#end


R3(config)#router bgp 6500
R3(config-router)#address-family ipv4 vrf A-2
R3(config-router-af)#$e ospf 13 vrf A-2 match internal external 1 external 2
R3(config-router-af)#end

(R3(config-router-af)#redistribute ospf 13 vrf A-2 match internal external 1 external 2)


R3(config)#router ospf 13 vrf A-2
R3(config-router)#redistribute bgp 6500 subnets

R3(config-router)#end


R1#show ip bgp vpnv4 all
BGP table version is 7, local router ID is 192.168.13.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found


     Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 500:1 (default for vrf A-1)
 *>  10.0.0.0         0.0.0.0                  0         32768 ?
 *>i 30.0.0.0         192.168.30.1             0    100      0 ?
 *>  192.168.40.1/32  10.1.1.2                 2         32768 ?
 *>i 192.168.50.1/32  192.168.30.1             2    100      0 ?

R1#show ip route vrf A-1

Routing Table: A-1
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.0.0.0/8 is directly connected, FastEthernet0/0
L        10.1.1.1/32 is directly connected, FastEthernet0/0
B     30.0.0.0/8 [200/0] via 192.168.30.1, 00:05:57
      192.168.40.0/32 is subnetted, 1 subnets
O        192.168.40.1 [110/2] via 10.1.1.2, 00:40:55, FastEthernet0/0
      192.168.50.0/32 is subnetted, 1 subnets
B        192.168.50.1 [200/2] via 192.168.30.1, 00:05:57

R1#show ip route vrf A-1 bgp

Routing Table: A-1
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

B     30.0.0.0/8 [200/0] via 192.168.30.1, 00:06:24
      192.168.50.0/32 is subnetted, 1 subnets
B        192.168.50.1 [200/2] via 192.168.30.1, 00:06:24

R1#ping vrf A-1 192.168.40.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.40.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/72/104 ms

R1#ping vrf A-1 192.168.50.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.50.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 104/144/248 ms




R3#show ip bgp vpnv4 all
BGP table version is 7, local router ID is 192.168.33.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 500:1 (default for vrf A-2)
 *>i 10.0.0.0         192.168.10.1             0    100      0 ?
 *>  30.0.0.0         0.0.0.0                  0         32768 ?
 *>i 192.168.40.1/32  192.168.10.1             2    100      0 ?
 *>  192.168.50.1/32  30.1.1.2                 2         32768 ?


R3#show ip route vrf A-2

Routing Table: A-2
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

B     10.0.0.0/8 [200/0] via 192.168.10.1, 00:14:56
      30.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        30.0.0.0/8 is directly connected, FastEthernet0/0
L        30.1.1.1/32 is directly connected, FastEthernet0/0
      192.168.40.0/32 is subnetted, 1 subnets
B        192.168.40.1 [200/2] via 192.168.10.1, 00:14:56
      192.168.50.0/32 is subnetted, 1 subnets
O        192.168.50.1 [110/2] via 30.1.1.2, 00:22:01, FastEthernet0/0

R3#show ip route vrf A-2 BGP

Routing Table: A-2
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

B     10.0.0.0/8 [200/0] via 192.168.10.1, 00:15:15
      192.168.40.0/32 is subnetted, 1 subnets
B        192.168.40.1 [200/2] via 192.168.10.1, 00:15:15



R3#ping vrf A-2 192.168.50.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.50.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/76/132 ms

R3#ping vrf A-2 192.168.40.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.40.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 68/108/152 ms

R4#ping 192.168.50.1 source 192.168.40.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.50.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.40.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 156/186/228 ms


R4#traceroute 192.168.50.1
Type escape sequence to abort.
Tracing the route to 192.168.50.1
VRF info: (vrf in name/id, vrf out name/id)
  1 10.1.1.1 108 msec 56 msec 104 msec
  2 30.1.1.1 [MPLS: Label 308 Exp 0] 84 msec 104 msec 104 msec
  3 30.1.1.2 172 msec 148 msec 128 msec

R5#ping 192.168.40.1 source 192.168.50.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.40.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.50.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 140/156/180 ms

R5#traceroute 192.168.40.1
Type escape sequence to abort.
Tracing the route to 192.168.40.1
VRF info: (vrf in name/id, vrf out name/id)
  1 30.1.1.1 36 msec 76 msec 56 msec
  2 10.1.1.1 [MPLS: Label 104 Exp 0] 180 msec 168 msec 56 msec
  3 10.1.1.2 180 msec 172 msec 228 msec


R4#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

O E2  30.0.0.0/8 [110/1] via 10.1.1.1, 00:15:14, FastEthernet0/0
      192.168.50.0/32 is subnetted, 1 subnets
O E2     192.168.50.1 [110/2] via 10.1.1.1, 00:15:14, FastEthernet0/0


R5#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set


O E2  10.0.0.0/8 [110/1] via 30.1.1.1, 00:12:07, FastEthernet0/0
      192.168.40.0/32 is subnetted, 1 subnets
O E2     192.168.40.1 [110/2] via 30.1.1.1, 00:12:07, FastEthernet0/0


Our Team

  • R.J AnthonyPython programmer / Instructor
  • Edgar C FrancisCCIE Technical Instructor/Network consultant
  • Noel AnthonyNetwork Automation / Instructor
  • J N AnthonyCCNA,CCNP / Instructor
  • Vikram ThakurComputer Hardware and Network Engineer