0

I'm struggling to setup virtual eth interface on Suse 12

When I run:

ipconfig eth0:1 10.0.0.2 netmask 255.255.255.0

Output from ifconfig is as expected:

eth0      Link encap:Ethernet  HWaddr 00:01:02:03:04:05
          inet addr:10.0.0.1  Bcast:10.0.24.255  Mask:255.255.255.0

eth0:1    Link encap:Ethernet  HWaddr 00:01:02:03:04:05
          inet addr:10.0.0.2  Bcast:10.0.24.255  Mask:255.255.255.0

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0

However this setup is not persistent. When the system is restarted I can no longer see eth0:1

I tried adding the IPADDR1='10.0.0.2/24' to the /etc/sysconfig/network/if-eth0 config file and that seems to be working fine BUT I cannot see eth0:1 in the ifconfig output ?

am I missing something?

migrated from serverfault.com Apr 10 '15 at 21:46

This question came from our site for system and network administrators.

0

After long search I have found the answer: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/Documentation/networking/alias.txt

Looks like virtual/alias interfaces are deprecated and should be avoided and one should rather add multiple IP addresses directly to eth0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.