BGP个人实验记录
实验拓扑
按照拓扑图
R1-2-3为AS200,运行OSPF实现内网互通
R4为AS100,R5为AS300,使用环回口模拟业务网段,并宣告进bgp
R1配置
sys
sys R1
int g0/0/0
ip add 192.168.12.1 24
int g0/0/1
ip add 192.168.14.1 24
ospf 1 router-id 1.1.1.1
area 0
network 192.168.12.0 0.0.0.255
quit
quit
bgp 200
router-id 1.1.1.1
peer 192.168.14.4 as 100
peer 192.168.23.3 as 200
peer 192.168.23.3 next-hop-local
peer 192.168.12.2 as 200
peer 192.168.12.2 next-hop-local
R2配置
sys
sys R2
int g0/0/0
ip add 192.168.12.2 24
int g0/0/1
ip add 192.168.23.2 24
ospf 1 router-id 2.2.2.2
area 0
network 192.168.12.0 0.0.0.255
network 192.168.23.0 0.0.0.255
quit
bgp 200
router-id 2.2.2.2
peer 192.168.12.1 as 200
peer 192.168.23.3 as 200
R3配置
sys
sys R3
int g0/0/0
ip add 192.168.23.3 24
int g0/0/1
ip add 192.168.35.3 24
ospf 1 router-id 3.3.3.3
area 0
network 192.168.23.0 0.0.0.255
quit
quit
bgp 200
router-id 3.3.3.3
peer 192.168.12.1 as 200
peer 192.168.12.1 next-hop-local
peer 192.168.35.5 as 300
peer 192.168.23.2 as 200
peer 192.168.23.2 next-hop-local
R4配置
sys
sys R4
int g0/0/0
ip add 192.168.14.4 24
int lo0
ip add 10.10.4.4 32
bgp 100
router-id 4.4.4.4
peer 192.168.14.1 as 200
network 10.10.4.4 32
R5配置
sys
sys R5
int g0/0/0
ip add 192.168.35.5 24
int lo0
ip add 10.10.5.5 32
bgp 300
router-id 5.5.5.5
peer 192.168.35.3 as 200
network 10.10.5.5 32
查看邻居情况,以R1为例
display bgp peer
显示Established说明邻居已建立
查看bgp路由表情况
display bgp routing-table
测试业务网段互通
由于BGP只传递了业务网段路由,直接ping不通,必须使用-a带源PING,才能测试是否连通
标签:基本,200,int,ip,配置,192.168,BGP,add,peer From: https://blog.csdn.net/weixin_50709708/article/details/144965190