「BGP」- Update Packet

  CREATED BY JENKINSBOT

Update 报文用于在 BGP Peer 间的传递路由信息,其用于发布路由撤销路由

报文格式

单个 Update 报文:
1)可以通告具有相同路径属性的多条路由,这些路由保存在 NLRI(Network Layer Reachable Information,网络层可达信息)中;
2)同时 Update 还可以携带多条不可达路由,用于告知对方撤销路由,这些保存在 Withdrawn Routes 字段中;

报文格式如图所示,主要字段解释如下:

Withdrawn Routes Length(Unfeasible routes length):标明 Withdrawn Routes 部分的长度,以 Byte 为单位。其值为零时,表示没有撤销的路由;

Withdrawn routes:不可达路由的列表;

Total path attribute length:路径属性字段的长度,以 Byte 为单位。如果为 0,则表示无 Path Attributes 字段;

Path attributes:与 NLRI 相关的所有路径属性列表,每个路径属性由一个 TLV(Type-Length-Value)三元组构成;

NLRI:可达路由的前缀和前缀长度二元组;

报文示例

更新路由的报文:

Frame 28: 109 bytes on wire (872 bits), 109 bytes captured (872 bits) on interface -, id 0
Ethernet II, Src: HuaweiTe_2e:4a:35 (00:e0:fc:2e:4a:35), Dst: HuaweiTe_0b:50:b5 (00:e0:fc:0b:50:b5)
Internet Protocol Version 4, Src: 10.1.12.1, Dst: 10.1.12.2
Transmission Control Protocol, Src Port: 50115, Dst Port: 179, Seq: 65, Ack: 65, Len: 55
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
        Path Attribute - AS_PATH: 200
        Path Attribute - NEXT_HOP: 10.1.12.1
        Path Attribute - MULTI_EXIT_DISC: 0
    Network Layer Reachability Information (NLRI)
        10.1.1.1/32

带有撤销路由的报文:

Frame 22: 86 bytes on wire (688 bits), 86 bytes captured (688 bits) on interface -, id 0
Ethernet II, Src: HuaweiTe_2e:4a:35 (00:e0:fc:2e:4a:35), Dst: HuaweiTe_0b:50:b5 (00:e0:fc:0b:50:b5)
Internet Protocol Version 4, Src: 10.1.12.1, Dst: 10.1.12.2
Transmission Control Protocol, Src Port: 179, Dst Port: 50969, Seq: 250, Ack: 65, Len: 32
Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 32
    Type: UPDATE Message (2)
    Withdrawn Routes Length: 9
    Withdrawn Routes
        10.1.12.0/24
            Withdrawn route prefix length: 24
            Withdrawn prefix: 10.1.12.0
        100.100.100.100/32
            Withdrawn route prefix length: 32
            Withdrawn prefix: 100.100.100.100
    Total Path Attribute Length: 0

MP-BGP VPNv4

MP_REACH_NLRI and EXTENDED_COMMUNITIES

Frame 273: 289 bytes on wire (2312 bits), 289 bytes captured (2312 bits) on interface -, id 0
Ethernet II, Src: HuaweiTe_f0:4f:dc (00:e0:fc:f0:4f:dc), Dst: HuaweiTe_ed:04:ec (00:e0:fc:ed:04:ec)
MultiProtocol Label Switching Header, Label: 1026, Exp: 6, S: 1, TTL: 255
Internet Protocol Version 4, Src: 10.1.1.1, Dst: 10.4.4.4
Transmission Control Protocol, Src Port: 179, Dst Port: 50565, Seq: 263, Ack: 96, Len: 231
Border Gateway Protocol - UPDATE Message
Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 115
    Type: UPDATE Message (2)
    Withdrawn Routes Length: 0
    Total Path Attribute Length: 92
    Path attributes
        Path Attribute - ORIGIN: INCOMPLETE
        Path Attribute - AS_PATH: empty
        Path Attribute - MULTI_EXIT_DISC: 3
        Path Attribute - LOCAL_PREF: 100
        Path Attribute - EXTENDED_COMMUNITIES
            Flags: 0xc0, Optional, Transitive, Complete
                1... .... = Optional: Set
                .1.. .... = Transitive: Set
                ..0. .... = Partial: Not set
                ...0 .... = Extended-Length: Not set
                .... 0000 = Unused: 0x0
            Type Code: EXTENDED_COMMUNITIES (16)
            Length: 32
            Carried extended communities: (4 communities)
                Route Target: 100:100 [Transitive 2-Octet AS-Specific]
                    Type: Transitive 2-Octet AS-Specific (0x00)
                        0... .... = IANA Authority: Allocated on Standard Action, Early Allocation or Experimental Basis
                        .0.. .... = Transitive across AS: Transitive
                    Subtype (AS2): Route Target (0x02)
                    2-Octet AS: 100
                    4-Octet AN: 100
                OSPF Domain Identifier: 0:0 [Transitive 2-Octet AS-Specific]
                    Type: Transitive 2-Octet AS-Specific (0x00)
                        0... .... = IANA Authority: Allocated on Standard Action, Early Allocation or Experimental Basis
                        .0.. .... = Transitive across AS: Transitive
                    Subtype (AS2): OSPF Domain Identifier (0x05)
                    2-Octet AS: 0
                    4-Octet AN: 0
                OSPF Route Type: Area: 0.0.0.1, Type: Router [Transitive Opaque]
                    Type: Transitive Opaque (0x03)
                        0... .... = IANA Authority: Allocated on Standard Action, Early Allocation or Experimental Basis
                        .0.. .... = Transitive across AS: Transitive
                    Subtype (Opaque): OSPF Route Type (0x06)
                    Area ID: 0.0.0.1
                    Route type: Router (1)
                    Options: 0x00 (Metric: Type-1)
                OSPF Router ID: 10.0.61.1:0 [Transitive IPv4-Address-Specific]
                    Type: Transitive IPv4-Address-Specific (0x01)
                        0... .... = IANA Authority: Allocated on Standard Action, Early Allocation or Experimental Basis
                        .0.. .... = Transitive across AS: Transitive
                    Subtype (IPv4): OSPF Router ID (0x07)
                    Router ID: 10.0.61.1
        Path Attribute - MP_REACH_NLRI
            Flags: 0x90, Optional, Extended-Length, Non-transitive, Complete
                1... .... = Optional: Set
                .0.. .... = Transitive: Not set
                ..0. .... = Partial: Not set
                ...1 .... = Extended-Length: Set
                .... 0000 = Unused: 0x0
            Type Code: MP_REACH_NLRI (14)
            Length: 32
            Address family identifier (AFI): IPv4 (1)
            Subsequent address family identifier (SAFI): Labeled VPN Unicast (128)
            Next hop:  RD=0:0 IPv4=10.1.1.1
                Route Distinguisher: 0:0
                IPv4 Address: 10.1.1.1
            Number of Subnetwork points of attachment (SNPA): 0
            Network Layer Reachability Information (NLRI)
                BGP Prefix
                    Prefix Length: 112
                    Label Stack: 1032 (bottom)
                    Route Distinguisher: 100:1
                    MP Reach NLRI IPv4 prefix: 192.168.1.0

MP_UNREACH_NLRI

Frame 80: 134 bytes on wire (1072 bits), 134 bytes captured (1072 bits) on interface -, id 0
Ethernet II, Src: HuaweiTe_f0:4f:dc (00:e0:fc:f0:4f:dc), Dst: HuaweiTe_ed:04:ec (00:e0:fc:ed:04:ec)
MultiProtocol Label Switching Header, Label: 1026, Exp: 6, S: 1, TTL: 255
Internet Protocol Version 4, Src: 10.1.1.1, Dst: 10.4.4.4
Transmission Control Protocol, Src Port: 179, Dst Port: 50565, Seq: 20, Ack: 20, Len: 76
Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 76
    Type: UPDATE Message (2)
    Withdrawn Routes Length: 0
    Total Path Attribute Length: 53
    Path attributes
        Path Attribute - MP_UNREACH_NLRI
            Flags: 0x90, Optional, Extended-Length, Non-transitive, Complete
            Type Code: MP_UNREACH_NLRI (15)
            Length: 49
            Address family identifier (AFI): IPv4 (1)
            Subsequent address family identifier (SAFI): Labeled VPN Unicast (128)
            Withdrawn Routes
                BGP Prefix
                BGP Prefix
                BGP Prefix
                    Prefix Length: 112
                    Label Stack: 0 (bottom)
                    Route Distinguisher: 100:1
                    MP Unreach NLRI IPv4 prefix: 10.0.61.0

参考文献

BGP Update Message