0

I am creating 4 different sub interfaces for 4 different VLAN. The sub interfaces are now of the form

eth0.a, eth0.b, eth0.c, eth0.d.

I am looking for a solution to rename these interfaces. so that the applications that are already consuming these interfaces doesn't have to change.

I tried ip link set dev name command, but the change is not persistent on reboot. so looking for a persistent solution.

Any pointers/advise/help would be really appreciated.

Thanks!

PDP
  • 1

1 Answers1

1

Subinterfaces are named according to the interface configuration files. In RHEL/CentOS/SL, you'll find the config files in /etc/sysconfig/network-scripts. The configuration filenames are like: ifcfg-eth0. Make new files like ifcfg-eth0.a, etc. Within the files you can specify the interface names. There's two types of names. One is a friendly name, more of a label, not used by the OS but displayed for user/admin use. The other is the name within the OS. I do not know the syntax of specifying the OS level names.

Also, you did not specify your distro. The information I've provided is for RPM based distros using the network service, not NetworkManager. If your distro is RHEL6.7 or later (using NetworkManager), or any non-rpm based distro, the method for doing subinterfaces may be entirely different.

Background: I've worked with RHEL 6.7 and 6.8, and the first thing I did was disable NetworkManager (I'm supporting hosts with static network configs). I do this because the network service and the /etc/sysconfig/network-scripts folder give complete control over the network systems. NetworkManager gives a shiny interface and very clumsy control and it feels like wrestling to get it to work correctly.

Jeter-work
  • 845
  • 4
  • 15