HCIP-15.1.3 BGP邻居建立(上)
OSPF静默接口将OSPF邻居断开,使用BGP选路
内部OSPF配置
R1:
router-id 1.1.1.1
ospf 1
a 5
net 1.1.1.0 0.0.0.255
net 1.1.2.0 0.0.0.255
net 10.1.12.0 0.0.0.255
R2:
router id 2.2.2.2
ospf 1
a 5
net 10.1.12.0 0.0.0.255
a 0
net 10.1.23.0 0.0.0.255
net 10.1.25.0 0.0.0.255
net 2.2.2.0 0.0.0.255
#
silent-int g0/0/1
silent-int g0/0/2 # 配置静默接口,不会从静默接口发送任何ospf报文
R3:
router id 3.3.3.3
ospf 1
a 0
net 10.1.23.0 0.0.0.255
net 10.1.34.0 0.0.0.255
net 3.3.3.0 0.0.0.255
#
silent-int g0/0/0
R4:
router-id 4.4.4.4
ospf 1
a 0
net 10.1.34.0 0.0.0.255
net 10.1.45.0 0.0.0.255
net 4.4.4.0 0.0.0.255
net 4.4.5.0 0.0.0.255
R5:
router id 5.5.5.5
ospf 1
a 0
net 10.1.25.0 0.0.0.255
met 10.1.45.0 0.0.0.255
net 5.5.5.5 0.0.0.0
#
silent-int g0/0/0
BGP配置
IBGP:相同AS(建议使用环回口建立)
EBGP:不同的AS
-
步骤1:建立邻居
-
步骤2:传递路由
-
步骤3:路由控制
R1:
bgp 100
router-id x.x.x.x # 全局已配置,此处可以不配
peer 2.2.2.2 as-number 100 # 邻居2.2.2.2所在的AS是100
pee 2.2.2.2 connect-interface loopback 0 # 指定更新源环回口地址
以上配置bgp报文源地址:1.1.1.1 目的地址:2.2.2.2
R2:
bgp 100
peer 1.1.1.1 as 100
peer 1.1.1.1 con loo 0
peer 10.1.23.3 as 200
pee 10.1.25.5 as 200 # EBGP不需要指定更新源
调试命令
dis bgp peer
<>reset bgp all # 重置BGP邻居关系
refresh bgp all exprot
dis tcp status
本文链接:https://www.orcy.net.cn/4136.html,转载请附上原文出处链接
发表评论