实验配置: (纯命令)
R1:
interface Loopback0
ip ospf 1 area 0
interface Ethernet0/0
ip ospf 1 area 0
mpls ip
router ospf 100
router-id 1.1.1.1
ip vrf R5
interface Ethernet0/1
ip vrf forwarding R5
ip address 15.1.1.1 255.255.255.0
ip vrf R5
rd 65001:5
route-target export 5:5
route-target import 6:6
ip vrf R9
interface Ethernet0/2
ip vrf forwarding R9
ip address 19.1.1.1 255.255.255.0
ip vrf R9
rd 65003:9
route-target export 9:9
route-target import 10:10
router bgp 100
bgp router-id 1.1.1.1
no bgp default ipv4-unicast
neighbor 3.3.3.3 remote-as 100
neighbor 3.3.3.3 update-source Loopback0
address-family vpnv4
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community extended
neighbor 3.3.3.3 next-hop-self
address-family ipv4 vrf R5
neighbor 15.1.1.5 remote-as 65001
neighbor 15.1.1.5 activate
address-family ipv4 vrf R9
neighbor 19.1.1.9 remote-as 65003
neighbor 19.1.1.9 activate
ip cef
mpls label protocol ldp
mpls ldp router-id Loopback0
R2:
interface Loopback0
ip ospf 1 area 0
interface Ethernet0/0
ip ospf 1 area 0
mpls ip
interface Ethernet0/1
ip address 23.1.1.2 255.255.255.0
ip ospf 1 area 0
mpls ip
router ospf 100
router-id 2.2.2.2
ip cef
mpls label protocol ldp
mpls ldp router-id Loopback0
R3:
interface Loopback0
ip ospf 100 area 0
interface Ethernet0/0
ip ospf 100 area 0
mpls ip
router ospf 100
router-id 3.3.3.3
ip vrf R10
interface Ethernet0/2
ip vrf forwarding R10
ip address 103.1.1.3 255.255.255.0
ip vrf R10
rd 65004:10
route-target export 10:10
route-target import 9:9
ip vrf R6
interface Ethernet0/1
ip vrf forwarding R6
ip address 36.1.1.3 255.255.255.0
ip vrf R6
rd 65002:6
route-target export 6:6
route-target import 5:5
router bgp 100
bgp router-id 3.3.3.3
no bgp default ipv4-unicast
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
neighbor 1.1.1.1 next-hop-self
address-family ipv4 vrf R10
neighbor 103.1.1.10 remote-as 65004
neighbor 103.1.1.10 activate
address-family ipv4 vrf R6
neighbor 36.1.1.6 remote-as 65002
neighbor 36.1.1.6 activate
ip cef
mpls label protocol ldp
mpls ldp router-id Loopback0
R4:
interface Loopback0
ip address 10.0.2.4 255.255.255.0
interface Ethernet0/0
ip address 10.0.0.4 255.255.255.0
router eigrp 100
network 10.0.0.4 0.0.0.0
network 10.0.2.4 0.0.0.0
R5:
router eigrp 100
network 10.0.0.5 0.0.0.0
redistribute bgp 65001 metric 1000 100 255 1 1500
router bgp 65001
bgp router-id 5.5.5.5
no bgp default ipv4-unicast
neighbor 15.1.1.1 remote-as 100
address-family ipv4
redistribute eigrp 100
neighbor 15.1.1.1 activate
R6:
router eigrp 100
network 10.0.1.6 0.0.0.0
redistribute bgp 65002 metric 1000 100 255 1 1500
router bgp 65002
bgp router-id 6.6.6.6
no bgp default ipv4-unicast
neighbor 36.1.1.3 remote-as 100
address-family ipv4
redistribute eigrp 100
neighbor 36.1.1.3 activate
R7:
router eigrp 100
network 10.0.1.7 0.0.0.0
network 10.0.3.7 0.0.0.0
R8:
router eigrp 100
network 10.0.0.8 0.0.0.0
network 10.0.2.8 0.0.0.0
R9
router eigrp 100
network 10.0.0.9 0.0.0.0
redistribute bgp 65003 metric 1000 100 255 1 1500
router bgp 65003
bgp router-id 9.9.9.9
no bgp default ipv4-unicast
neighbor 19.1.1.1 remote-as 100
address-family ipv4
redistribute eigrp 100
neighbor 19.1.1.1 activate
R10:
router eigrp 100
network 10.0.1.10 0.0.0.0
redistribute bgp 65004 metric 1000 100 255 1 1500
router bgp 65004
bgp router-id 10.10.10.10
no bgp default ipv4-unicast
neighbor 103.1.1.3 remote-as 100
address-family ipv4
redistribute eigrp 100
neighbor 103.1.1.3 activate
R11:
router eigrp 100
network 10.0.1.11 0.0.0.0
network 10.0.3.11 0.0.0.0