Bgp 配置
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Bgp 配置
R4:
router bgp 4
no synchronization
默认关闭同步(同步:是只有互联通信的路由器才能建立邻居,可以写默认或者跑IGP解决)
bgp router-id 4.4.4.4 //bgp router-id
bgp log-neighbor-changes
network 4.4.4.0 mask 255.255.255.0 //宣告网络(必须自己有,而且要精确匹配)neighbor 2.2.2.2 remote-as 1 //手动添加邻居
neighbor 2.2.2.2 ebgp-multihop 5 //ebgp默认ttl 为1,用环回口改大点才能
建邻居
neighbor 2.2.2.2 update-source Loopback0 //指定更新源环回口
no auto-summary
ip route 2.2.2.2 255.255.255.255 Serial0/0 //同步问题解决方案,写默认,确认能互联
R2:
router ospf 1
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 192.168.12.0 0.0.0.255 area 0
!
router bgp 1
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 next-hop-self //对ibgp邻居必须指定自己为宣
告路由的下一跳
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 4.4.4.4 remote-as 4
neighbor 4.4.4.4 ebgp-multihop 2 //ebgp 邻居改ttl
neighbor 4.4.4.4 update-source Loopback0
no auto-summary
ip route 4.4.4.4 255.255.255.255 Serial0/1
R1:
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 update-source Loopback0
no auto-summary
R3:
router ospf 1
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 192.168.13.0 0.0.0.255 area 0
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 next-hop-self
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
neighbor 2.2.2.2 next-hop-self
neighbor 5.5.5.5 remote-as 5
neighbor 5.5.5.5 ebgp-multihop 2 neighbor 5.5.5.5 update-source Loopback0 no auto-summary
ip route 5.5.5.5 255.255.255.255 Serial0/1
R5:
router bgp 5
no synchronization
bgp log-neighbor-changes
network 5.5.5.0 mask 255.255.255.0 network 192.168.35.0
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 ebgp-multihop 5 neighbor 3.3.3.3 update-source Loopback0 no auto-summary
ip route 3.3.3.3 255.255.255.255 Serial0/0