You are not logged in.

#1 2011-07-12 12:01:35

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 331
Website

How do I add multiple nics to set up a router wuth netcfg

Only all I get with multiple files is rnetlink answers file exists.

I don't seem to be able to find much usefull information on the best way to do this to ue Arch as a router.

(It was easy before)


Kind regards

Benedict White

Offline

#2 2011-07-12 13:29:49

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How do I add multiple nics to set up a router wuth netcfg

Write a suitable profile for each interface. You can't have multiple interfaces in one profile.

(It's still easy - just different smile )

Last edited by tomk (2011-07-12 13:30:32)

Offline

#3 2011-07-12 14:44:07

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 331
Website

Re: How do I add multiple nics to set up a router wuth netcfg

Right, so a profile for each interface? That's easy in principle but what would be in each one? Are there examples around?


Kind regards

Benedict White

Offline

#4 2011-07-12 14:47:14

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 331
Website

Re: How do I add multiple nics to set up a router wuth netcfg

I get the rnetlink answers file exists error with multiple profiles (one for each interface).


Kind regards

Benedict White

Offline

#5 2011-07-12 16:29:33

derelict
Member
Registered: 2006-07-25
Posts: 81

Re: How do I add multiple nics to set up a router wuth netcfg

You can get creative with the POST_UP command:

CONNECTION='ethernet'
DESCRIPTION='A basic static ethernet connection using iproute'
INTERFACE='eth0'
IP='static'
ADDR='192.168.1.5'
NETMASK='255.255.255.0'
GATEWAY='192.168.1.1'
DNS=('192.168.1.1' 'X.X.X.X')
DOMAIN='domain.org'
POST_UP='ip addr add 10.200.1.49/26 brd 10.200.1.63 dev eth1 label eth1'
PRE_DOWN='ip addr del 10.200.1.49/26 dev eth1 label eth1'

It's not pretty, but it allows both interfaces to be configured with one profile.

Offline

#6 2011-07-12 20:59:24

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How do I add multiple nics to set up a router wuth netcfg

Benedict_White wrote:

Right, so a profile for each interface? That's easy in principle but what would be in each one? Are there examples around?

Impossible to answer that without details of what you're trying to achieve. "use Arch as a router" is extremely vague.

Also, please post error messages exactly as they appear on your system - paraphrasing, spelling errors, etc just complicate matters.

Last edited by tomk (2011-07-12 21:06:10)

Offline

#7 2011-07-12 22:17:14

cybertorture
Member
Registered: 2010-05-05
Posts: 339

Re: How do I add multiple nics to set up a router wuth netcfg

Well i got it running with 3 ethernet devices this way :

ll /etc/network.d/
-rw-r--r--  1 root root  178 19 юни  5,17 eth0
-rw-r--r--  1 root root  178 19 юни  5,17 eth1
-rw-r--r--  1 root root  110 19 юни  5,17 eth2

note: my configuration is eth2 - internet device eth0 and eth1 are local net

cat /etc/network.d/eth2 
CONNECTION='ethernet'
DESCRIPTION='A basic dhcp ethernet connection using iproute'
INTERFACE='eth2'
IP='dhcp'
cat /etc/network.d/eth0
CONNECTION='ethernet'
DESCRIPTION='A basic static ethernet connection using iproute'
INTERFACE='eth0'
IP='static'
ADDR='192.168.1.1'

eth1 is same as eth0
note: only problem so far is that if eth0 or eth1 does not have anything connected to them they seem to fail

Last edited by cybertorture (2011-07-12 22:19:24)


O' rly ? Ya rly Oo

Offline

Board footer

Powered by FluxBB