Fe2/0 of R1 and R3 is configured under vrf one and connected to R4 and R6 respectively.
Between R1 and R4, ldp is used for label binding, between R3 and R6, bgp is used for label binding with the command "neighbor x.x.x.x send-label"
In AS2, R5 and R7 are vpnv4 peers and provide l3vpn service to R15 and R16.
R1 Config
ip vrf one
rd 1:1
route-target export 1:1
route-target import 1:1
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet1/0
ip address 192.168.12.1 255.255.255.0
mpls ip
!
interface FastEthernet2/0
ip vrf forwarding one
ip address 192.168.14.1 255.255.255.0
mpls ip
!
router ospf 2 vrf one
log-adjacency-changes
redistribute bgp 1 subnets
network 192.168.14.1 0.0.0.0 area 0
!
router ospf 1
network 1.1.1.1 0.0.0.0 area 0
network 192.168.12.1 0.0.0.0 area 0
network 192.168.13.1 0.0.0.0 area 0
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
!
router bgp 1
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 update-source Loopback0
!
address-family ipv4
no synchronization
no auto-summary
exit-address-family
!
address-family vpnv4
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community extended
exit-address-family
!
address-family ipv4 vrf one
no synchronization
redistribute ospf 2 vrf one
exit-address-family
R2 Config
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.12.2 255.255.255.0
mpls ip
!
interface FastEthernet0/1
ip address 192.168.23.2 255.255.255.0
mpls ip
!
router ospf 1
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 192.168.12.2 0.0.0.0 area 0
network 192.168.23.2 0.0.0.0 area 0
!
R3 Config
ip vrf one
rd 1:1
route-target export 1:1
route-target import 1:1
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet1/1
ip address 192.168.23.3 255.255.255.0
mpls ip
mpls traffic-eng tunnels
ip rsvp bandwidth
!
interface FastEthernet2/0
ip vrf forwarding one
ip address 192.168.36.3 255.255.255.0
mpls bgp forwarding
!
router ospf 1
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 192.168.13.3 0.0.0.0 area 0
network 192.168.23.3 0.0.0.0 area 0
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
!
router bgp 1
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
!
address-family ipv4
no synchronization
no auto-summary
exit-address-family
!
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
exit-address-family
!
address-family ipv4 vrf one
no synchronization
neighbor 192.168.36.6 remote-as 2
neighbor 192.168.36.6 activate
neighbor 192.168.36.6 send-label
exit-address-family
R4 Config
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.14.4 255.255.255.0
mpls ip
!
interface FastEthernet0/1
ip address 192.168.45.4 255.255.255.0
mpls ip
!
router ospf 1
network 4.4.4.4 0.0.0.0 area 0
network 192.168.14.4 0.0.0.0 area 0
network 192.168.45.4 0.0.0.0 area 0
R5 Config
ip vrf two
rd 2:2
route-target export 2:2
route-target import 2:2
!
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface FastEthernet1/0
ip address 192.168.45.5 255.255.255.0
mpls ip
!
interface FastEthernet2/0
ip vrf forwarding two
ip address 192.168.155.5 255.255.255.0
!
router ospf 1
network 5.5.5.5 0.0.0.0 area 0
network 192.168.45.5 0.0.0.0 area 0
!
router bgp 2
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 7.7.7.7 remote-as 2
neighbor 7.7.7.7 update-source Loopback0
!
address-family ipv4
no synchronization
no auto-summary
exit-address-family
!
address-family vpnv4
neighbor 7.7.7.7 activate
neighbor 7.7.7.7 send-community extended
exit-address-family
!
address-family ipv4 vrf two
no synchronization
redistribute connected
redistribute static
exit-address-family
!
ip route vrf two 15.15.15.15 255.255.255.255 192.168.155.15
R6 Config
interface Loopback0
ip address 6.6.6.6 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.36.6 255.255.255.0
!
interface FastEthernet0/1
ip address 192.168.67.6 255.255.255.0
mpls ip
!
router ospf 1
redistribute bgp 2 subnets route-map AS2LOOPBACKS
network 6.6.6.6 0.0.0.0 area 0
network 192.168.67.6 0.0.0.0 area 0
!
router bgp 2
bgp log-neighbor-changes
neighbor 192.168.36.3 remote-as 1
!
address-family ipv4
redistribute ospf 1 route-map AS2LOOPBACKS
neighbor 192.168.36.3 activate
neighbor 192.168.36.3 send-label
no auto-summary
no synchronization
!
ip prefix-list AS2LOOPBACKS seq 5 permit 4.4.4.4/32
ip prefix-list AS2LOOPBACKS seq 10 permit 5.5.5.5/32
ip prefix-list AS2LOOPBACKS seq 15 permit 6.6.6.6/32
ip prefix-list AS2LOOPBACKS seq 20 permit 7.7.7.7/32
!
route-map AS2LOOPBACKS permit 10
match ip address prefix-list AS2LOOPBACKS
R7 Config
ip vrf two
rd 2:2
route-target export 2:2
route-target import 2:2
!
interface Loopback0
ip address 7.7.7.7 255.255.255.255
!
interface FastEthernet1/0
ip address 192.168.67.7 255.255.255.0
mpls ip
!
interface FastEthernet2/0
ip vrf forwarding two
ip address 192.168.167.7 255.255.255.0
!
router ospf 1
network 7.7.7.7 0.0.0.0 area 0
network 192.168.67.7 0.0.0.0 area 0
!
router bgp 2
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 5.5.5.5 remote-as 2
neighbor 5.5.5.5 update-source Loopback0
!
address-family ipv4
no synchronization
no auto-summary
exit-address-family
!
address-family vpnv4
neighbor 5.5.5.5 activate
neighbor 5.5.5.5 send-community extended
exit-address-family
!
address-family ipv4 vrf two
no synchronization
redistribute connected
redistribute static
exit-address-family
!
ip route vrf two 16.16.16.16 255.255.255.255 192.168.167.16
R15 Config
interface Loopback0
ip address 15.15.15.15 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.155.15 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.168.155.5
R16 Config
interface Loopback0
ip address 16.16.16.16 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.167.16 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.168.167.7
Verification
AS2 loopback networks used to peer vpnv4 session
R5#show ip route ospf
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/2] via 192.168.45.4, 03:36:16, FastEthernet1/0
6.0.0.0/32 is subnetted, 1 subnets
O E2 6.6.6.6 [110/1] via 192.168.45.4, 03:21:56, FastEthernet1/0
7.0.0.0/32 is subnetted, 1 subnets
O E2 7.7.7.7 [110/1] via 192.168.45.4, 03:21:56, FastEthernet1/0
O 192.168.14.0/24 [110/2] via 192.168.45.4, 03:36:06, FastEthernet1/0
R5#traceroute 7.7.7.7 source loopback 0
Type escape sequence to abort.
Tracing the route to 7.7.7.7
1 192.168.45.4 [MPLS: Label 18 Exp 0] 120 msec 104 msec 92 msec
2 192.168.14.1 [MPLS: Label 24 Exp 0] 136 msec 132 msec 100 msec
3 192.168.12.2 [MPLS: Labels 17/25 Exp 0] 112 msec 108 msec 100 msec
4 192.168.36.3 [MPLS: Label 25 Exp 0] 148 msec 140 msec 136 msec
5 192.168.36.6 [MPLS: Label 16 Exp 0] 132 msec 112 msec 128 msec
6 192.168.67.7 176 msec * 188 msec
R5#show mpls forwarding-table
20 18 7.7.7.7/32 0 Fa1/0 192.168.45.4
R4#show mpls forwarding-table
18 24 7.7.7.7/32 33425 Fa0/0 192.168.14.1
R1#show mpls forwarding-table
21 17 3.3.3.3/32 0 Fa1/0 192.168.12.2
R1#show bgp vpnv4 unicast all labels
7.7.7.7/32 3.3.3.3 nolabel/25
R3#show mpls forwarding-table
25 16 7.7.7.7/32[V] 41978 Fa2/0 192.168.36.6
l3vpn clients reachability
R15#ping 16.16.16.16 source loopback 0
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 96/108/144 ms
R15#traceroute 16.16.16.16 source loopback 0
1 192.168.155.5 12 msec 40 msec 20 msec
2 192.168.45.4 [MPLS: Labels 18/20 Exp 0] 120 msec 120 msec 68 msec
3 192.168.14.1 [MPLS: Labels 24/20 Exp 0] 112 msec 124 msec 136 msec
4 192.168.12.2 [MPLS: Labels 17/25/20 Exp 0] 104 msec 84 msec 60 msec
5 192.168.23.3 [MPLS: Labels 25/20 Exp 0] 120 msec 120 msec 88 msec
6 192.168.36.6 [MPLS: Labels 16/20 Exp 0] 104 msec 124 msec 96 msec
7 192.168.167.7 [MPLS: Label 20 Exp 0] 76 msec 108 msec 92 msec
8 192.168.167.16 112 msec * 124 msec
No comments:
Post a Comment