You are not logged in.

#1 2007-06-22 13:22:49

Athanagor
Member
Registered: 2007-06-22
Posts: 4

How to add a Virtual Network Interface (e.g. eth0:1)?

Hello everybody.
I'm trying to figure out, how to add a virtual ether interface, e.g. eth0:1.
When I add a line like:
eth0:1="eth0:1 192.168.0.105 netmask 255.255.255.0 broadcast 192.168.0.255"
and change
INTERFACES=(lo eth0) to INTERFACES=(lo eth0 eth0:1) in rc.conf
I got Errors and the interface doesn't show up.

eth0 is initialized by using dhcp.

Has anybody a solution for it?

Thanks for help, Oli.

Last edited by Athanagor (2007-06-22 13:23:33)

Offline

#2 2007-06-22 17:44:04

smoon
Member
Registered: 2005-08-22
Posts: 468
Website

Re: How to add a Virtual Network Interface (e.g. eth0:1)?

Something like this should work:

lo="lo 127.0.0.1"
eth0="dhcp"
eth01="eth0:1 192.168.0.105"
INTERFACES=(lo eth0 eth01)

Offline

#3 2007-06-22 20:27:04

Athanagor
Member
Registered: 2007-06-22
Posts: 4

Re: How to add a Virtual Network Interface (e.g. eth0:1)?

Thanks to Smoon!
I've just tested it and of course it runs.
I thought, that the variablename must be a valid interface-name.
Now  I know better.
Again, thanks Smoon.

Problem solved, Oli.

Offline

Board footer

Powered by FluxBB