You are not logged in.

#1 2008-03-27 20:03:15

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Netcfg2 and network interface aliases

Hi all,
my server has one physical network card and some aliases defined (eth0:0, eth0:1 ecc.).
I want to switch to new netcfg but I don't know in wich way I can define them within a profile.
Now my /etc/rc.conf is:

eth0="eth0 192.168.x.1 netmask 255.255.255.0 broadcast 192.168.x.255"
eth0a0="eth0:0 192.168.x.5 netmask 255.255.255.0 broadcast 192.168.x.255"
eth0a1="eth0:1 192.168.x.20 netmask 255.255.255.0 broadcast 192.168.x.255"
eth0a2="eth0:2 192.168.x.9 netmask 255.255.255.0 broadcast 192.168.x.255"
..
eth0a8="eth0:8 192.168.x.69 netmask 255.255.255.0 broadcast 192.168.x.255"
INTERFACES=(lo eth0 eth0a0 eth0a1 eth0a2 eth0a3 eth0a4 eth0a5 eth0a6 eth0a7 eth0a8)

Any idea?
Thanks
Luca

Last edited by luca (2008-03-27 20:04:14)

Offline

#2 2008-03-27 20:14:48

tigrmesh
IRC Op
From: Florida, US
Registered: 2007-12-11
Posts: 794

Re: Netcfg2 and network interface aliases

Hi.

Have you looked at /etc/network.d/examples/ethernet-static.example?  It seems like it has what you need.

Offline

#3 2008-03-27 20:16:50

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Netcfg2 and network interface aliases

Hi tigrmesh,
yes I saw the static example, but I want to know how define additional aliases

Offline

#4 2008-03-27 20:49:00

tigrmesh
IRC Op
From: Florida, US
Registered: 2007-12-11
Posts: 794

Re: Netcfg2 and network interface aliases

If I understand correctly, you don't have aliases any more, you define a profile for each of your aliases in /etc/network.d.  In your case you would name them eth0a0, eth0a1, eth0a2, etc. 

Then you'd put them in NETWORKS=().

Offline

#5 2008-03-28 00:37:41

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Netcfg2 and network interface aliases

If what you're doing works, you don't have to switch. The classic configuration style  is here to stay.

Offline

#6 2008-03-28 02:35:39

Cypher
Member
From: Coquimbo, Chile
Registered: 2007-04-14
Posts: 67

Re: Netcfg2 and network interface aliases

noob question:

can have virtual interfaces with any NIC ???

Offline

#7 2008-03-28 08:20:21

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Netcfg2 and network interface aliases

Cypher wrote:

noob question:

can have virtual interfaces with any NIC ???

Easy way to find out if your nic supports it.... open a console and try and use one.

Offline

#8 2008-03-28 10:07:39

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: Netcfg2 and network interface aliases

Since the OP'er has gotten an answer -> little hijacking of this thread...

Why would you use virtual interfaces? I have never heard of it (not pretending it has no use if I don't know if, of course...)

Zl.

Offline

#9 2008-03-28 16:01:01

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Netcfg2 and network interface aliases

Thank you iphitus,
I will stay with the "old" configuration

Offline

Board footer

Powered by FluxBB