题目如图:
1.IP规划及配置:
R1~R5:
2.用OSPF宣告在R2 R3 R4之间:
3、使用BGP建立邻居关系
3.1 R1 R2 建立邻居关系:
由于TCP服务启动需要一点时间,后面是成功后的TCP状态表
3.2. R2 R4 建立邻居关系:
3.3 R4 R5 建立邻居关系:
3.4 R4 R5双向缺省:
3.5 R4 R5 TTL修改为2:
[R4-bgp]peer 5.5.5.5 ebgp-max-hop 2
[R5-bgp]peer 4.4.4.4 ebgp-max-hop 2
4.BGP中相互宣告路由:
R1 :
R5:
先加上环回1 99.1.1.1 24
[R5]bgp 3
[R5-bgp]network 5.5.5.0 24
[R5-bgp]network 99.1.1.0 24
---------------------------------------------------------------------
5. R2 R3 建邻:
[R2]bgp 2
[R2-bgp]peer 3.3.3.3 as-number 2
[R2-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[R3]bgp 2
[R3-bgp]peer 2.2.2.2 as-number 2
[R3-bgp]peer 2.2.2.2 connect-interface LoopBack 0
R3 R4 建邻:
[R3]bgp 2
[R3-bgp]peer 4.4.4.4 as-number 2
[R3-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[R4]bgp 2
[R4-bgp]peer 3.3.3.3 as-number 2
[R4-bgp]peer 3.3.3.3 connect-interface LoopBack 0
6.测试结果: