Interface eth0 isup, line protocol detection is disabled . . . . . Interface eth1 isup, line protocol detection is disabled . . . . .
配置eth0接口的参数:
1 2 3 4 5 6 7
site-A-RTR# configure terminal site-A-RTR(config)# interface eth0 site-A-RTR(config-if)# ip address 100.100.0.1/30 site-A-RTR(config-if)# description "to Router-B" site-A-RTR(config-if)# no shutdown site-A-RTR(config-if)# exit
继续配置eth1接口的参数:
1 2 3 4 5 6
site-A-RTR(config)# interface eth1 site-A-RTR(config-if)# ip address 100.100.1.1/24 site-A-RTR(config-if)# description "test ip from provider A network" site-A-RTR(config-if)# no shutdown site-A-RTR(config-if)# exit
现在确认配置:
1 2
Router-A# showinterface
1 2 3 4 5 6 7
Interface eth0 is up, line protocol detection is disabled Description: "to Router-B" inet100.100.0.1/30 broadcast 100.100.0.3 Interface eth1 is up, line protocol detection is disabled Description: "test ip from provider A network" inet100.100.1.1/24 broadcast 100.100.1.255
1 2
Router-A# show interfacedescription #显示接口描述
1 2 3 4
Interface Status Protocol Description eth0 up unknown "to Router-B" eth1 up unknown "test ip from provider A network"
如果一切看起来正常,别忘记保存配置。
1 2
Router-A# write
同样地,在路由器B重复一次配置。
在我们继续下一步之前,确认下彼此的IP是可以ping通的。
1 2
Router-A# ping 100.100.0.2
1 2 3
PING100.100.0.2 (100.100.0.2) 56(84) bytes of data. 64 bytes from 100.100.0.2: icmp_seq=1 ttl=64 time=0.616 ms
B>* 200.200.0.0/22 [20/0] via 100.100.0.2, eth0, 00:08:13
BGP学习到的路由也将会在Linux路由表中出现。
1 2
[root@Router-A~]# ip route
1 2 3 4
100.100.0.0/30 dev eth0 proto kernel scope link src 100.100.0.1 100.100.1.0/24 dev eth1 proto kernel scope link src 100.100.1.1 200.200.0.0/22 via 100.100.0.2 dev eth0 proto zebra