文档介绍:第九章 BGP
. Configuring BGP
提问在网络中启用 BGPPAN>
回答
Route1 在 AS 65500 中
Router1#configure terminal
Enter mands, one per line. End TL/Z.
Router1(config)#interface Serial0
Router1(config-if)#ip address
Router1(config-if)#exit
Router1(config)#router bgp 65500
Router1(config-router)#network
Router1(config-router)#neighbor remote-as 65501
Router1(config-router)#no synchronization
Router1(config-router)#exit
Router1(config)#end
Router1#
Router2 在 AS 65501 中
Router2#configure terminal
Enter mands, one per line. End TL/Z.
Router2(config)#interface Serial0
Router2(config-if)#ip address
Router2(config-if)#exit
Router2(config)#router bgp 65501
Router2(config-router)#network mask
Router2(config-router)#neighbor remote-as 65500
Router2(config-router)#no synchronization
Router2(config-router)#exit
Router2(config)#end
Router2#
注释在对 BGP 验证的时候比较有用的命令是
Router1#show ip bgp summary
BGP router identifier , local AS number 65500
BGP table version is 7, main routing table version 7
work entries and 4 paths using 484 bytes of memory
2 BGP path attribute entries using 196 bytes of memory
BGP activity 11/7 prefixes, 11/7 paths
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
4 65501 17 18 7 0 0 00:12:38 2
4 65531 527 526 0 0 0 21:05:23 Active
Router1#
需要注意的是理想状态是 State 里面是数字,尽管是 Active 也不代表是配置正常,反而是配置出现错误。
通过 neighbor update-source Loopback0 命令来限制 BGP 数据包源地址为回环地址,但要确
保此地址的连通性
. 使用 eBGP Multihop
提问配置外部 BGP,但是不是直连的路由器
回答
Router1#configure terminal
Enter mands, one per line. End TL/Z.
Router1(config)#ip route 2
Router1(config)#router bgp 65500
Router1(config-router)#neighbor remote-as 65530
Router1(config-router)#neighbor update-source Loopback0
Router1(c