-
Notifications
You must be signed in to change notification settings - Fork 77
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
Update vrf.py #97
Update vrf.py #97
Conversation
Fixed variables for ip rule commands. Was incorrectly referencing vrf_dev_name, instead of vrf_table. E.g. Before: ip rule add pref 200 oif {{vrf_dev_name}} table {{vrf_dev_name}} After: ip rule add pref 200 oif {{vrf_dev_name}} table {{vrf_table}}
@jhiggins-NZ thanks for the patch!. Can you pls share your config + iproute2 version ?. ifupdown2 sets vrf_dev_name = vrf_table_name in auto mode and we populate iproute2 table name map. So, just curious what config you were using and what error are you seeing. |
Hi @roopa-prabhu, Example config: auto eth1 ifupdown2 version: IP Route 2 verson Example of the issue: Essentially here ip rule is expecting a table ID. Instead the variable references the table name instead :) Hope this helps. Cheers, |
Hi @jhiggins-NZ I tried it on my debian buster and it seems to work. Can I ask you to provide debug log? What we suspect is that you are missing the rt_table file
Extract from the man:
|
Got my hands full for the next week, but will retest after that. In the meantime, setup is a fresh ubuntu 16.04.5 server install, with Kernel 4.16. Then the rest of the test is exactly as above. |
Looks like you are correct. info: vrf: syncing table map to /etc/iproute2/rt_tables.d/ifupdown2_vrf_map.conf info: cannot find /etc/iproute2/rt_tables.d. pls check if your iproute2 version supports rt_tables.d /etc/iproute2# ls Do you know why iproute2 4.20 is missing the file? Cheers, |
Change vrf_dev_name to vrf_table for VRF ip rule delete
Hello @jhiggins-NZ On my debian buster VM I have iproute2 4.20 installed and I can see that this directory exists.
Maybe you should purge and reinstall iproute2? Let me know. |
Hello @jhiggins-NZ Did you fix the iproute2 issue? Thanks, |
moved to #318 |
Fixed variables for ip rule commands.
Was incorrectly referencing vrf_dev_name, instead of vrf_table.
Caused ip rule cmd to fail.
Before:
ip rule add pref 200 oif {{vrf_dev_name}} table {{vrf_dev_name}}
After:
ip rule add pref 200 oif {{vrf_dev_name}} table {{vrf_table}}