diff options
author | DmitriyEshenko <dmitriy.eshenko@vyos.io> | 2019-12-26 13:14:24 +0000 |
---|---|---|
committer | DmitriyEshenko <dmitriy.eshenko@vyos.io> | 2019-12-26 13:14:24 +0000 |
commit | 4fa0b07c7c59f3e31080dc6f18be5e9459b53ac1 (patch) | |
tree | 56c75d11be698c6bebf97f9d2a2c1df1460a521d /sysconf | |
parent | 0b8818dec45567d794b1d648e37639f28df8e64a (diff) | |
download | vyatta-cfg-system-4fa0b07c7c59f3e31080dc6f18be5e9459b53ac1.tar.gz vyatta-cfg-system-4fa0b07c7c59f3e31080dc6f18be5e9459b53ac1.zip |
T1903: Implement predefined interface naming for VMWare
Diffstat (limited to 'sysconf')
-rw-r--r-- | sysconf/64-vyos-vmware-net.rules | 14 | ||||
-rw-r--r-- | sysconf/65-vyatta-net.rules | 7 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sysconf/64-vyos-vmware-net.rules b/sysconf/64-vyos-vmware-net.rules new file mode 100644 index 00000000..66a4a069 --- /dev/null +++ b/sysconf/64-vyos-vmware-net.rules @@ -0,0 +1,14 @@ +ATTR{[dmi/id]sys_vendor}!="VMware, Inc.", GOTO="end_vmware_nic" + +ACTION=="add", SUBSYSTEM=="net", ATTRS{label}=="Ethernet0", ENV{VYOS_IFNAME}="eth0" +ACTION=="add", SUBSYSTEM=="net", ATTRS{label}=="Ethernet1", ENV{VYOS_IFNAME}="eth1" +ACTION=="add", SUBSYSTEM=="net", ATTRS{label}=="Ethernet2", ENV{VYOS_IFNAME}="eth2" +ACTION=="add", SUBSYSTEM=="net", ATTRS{label}=="Ethernet3", ENV{VYOS_IFNAME}="eth3" +ACTION=="add", SUBSYSTEM=="net", ATTRS{label}=="Ethernet4", ENV{VYOS_IFNAME}="eth4" +ACTION=="add", SUBSYSTEM=="net", ATTRS{label}=="Ethernet5", ENV{VYOS_IFNAME}="eth5" +ACTION=="add", SUBSYSTEM=="net", ATTRS{label}=="Ethernet6", ENV{VYOS_IFNAME}="eth6" +ACTION=="add", SUBSYSTEM=="net", ATTRS{label}=="Ethernet7", ENV{VYOS_IFNAME}="eth7" +ACTION=="add", SUBSYSTEM=="net", ATTRS{label}=="Ethernet8", ENV{VYOS_IFNAME}="eth8" +ACTION=="add", SUBSYSTEM=="net", ATTRS{label}=="Ethernet9", ENV{VYOS_IFNAME}="eth9" + +LABEL="end_vmware_nic" diff --git a/sysconf/65-vyatta-net.rules b/sysconf/65-vyatta-net.rules index 0f4b9006..2b48c121 100644 --- a/sysconf/65-vyatta-net.rules +++ b/sysconf/65-vyatta-net.rules @@ -13,6 +13,13 @@ KERNEL!="eth*|wlan*", GOTO="vyatta_net_end" # ignore "secondary" monitor interfaces of mac80211 drivers KERNEL=="wlan*", ATTRS{type}=="803", GOTO="vyatta_net_end" +# If using VyOS predefined names +ENV{VYOS_IFNAME}!="eth*", GOTO="end_vyos_predef_names" + +DRIVERS=="?*", PROGRAM="vyatta_net_name %k $attr{address} $env{VYOS_IFNAME}", NAME="%c", GOTO="vyatta_net_end" + +LABEL="end_vyos_predef_names" + # ignore interfaces without a driver link like bridges and VLANs DRIVERS=="?*", PROGRAM="vyatta_net_name %k $attr{address}", NAME="%c" |