Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tunnels: T3592: Set default TTL to 64 #861

Merged
merged 1 commit into from Jun 4, 2021
Merged

Conversation

sever-sever
Copy link
Member

@sever-sever sever-sever commented Jun 1, 2021

Change Summary

Set default TTL value for tunnels from 0 to 64
There are a lot of situation when the default value 0 (inherit)
not work properly when you have routing configuration for OSPF
or BGP over the tunnels. To fix it you need an explicit set TTL
value other than 0. Or hardcode another value as default.

Also, in some situations with "inherit" value the BGP session can't be established when you upgrade from 1.2 to 1.3/1.4
In 1.2 the TTL value is hardcoded to 255.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Component(s) name

tunnel, ttl

Proposed changes

The change default TTL value for tunnels from 0 (inherit) to 64

How to test

set interfaces tunnel tun0 address '10.0.0.1/30'
set interfaces tunnel tun0 encapsulation 'gre'
set interfaces tunnel tun0 remote '192.0.2.2'
set interfaces tunnel tun0 source-address '192.0.2.1'

Expected ttl 255

vyos@r1-roll# sudo ip -d tunnel show
tun0: gre/ip remote 192.0.2.2 local 192.0.2.1 ttl 64 tos inherit

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Copy link
Member

@c-po c-po left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As VyOS 1.2 uses a TTL of 255 as default https://github.com/vyos/vyatta-cfg-system/blob/crux/templates/interfaces/tunnel/node.def#L64-L68 we should not simply change the default. We rather should use a migration script which sets the ttl explicitly to 255 if none is configured when doing an image upgrade. This keeps the entire solution backwards compatible.

@sever-sever sever-sever changed the title tunnels: T3592: Set default TTL to 64 tunnels: T3592: Set default TTL to 255 Jun 2, 2021
@DmitriyEshenko
Copy link
Contributor

@c-po @sever-sever please, let's following IANA recommendation https://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml#ip-parameters-2
I can't imagine a situation where we need TTL more than 64 for tunnels

@c-po
Copy link
Member

c-po commented Jun 2, 2021

@c-po @sever-sever please, let's following IANA recommendation https://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml#ip-parameters-2
I can't imagine a situation where we need TTL more than 64 for tunnels

I totally agree, we should move to 64 and add a migration script.

@sever-sever sever-sever changed the title tunnels: T3592: Set default TTL to 255 tunnels: T3592: Set default TTL to 64 Jun 2, 2021
Set default TTL value for tunnels from 0 to 64
There are a lot of situation when default value 0 (inherit)
not work properly when you have routing configuration for OSPF
or BGP over the tunnels. To fix it you need explicit set TTL
value other then 0. Or hardcode another value as default.
Copy link
Member

@dmbaturin dmbaturin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this warrants a migration script. Networks with more than 64 hops are incredibly rare. Let's just document the behaviour change in release notes.

@c-po c-po merged commit 5ae12f8 into vyos:current Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants