[OpenSUSE 10.3] virtual network interface

Does anyone know how to have a virtual interface and make it permanent?
This cannot be done via yast.

I can do ifconfig eth0:0 192.168.25.25 - but once I reboot, it’s gone.

I have also tried creating a file /etc/sysconfig/network-scripts/ifcfg-eth0:1


DEVICE=eth0:1
BOOTPROTO=static
IPADDR=192.168.25.25
NETMASK=255.255.255.0
NETWORK=192.168.25.0
BROADCAST=192.168.25.255
ONBOOT=yes

but when I restart the network (/etc/init.d/network restart) I get the
following and I don’t get any eth0:1 interface when I do ifconfig -a.



Shutting down the NetworkManager                                      done
Shutting down the DHCP DBUS Daemon                                    done
Shutting down the NetworkManagerDispatcher                            done
Hint: you may set mandatory devices in /etc/sysconfig/network/config
Setting up network interfaces:
    lo
    lo        IP address: 127.0.0.1/8
Checking for network time protocol daemon (NTPD):                     doneing
    eth0      device: Broadcom Corporation NetXtreme BCM5722 Gigabit Ethernet PCI Express
    eth0      IP address: 203.10.1.21/24
    eth0:zeus IP address: 203.10.1.21/24
Checking for network time protocol daemon (NTPD):                     doneing
Setting up service network  .  .  .  .  .  .  .  .  .  .  .  .  .  .  done

Would someone know how to set this up?

Thanks.

In 11.0 YaST there is a panel for assigning alias addresses for the interface. I don’t run 10.3 anymore, but I doubt that it is really impossible via YaST.

No one here knows how to do this in OpenSUSE 10.3?!

Ok, I looked at a remote 10.1 server with ncurses yast, and it’s under Network Devices > Network Card > Edit > Advanced > Additional Addresses. IIRC the same in 10.3.

Thanks for your help.

I’ve looked and there’s no such option under 10.3. I can go to Network Devices > Network Card then there is no “Edit” - “Advanced”

I have read the ifcfg-vlan man page and have setup /etc/sysconfig/network/ifcfg-vlan3:

STARTMODE=onboot
ETHERDEVICE=eth0
IPADDR=192.168.25.25/24

Now when I restart the network (service network restart) I can see vlan3. But still cannot ping or ssh to that IP address from outside. Although I can ssh to this IP from the box itself. So, I’m guessing it’s a routing table issue.

You have to select the eth device before you can edit. Also you should have selected ifup method.

Hi,

It is definitely available in yast. Via the ifup method as ken states or network manager method from:

Network devices -> network card -> (select card) -> configure -> additional addresses.

hth
J

Thanks, yes. It’s definitely there.

But my problem was that I was trying to assign an IP address to the virtual interface (vif) from a different subnet. This will never work as the server’s physical network interface is connected to another subnet. So, if you ping the vif’s IP from outside, it won’t respond as data link layer would not know where to find that IP.

Anyhow, I solved the problem just by assigning an IP from the same subnet as my physical interface.