1

Topology:

loop(2.1.1.1) - routerA (192.168.1.2)--------- (192.168.1.1) routerB - loop(1.1.1.1)

I have eBGP peering configured with a Multihop of 2 on both sides and static routes to reach loopbacks.

  • In the initial TCP handshake (SYN) from 1.1.1.1, the TTL is 2.
  • Return SYN-ACK from peer 2.1.1.1 contains a TTL value of 255.
  • All further BGP packets in both directions contain a TTL of 2.

Why do we see a TTL value of 255 in the SYN-ACK but a value of 2 in the other communication?

Edit:

R2

router bgp 200 
no synchronization 
bgp log-neighbor-changes 
neighbor 2.1.1.1 remote-as 100 
neighbor 2.1.1.1 ebgp-multihop 2 
neighbor 2.1.1.1 update-source Loopback1 
no auto-summary 

R1

router bgp 100 
no synchronization 
bgp log-neighbor-changes 
neighbor 1.1.1.1 remote-as 200 
neighbor 1.1.1.1 ebgp-multihop 2 
neighbor 1.1.1.1 update-source Loopback1 
no auto-summary
4
  • Are you setting TTL Security on your neighbour statement? If so, can you share the config.
    – ditrapanij
    May 8 '20 at 9:04
  • R2 router bgp 200 no synchronization bgp log-neighbor-changes neighbor 2.1.1.1 remote-as 100 neighbor 2.1.1.1 ebgp-multihop 2 neighbor 2.1.1.1 update-source Loopback1 no auto-summary R1 router bgp 100 no synchronization bgp log-neighbor-changes neighbor 1.1.1.1 remote-as 200 neighbor 1.1.1.1 ebgp-multihop 2 neighbor 1.1.1.1 update-source Loopback1 no auto-summary May 8 '20 at 10:19
  • Please edit you post to add your configuration, using the preformatted option.
    – JFL
    May 8 '20 at 10:59
  • My guess: the 3-way handshake SYN -> SYN+ACK -> ACK is handled completely within the TCP stack. The application (BGP in this case) only gets an incoming connection on the TCP socket when the 3-way handshake has been completed. So, most likely, in the implementation the correct TTL is only set when after BGP code gets involved. It is possible to avoid this issue, but it involves changing the socket API. Jan 12 '21 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.