MPLS LAB ( vrf, vpn4, redistribución, ospf, bgp, rip, eigrp )
Este es un laboratorio bastante completo, donde el objetivo principal es entender el funcionamiento de la red MPLS dentro del área backbone.
Trayecto del paquete a verificar:
ping desde 172.16.4.1 en R4 --> 172.16.5.1 en R5- Se publica la red 172.16.4.1 en RIP que entra en R1 a la vrf VRF_A
- RIP se redistribuye dentro de BGP
- y este inyecta los paquetes dentro de VPNv4
- permitiendo atravesar el backbone por la red de MPLS y salir de la VPNv4 en R2
- en R2 se redistribuye dentro del segundo IGP (EIGRP para este caso), saliendo por la vrf VRF_A
- el cual le entrega el paquete a R5 que conoce la red destino.
R1
hostname R1
!
ip vrf VRF_A
rd 120:120
route-target export 20:20
route-target import 30:30
!
!
interface Loopback0
ip address 10.0.0.1 255.255.255.255
!
interface FastEthernet0/0
ip vrf forwarding VRF_A
ip address 10.0.14.1 255.255.255.0
!
interface FastEthernet0/1
ip address 10.0.13.1 255.255.255.0
mpls ip
!
interface FastEthernet1/0
ip address 10.0.12.1 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 1
log-adjacency-changes
network 10.0.0.1 0.0.0.0 area 0
network 10.0.12.0 0.0.0.255 area 0
network 10.0.13.0 0.0.0.255 area 0
!
router rip
!
address-family ipv4 vrf VRF_A
redistribute bgp 123 metric 2
network 10.0.0.0
no auto-summary
version 2
exit-address-family
!
router bgp 123
no synchronization
bgp log-neighbor-changes
neighbor 10.0.0.2 remote-as 123
neighbor 10.0.0.2 update-source Loopback0
neighbor 10.0.0.3 remote-as 123
neighbor 10.0.0.3 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 10.0.0.2 activate
neighbor 10.0.0.2 send-community extended
exit-address-family
!
address-family ipv4 vrf VRF_A
redistribute rip
no synchronization
exit-address-family
!
end
!
ip vrf VRF_A
rd 120:120
route-target export 20:20
route-target import 30:30
!
!
interface Loopback0
ip address 10.0.0.1 255.255.255.255
!
interface FastEthernet0/0
ip vrf forwarding VRF_A
ip address 10.0.14.1 255.255.255.0
!
interface FastEthernet0/1
ip address 10.0.13.1 255.255.255.0
mpls ip
!
interface FastEthernet1/0
ip address 10.0.12.1 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 1
log-adjacency-changes
network 10.0.0.1 0.0.0.0 area 0
network 10.0.12.0 0.0.0.255 area 0
network 10.0.13.0 0.0.0.255 area 0
!
router rip
!
address-family ipv4 vrf VRF_A
redistribute bgp 123 metric 2
network 10.0.0.0
no auto-summary
version 2
exit-address-family
!
router bgp 123
no synchronization
bgp log-neighbor-changes
neighbor 10.0.0.2 remote-as 123
neighbor 10.0.0.2 update-source Loopback0
neighbor 10.0.0.3 remote-as 123
neighbor 10.0.0.3 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 10.0.0.2 activate
neighbor 10.0.0.2 send-community extended
exit-address-family
!
address-family ipv4 vrf VRF_A
redistribute rip
no synchronization
exit-address-family
!
end
R4
hostname R4
!
interface Loopback0
ip address 10.0.0.4 255.255.255.255
!
interface Loopback4
ip address 172.16.4.1 255.255.255.0
!
interface FastEthernet0/0
ip address 10.0.14.4 255.255.255.0
!
router rip
version 2
network 10.0.0.0
network 172.16.0.0
no auto-summary
!
end
!
interface Loopback0
ip address 10.0.0.4 255.255.255.255
!
interface Loopback4
ip address 172.16.4.1 255.255.255.0
!
interface FastEthernet0/0
ip address 10.0.14.4 255.255.255.0
!
router rip
version 2
network 10.0.0.0
network 172.16.0.0
no auto-summary
!
end
R2
hostname R2
!
ip vrf VRF_A
rd 120:120
route-target export 30:30
route-target import 20:20
!
interface Loopback0
ip address 10.0.0.2 255.255.255.255
!
interface FastEthernet0/0
ip vrf forwarding VRF_A
ip address 10.0.25.2 255.255.255.0
!
interface FastEthernet0/1
ip address 10.0.23.2 255.255.255.0
mpls ip
!
interface FastEthernet1/0
ip address 10.0.12.2 255.255.255.0
mpls ip
!
router eigrp 1
no auto-summary
!
address-family ipv4 vrf VRF_A
redistribute bgp 123 metric 1 1 1 1 1
network 10.0.25.0 0.0.0.255
no auto-summary
autonomous-system 5
exit-address-family
!
router ospf 1
log-adjacency-changes
network 10.0.0.2 0.0.0.0 area 0
network 10.0.12.0 0.0.0.255 area 0
network 10.0.23.0 0.0.0.255 area 0
!
router bgp 123
no synchronization
bgp log-neighbor-changes
neighbor 10.0.0.1 remote-as 123
neighbor 10.0.0.1 update-source Loopback0
neighbor 10.0.0.3 remote-as 123
neighbor 10.0.0.3 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 send-community extended
exit-address-family
!
address-family ipv4 vrf VRF_A
redistribute eigrp 5
no synchronization
exit-address-family
!
end
!
ip vrf VRF_A
rd 120:120
route-target export 30:30
route-target import 20:20
!
interface Loopback0
ip address 10.0.0.2 255.255.255.255
!
interface FastEthernet0/0
ip vrf forwarding VRF_A
ip address 10.0.25.2 255.255.255.0
!
interface FastEthernet0/1
ip address 10.0.23.2 255.255.255.0
mpls ip
!
interface FastEthernet1/0
ip address 10.0.12.2 255.255.255.0
mpls ip
!
router eigrp 1
no auto-summary
!
address-family ipv4 vrf VRF_A
redistribute bgp 123 metric 1 1 1 1 1
network 10.0.25.0 0.0.0.255
no auto-summary
autonomous-system 5
exit-address-family
!
router ospf 1
log-adjacency-changes
network 10.0.0.2 0.0.0.0 area 0
network 10.0.12.0 0.0.0.255 area 0
network 10.0.23.0 0.0.0.255 area 0
!
router bgp 123
no synchronization
bgp log-neighbor-changes
neighbor 10.0.0.1 remote-as 123
neighbor 10.0.0.1 update-source Loopback0
neighbor 10.0.0.3 remote-as 123
neighbor 10.0.0.3 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 send-community extended
exit-address-family
!
address-family ipv4 vrf VRF_A
redistribute eigrp 5
no synchronization
exit-address-family
!
end
R5
hostname R5
!
interface Loopback0
ip address 10.0.0.5 255.255.255.255
!
interface Loopback5
ip address 172.16.5.1 255.255.255.0
!
interface FastEthernet0/0
ip address 10.0.25.5 255.255.255.0
!
router eigrp 5
network 10.0.0.5 0.0.0.0
network 10.0.25.0 0.0.0.255
network 172.16.5.0 0.0.0.0
no auto-summary
!
end
!
interface Loopback0
ip address 10.0.0.5 255.255.255.255
!
interface Loopback5
ip address 172.16.5.1 255.255.255.0
!
interface FastEthernet0/0
ip address 10.0.25.5 255.255.255.0
!
router eigrp 5
network 10.0.0.5 0.0.0.0
network 10.0.25.0 0.0.0.255
network 172.16.5.0 0.0.0.0
no auto-summary
!
end
R3
hostname R3
!
ip vrf VRF_A
rd 120:120
route-target export 30:30
route-target import 20:20
!
interface Loopback0
ip address 10.0.0.3 255.255.255.255
!
interface FastEthernet0/0
ip address 10.0.23.3 255.255.255.0
mpls ip
!
interface FastEthernet0/1
ip address 10.0.13.3 255.255.255.0
mpls ip
!
router ospf 1
log-adjacency-changes
network 10.0.0.3 0.0.0.0 area 0
network 10.0.13.0 0.0.0.255 area 0
network 10.0.23.0 0.0.0.255 area 0
!
router bgp 123
no synchronization
bgp log-neighbor-changes
neighbor 10.0.0.1 remote-as 123
neighbor 10.0.0.1 update-source Loopback0
neighbor 10.0.0.2 remote-as 123
neighbor 10.0.0.2 update-source Loopback0
no auto-summary
!
end
!
ip vrf VRF_A
rd 120:120
route-target export 30:30
route-target import 20:20
!
interface Loopback0
ip address 10.0.0.3 255.255.255.255
!
interface FastEthernet0/0
ip address 10.0.23.3 255.255.255.0
mpls ip
!
interface FastEthernet0/1
ip address 10.0.13.3 255.255.255.0
mpls ip
!
router ospf 1
log-adjacency-changes
network 10.0.0.3 0.0.0.0 area 0
network 10.0.13.0 0.0.0.255 area 0
network 10.0.23.0 0.0.0.255 area 0
!
router bgp 123
no synchronization
bgp log-neighbor-changes
neighbor 10.0.0.1 remote-as 123
neighbor 10.0.0.1 update-source Loopback0
neighbor 10.0.0.2 remote-as 123
neighbor 10.0.0.2 update-source Loopback0
no auto-summary
!
end