From d8808f46955fdaed1d2e86ec10b078db66e4639e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 4 Mar 2020 21:28:03 +0100 Subject: vrf: T31: prior to the v4.8 kernel iif and oif rules are needed .. we run on 4.19 thus this is no longer needed. --- src/conf_mode/vrf.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/conf_mode') diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py index 91d8f8432..8036703f1 100755 --- a/src/conf_mode/vrf.py +++ b/src/conf_mode/vrf.py @@ -181,12 +181,11 @@ def apply(vrf_config): table = vrf['table'] if not os.path.isdir(f'/sys/class/net/{name}'): + # For each VRF apart from your default context create a VRF + # interface with a separate routing table _cmd(f'ip link add {name} type vrf table {table}') + # Start VRf _cmd(f'ip link set dev {name} up') - _cmd(f'ip -4 rule add oif {name} lookup {table}') - _cmd(f'ip -4 rule add iif {name} lookup {table}') - _cmd(f'ip -6 rule add oif {name} lookup {table}') - _cmd(f'ip -6 rule add iif {name} lookup {table}') # set VRF description for e.g. SNMP monitoring with open(f'/sys/class/net/{name}/ifalias', 'w') as f: -- cgit v1.2.3