JUNOS_BGP_その1(timer)
JUNOSのBGP
まずか簡単なところから構成は↓
R4はR6のConfigはR3とR5と似た内容なので、省略
R3
R3#show run | sec router bgp 100
router bgp 100
bgp router-id 1.1.1.3
bgp log-neighbor-changes
neighbor 172.16.4.254 remote-as 100
neighbor 172.16.5.254 remote-as 200
!
address-family ipv4
network 1.1.1.3 mask 255.255.255.255
neighbor 172.16.4.254 activate
neighbor 172.16.4.254 next-hop-self
neighbor 172.16.4.254 soft-reconfiguration inbound
neighbor 172.16.5.254 activate
neighbor 172.16.5.254 soft-reconfiguration inbound
exit-address-family
R5
router-id 2.1.1.5;
autonomous-system 200;
set policy-options prefix-list LOCAL 2.1.1.5/32
set policy-options policy-statement EXT term 1 from protocol bgp
set policy-options policy-statement EXT term 1 then next-hop self
set policy-options policy-statement EXT term 2 from prefix-list LOCAL
set policy-options policy-statement EXT term 2 then accept
set policy-options policy-statement INT term 1 from protocol bgp
set policy-options policy-statement INT term 1 then next-hop self
set policy-options policy-statement INT term 1 then accept
set policy-options policy-statement INT term 2 from prefix-list LOCAL
set policy-options policy-statement INT term 2 then next-hop self
set protocols bgp group external type external
set protocols bgp group external local-address 172.16.5.254
set protocols bgp group external neighbor 172.16.5.1 export EXT
set protocols bgp group external neighbor 172.16.5.1 peer-as 100
set protocols bgp group internal type internal
set protocols bgp group internal local-address 172.16.7.1
set protocols bgp group internal neighbor 172.16.7.254 export INT
R5でR6とのpeer確認
admin@R5# run show bgp neighbor 172.16.7.254
Peer: 172.16.7.254+54497 AS 200 Local: 172.16.7.1+179 AS 200
Group: internal Routing-Instance: master
Forwarding routing-instance: master
Type: Internal State: Established Flags: <Sync>
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: Cease
Export: [ INT ]
Options: <Preference LocalAddress GracefulRestart Refresh>
Local Address: 172.16.7.1 Holdtime: 90 Preference: 170
Number of flaps: 9
Last flap event: Stop
Error: 'Cease' Sent: 7 Recv: 2
Peer ID: 2.1.1.6 Local ID: 2.1.1.5 Active Holdtime: 90
Keepalive Interval: 30 Group index: 1 Peer index: 0 SNMP index: 3
R5でR3とのpeer確認
admin@R5# run show bgp neighbor 172.16.5.1
Peer: 172.16.5.1+36571 AS 100 Local: 172.16.5.254+179 AS 200
Group: external Routing-Instance: master
Forwarding routing-instance: master
Type: External State: Established Flags: <Sync>
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: Cease
Export: [ EXT ]
Options: <Preference LocalAddress GracefulRestart PeerAS Refresh>
Local Address: 172.16.5.254 Holdtime: 90 Preference: 170
Number of flaps: 6
Last flap event: Stop
Error: 'Cease' Sent: 6 Recv: 0
Peer ID: 1.1.1.3 Local ID: 2.1.1.5 Active Holdtime: 90
Keepalive Interval: 30 Group index: 0 Peer index: 0 SNMP index: 2
JUNOSのinterval / holdtime は30/90
Ciscoのinterval / holdtime は60/180
BGPのtimer不一致時は小さいほうに従うので、このR3-R5はJUNOSに従っている。
R3側でも確認
R3#show bgp ipv4 unicast neighbors 172.16.5.254
BGP neighbor is 172.16.5.254, remote AS 200, external link
BGP version 4, remote router ID 2.1.1.5
BGP state = Established, up for 00:57:07
Last read 00:00:13, last write 00:00:16, hold time is 90, keepalive interval is 30 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
念のため、R5との接続はデフォルト60/180になっている事を確認
R3#show bgp ipv4 unicast neighbors 172.16.4.254
BGP neighbor is 172.16.4.254, remote AS 100, internal link
BGP version 4, remote router ID 1.1.1.4
BGP state = Established, up for 00:29:41
Last read 00:00:14, last write 00:00:18, hold time is 180, keepalive interval is 60 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
Neighbor capabilities:
こっから本題
この状態でR3をtimer 10/30、R5を15/45に変更してみる。
この場合、R3-R5は10/30 R5-R6は15/45になると思われる。
変更後、R5でR3とのpeer確認
admin@R5# run show bgp neighbor 172.16.5.1
Peer: 172.16.5.1+56976 AS 100 Local: 172.16.5.254+179 AS 200
Group: external Routing-Instance: master
Forwarding routing-instance: master
Type: External State: Established Flags: <Sync>
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: None
Export: [ EXT ]
Options: <Preference LocalAddress HoldTime GracefulRestart PeerAS Refresh>
Local Address: 172.16.5.254 Holdtime: 45 Preference: 170
Number of flaps: 1
Last flap event: TransportError
Peer ID: 1.1.1.3 Local ID: 2.1.1.5 Active Holdtime: 30
Keepalive Interval: 10 Group index: 0 Peer index: 0 SNMP index: 2
I/O Session Thread: bgpio-0 State: Enabled
変更後、R6でR5とのpeer確認
admin@R6# run show bgp neighbor 172.16.7.1
Peer: 172.16.7.1+179 AS 200 Local: 172.16.7.254+64962 AS 200
Group: internal Routing-Instance: master
Forwarding routing-instance: master
Type: Internal State: Established Flags: <Sync>
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: Cease
Export: [ INT ]
Options: <Preference LocalAddress GracefulRestart Refresh>
Local Address: 172.16.7.254 Holdtime: 90 Preference: 170
Number of flaps: 9
Last flap event: RecvNotify
Error: 'Cease' Sent: 1 Recv: 8
Peer ID: 2.1.1.5 Local ID: 2.1.1.6 Active Holdtime: 45
Keepalive Interval: 15 Group index: 1 Peer index: 0 SNMP index: 3