The case for MPLS VPN

The routers R1 and R5 use the dynamic routing protocol OSPF to advertise routes; R2 and R4 establish BGP neighbors, connect the interfaces of R1, R5, R6, and R7 to start the vrf space, configure MPLS-VPN, and generate the BGP table under VPNV4; R2, R3, R4 uses MPLS to prevent routing black holes. R2 and R4 obtain all routes through bidirectional re-broadcasting. R6 and R7 start BGP and maintain the same route-target value as R2 and R4, so that the entire network can communicate with each other.
The configuration is as follows:
The case for MPLS VPN
R1:
interface Loopback0
ip address 192.168.1.1 255.255.255.0
interface Serial1/1
ip address 192.168.2.1 255.255.255.0
router ospf 1
router-id 192.168.1.1
log-adjacency-changes
network 192.168.1.1 0.0.0.0 area
network 192.168.2.1 0.0.0.0 area 0
R2:
ip vrf 6
rd 100:6
route-target export 1:1
route-target import 1:1
ip vrf eilm
rd 100:1
route-target export 1:1
route-target import 1:1
ip vrf forwarding
ip cef
mpls label range 200 299

interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
ip vrf forwarding 6
ip address 26.1.1.2 255.255.255.0
duplex half
!
interface Serial1/0
ip vrf forwarding eilm
ip address 192.168.2.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 23.1.1.2 255.255.255.0
router eigrp 90
network 2.0.0.0
network 23.0.0.0
no auto-summary
!
router ospf 1 vrf eilm
router-id 2.2.2.2
log-adjacency-changes
redistribute bgp 1 subnets
network 192.168.2.2 0.0.0.0 area 0
!
router bgp 1
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 1
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 eilm
redistribute ospf 1
no auto-summary
no synchronization
exit-address-family
!
address-family ipv4 vrf 6
neighbor 26.1.1.6 remote-as 6
neighbor 26.1.1.6 activate
no auto-summary
no synchronization
exit-address-family
R3:
ip cef
mpls label range 300 399
interface Loopback0
ip address 3.3.3.3 255.255.255.0
interface Serial1/0
ip address 23.1.1.3 255.255.255.0
tag-switching ip
serial restart-delay 0
!
interface Serial1/1
ip address 34.1.1.3 255.255.255.0
router eigrp 90
network 3.0.0.0
network 23.0.0.0
network 34.0.0.0
no auto-summary
R4:

ip vrf 7
rd 100:7
route-target export 1:1
route-target import 1:1
!
ip vrf eason
rd 100:5
route-target export 1:1
route-target import 1:1
!
ip cef
mpls label range 400 499
interface Loopback0
ip address 4.4.4.4 255.255.255.0
!
interface FastEthernet0/0
ip vrf forwarding 7
ip address 47.1.1.4 255.255.255.0
duplex half
!
interface Serial1/0
ip address 34.1.1.4 255.255.255.0
tag-switching ip
serial restart-delay 0
!
interface Serial1/1
ip vrf forwarding eason
ip address 192.168.3.1 255.255.255.0
router eigrp 90
network 4.0.0.0
network 34.0.0.0
no auto-summary
!
router ospf 1 vrf eason
router-id 4.4.4.4
log-adjacency-changes
redistribute bgp 1 subnets
network 192.168.3.1 0.0.0.0 area 0
!
router bgp 1
no synchronization
bgp router-id 4.4.4.4
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community both
exit-address-family
!
address-family ipv4 vrf eason
redistribute ospf 1
no auto-summary
no synchronization
exit-address-family
!
address-family ipv4 vrf 7
neighbor 47.1.1.7 remote-as 7
neighbor 47.1.1.7 activate
no auto-summary
no synchronization
exit-address-family
R5:
interface Loopback0
ip address 192.168.4.1 255.255.255.0
interface Serial1/0
ip address 192.168.3.2 255.255.255.0
router ospf 1
router-id 192.168.4.1
log-adjacency-changes
network 192.168.3.2 0.0.0.0 area 0
network 192.168.4.1 0.0.0.0 area 0
R6:

interface Loopback0
ip address 6.6.6.6 255.255.255.0
!
interface FastEthernet0/0
ip address 26.1.1.6 255.255.255.0
router bgp 6
no synchronization
bgp router-id 6.6.6.6
bgp log-neighbor-changes
network 6.6.6.0 mask 255.255.255.0
neighbor 26.1.1.2 remote-as 1
no auto-summary
R7:
interface Loopback0
ip address 7.7.7.7 255.255.255.0
!
interface FastEthernet0/0
ip address 47.1.1.7 255.255.255.0
router bgp 7
no synchronization
bgp router-id 7.7.7.7
bgp log-neighbor-changes
network 7.7.7.0 mask 255.255.255.0
neighbor 47.1.1.4 remote-as 1
no auto-summary
Experimental results:

The case for MPLS VPN

The case for MPLS VPN

BGP table

The case for MPLS VPN

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324740179&siteId=291194637
VPN