bgpd: EoR marker not sent for all negotiated AF

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

bgpd: EoR marker not sent for all negotiated AF

Pierre Emeriaud
If both IPv4 and IPv6 address families are (successfully) negotiated
during BGP OPEN, bgpd sends only the IPv4 End-of-Rib marker and fails
to send the IPv6 EoR marker.

If only one address family is negotiated, EoR marker is sent according
to the correct address family.

End-of-RIB marker is either a withdraw (IPv4) or a MP_UNREACH_NLRI
(IPv6) with no routes. EoR is defined in RFC 4724


Setup:
- IPv4 & IPv6 address families negotiated in bgp OPEN
- no network announced or only IPv6
- heimdall is running -stable
- dev is running -current as of 20180302

petrus@dev[0]:~$ bgpctl show nei heimdall
BGP neighbor is 2001:678:3cc:2101::1, remote AS 206155
 Description: heimdall
  BGP version 4, remote router-id 212.129.29.29
  BGP state = Established, up for 00:02:56
  Last read 00:00:26, holdtime 90s, keepalive interval 30s
  Neighbor capabilities:
    Multiprotocol extensions: IPv4 unicast, IPv6 unicast        <<<<<<<<<<<<<
    Route Refresh
    Graceful Restart: Timeout: 90, restarted, IPv4 unicast, IPv6 unicast <<<<
    4-byte AS numbers

  Message statistics:
                  Sent       Received
  Opens                    3          3
  Notifications            1          1
  Updates                  4         12
  Keepalives              21         21
  Route Refresh            1          2
  Total                   30         39

  Update statistics:
                  Sent       Received
  Updates                  0          0
  Withdraws                0          0
  End-of-Rib               1          1                         <<<<<<<<<<<<<

  Local host:  2001:678:3cc:2101::3, Local port:  30881
  Remote host: 2001:678:3cc:2101::1, Remote port:   179

The same on heimdall.

logs show only IPv4 EoR:
Mar  8 18:16:48 dev bgpd[52065]: neighbor 2001:678:3cc:2101::1
(heimdall): sending IPv4 unicast EOR marker
Mar  8 18:16:48 dev bgpd[52065]: neighbor 2001:678:3cc:2101::1
(heimdall): received IPv4 unicast EOR marker

Here is a capture from dev of the bgp session establishment:
No.     Time           Source                Destination
Protocol Length Info
      1 0.000000       2001:678:3cc:2101::3  2001:678:3cc:2101::1  TCP
     98     42445 → 179 [SYN] Seq=0 Win=16384 Len=0 MSS=1440
SACK_PERM=1 WS=64 TSval=239166748 TSecr=0
      2 0.000193       2001:678:3cc:2101::1  2001:678:3cc:2101::3  TCP
     94     179 → 42445 [SYN, ACK] Seq=0 Ack=1 Win=16384 Len=0
MSS=1440 WS=64 TSval=2887012390 TSecr=239166748
      3 0.000253       2001:678:3cc:2101::3  2001:678:3cc:2101::1  TCP
     86     42445 → 179 [ACK] Seq=1 Ack=1 Win=16384 Len=0
TSval=239166748 TSecr=2887012390
      4 0.000777       2001:678:3cc:2101::1  2001:678:3cc:2101::3  BGP
     149    OPEN Message
      5 0.001346       2001:678:3cc:2101::3  2001:678:3cc:2101::1  BGP
     149    OPEN Message
      6 0.001568       2001:678:3cc:2101::3  2001:678:3cc:2101::1  BGP
     105    KEEPALIVE Message
      7 0.001701       2001:678:3cc:2101::1  2001:678:3cc:2101::3  TCP
     86     179 → 42445 [ACK] Seq=64 Ack=83 Win=17088 Len=0
TSval=2887012390 TSecr=239166748
      8 0.001851       2001:678:3cc:2101::1  2001:678:3cc:2101::3  BGP
     105    KEEPALIVE Message
      9 0.002375       2001:678:3cc:2101::3  2001:678:3cc:2101::1  BGP
     109    UPDATE Message
     10 0.014815       2001:678:3cc:2101::1  2001:678:3cc:2101::3  BGP
     109    UPDATE Message
     11 0.211881       2001:678:3cc:2101::3  2001:678:3cc:2101::1  TCP
     86     42445 → 179 [ACK] Seq=106 Ack=106 Win=16384 Len=0
TSval=239166749 TSecr=2887012390


No.     Time           Source                Destination
Protocol Length Info
      9 0.002375       2001:678:3cc:2101::3  2001:678:3cc:2101::1  BGP
     109    UPDATE Message

Internet Protocol Version 6, Src: 2001:678:3cc:2101::3, Dst:
2001:678:3cc:2101::1
Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 23
    Type: UPDATE Message (2)
    Withdrawn Routes Length: 0
    Total Path Attribute Length: 0


No.     Time           Source                Destination
Protocol Length Info
     10 0.014815       2001:678:3cc:2101::1  2001:678:3cc:2101::3  BGP
     109    UPDATE Message

Internet Protocol Version 6, Src: 2001:678:3cc:2101::1, Dst:
2001:678:3cc:2101::3
Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 23
    Type: UPDATE Message (2)
    Withdrawn Routes Length: 0
    Total Path Attribute Length: 0


If only IPv6 is negotiated, EoR marker is sent. Here is what it looks like:

Border Gateway Protocol - UPDATE Message
    Marker: ffffffffffffffffffffffffffffffff
    Length: 29
    Type: UPDATE Message (2)
    Withdrawn Routes Length: 0
    Total Path Attribute Length: 6
    Path attributes
        Path Attribute - MP_UNREACH_NLRI
            Flags: 0x80, Optional, Non-transitive, Complete
            Type Code: MP_UNREACH_NLRI (15)
            Length: 3
            Address family identifier (AFI): IPv6 (2)
            Subsequent address family identifier (SAFI): Unicast (1)
            Withdrawn routes (0 bytes)

Mar  8 18:41:01 dev bgpd[52065]: neighbor 2001:678:3cc:2101::1
(heimdall): sending IPv6 unicast EOR marker
Mar  8 18:41:01 dev bgpd[52065]: neighbor 2001:678:3cc:2101::1
(heimdall): received IPv6 unicast EOR marker


(On a side note, is it possible with bgpd to announce IPv4 routes over
an IPv6 transport, even with afi/safi 1/1 negotiated?)

thanks in advance,
pierre