※noteから引っ越してきた記事
初期設定
iosv-0
en
terminal length 0
conf t
hostname iosv-0
line console 0
logging synchronous
exit
!
int lo0
ip address 1.1.1.1 255.255.255.255
!
int gi0/0
ip address 192.168.12.1 255.255.255.0
ip ospf 1 area 0
no shut
exit
!
router bgp 100
neighbor 192.168.23.3 remote-as 100
neighbor 192.168.23.3 update-source gi0/0
end
!
iosv-1
en
terminal length 0
conf t
hostname iosv-1
line console 0
logging sychronous
exit
!
int gi0/0
ip address 192.168.12.2 255.255.255.0
ip ospf 1 area 0
no shut
!
int gi0/1
ip address 192.168.23.2 255.255.255.0
ip ospf 1 area 0
no shut
exit
!
iosv-2
en
terminal length 0
conf t
hostname iosv-2
line console 0
logging synchronous
exit
!
int lo0
ip address 3.3.3.3 255.255.255.255
!
int gi0/0
ip address 192.168.23.3 255.255.255.0
ip ospf 1 area 0
no shut
exit
!
router bgp 100
neighbor 192.168.12.1 remote-as 100
neighbor 192.168.12.1 update-source gi0/0
end
!
disable-connected-check
iosv-1#sh run | sec bgp
router bgp 100
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 200
neighbor 3.3.3.3 disable-connected-check
neighbor 3.3.3.3 update-source Loopback0
iosv-1#sh ip bgp sum
BGP router identifier 2.2.2.2, local AS number 100
BGP table version is 10, main routing table version 10
1 network entries using 144 bytes of memory
1 path entries using 84 bytes of memory
1/1 BGP path/bestpath attribute entries using 160 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 412 total bytes of memory
BGP activity 3/2 prefixes, 5/4 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
3.3.3.3 4 200 5 4 9 0 0 00:00:45 1
TTLが1になっている。
ebgp-multihopはTTLの数を増やしてeBGPピアリングを行う。
disable-connected-checkはTTL1のまま、TTLをチェックしないようにすることでeBGPピアリングを行う。
直接接続でない場合
iosv-2(config-router)#do sh run | sec bgp
router bgp 200
bgp log-neighbor-changes
network 3.3.3.3 mask 255.255.255.255
neighbor 192.168.12.1 remote-as 100
neighbor 192.168.12.1 disable-connected-check
neighbor 192.168.12.1 update-source GigabitEthernet0/0
iosv-2(config-router)#do sh ip bgp sum
BGP router identifier 3.3.3.3, local AS number 200
BGP table version is 2, main routing table version 2
1 network entries using 144 bytes of memory
1 path entries using 84 bytes of memory
1/1 BGP path/bestpath attribute entries using 160 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 388 total bytes of memory
BGP activity 11/10 prefixes, 12/11 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.168.12.1 4 100 0 0 1 0 0 00:03:09 Idle
192.168.23.2 4 100 0 0 1 0 0 00:13:07 Idle
iosv-0でもiosv-2に対してdisable-connected-checkを設定しているが、直接接続でないためピアリングできない。