1.拓扑图
2.PC机配置IP地址(按拓扑图要求配置即可)
3.路由器配置接口地址(按拓扑图要求配置即可)
R1:
R1(config)int f0/0
R1(config-if)ip add 10.0.0.2 255.255.255.0
R1(config-if)no shu
R1(config)int f0/1
R1(config-if)ip add 20.0.0.2 255.255.255.0
R1(config-if)no shu
R2:
R2(config)int f0/0
R2(config-if)ip add 10.0.0.1 255.255.255.0
R2(config-if)no shu
R2(config)int f0/1
R2(config-if)ip add 192.168.1.254 255.255.255.0
R2(config-if)no shu
R3:
R3(config)int f0/0
R3(config-if)ip add 20.0.0.1 255.255.255.0
R3(config-if)no shu
R3(config)int f0/1
R3(config-if)ip add 192.168.0.254 255.255.255.0
R3(config-if)no shu
4.配置BGP协议
配置命令:
R2例子:router bgp 300
设置自治域号neighbor 10.0.0.2 remote-as 100
设置远程相连自治域边界路由器端口network 192.168.1.0 mask 255.255.255.0
分享本地网络network 10.0.0.0 mask 255.255.255.0
分享本地网络
R1:
Router(config)#router bgp 100
Router(config-router)#neighbor 20.0.0.1 remote-as 200
Router(config-router)#neighbor 10.0.0.1 remote-as 300
Router(config-router)#network 10.0.0.0 mask 255.255.255.0
Router(config-router)#network 20.0.0.0 mask 255.255.255.0
R2:
Router(config)#router bgp 300
Router(config-router)#neighbor 10.0.0.2 remote-as 100
Router(config-router)#network 10.0.0.0 mask 255.255.255.0
Router(config-router)#network 192.168.1.0 mask 255.255.255.0
R3:
Router(config)#router bgp 200
Router(config-router)#neighbor 20.0.0.2 remote-as 100
Router(config-router)#network 20.0.0.0 mask 255.255.255.0
Router(config-router)#network 192.168.0.0 mask 255.255.255.0
5.查看路由表
R1:
R2:
R3:
6.测试连通性
最后一次更新于2020-03-23
0 条评论