1、配置ip
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.16.12.1 24
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 1.1.1.1 24
其余路由器均类似于r1
2、配置OSPF
仅R2,R3,R4配置OSPF
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
修改接口类型为广播型
[r4]interface LoopBack 0
[r4-LoopBack0]ospf network-type broadcast
3、建立邻居关系
建立BGP邻居关系
[r1]bgp
[r1-bgp] router-id 1.1.1.1
[r1-bgp]peer 192.16.12.2 as-number 2
建立IBGP邻居关系
[r2]bgp 2
[r2-bgp]peer 3.3.3.3 as-number 2
多链路的EBGP邻居关系
[r4]ip route-static 5.5.5.0 24 192.16.45.2
[r4]ip route-static 5.5.5.0 24 192.16.54.2
[r5]ip route-static 4.4.4.0 24 192.16.45.1
[r5]ip route-static 4.4.4.0 24 192.16.54.1
4、宣告路由
R1到R5都宣告
[r1]bgp 1
[r1-bgp]network 192.16.1.0 24
[r1-bgp]q
5、修改下一跳
[r2]bgp 2
[r2-bgp]peer 3.3.3.3 next-hop-local
标签:24,bgp,r1,第一天,ip,192.16,BGP,实验,r4 From: https://www.cnblogs.com/miracle01/p/17040878.html