笔者昨天在CCIE群里听到朋友对我博客的评价:实例充足,理论欠缺!
回顾前几日的博客,我认为更为精准的评价应该是:理论和实例的配比失衡!
所以,笔者想要做一些补救,希望能够把以前理论多的添加实验部分,实验多的添加理论部分!
这里是对第四篇博文BGP相关的知识添加的BGP实例!
拓扑图如下:
配置如下:
R1:
interface Loopback0
ip address 172.16.0.1 255.255.255.0
!
interface Loopback1
ip address 172.16.1.1 255.255.255.0
!
interface Serial0/0
ip address 192.168.12.1 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router bgp 65530
no synchronization
bgp log-neighbor-changes
bgp confederation identifier 100
bgp confederation peers 65531
network 172.16.0.0 mask 255.255.255.0
network 172.16.1.0 mask 255.255.255.0
neighbor 192.168.12.2 remote-as 65531
no auto-summary
!
R2:
interface Serial0/0
ip address 192.168.12.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
ip address 192.168.23.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/2
ip address 192.168.24.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router bgp 65531
no synchronization
bgp log-neighbor-changes
bgp confederation identifier 100
bgp confederation peers 65530 65532
aggregate-address 172.16.0.0 255.255.254.0 as-set attribute-map attr suppress-map supp
aggregate-address 172.16.2.0 255.255.254.0 as-set attribute-map attr1
neighbor 192.168.12.1 remote-as 65530
neighbor 192.168.23.3 remote-as 65532
neighbor 192.168.24.4 remote-as 65531
no auto-summary
!
no ip http server
no ip http secure-server
!
!
!
access-list 1 permit 172.16.0.0
!
route-map supp permit 10
match ip address 1
!
route-map attr permit 10
set local-preference 99
!
route-map attr1 permit 10
set local-preference 99
R3:
interface Loopback0
ip address 172.16.2.1 255.255.255.0
!
interface Loopback1
ip address 172.16.3.1 255.255.255.0
!
interface Serial0/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/1
ip address 192.168.23.3 255.255.255.0
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router bgp 65532
no synchronization
bgp log-neighbor-changes
bgp confederation identifier 100
bgp confederation peers 65531
network 172.16.2.0 mask 255.255.255.0
network 172.16.3.0 mask 255.255.255.0
neighbor 192.168.23.2 remote-as 65531
no auto-summary
!
R4:
interface Serial0/1
ip address 192.168.45.4 255.255.255.0
serial restart-delay 0
!
interface Serial0/2
ip address 192.168.24.4 255.255.255.0
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router bgp 65531
no synchronization
bgp log-neighbor-changes
bgp confederation identifier 100
neighbor 192.168.24.2 remote-as 65531
neighbor 192.168.24.2 route-reflector-client
neighbor 192.168.45.5 remote-as 65531
no auto-summary
!
R5:
interface Serial0/0
ip address 192.168.56.5 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
ip address 192.168.45.5 255.255.255.0
serial restart-delay 0
!
interface Serial0/2
ip address 192.168.57.5 255.255.255.0
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router bgp 65531
no synchronization
bgp log-neighbor-changes
bgp confederation identifier 100
neighbor 192.168.45.4 remote-as 65531
neighbor 192.168.56.6 remote-as 200
neighbor 192.168.57.7 remote-as 300
neighbor 192.168.57.7 filter-list 10 in
no auto-summary
!
R6:
interface Serial0/0
ip address 192.168.56.6 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router bgp 200
no synchronization
bgp log-neighbor-changes
network 0.0.0.0
neighbor 192.168.56.5 remote-as 100
no auto-summary
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 Null0
R7:
interface Serial0/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
ip address 192.168.57.7 255.255.255.0
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router bgp 300
no synchronization
bgp log-neighbor-changes
redistribute static
neighbor 192.168.57.5 remote-as 100
default-information originate
no auto-summary
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 Null0