1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

BGP Message ベンダ比較(IOS-XE/IOS-XR/Junos/EOS)

1
Posted at

確認環境

containerlab(v0.75.0)上にて以下OS毎のBGP Message差分を確認

  • c8000v(IOS-XE) : 17.16.01a
  • XRd(IOS-XR) : 25.2.1
  • cJunosEvolved : 25.4R1.13-EVO
  • cEOS : 4.35.1F

pcapは以下手法にて取得

Config (show runの該当箇所のみ抜粋)

configは各BGP Messageが確認できる最低限のconfig投入にて確認

IOS-XE

interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface GigabitEthernet2
 ip address 192.168.12.2 255.255.255.0
 negotiation auto
!
router bgp 65200
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 network 2.2.2.2 mask 255.255.255.255
 neighbor 192.168.12.1 remote-as 65100
!

IOS-XR

interface Loopback0
 ipv4 address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 192.168.12.1 255.255.255.0
!
route-policy PASS
  pass
end-policy
!
router bgp 65100
 bgp router-id 1.1.1.1
 address-family ipv4 unicast
  network 1.1.1.1/32
 !        
 neighbor 192.168.12.2
  remote-as 65200
  address-family ipv4 unicast
   route-policy PASS in
   route-policy PASS out
  !       
 !        
!         

Junos

set interfaces et-0/0/1 unit 0 family inet address 192.168.45.4/24
set interfaces lo0 unit 0 family inet address 4.4.4.4/32
set policy-options prefix-list LOOPBACK 4.4.4.4/32
set policy-options policy-statement EXPORT term 1 from prefix-list LOOPBACK
set policy-options policy-statement EXPORT term 1 then accept
set routing-options router-id 4.4.4.4
set routing-options autonomous-system 65400
set protocols bgp group EBGP type external
set protocols bgp group EBGP export EXPORT
set protocols bgp group EBGP neighbor 192.168.45.5 peer-as 65500

EOS

interface Ethernet1
   no switchport
   ip address 192.168.45.5/24
!
interface Loopback0
   ip address 5.5.5.5/32
!
router bgp 65500
   router-id 5.5.5.5
   neighbor 192.168.45.4 remote-as 65400
   network 5.5.5.5/32
!

BGP Message

Type1 : OPEN Message

  • Optional ParametersのCapabilityに各OS差分あり
  • Optional ParameterとCapabilityの紐付けに各OS差分あり
    • IOS-XE/IOS-XR/Junos : Capability毎にOptional Parameterが存在
    • EOS : 一つのOptional Parameter内に複数のCapabilityが存在
IOS-XE IOS-XR Junos EOS
Multiprotocol extensions capability (1) ● ● ● ●
Route refresh capability (2) ● ● ● ●
Extended Next Hop Encoding (5) ●
Graceful Restart capability (64) ● ●
Support for 4-octet AS number capability (65) ● ● ● ●
Support for Additional Paths (69) ●
Enhanced route refresh capability (70) ● ●
Long-Lived Graceful Restart Capability (71) ●
Route refresh capability (Cisco) (128) ● ● ●
Optional Parameter : Capability 1:1 1:1 1:1 1:N

Multiprotocol extensions capability (1)
 IPv6やVPNv4などIPv4以外のアドレスファミリをネゴシエーションする機能

Route refresh capability (2)
 セッション切断無しでルートを再学習させる機能

Extended Next Hop Encoding (5)
 IPv4経路のNext HopにIPv6アドレスを指定できる機能

Graceful Restart capability (64)
 制御プレーン再起動時も転送を継続し通信断を防ぐ機能

Support for 4-octet AS number capability (65)
 4byte AS番号のサポート

Support for Additional Paths (69)
 Best Path以外の複数経路を広告できる機能

Enhanced route refresh capability (70)
 Route Refreshの同期状況を細かく通知する拡張版

Long-Lived Graceful Restart Capability (71)
 Graceful Restartの保持時間をさらに延長する拡張機能

Route refresh capability (Cisco) (128)
 標準化前のCisco独自Route Refresh実装

IOS-XE

Border Gateway Protocol - OPEN Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 57
    Type: OPEN Message (1)
    Version: 4
    My AS: 65200
    Hold Time: 180
    BGP Identifier: 2.2.2.2
    Optional Parameters Length: 28
    Optional Parameters
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 6
            Capability: Multiprotocol extensions capability
                Type: Multiprotocol extensions capability (1)
                Length: 4
                AFI: IPv4 (1)
                Reserved: 00
                SAFI: Unicast (1)
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 2
            Capability: Route refresh capability (Cisco)
                Type: Route refresh capability (Cisco) (128)
                Length: 0
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 2
            Capability: Route refresh capability
                Type: Route refresh capability (2)
                Length: 0
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 2
            Capability: Enhanced route refresh capability
                Type: Enhanced route refresh capability (70)
                Length: 0
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 6
            Capability: Support for 4-octet AS number capability
                Type: Support for 4-octet AS number capability (65)
                Length: 4
                AS Number: 65200

IOS-XR

Border Gateway Protocol - OPEN Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 75
    Type: OPEN Message (1)
    Version: 4
    My AS: 65100
    Hold Time: 180
    BGP Identifier: 1.1.1.1
    Optional Parameters Length: 46
    Optional Parameters
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 6
            Capability: Multiprotocol extensions capability
                Type: Multiprotocol extensions capability (1)
                Length: 4
                AFI: IPv4 (1)
                Reserved: 00
                SAFI: Unicast (1)
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 2
            Capability: Route refresh capability (Cisco)
                Type: Route refresh capability (Cisco) (128)
                Length: 0
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 2
            Capability: Route refresh capability
                Type: Route refresh capability (2)
                Length: 0
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 6
            Capability: Support for 4-octet AS number capability
                Type: Support for 4-octet AS number capability (65)
                Length: 4
                AS Number: 65100
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 20
            Capability: Extended Next Hop Encoding
                Type: Extended Next Hop Encoding (5)
                Length: 18
                AFI: IPv4 (1)
                SAFI: Unicast (1)
                Next hop AFI: IPv6 (2)
                AFI: IPv4 (1)
                SAFI: Multicast (2)
                Next hop AFI: IPv6 (2)
                AFI: IPv4 (1)
                SAFI: Labeled VPN Unicast (128)
                Next hop AFI: IPv6 (2)

Junos

Border Gateway Protocol - OPEN Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 63
    Type: OPEN Message (1)
    Version: 4
    My AS: 65400
    Hold Time: 90
    BGP Identifier: 4.4.4.4
    Optional Parameters Length: 34
    Optional Parameters
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 6
            Capability: Multiprotocol extensions capability
                Type: Multiprotocol extensions capability (1)
                Length: 4
                AFI: IPv4 (1)
                Reserved: 00
                SAFI: Unicast (1)
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 2
            Capability: Route refresh capability (Cisco)
                Type: Route refresh capability (Cisco) (128)
                Length: 0
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 2
            Capability: Route refresh capability
                Type: Route refresh capability (2)
                Length: 0
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 4
            Capability: Graceful Restart capability
                Type: Graceful Restart capability (64)
                Length: 2
                    [Expert Info (Chat/Request): Graceful Restart Capability supported in Helper mode only]
                        [Graceful Restart Capability supported in Helper mode only]
                        [Severity level: Chat]
                        [Group: Request]
                Restart Timers: 0x4078, Graceful notification
                    0... .... .... .... = Restart state: No
                    .1.. .... .... .... = Graceful notification: Yes
                    .... 0000 0111 1000 = Time: 120
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 6
            Capability: Support for 4-octet AS number capability
                Type: Support for 4-octet AS number capability (65)
                Length: 4
                AS Number: 65400
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 2
            Capability: Long-Lived Graceful Restart (LLGR) Capability
                Type: Long-Lived Graceful Restart (LLGR) Capability (71)
                Length: 0

EOS

Border Gateway Protocol - OPEN Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 57
    Type: OPEN Message (1)
    Version: 4
    My AS: 65500
    Hold Time: 180
    BGP Identifier: 5.5.5.5
    Optional Parameters Length: 28
    Optional Parameters
        Optional Parameter: Capability
            Parameter Type: Capability (2)
            Parameter Length: 26
            Capability: Route refresh capability
                Type: Route refresh capability (2)
                Length: 0
            Capability: Enhanced route refresh capability
                Type: Enhanced route refresh capability (70)
                Length: 0
            Capability: Support for 4-octet AS number capability
                Type: Support for 4-octet AS number capability (65)
                Length: 4
                AS Number: 65500
            Capability: Multiprotocol extensions capability
                Type: Multiprotocol extensions capability (1)
                Length: 4
                AFI: IPv4 (1)
                Reserved: 00
                SAFI: Unicast (1)
            Capability: Graceful Restart capability
                Type: Graceful Restart capability (64)
                Length: 2
                    [Expert Info (Chat/Request): Graceful Restart Capability supported in Helper mode only]
                        [Graceful Restart Capability supported in Helper mode only]
                        [Severity level: Chat]
                        [Group: Request]
                Restart Timers: 0xc12c, Restart state, Graceful notification
                    1... .... .... .... = Restart state: Yes
                    .1.. .... .... .... = Graceful notification: Yes
                    .... 0001 0010 1100 = Time: 300
            Capability: Support for Additional Paths
                Type: Support for Additional Paths (69)
                Length: 4
                AFI: IPv4 (1)
                SAFI: Unicast (1)
                Send/Receive: Receive (1)

Type2 : UPDATE Message

  • Withdrawn RoutesのUPDATE Messageに関しては、loopback IF shutdownにて取得
  • BGP Establishedした直後に送信されるUPDATEには以下のように空のUPDATEが送信される
    • この空のUPDATEはEnd-of-RIB Markerと言い、すべての経路情報を送信したことを示す
    • 元々はRFC4724にてgraceful restart機能の一部として定義された
    • RFC4724 Section 2にて、"recommended" となっているためIOS-XE/IOS-XRがGraceful RestartのCapablityを送信してないにも関わらずEnd-of-RIBを送信している可能性あり
2. Marker for End-of-RIB

Although the End-of-RIB marker is specified for the purpose of BGP 
graceful restart, it is noted that the generation of such a marker 
upon completion of the initial update would be useful for routing 
convergence in general, and thus the practice is recommended.
  • Path AttributeにOS差分有り
    • IOS-XE/IOS-XR : ORIGIN, AS_PATH, NEXT_HOP, MULTI_EXIT_DISC(default MED=0)
    • Junos/EOS : ORIGIN, AS_PATH, NEXT_HOP
  • Withdrawn RoutesはOS差分無し

image.png

IOS-XE

Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 55
    Type: UPDATE Message (2)
    Withdrawn Routes Length: 0
    Total Path Attribute Length: 27
    Path attributes
        Path Attribute - ORIGIN: IGP
            Flags: 0x40, Transitive, Well-known, Complete
                0... .... = Optional: Not set
                .1.. .... = Transitive: Set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: ORIGIN (1)
            Length: 1
            Origin: IGP (0)
        Path Attribute - AS_PATH: 65200 
            Flags: 0x40, Transitive, Well-known, Complete
                0... .... = Optional: Not set
                .1.. .... = Transitive: Set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: AS_PATH (2)
            Length: 6
            AS Path segment: 65200
                Segment type: AS_SEQUENCE (2)
                Segment length (number of ASN): 1
                AS4: 65200
        Path Attribute - NEXT_HOP: 192.168.12.2 
            Flags: 0x40, Transitive, Well-known, Complete
                0... .... = Optional: Not set
                .1.. .... = Transitive: Set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: NEXT_HOP (3)
            Length: 4
            Next hop: 192.168.12.2
        Path Attribute - MULTI_EXIT_DISC: 0
            Flags: 0x80, Optional, Non-transitive, Complete
                1... .... = Optional: Set
                .0.. .... = Transitive: Not set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: MULTI_EXIT_DISC (4)
            Length: 4
            Multiple exit discriminator: 0
    Network Layer Reachability Information (NLRI)
        2.2.2.2/32
            NLRI prefix length: 32
            NLRI prefix: 2.2.2.2
Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 28
    Type: UPDATE Message (2)
    Withdrawn Routes Length: 5
    Withdrawn Routes
        2.2.2.2/32
            Withdrawn route prefix length: 32
            Withdrawn prefix: 2.2.2.2
    Total Path Attribute Length: 0

IOS-XR

Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 55
    Type: UPDATE Message (2)
    Withdrawn Routes Length: 0
    Total Path Attribute Length: 27
    Path attributes
        Path Attribute - ORIGIN: IGP
            Flags: 0x40, Transitive, Well-known, Complete
                0... .... = Optional: Not set
                .1.. .... = Transitive: Set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: ORIGIN (1)
            Length: 1
            Origin: IGP (0)
        Path Attribute - AS_PATH: 65100 
            Flags: 0x40, Transitive, Well-known, Complete
                0... .... = Optional: Not set
                .1.. .... = Transitive: Set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: AS_PATH (2)
            Length: 6
            AS Path segment: 65100
                Segment type: AS_SEQUENCE (2)
                Segment length (number of ASN): 1
                AS4: 65100
        Path Attribute - NEXT_HOP: 192.168.12.1 
            Flags: 0x40, Transitive, Well-known, Complete
                0... .... = Optional: Not set
                .1.. .... = Transitive: Set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: NEXT_HOP (3)
            Length: 4
            Next hop: 192.168.12.1
        Path Attribute - MULTI_EXIT_DISC: 0
            Flags: 0x80, Optional, Non-transitive, Complete
                1... .... = Optional: Set
                .0.. .... = Transitive: Not set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: MULTI_EXIT_DISC (4)
            Length: 4
            Multiple exit discriminator: 0
    Network Layer Reachability Information (NLRI)
        1.1.1.1/32
            NLRI prefix length: 32
            NLRI prefix: 1.1.1.1
Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 28
    Type: UPDATE Message (2)
    Withdrawn Routes Length: 5
    Withdrawn Routes
        1.1.1.1/32
            Withdrawn route prefix length: 32
            Withdrawn prefix: 1.1.1.1
    Total Path Attribute Length: 0

Junos

Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 48
    Type: UPDATE Message (2)
    Withdrawn Routes Length: 0
    Total Path Attribute Length: 20
    Path attributes
        Path Attribute - ORIGIN: IGP
            Flags: 0x40, Transitive, Well-known, Complete
                0... .... = Optional: Not set
                .1.. .... = Transitive: Set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: ORIGIN (1)
            Length: 1
            Origin: IGP (0)
        Path Attribute - AS_PATH: 65400 
            Flags: 0x40, Transitive, Well-known, Complete
                0... .... = Optional: Not set
                .1.. .... = Transitive: Set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: AS_PATH (2)
            Length: 6
            AS Path segment: 65400
                Segment type: AS_SEQUENCE (2)
                Segment length (number of ASN): 1
                AS4: 65400
        Path Attribute - NEXT_HOP: 192.168.45.4 
            Flags: 0x40, Transitive, Well-known, Complete
                0... .... = Optional: Not set
                .1.. .... = Transitive: Set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: NEXT_HOP (3)
            Length: 4
            Next hop: 192.168.45.4
    Network Layer Reachability Information (NLRI)
        4.4.4.4/32
            NLRI prefix length: 32
            NLRI prefix: 4.4.4.4
Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 28
    Type: UPDATE Message (2)
    Withdrawn Routes Length: 5
    Withdrawn Routes
        4.4.4.4/32
            Withdrawn route prefix length: 32
            Withdrawn prefix: 4.4.4.4
    Total Path Attribute Length: 0

EOS

Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 48
    Type: UPDATE Message (2)
    Withdrawn Routes Length: 0
    Total Path Attribute Length: 20
    Path attributes
        Path Attribute - ORIGIN: IGP
            Flags: 0x40, Transitive, Well-known, Complete
                0... .... = Optional: Not set
                .1.. .... = Transitive: Set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: ORIGIN (1)
            Length: 1
            Origin: IGP (0)
        Path Attribute - AS_PATH: 65500 
            Flags: 0x40, Transitive, Well-known, Complete
                0... .... = Optional: Not set
                .1.. .... = Transitive: Set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: AS_PATH (2)
            Length: 6
            AS Path segment: 65500
                Segment type: AS_SEQUENCE (2)
                Segment length (number of ASN): 1
                AS4: 65500
        Path Attribute - NEXT_HOP: 192.168.45.5 
            Flags: 0x40, Transitive, Well-known, Complete
                0... .... = Optional: Not set
                .1.. .... = Transitive: Set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: NEXT_HOP (3)
            Length: 4
            Next hop: 192.168.45.5
    Network Layer Reachability Information (NLRI)
        5.5.5.5/32
            NLRI prefix length: 32
            NLRI prefix: 5.5.5.5
Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 28
    Type: UPDATE Message (2)
    Withdrawn Routes Length: 5
    Withdrawn Routes
        5.5.5.5/32
            Withdrawn route prefix length: 32
            Withdrawn prefix: 5.5.5.5
    Total Path Attribute Length: 0

Type3 : NOTIFICATION Message

  • shutdown時のOS差分あり
    • IOS-XE/IOS-XR/Junos : Administratively Shutdown(2)
    • EOS : Hard Reset(9)
  • Junos/EOSのNOTIFICATION : Hard Reset(9)の場合Dataフィールドが付与されている。これはRFC8538で定義されたHard Reset(9)の挙動

Hard Reset (Subcode 9) Dataフィールドの構造

Hard Reset送信時のDataフィールドは2バイト構造となっており、内訳は以下の通り

  • 1バイト目: Major Error Code (常に 0x06 = Cease)
  • 2バイト目: Cease Subcode
Data Subcode reason
0602 0x02 = Administratively Shutdown shutdownコマンド
0603 0x03 = Peer De-configured neighborの設定削除/deactivate
0604 0x04 = Administratively Reset clear bgp 系のリセット

IOS-XE

neighbor 192.168.12.1 shutdown

Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 21
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Administratively Shutdown (2)

clear bgp *

Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 21
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Administratively Reset (4)

no neighbor 192.168.12.1

Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 21
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Peer De-configured (3)

IOS-XR

neighbor 192.168.12.2 shutdown

Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 21
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Administratively Shutdown (2)

clear bgp *

  • clear bgp * graceful はNOTIFICATION Messageを送信しない(OPEN,KEEPALIVE,UPDATEのみ)
Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 21
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Administratively Reset (4)

no neighbor 192.168.12.2

Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 21
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Other Configuration Change (6)

Junos

deactivate protocols bgp group EBGP neighbor 192.168.45.5

  • Data: 0603 = Peer De-configured
Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 23
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Hard Reset (9)
    Data: 0603

set protocols bgp group EBGP neighbor 192.168.45.5 shutdown

Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 22
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Administratively Shutdown (2)
    BGP Shutdown Communication Length: 0
    Shutdown Communication: 
  • deactivate/shutdownした状態で対向からOPEN Message受信時
    • OPENと合わせてNOTIFICATIONも送信
    • 数回 3way handshake確立→OPEN→OPEN/NOTIFICATION→FINのやりとりを繰り返す
    • IOS-XE/XRの場合は、3way handshake時にRSTで確立しないためOPEN送信まで到達しない
    • JunosはshutdownしてもBGP FSMがConnect→Active状態を回し続けるため、TCP確立後に自分からもOPENを送信した直後にNOTIFICATIONでクローズする
Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 21
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Connection Rejected (5)

image.png
clear bgp neighbor all

  • Data: 0604 = Administratively Reset
Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 23
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Hard Reset (9)
    Data: 0604

clear bgp neighbor all gracefully

Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 21
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Administratively Reset (4)

EOS

neighbor 192.168.45.4 shutdown

  • Data: 0602 = Administratively Shutdown
Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 23
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Hard Reset (9)
    Data: 0602

shutdown状態時の挙動

  • IOS-XE/IOS-XR: TCPレイヤでSYNにRSTを返すためBGPレイヤまで到達せず
  • Junos: TCP確立後、対向からのOPENに対してOPEN/NOTIFICATIONのみ送信
  • EOS: TCP確立後、対向からのOPENに対してNOTIFICATIONのみ送信
Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 21
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Connection Rejected (5)

image.png

clear ip bgp *

  • Data: 0604 = Administratively Reset
Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 23
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Hard Reset (9)
    Data: 0604

no neighbor 192.168.45.4

  • Data: 0603 = Peer De-configured
Border Gateway Protocol - NOTIFICATION Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 23
    Type: NOTIFICATION Message (3)
    Major error Code: Cease (6)
    Minor error Code (Cease): Hard Reset (9)
    Data: 0603

Type4 : KEEPALIVE Message

  • 中身はOS差分無し
  • default送信間隔のみ異なる
    • 60s : IOS-XE/IOS-XR/EOS
    • 30s : Junos
  • jitter実装も異なる
    • IOS-XR : jitterなし(正確に60s)
    • IOS-XE/Junos/EOS : jitterあり(25%程度)
      • RFC4271 Section 10
      • 同期したKeepaliveが大量のピアで一斉送信されないようにするためのメカニズム
10. BGP Timers

The suggested default amount of jitter SHALL be determined by multiplying 
the base value of the appropriate timer by a random factor, which is uniformly
distributed in the range from 0.75 to 1.0. A new random value SHOULD be picked 
each time the timer is set. 
The range of the jitter's random value MAY be configurable.

IOS-XE

  • 約50s〜約60s毎にkeepalive送信
Border Gateway Protocol - KEEPALIVE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 19
    Type: KEEPALIVE Message (4)

image.png

IOS-XR

  • 正確に60s毎にkeepalive送信
Border Gateway Protocol - KEEPALIVE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 19
    Type: KEEPALIVE Message (4)

image.png

Junos

  • 約30s毎にkeepalive送信
Border Gateway Protocol - KEEPALIVE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 19
    Type: KEEPALIVE Message (4)

image.png

EOS

  • 約60s毎にkeepalive送信
  • JunosとのeBGPとなるため、最小keepaliveに合わせる形で約30s毎にkeepalive送信
  • 別構成でEOS間でのeBGPによる確認。こちらはdefault通り約60s毎にkeepalive送信(実測だと約45s〜約60sと一番ばらつきがある)
Border Gateway Protocol - KEEPALIVE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 19
    Type: KEEPALIVE Message (4)
  • Junos-EOS間eBGP
    image.png
  • EOS-EOS間eBGP
    image.png

Type5 : ROUTE-REFRESH Message

OS差分無し

IOS-XE

clear ip bgp * soft in

Border Gateway Protocol - ROUTE-REFRESH Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 23
    Type: ROUTE-REFRESH Message (5)
    Address family identifier (AFI): IPv4 (1)
    Subtype: Normal route refresh request [RFC2918] with/without ORF [RFC5291] (0)
    Subsequent address family identifier (SAFI): Unicast (1)

IOS-XR

clear bgp ipv4 unicast * soft in

Border Gateway Protocol - ROUTE-REFRESH Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 23
    Type: ROUTE-REFRESH Message (5)
    Address family identifier (AFI): IPv4 (1)
    Subtype: Normal route refresh request [RFC2918] with/without ORF [RFC5291] (0)
    Subsequent address family identifier (SAFI): Unicast (1)

Junos

clear bgp neighbor all soft-inbound

Border Gateway Protocol - ROUTE-REFRESH Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 23
    Type: ROUTE-REFRESH Message (5)
    Address family identifier (AFI): IPv4 (1)
    Subtype: Normal route refresh request [RFC2918] with/without ORF [RFC5291] (0)
    Subsequent address family identifier (SAFI): Unicast (1)

EOS

clear bgp * soft in

Border Gateway Protocol - ROUTE-REFRESH Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 23
    Type: ROUTE-REFRESH Message (5)
    Address family identifier (AFI): IPv4 (1)
    Subtype: Normal route refresh request [RFC2918] with/without ORF [RFC5291] (0)
    Subsequent address family identifier (SAFI): Unicast (1)
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?