-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix can't access IPV6 address via management interface because 'default' route table does not add to route lookup issue. #17281
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,9 @@ iface eth0 inet6 static | |
pre-down ip -6 route delete default via 2603:10e2:0:2902::1 dev eth0 table default | ||
pre-down ip -6 route delete 2603:10e2:0:2902::/64 dev eth0 table default | ||
pre-down ip -6 rule delete pref 32765 from 2603:10e2:0:2902::8/128 table default | ||
# IPV6 default table not add to lookup by default, management server need this to access IPV6 address when BGP shutdown | ||
up ip -6 rule add pref 32767 lookup default | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you please move this to 'up' section - line 40 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
pre-down ip -6 rule delete pref 32767 lookup default | ||
# | ||
source /etc/network/interfaces.d/* | ||
# | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,9 @@ iface eth1 inet6 static | |
pre-down ip -6 route delete default via 2603:10e2:0:abcd::1 dev eth1 table default | ||
pre-down ip -6 route delete 2603:10e2:0:abcd::/64 dev eth1 table default | ||
pre-down ip -6 rule delete pref 32765 from 2603:10e2:0:abcd::8/128 table default | ||
# IPV6 default table not add to lookup by default, management server need this to access IPV6 address when BGP shutdown | ||
up ip -6 rule add pref 32767 lookup default | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here. please keep 'up' and 'pre-down' separate There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
pre-down ip -6 rule delete pref 32767 lookup default | ||
iface eth0 inet6 static | ||
address 2603:10e2:0:2902::8 | ||
netmask 64 | ||
|
@@ -71,6 +74,9 @@ iface eth0 inet6 static | |
pre-down ip -6 route delete default via 2603:10e2:0:2902::1 dev eth0 table default | ||
pre-down ip -6 route delete 2603:10e2:0:2902::/64 dev eth0 table default | ||
pre-down ip -6 rule delete pref 32765 from 2603:10e2:0:2902::8/128 table default | ||
# IPV6 default table not add to lookup by default, management server need this to access IPV6 address when BGP shutdown | ||
up ip -6 rule add pref 32767 lookup default | ||
pre-down ip -6 rule delete pref 32767 lookup default | ||
# | ||
source /etc/network/interfaces.d/* | ||
# | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you get the magic number? #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The number is based on IPV4 default route table priority:
admin@vlab-01:~$ ip -4 rule list
1001: from all lookup local
32764: from all to 172.17.0.1/24 lookup default
32765: from 10.250.0.101 lookup default
32766: from all lookup main
32767: from all lookup default
The default route table need have lowest priority so when can' find route from 'local' and 'main' table the rules from 'default' table will be use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems we need to define a named constant for 32764, and +3 here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.