)
拓扑图CE1配置CE1#sh runBuilding configuration...Current configuration: 1075 bytesversion RG-NSE-Route(V1.06)hostname CE1!no cwmp!install 0 X86!sysmac 505d.a300.4201!webmaster level 0 username admin password 7 04361c0b370d!no service password-encryption!redundancy!vpdn limit_rate 15!vlan 1!interface GigabitEthernet 0/0ip address 12.1.1.1 255.255.255.0!interface GigabitEthernet 0/1!interface GigabitEthernet 0/2!interface GigabitEthernet 0/3!interface GigabitEthernet 0/4!interface GigabitEthernet 0/5!interface GigabitEthernet 0/6!interface GigabitEthernet 0/7!interface GigabitEthernet 0/8!interface GigabitEthernet 0/9!interface Loopback 0ip address 1.1.1.1 255.255.255.255!router bgp 100bgp log-neighbor-changesbgp graceful-restart restart-time 120bgp graceful-restart stalepath-time 360bgp graceful-restartneighbor 12.1.1.2 remote-as 200address-family ipv4network 1.1.1.1 mask 255.255.255.255neighbor 12.1.1.2 activateexit-address-family!line console 0logging synchronousline vty 0 4logging synchronouslogin!endCE1#PE1配置PE1#sh runBuilding configuration...Current configuration: 1660 bytesversion RG-NSE-Route(V1.06)hostname PE1!ip vrf aaard 1:1route-target both 100:1!no cwmp!install 0 X86!sysmac 5049.3b00.4301!webmaster level 0 username admin password 7 073f07221c1c!mpls ip!no service password-encryption!redundancy!vpdn limit_rate 15!vlan 1!interface GigabitEthernet 0/0ip vrf forwarding aaaip address 12.1.1.2 255.255.255.0!interface GigabitEthernet 0/1ip address 23.1.1.2 255.255.255.0mpls iplabel-switching!interface GigabitEthernet 0/2!interface GigabitEthernet 0/3!interface GigabitEthernet 0/4!interface GigabitEthernet 0/5!interface GigabitEthernet 0/6!interface GigabitEthernet 0/7!interface GigabitEthernet 0/8!interface GigabitEthernet 0/9!interface Loopback 0ip address 2.2.2.2 255.255.255.255!router bgp 200no bgp default ipv4-unicastbgp log-neighbor-changesbgp graceful-restart restart-time 120bgp graceful-restart stalepath-time 360bgp graceful-restartneighbor 4.4.4.4 remote-as 200neighbor 4.4.4.4 update-source Loopback 0address-family ipv4exit-address-familyaddress-family vpnv4 unicastneighbor 4.4.4.4 activateneighbor 4.4.4.4 send-community extendedexit-address-family!address-family ipv4 vrf aaaneighbor 12.1.1.1 remote-as 100neighbor 12.1.1.1 activateexit-address-family!router ospf 100graceful-restartnetwork 2.2.2.2 0.0.0.0 area 0network 23.1.1.2 0.0.0.0 area 0!mpls router ldpldp router-id interface Loopback 0graceful-restart!line console 0logging synchronousline vty 0 4logging synchronouslogin!endPE1#P1配置P1#sh runBuilding configuration...Current configuration: 1094 bytesversion RG-NSE-Route(V1.06)hostname P1!no cwmp!install 0 X86!sysmac 5063.0400.4101!webmaster level 0 username admin password 7 13041647042f!mpls ip!no service password-encryption!redundancy!vpdn limit_rate 15!vlan 1!interface GigabitEthernet 0/0ip address 23.1.1.3 255.255.255.0mpls iplabel-switching!interface GigabitEthernet 0/1ip address 34.1.1.3 255.255.255.0mpls iplabel-switching!interface GigabitEthernet 0/2!interface GigabitEthernet 0/3!interface GigabitEthernet 0/4!interface GigabitEthernet 0/5!interface GigabitEthernet 0/6!interface GigabitEthernet 0/7!interface GigabitEthernet 0/8!interface GigabitEthernet 0/9!interface Loopback 0ip address 3.3.3.3 255.255.255.255!router ospf 100graceful-restartnetwork 3.3.3.3 0.0.0.0 area 0network 23.1.1.3 0.0.0.0 area 0network 34.1.1.3 0.0.0.0 area 0!mpls router ldpldp router-id interface Loopback 0graceful-restart!line console 0logging synchronousline vty 0 4logging synchronouslogin!endP1#ASBR1配置ASBR1#sh runBuilding configuration...Current configuration: 1688 bytesversion RG-NSE-Route(V1.06)hostname ASBR1!no cwmp!install 0 X86!sysmac 5048.1700.4001!webmaster level 0 username admin password 7 004b244e4a39!mpls ip!no service password-encryption!redundancy!vpdn limit_rate 15!vlan 1!interface GigabitEthernet 0/0ip address 34.1.1.4 255.255.255.0mpls iplabel-switching!interface GigabitEthernet 0/1ip address 45.1.1.4 255.255.255.0label-switching!interface GigabitEthernet 0/2!interface GigabitEthernet 0/3!interface GigabitEthernet 0/4!interface GigabitEthernet 0/5!interface GigabitEthernet 0/6!interface GigabitEthernet 0/7!interface GigabitEthernet 0/8!interface GigabitEthernet 0/9!interface Loopback 0ip address 4.4.4.4 255.255.255.255!router bgp 200bgp router-id 4.4.4.4no bgp default ipv4-unicastbgp log-neighbor-changesbgp graceful-restart restart-time 120bgp graceful-restart stalepath-time 360bgp graceful-restartneighbor 2.2.2.2 remote-as 200neighbor 2.2.2.2 update-source Loopback 0neighbor 45.1.1.5 remote-as 300address-family ipv4exit-address-familyaddress-family vpnv4 unicastno bgp default route-target filterneighbor 2.2.2.2 activateneighbor 2.2.2.2 next-hop-self ////B的关键之处neighbor 2.2.2.2 send-community extendedneighbor 45.1.1.5 activateneighbor 45.1.1.5 send-community extendedexit-address-family!router ospf 100graceful-restartnetwork 4.4.4.4 0.0.0.0 area 0network 34.1.1.4 0.0.0.0 area 0!mpls router ldpldp router-id interface Loopback 0graceful-restart!line console 0logging synchronousline vty 0 4logging synchronouslogin!endASBR1#ASBR2配置ASBR2#sh runBuilding configuration...Current configuration: 1688 bytesversion RG-NSE-Route(V1.06)hostname ASBR2!no cwmp!install 0 X86!sysmac 505e.2300.2501!webmaster level 0 username admin password 7 092e111f2e0b!mpls ip!no service password-encryption!redundancy!vpdn limit_rate 15!vlan 1!interface GigabitEthernet 0/0ip address 45.1.1.5 255.255.255.0label-switching!interface GigabitEthernet 0/1ip address 56.1.1.5 255.255.255.0mpls iplabel-switching!interface GigabitEthernet 0/2!interface GigabitEthernet 0/3!interface GigabitEthernet 0/4!interface GigabitEthernet 0/5!interface GigabitEthernet 0/6!interface GigabitEthernet 0/7!interface GigabitEthernet 0/8!interface GigabitEthernet 0/9!interface Loopback 0ip address 5.5.5.5 255.255.255.255!router bgp 300bgp router-id 5.5.5.5no bgp default ipv4-unicastbgp log-neighbor-changesbgp graceful-restart restart-time 120bgp graceful-restart stalepath-time 360bgp graceful-restartneighbor 7.7.7.7 remote-as 300neighbor 7.7.7.7 update-source Loopback 0neighbor 45.1.1.4 remote-as 200address-family ipv4exit-address-familyaddress-family vpnv4 unicastno bgp default route-target filterneighbor 7.7.7.7 activateneighbor 7.7.7.7 next-hop-self //关键之处neighbor 7.7.7.7 send-community extendedneighbor 45.1.1.4 activateneighbor 45.1.1.4 send-community extendedexit-address-family!router ospf 100graceful-restartnetwork 5.5.5.5 0.0.0.0 area 0network 56.1.1.5 0.0.0.0 area 0!mpls router ldpldp router-id interface Loopback 0graceful-restart!line console 0logging synchronousline vty 0 4logging synchronouslogin!endASBR2#P2配置P2#sh runBuilding configuration...Current configuration: 1094 bytesversion RG-NSE-Route(V1.06)hostname P2!no cwmp!install 0 X86!sysmac 50b5.fb00.2601!webmaster level 0 username admin password 7 092e111f2e0b!mpls ip!no service password-encryption!redundancy!vpdn limit_rate 15!vlan 1!interface GigabitEthernet 0/0ip address 56.1.1.6 255.255.255.0mpls iplabel-switching!interface GigabitEthernet 0/1ip address 67.1.1.6 255.255.255.0mpls iplabel-switching!interface GigabitEthernet 0/2!interface GigabitEthernet 0/3!interface GigabitEthernet 0/4!interface GigabitEthernet 0/5!interface GigabitEthernet 0/6!interface GigabitEthernet 0/7!interface GigabitEthernet 0/8!interface GigabitEthernet 0/9!interface Loopback 0ip address 6.6.6.6 255.255.255.255!router ospf 100graceful-restartnetwork 6.6.6.6 0.0.0.0 area 0network 56.1.1.6 0.0.0.0 area 0network 67.1.1.6 0.0.0.0 area 0!mpls router ldpldp router-id interface Loopback 0graceful-restart!line console 0logging synchronousline vty 0 4logging synchronouslogin!endP2#PE2配置PE2#sh runBuilding configuration...Current configuration: 1713 bytesversion RG-NSE-Route(V1.06)hostname PE2!ip vrf bbbrd 1:2route-target both 100:1!no cwmp!install 0 X86!sysmac 50a2.e700.2701!webmaster level 0 username admin password 7 073f07221c1c!mpls ip!no service password-encryption!redundancy!vpdn limit_rate 15!vlan 1!interface GigabitEthernet 0/0ip address 67.1.1.7 255.255.255.0mpls iplabel-switching!interface GigabitEthernet 0/1ip vrf forwarding bbbip address 78.1.1.7 255.255.255.0!interface GigabitEthernet 0/2!interface GigabitEthernet 0/3!interface GigabitEthernet 0/4!interface GigabitEthernet 0/5!interface GigabitEthernet 0/6!interface GigabitEthernet 0/7!interface GigabitEthernet 0/8!interface GigabitEthernet 0/9!interface Loopback 0ip address 7.7.7.7 255.255.255.255!router bgp 300bgp router-id 7.7.7.7no bgp default ipv4-unicastbgp log-neighbor-changesbgp graceful-restart restart-time 120bgp graceful-restart stalepath-time 360bgp graceful-restartneighbor 5.5.5.5 remote-as 300neighbor 5.5.5.5 update-source Loopback 0address-family ipv4neighbor 5.5.5.5 activateexit-address-familyaddress-family vpnv4 unicastneighbor 5.5.5.5 activateneighbor 5.5.5.5 send-community extendedexit-address-family!address-family ipv4 vrf bbbneighbor 78.1.1.8 remote-as 400neighbor 78.1.1.8 activateexit-address-family!router ospf 100graceful-restartnetwork 7.7.7.7 0.0.0.0 area 0network 67.1.1.7 0.0.0.0 area 0!mpls router ldpldp router-id interface Loopback 0graceful-restart!line console 0logging synchronousline vty 0 4logging synchronouslogin!endPE2#CE2配置CE2#sh runBuilding configuration...Current configuration: 1099 bytesversion RG-NSE-Route(V1.06)hostname CE2!no cwmp!install 0 X86!sysmac 5045.c400.2b01!webmaster level 0 username admin password 7 154b092c1b25!no service password-encryption!redundancy!vpdn limit_rate 15!vlan 1!interface GigabitEthernet 0/0ip address 78.1.1.8 255.255.255.0!interface GigabitEthernet 0/1!interface GigabitEthernet 0/2!interface GigabitEthernet 0/3!interface GigabitEthernet 0/4!interface GigabitEthernet 0/5!interface GigabitEthernet 0/6!interface GigabitEthernet 0/7!interface GigabitEthernet 0/8!interface GigabitEthernet 0/9!interface Loopback 0ip address 8.8.8.8 255.255.255.255!router bgp 400bgp router-id 8.8.8.8bgp log-neighbor-changesbgp graceful-restart restart-time 120bgp graceful-restart stalepath-time 360bgp graceful-restartneighbor 78.1.1.7 remote-as 300address-family ipv4network 8.8.8.8 mask 255.255.255.255neighbor 78.1.1.7 activateexit-address-family!line console 0logging synchronousline vty 0 4logging synchronouslogin!endCE2#希望对你有所帮助 那样我会很开心