网络拓扑:
XRV1
==============================================================
!
hostname XRV1
!
interface Loopback0
ip address 220.198.32.1 255.255.255.255
ip router isis 100
!
interface Loopback1
ip address 114.114.1.1 255.255.255.255
!
interface GigabitEthernet1
ip address 10.10.1.1 255.255.255.252
ip router isis 100
negotiation auto
isis circuit-type level-2-only
!
interface GigabitEthernet2
ip address 10.10.1.9 255.255.255.252
ip router isis 100
negotiation auto
isis circuit-type level-2-only
!
interface GigabitEthernet3
ip address 10.10.1.17 255.255.255.252
ip router isis 100
negotiation auto
isis circuit-type level-2-only
!
router isis 100
net 49.0000.2201.9832.1000.00
is-type level-2-only
!
router bgp 4809
bgp router-id 220.198.32.1
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
network 114.114.1.1 mask 255.255.255.255
neighbor internal peer-group
neighbor internal password cisco
neighbor internal update-source Loopback0
neighbor 220.198.32.2 remote-as 4809
neighbor 220.198.32.2 peer-group internal
neighbor 220.198.32.3 remote-as 4809
neighbor 220.198.32.3 peer-group internal
neighbor 220.198.32.4 remote-as 4809
neighbor 220.198.32.4 peer-group internal
!
XRV2
==============================================================
hostname XRV2
!
interface Loopback0
ip address 220.198.32.2 255.255.255.255
ip router isis 100
!
interface Loopback1
ip address 114.114.1.2 255.255.255.255
!
interface GigabitEthernet1
ip address 10.10.1.2 255.255.255.252
ip router isis 100
negotiation auto
isis circuit-type level-2-only
!
interface GigabitEthernet2
ip address 10.10.1.13 255.255.255.252
ip router isis 100
negotiation auto
isis circuit-type level-2-only
!
interface GigabitEthernet3
ip address 10.10.1.21 255.255.255.252
ip router isis 100
negotiation auto
isis circuit-type level-2-only
!
router isis 100
net 49.0000.2201.9832.2000.00
is-type level-2-only
!
router bgp 4809
bgp router-id 220.198.32.2
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
network 114.114.1.2 mask 255.255.255.255
neighbor internal peer-group
neighbor internal password cisco
neighbor internal update-source Loopback0
neighbor 220.198.32.1 remote-as 4809
neighbor 220.198.32.1 peer-group internal
neighbor 220.198.32.3 remote-as 4809
neighbor 220.198.32.3 peer-group internal
neighbor 220.198.32.4 remote-as 4809
neighbor 220.198.32.4 peer-group internal
!
XRV3
==============================================================
!
hostname XRV3
!
interface Loopback0
ip address 220.198.32.3 255.255.255.255
ip router isis 100
!
interface Loopback1
ip address 114.114.1.3 255.255.255.255
!
interface GigabitEthernet1
ip address 10.10.1.5 255.255.255.252
ip router isis 100
negotiation auto
isis circuit-type level-2-only
!
interface GigabitEthernet2
ip address 10.10.1.10 255.255.255.252
ip router isis 100
negotiation auto
isis circuit-type level-2-only
!
interface GigabitEthernet3
ip address 10.10.1.22 255.255.255.252
ip router isis 100
negotiation auto
isis circuit-type level-2-only
!
interface GigabitEthernet4
ip address 123.103.15.1 255.255.255.252
negotiation auto
bfd interval 250 min_rx 250 multiplier 3
!
router isis 100
net 49.0000.2201.9832.3000.00
is-type level-2-only
redistribute static ip
!
router isis 1200
!
router bgp 4809
bgp router-id 220.198.32.3
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
network 114.114.1.3 mask 255.255.255.255
neighbor internal peer-group
neighbor internal password cisco
neighbor internal update-source Loopback0
neighbor internal next-hop-self
neighbor internal route-map external-import out
neighbor 123.103.15.2 remote-as 9808
neighbor 123.103.15.2 password cisco
neighbor 123.103.15.2 fall-over bfd
neighbor 220.198.32.1 remote-as 4809
neighbor 220.198.32.1 peer-group internal
neighbor 220.198.32.2 remote-as 4809
neighbor 220.198.32.2 peer-group internal
neighbor 220.198.32.4 remote-as 4809
neighbor 220.198.32.4 peer-group internal
!
!
virtual-service csr_mgmt
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
ip route 108.108.108.1 255.255.255.255 123.103.15.2
!
!
ip prefix-list external-import seq 5 permit 114.114.1.5/32
ip prefix-list external-import seq 10 permit 114.114.1.6/32
!
route-map external-import permit 10
match ip address prefix-list external-import
set ip next-hop 108.108.108.1
!
route-map external-import permit 20
!
XRV4
==============================================================
!
hostname XRV4
!
interface Loopback0
ip address 220.198.32.4 255.255.255.255
ip router isis 100
!
interface Loopback1
ip address 114.114.1.4 255.255.255.255
!
interface GigabitEthernet1
ip address 10.10.1.6 255.255.255.252
ip router isis 100
negotiation auto
isis circuit-type level-2-only
!
interface GigabitEthernet2
ip address 10.10.1.14 255.255.255.252
ip router isis 100
negotiation auto
isis circuit-type level-2-only
!
interface GigabitEthernet3
ip address 10.10.1.18 255.255.255.252
ip router isis 100
negotiation auto
isis circuit-type level-2-only
!
interface GigabitEthernet4
ip address 61.135.142.1 255.255.255.252
negotiation auto
bfd interval 250 min_rx 250 multiplier 3
!
router isis 100
net 49.0000.2201.9832.4000.00
is-type level-2-only
redistribute static ip
!
router bgp 4809
bgp router-id 220.198.32.4
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
network 114.114.1.4 mask 255.255.255.255
neighbor internal peer-group
neighbor internal password cisco
neighbor internal update-source Loopback0
neighbor internal next-hop-self
neighbor internal route-map external-import out
neighbor 61.135.142.2 remote-as 9808
neighbor 61.135.142.2 password cisco
neighbor 61.135.142.2 fall-over bfd
neighbor 220.198.32.1 remote-as 4809
neighbor 220.198.32.1 peer-group internal
neighbor 220.198.32.2 remote-as 4809
neighbor 220.198.32.2 peer-group internal
neighbor 220.198.32.3 remote-as 4809
neighbor 220.198.32.3 peer-group internal
!
!
virtual-service csr_mgmt
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
ip route 108.108.108.1 255.255.255.255 61.135.142.2
!
!
ip prefix-list external-import seq 5 permit 114.114.1.5/32
ip prefix-list external-import seq 10 permit 114.114.1.6/32
!
route-map external-import permit 10
match ip address prefix-list external-import
set ip next-hop 108.108.108.1
!
route-map external-import permit 20
!
XRV5
==============================================================
!
hostname XRV5
!
interface Loopback0
ip address 220.198.32.5 255.255.255.255
ip router isis 100
!
interface Loopback1
ip address 114.114.1.5 255.255.255.255
!
interface GigabitEthernet1
ip address 10.10.2.1 255.255.255.252
ip router isis 100
negotiation auto
isis circuit-type level-2-only
!
interface GigabitEthernet4
ip address 123.103.15.2 255.255.255.252
negotiation auto
bfd interval 250 min_rx 250 multiplier 3
!
router isis 100
net 49.0000.2201.9832.5000.00
is-type level-2-only
!
router bgp 9808
bgp router-id 220.198.32.5
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
network 114.114.1.5 mask 255.255.255.255
neighbor 123.103.15.1 remote-as 4809
neighbor 123.103.15.1 password cisco
neighbor 123.103.15.1 fall-over bfd
neighbor 220.198.32.6 remote-as 9808
neighbor 220.198.32.6 password cisco
neighbor 220.198.32.6 update-source Loopback0
neighbor 220.198.32.6 next-hop-self
!
XRV6
==============================================================
!
hostname XRV6
interface Loopback0
ip address 220.198.32.6 255.255.255.255
ip router isis 100
!
interface Loopback1
ip address 114.114.1.6 255.255.255.255
!
interface GigabitEthernet1
ip address 10.10.2.2 255.255.255.252
ip router isis 100
negotiation auto
isis circuit-type level-2-only
!
interface GigabitEthernet4
ip address 61.135.142.2 255.255.255.252
negotiation auto
bfd interval 250 min_rx 250 multiplier 3
!
router isis 100
net 49.0000.2201.9832.6000.00
is-type level-2-only
!
router bgp 9808
bgp router-id 220.198.32.6
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
network 114.114.1.6 mask 255.255.255.255
neighbor 61.135.142.1 remote-as 4809
neighbor 61.135.142.1 password cisco
neighbor 61.135.142.1 fall-over bfd
neighbor 220.198.32.5 remote-as 9808
neighbor 220.198.32.5 password cisco
neighbor 220.198.32.5 update-source Loopback0
neighbor 220.198.32.5 next-hop-self
!
在XRV1上使用show ip bgp 查看BGP路由表
==============================================================
在XRV1上使用tracert跟踪路由,源为XRV1的l1地址,目标为XRV5的l1地址
==============================================================
原文:https://www.cnblogs.com/networking/p/10809863.html