R5就不接CE了,还用上面的loopback 10代替。
R1
hostname R1
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
no ip directed-broadcast
!
interface Loopback10
ip address 10.10.10.10 255.255.255.255
no ip directed-broadcast
!
interface Ethernet1/1
ip address 192.168.123.1 255.255.255.0
no ip directed-broadcast
full-duplex
!
ip route 0.0.0.0 0.0.0.0 192.168.123.23
R2
hostname R2
!
ip cef
ip vrf SiteA
rd 100:100
route-target export 100:100
route-target import 100:100
!
mpls label protocol ldp
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
no ip directed-broadcast
!
interface Ethernet1/1
ip vrf forwarding SiteA
ip address 192.168.123.2 255.255.255.0
no ip redirects
no ip directed-broadcast
full-duplex
standby ip 192.168.123.23
standby 1 track Ethernet1/4
!
interface Ethernet1/4
ip address 192.168.24.2 255.255.255.0
no ip directed-broadcast
full-duplex
tag-switching ip
!
router ospf 100
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 192.168.24.0 0.0.0.255 area 0
!
router bgp 100
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 100
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 SiteA
redistribute static
no synchronization
exit-address-family
!
ip route vrf SiteA 10.10.10.10 255.255.255.255 192.168.123.1
!
tag-switching
tdp router-id Loopback0
R3
hostname R3
!
ip cef
ip vrf SiteA
rd 100:100
route-target export 100:100
route-target import 100:100
!
mpls label protocol ldp
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
no ip directed-broadcast
!
interface Ethernet1/1
ip vrf forwarding SiteA
ip address 192.168.123.3 255.255.255.0
no ip redirects
no ip directed-broadcast
full-duplex
standby ip 192.168.123.23
standby 1 track Ethernet1/4
!
interface Ethernet1/4
ip address 192.168.34.3 255.255.255.0
no ip directed-broadcast
full-duplex
tag-switching ip
!
router ospf 100
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 192.168.34.0 0.0.0.255 area 0
!
router bgp 100
no synchronization
bgp router-id 3.3.3.3
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 100
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 SiteA
redistribute static
no synchronization
exit-address-family
!
ip route vrf SiteA 10.10.10.10 255.255.255.255 192.168.123.1
!
tag-switching tdp router-id Loopback0
R4
hostname R4
!
ip cef
mpls label protocol ldp
!
interface Loopback0
ip address 4.4.4.4 255.255.255.255
no ip directed-broadcast
!
interface Ethernet1/2
ip address 192.168.24.4 255.255.255.0
no ip directed-broadcast
full-duplex
tag-switching ip
!
interface Ethernet1/3
ip address 192.168.34.4 255.255.255.0
no ip directed-broadcast
full-duplex
tag-switching ip
!
interface Ethernet1/5
ip address 192.168.45.4 255.255.255.0
no ip directed-broadcast
full-duplex
tag-switching ip
!
router ospf 100
router-id 4.4.4.4
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 0
network 192.168.24.0 0.0.0.255 area 0
network 192.168.34.0 0.0.0.255 area 0
network 192.168.45.0 0.0.0.255 area 0
!
router bgp 100
no synchronization
bgp router-id 4.4.4.4
bgp log-neighbor-changes
neighbor PEER peer-group
neighbor PEER remote-as 100
neighbor PEER update-source Loopback0
neighbor PEER route-reflector-client
neighbor 2.2.2.2 peer-group PEER
neighbor 3.3.3.3 peer-group PEER
neighbor 5.5.5.5 peer-group PEER
no auto-summary
!
address-family vpnv4
neighbor PEER activate
neighbor PEER send-community extended
neighbor PEER route-reflector-client
neighbor 2.2.2.2 peer-group PEER
neighbor 3.3.3.3 peer-group PEER
neighbor 5.5.5.5 peer-group PEER
exit-address-family
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.0.79.254
!
tag-switching tdp router-id Loopback0
R5
hostname R5
!
ip cef
ip vrf SiteA
rd 100:100
route-target export 100:100
route-target import 100:100
!
mpls label protocol ldp
!
interface Loopback0
ip address 5.5.5.5 255.255.255.255
no ip directed-broadcast
!
interface Loopback10
ip vrf forwarding SiteA
ip address 50.50.50.50 255.255.255.255
no ip directed-broadcast
!
interface Ethernet1/4
ip address 192.168.45.5 255.255.255.0
no ip directed-broadcast
full-duplex
tag-switching ip
!
router ospf 100
router-id 5.5.5.5
log-adjacency-changes
network 5.5.5.5 0.0.0.0 area 0
network 192.168.45.0 0.0.0.255 area 0
!
router bgp 100
no synchronization
bgp router-id 5.5.5.5
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 100
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 SiteA
redistribute connected
no synchronization
exit-address-family
!
tag-switching tdp router-id Loopback0