Friday, June 1, 2012

Using GNS3 to create an MPLS VRF Lab



OBJECTIVE: To be able to ping from end to end on each individual VRF: e.g from R5 to R0 using the  10.3.3.0 subnet. Note that on R7, a similar subnet exists:



 ______________________________________________

R0

hostname Router0
!
!
ip cef
!
!
interface Loopback0
 ip address 10.1.1.1 255.255.255.0
!
!
interface Ethernet1/0
 ip address 192.168.15.6 255.255.255.0
no shut
!
!
router eigrp 1
 network 10.0.0.0
 network 192.168.15.0
 no auto-summary
_______________________________










R1

hostname Router1
!
!
ip cef
!
ip vrf Cust-A
 rd 1:111
 route-target export 1:100
 route-target import 1:100
!
ip vrf Cust-B
 rd 2:222
 route-target export 2:200
 route-target import 2:200
!
mpls label protocol ldp
!
!
!
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
!
interface Ethernet1/0
 ip vrf forwarding Cust-A
 ip address 192.168.15.3 255.255.255.0
 duplex half
!
!
interface Serial2/0
 ip address 10.32.12.1 255.255.255.0
 mpls ip
 serial restart-delay 0
!
interface Serial2/1
 ip address 10.32.14.1 255.255.255.0
 mpls ip
 serial restart-delay 0
!
!
interface FastEthernet3/0
 ip vrf forwarding Cust-B
 ip address 192.168.16.3 255.255.255.0
 duplex auto
 speed auto
!
!
router eigrp 1
 network 4.4.4.4 0.0.0.0
 network 10.32.12.0 0.0.0.255
 network 10.32.14.0 0.0.0.255
 network 10.32.15.0 0.0.0.255
 network 10.32.16.0 0.0.0.255
 no auto-summary
!
router eigrp 65001
 no auto-summary
 !
 address-family ipv4 vrf Cust-B
 redistribute bgp 65001 metric 10000 1000 255 1 1500
 network 192.168.16.3 0.0.0.0
 no auto-summary
 autonomous-system 1
 exit-address-family
 !
 address-family ipv4 vrf Cust-A
 redistribute bgp 65001 metric 10000 1000 255 1 1500
 network 192.168.15.3 0.0.0.0
 no auto-summary
 autonomous-system 1
 exit-address-family
!
router bgp 65001
 no synchronization
 bgp log-neighbor-changes
 neighbor 3.3.3.3 remote-as 65001
 neighbor 3.3.3.3 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 3.3.3.3 activate
 neighbor 3.3.3.3 send-community both
 exit-address-family
 !
 address-family ipv4 vrf Cust-B
 redistribute eigrp 1
 no synchronization
 exit-address-family
 !
 address-family ipv4 vrf Cust-A
 redistribute eigrp 1
 no synchronization
 exit-address-family
!
-____________________________________________________

R2

hostname Router2
!
ip cef
!
!
mpls label protocol ldp
!
!
interface Serial1/0
 ip address 10.32.12.2 255.255.255.0
 mpls ip
 serial restart-delay 0
no shut
!
interface Serial1/1
 ip address 10.32.23.2 255.255.255.0
 mpls ip
 serial restart-delay 0
no shut
!
interface Serial1/2
 ip address 10.32.24.2 255.255.255.0
 mpls ip
 serial restart-delay 0
no shut
!
!
router eigrp 1
 network 10.32.12.0 0.0.0.255
 network 10.32.23.0 0.0.0.255
 network 10.32.24.0 0.0.0.255
 no auto-summary
!
_______________________________________________________

R3


hostname Router3
!
!
ip cef
!
!
mpls label protocol ldp
!
!
interface Serial1/0
 ip address 10.32.14.4 255.255.255.0
 mpls ip
 serial restart-delay 0
no shut
!
interface Serial1/1
 ip address 10.32.34.4 255.255.255.0
 mpls ip
 serial restart-delay 0
no shut
!
interface Serial1/2
 ip address 10.32.24.4 255.255.255.0
 mpls ip
 serial restart-delay 0
no shut
!
!
router eigrp 1
 network 10.32.14.0 0.0.0.255
 network 10.32.24.0 0.0.0.255
 network 10.32.34.0 0.0.0.255
 no auto-summary
!
!___________________________________

R4
hostname Router4
!
ip cef
!
!
ip vrf Cust-A
 rd 1:111
 route-target export 1:100
 route-target import 1:100
!
ip vrf Cust-B
 rd 2:222
 route-target export 2:200
 route-target import 2:200
!
mpls label protocol ldp
!
!
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
!
interface Serial1/0
 ip address 10.32.34.3 255.255.255.0
 mpls ip
 serial restart-delay 0
no shut
!
interface Serial1/1
 ip address 10.32.23.3 255.255.255.0
no shutdown
 mpls ip
 serial restart-delay 0
no shut
!
!
interface FastEthernet2/0
 ip vrf forwarding Cust-A
 ip address 192.168.37.3 255.255.255.0
 duplex auto
 speed auto
no shut
!
interface FastEthernet2/1
 ip vrf forwarding Cust-B
 ip address 192.168.38.3 255.255.255.0
 duplex auto
 speed auto
no shut
!
router eigrp 1
 network 3.3.3.3 0.0.0.0
 network 10.32.23.0 0.0.0.255
 network 10.32.34.0 0.0.0.255
 network 10.32.36.0 0.0.0.255
 network 10.32.38.0 0.0.0.255
 no auto-summary
!
router eigrp 65001
 auto-summary
 !
 address-family ipv4 vrf Cust-B
 redistribute bgp 65001 metric 10000 1000 255 1 1500
 network 192.168.38.3 0.0.0.0
 no auto-summary
 autonomous-system 1
 exit-address-family
 !
 address-family ipv4 vrf Cust-A
 redistribute bgp 65001 metric 10000 1000 255 1 1500
 network 192.168.37.3 0.0.0.0
 no auto-summary
 autonomous-system 1
 exit-address-family
!
router bgp 65001
 no synchronization
 bgp log-neighbor-changes
 neighbor 4.4.4.4 remote-as 65001
 neighbor 4.4.4.4 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 4.4.4.4 activate
 neighbor 4.4.4.4 send-community both
 exit-address-family
 !
 address-family ipv4 vrf Cust-B
 redistribute eigrp 1
 no synchronization
 exit-address-family
 !
 address-family ipv4 vrf Cust-A
 redistribute eigrp 1
 no synchronization
 exit-address-family
!
______________________________________

R5

hostname Router5
ip cef
!
!
interface Loopback0
 ip address 10.3.3.10 255.255.255.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
no shut
!
interface FastEthernet1/0
 ip address 192.168.37.6 255.255.255.0
 duplex auto
 speed auto
no shut
!
!
router eigrp 1
 network 10.3.3.0 0.0.0.255
 network 192.168.37.0
 auto-summary
!
!
______________________________________
R6
hostname Router6
!
ip cef
!
!
interface Loopback0
 ip address 10.2.2.1 255.255.255.0
no shut
!
!
interface FastEthernet1/0
 ip address 192.168.16.6 255.255.255.0
 duplex auto
 speed auto
no shut
!
!
router eigrp 1
 network 10.2.2.0 0.0.0.255
 network 192.168.16.0
 no auto-summary
!
!
_____________________________________

R7

hostname Router7
!
ip cef
!
!
!
interface Loopback0
 ip address 10.3.3.1 255.255.255.0
no shut
!
!
interface FastEthernet1/0
 ip address 192.168.38.6 255.255.255.0
 duplex auto
 speed auto
no shut
!
!
router eigrp 1
 network 10.0.0.0
 network 192.168.38.0
 no auto-summary
!
____________________________________

1 comment: