该文档涉及的命令有:
neighbor [ip-address|peer-group-name] advertise-map [route-map-name1] non-exist-map [route-map-name2]
neighbor [ip-address|peer-group-name] default-originate
neighbor [ip-address|peer-group-name] default-originate route-map xxx
3-6-1 neighbor [ip-address|peer-group-name] advertise-map [route-map-name1] non-exist-map [route-map-name2]
这个命令实际上就是我们常说的条件路由。
如果强制性翻译成中文,比如下面的命令:
neighbor 172.17.1.2 advertise-map secondery non-exist-map primary
对于邻居172.17.1.2,如果route-map通告的路由primary已经不存在于BGP表中了,那么将会通告secondery route-map给172.17.1.2
Advertise-map的作用是:如果主要前缀在BGP表中显身,bgp路由器便不得将次要前缀通告给bgp对等体,要是主要前缀从bgp表中消失,那么便通告次要前缀。
在这个拓扑中,R1的配置为:
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Loopback1
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
ip address 172.17.1.1 255.255.255.0
duplex full
speed auto
!
router bgp 100
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
network 2.2.2.0 mask 255.255.255.0
neighbor 172.17.1.2 remote-as 100
no auto-summary
!
no ip http server
no ip http secure-server
!
R2的配置为:
interface FastEthernet0/0
ip address 172.17.1.2 255.255.255.0
duplex full
speed auto
!
router bgp 100
no synchronization
bgp log-neighbor-changes
neighbor 172.17.1.1 remote-as 100
no auto-summary
!