Mpls-*** 实验
实验拓扑图


hostname R1
ip vrf ***_a
rd 100:1
route-target export 100:1
route-target import 100:1
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Serial0/0
ip vrf forwarding ***_a
ip address 15.1.1.1 255.255.255.0
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial0/2
ip address 14.1.1.1 255.255.255.0
mpls ip
serial restart-delay 0
no dce-terminal-timing-enable
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.0 0.0.0.255 area 0
network 14.1.1.0 0.0.0.255 area 0
!
router rip
!
address-family ipv4 vrf ***_a
redistribute bgp 1234 metric 1
network 15.0.0.0
no auto-summary
version 2
exit-address-family
!
router bgp 1234
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 1234
neighbor 2.2.2.2 update-source Loopback0
neighbor 3.3.3.3 remote-as 1234
neighbor 3.3.3.3 update-source Loopback0
no auto-summary
!
address-family ***v4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community extended
exit-address-family
!
address-family ipv4 vrf ***_a
redistribute rip
no synchronization
exit-address-family
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
End
------------------------------------------------R2--------------------------
hostname R2
ip vrf ***_a
rd 100:1
route-target export 100:1
route-target import 100:1
!
ip vrf ***_b
rd 200:1
route-target export 200:1
route-target import 200:1
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Serial0/0
ip address 24.1.1.2 255.255.255.0
mpls ip
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial0/1
ip vrf forwarding ***_b
ip address 27.1.1.2 255.255.255.0
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial0/2
ip vrf forwarding ***_a
ip address 26.1.1.2 255.255.255.0
serial restart-delay 0
no dce-terminal-timing-enable
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 24.1.1.0 0.0.0.255 area 0
!
router rip
!
address-family ipv4 vrf ***_b
redistribute bgp 1234 metric 1
network 27.0.0.0
no auto-summary
version 2
exit-address-family
!
address-family ipv4 vrf ***_a
redistribute bgp 1234 metric 1
network 26.0.0.0
no auto-summary
version 2
exit-address-family
!
router bgp 1234
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 1234
neighbor 1.1.1.1 update-source Loopback0
neighbor 3.3.3.3 remote-as 1234
neighbor 3.3.3.3 update-source Loopback0
no auto-summary
!
address-family ***v4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community extended
exit-address-family
!
address-family ipv4 vrf ***_b
redistribute rip
no synchronization
exit-address-family
!
address-family ipv4 vrf ***_a
redistribute rip
no synchronization
exit-address-family
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
End
---------------------------------------R3-----------------------------------------
hostname R3
ip vrf ***_b
rd 200:1
route-target export 200:1
route-target import 200:1
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Serial0/0
ip vrf forwarding ***_b
ip address 38.1.1.3 255.255.255.0
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial0/1
ip address 34.1.1.3 255.255.255.0
mpls ip
serial restart-delay 0
no dce-terminal-timing-enable
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 34.1.1.0 0.0.0.255 area 0
!
router rip
!
address-family ipv4 vrf ***_b
redistribute bgp 1234 metric 1
network 38.0.0.0
no auto-summary
version 2
exit-address-family
!
router bgp 1234
no synchronization
bgp router-id 3.3.3.3
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 1234
neighbor 1.1.1.1 update-source Loopback0
neighbor 2.2.2.2 remote-as 1234
neighbor 2.2.2.2 update-source Loopback0
no auto-summary
!
address-family ***v4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended
exit-address-family
!
address-family ipv4 vrf ***_b
redistribute rip
no synchronization
exit-address-family
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
End
------------------------------------------R4----------------------------------
hostname R4
interface Serial0/0
ip address 24.1.1.4 255.255.255.0
mpls ip
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial0/1
ip address 34.1.1.4 255.255.255.0
mpls ip
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial0/2
ip address 14.1.1.4 255.255.255.0
mpls ip
serial restart-delay 0
no dce-terminal-timing-enable
!
router ospf 1
router-id 4.4.4.4
log-adjacency-changes
network 4.4.4.0 0.0.0.255 area 0
network 14.1.1.0 0.0.0.255 area 0
network 24.1.1.0 0.0.0.255 area 0
network 34.1.1.0 0.0.0.255 area 0
!
n
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
--------------------------------------------R5------------------------------------
hostname R5
!
interface Loopback0
ip address 5.5.5.5 255.255.255.0
!
interface Serial0/0
ip address 15.1.1.5 255.255.255.0
serial restart-delay 0
no dce-terminal-timing-enable
!
router rip
version 2
network 5.0.0.0
network 15.0.0.0
no auto-summary
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
End
----------------------------------R6-------------------------------------
hostname R6
interface Loopback0
ip address 6.6.6.6 255.255.255.0
!
interface Serial0/2
ip address 26.1.1.6 255.255.255.0
serial restart-delay 0
no dce-terminal-timing-enable
!
router rip
version 2
network 6.0.0.0
network 26.0.0.0
no auto-summary
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
End
-------------------------------R7----------------------------------
hostname R7
interface Loopback0
ip address 7.7.7.7 255.255.255.0
!
interface Serial0/1
ip address 27.1.1.7 255.255.255.0
serial restart-delay 0
no dce-terminal-timing-enable
router rip
version 2
network 7.0.0.0
network 27.0.0.0
no auto-summary
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
-------------------------------------------R8--------------------------
hostname R8
interface Loopback0
ip address 8.8.8.8 255.255.255.0
!
interface Serial0/0
ip address 38.1.1.8 255.255.255.0
serial restart-delay 0
no dce-terminal-timing-enable
!
router rip
version 2
network 8.0.0.0
network 38.0.0.0
no auto-summary
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
End