網絡拓撲:redis
XRV1網絡
==============================================================oop
!
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
!ui
XRV2rest
==============================================================router
hostname XRV2
!server
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
!blog
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地址
==============================================================
配置要點:
1.在兩個ISP的邊界上寫一條下一跳並不是真實存在的路由,下一跳指向友商的真實的EBGP的接口地址
2.將上述靜態路由重分佈進ISIS路由
3.在邊界上經過前綴列表匹配須要進行IBGP負載的友商的路由
4.經過route-map進行修改須要進行IBGP負載的友商的路由的下一跳爲1的靜態的目標路由
5.在邊界上經過neighbor調用route-map修改下一跳後發佈給IBGP
6.IBGP鄰居受到從EBGP學習到的路由後便可實現負載