※noteから引っ越してきた記事
設定
iosv-0(config)#router bgp 100
iosv-0(config-router)#neighbor 192.168.12.2 remote-as 200
iosv-0(config-router)#redistribute connected
iosv-1(config)#router bgp 200
iosv-1(config-router)#neighbor 192.168.12.1 remote-as 100
iosv-1(config-router)#redistribute connected
show ip route
iosv-0#sh ip ro | b Gate
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
B 2.2.2.2 [20/0] via 192.168.12.2, 00:02:53
192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, GigabitEthernet0/0
L 192.168.12.1/32 is directly connected, GigabitEthernet0/0
iosv-1#sh ip ro | b Gate
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
B 1.1.1.1 [20/0] via 192.168.12.1, 00:04:59
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, GigabitEthernet0/0
L 192.168.12.2/32 is directly connected, GigabitEthernet0/0
network mask を使わなくてもloopbackの情報をBGPとして広告できる。言われてみればそらそうだけど、結構目からうろこだったので備忘録。