<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
跨域××× 组网实例-OptionB
组网需求
R1 和R6 属于同一个×××。R1 通过AS100 的R2 接入,R6 通过AS200 的R5 接入。采用OptionB方式实现跨域的BGP/MPLS ×××.
r1#show run
hostname r1
!
no ip domain lookup
!
ip cef
!
interface Loopback0
ip address 10.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 1.1.1.1 255.255.255.0
duplex half
!
router bgp 1000
no synchronization
bgp log-neighbor-changes
redistribute connected
neighbor 1.1.1.2 remote-as 100
no auto-summary
!
r2#show run
hostname r2
!
no ip domain lookup
!
ip vrf ***
rd 100:1
route-target export 100:1
route-target import 100:1
!
ip cef
!
interface Loopback0
ip address 20.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip vrf forwarding ***
ip address 1.1.1.2 255.255.255.0
duplex half
!
interface FastEthernet1/0
ip address 2.1.1.1 255.255.255.0
duplex half
tag-switching ip
!
router ospf 1
log-adjacency-changes
network 2.1.1.0 0.0.0.255 area 0
network 20.1.1.1 0.0.0.0 area 0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
neighbor 30.1.1.1 remote-as 100
neighbor 30.1.1.1 update-source Loopback0
no auto-summary
!
address-family ***v4
neighbor 30.1.1.1 activate
neighbor 30.1.1.1 send-community extended
exit-address-family
!
address-family ipv4 vrf ***
redistribute connected
neighbor 1.1.1.1 remote-as 1000
neighbor 1.1.1.1 activate
no auto-summary
no synchronization
exit-address-family
r3#show run
hostname r3
!
no ip domain lookup
!
ip cef
!
interface Loopback0
ip address 30.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 3.1.1.1 255.255.255.0
duplex half
tag-switching ip
!
interface FastEthernet1/0
ip address 2.1.1.2 255.255.255.0
duplex half
tag-switching ip
!
router ospf 1
log-adjacency-changes
network 2.1.1.0 0.0.0.255 area 0
network 30.1.1.1 0.0.0.0 area 0
!
router bgp 100
no synchronization
no bgp default route-target filter
bgp log-neighbor-changes
neighbor 3.1.1.2 remote-as 200
neighbor 20.1.1.1 remote-as 100
neighbor 20.1.1.1 update-source Loopback0
no auto-summary
!
address-family ***v4
neighbor 3.1.1.2 activate
neighbor 3.1.1.2 send-community extended
neighbor 20.1.1.1 activate
neighbor 20.1.1.1 next-hop-self
neighbor 20.1.1.1 send-community extended
bgp dampening
exit-address-family
r4# show run
hostname r4
!
no ip domain lookup
!
ip cef
!
interface Loopback0
ip address 40.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 3.1.1.2 255.255.255.0
duplex half
!
interface FastEthernet1/0
ip address 4.1.1.1 255.255.255.0
duplex half
tag-switching ip
!
router ospf 1
log-adjacency-changes
network 4.1.1.1 0.0.0.0 area 0
network 40.1.1.1 0.0.0.0 area 0
!
router bgp 200
no synchronization
no bgp default route-target filter
bgp log-neighbor-changes
neighbor 3.1.1.1 remote-as 100
neighbor 50.1.1.1 remote-as 200
neighbor 50.1.1.1 update-source Loopback0
no auto-summary
!
address-family ***v4
neighbor 3.1.1.1 activate
neighbor 3.1.1.1 send-community extended
neighbor 50.1.1.1 activate
neighbor 50.1.1.1 next-hop-self
neighbor 50.1.1.1 send-community extended
bgp dampening
exit-address-family
r5#show run
hostname r5
!
no ip domain lookup
!
ip vrf ***
rd 200:1
route-target export 100:1
route-target import 100:1
!
ip cef
!
interface Loopback0
ip address 50.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip vrf forwarding ***
ip address 5.1.1.1 255.255.255.0
duplex half
!
interface FastEthernet1/0
ip address 4.1.1.2 255.255.255.0
duplex half
tag-switching ip
!
router ospf 1
log-adjacency-changes
network 4.1.1.2 0.0.0.0 area 0
network 50.1.1.1 0.0.0.0 area 0
!
router bgp 200
no synchronization
bgp log-neighbor-changes
neighbor 40.1.1.1 remote-as 200
neighbor 40.1.1.1 update-source Loopback0
no auto-summary
!
address-family ***v4
neighbor 40.1.1.1 activate
neighbor 40.1.1.1 send-community extended
exit-address-family
!
address-family ipv4 vrf ***
redistribute connected
neighbor 5.1.1.2 remote-as 1
neighbor 5.1.1.2 activate
no auto-summary
no synchronization
exit-address-family
r6#show run
hostname r6
!
no ip domain lookup
!
ip cef
!
interface Loopback0
ip address 60.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 5.1.1.2 255.255.255.0
duplex half
!
interface FastEthernet1/0
no ip address
shutdown
duplex half
!
router bgp 1
no synchronization
bgp log-neighbor-changes
redistribute connected
neighbor 5.1.1.1 remote-as 200
no auto-summary
转载于:https://blog.51cto.com/zwmy1021/96175