You are not logged in.

#1 2012-03-09 13:48:07

balasarius
Member
From: NorthWest, United Kingdom
Registered: 2010-09-28
Posts: 10

[SOLVED]Setup 2 network cards. one with dhcp and the other with...

...static IP

hey Guys,

I'm having trouble setting up 2 separate network cards to start up on boot, but so far I'm struggling just to set up the too separate networks using 'ifcfg'.

I have tried setting up the two network in the /etc/rc.conf file like this

 interface=eth0
  address=
  netmask=
  broadcast=
  gateway=

 interface=eth1
  address=192.168.56.102
  netmask=255.255.255.0
  broadcast=192.168.56.0

but where eth0 should be dhcp (and in my case I should get a 10.X.X.X address) but all I get is 0.0.0.0.
now if I remove (or comment out) the settings for eth1 then eth0 gets the address I expect.

I've got myself a little confused with ifcfg and what it can and can't do.

I need help please smile

And 'Thank You' in advance

Last edited by balasarius (2012-03-09 14:39:08)

Offline

#2 2012-03-09 13:50:51

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]Setup 2 network cards. one with dhcp and the other with...

rc.conf alone supports just one wired interface: http://www.archlinux.org/news/deprecation-of-net-tools/
Are you using networkmanager, netcfg or ...?

Offline

#3 2012-03-09 13:59:53

balasarius
Member
From: NorthWest, United Kingdom
Registered: 2010-09-28
Posts: 10

Re: [SOLVED]Setup 2 network cards. one with dhcp and the other with...

karol wrote:

rc.conf alone supports just one wired interface: http://www.archlinux.org/news/deprecation-of-net-tools/
Are you using networkmanager, netcfg or ...?


hmm OK that makes sense.

as I already have netcfg install I would like to know how to set up both cards with that

Last edited by balasarius (2012-03-09 14:00:15)

Offline

#4 2012-03-09 14:03:53

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]Setup 2 network cards. one with dhcp and the other with...

balasarius wrote:

as I already have netcfg install I would like to know how to set up both cards with that

You need to be more specific: what exactly are the problems you're up against? Post the configs you're using.

Offline

#5 2012-03-09 14:04:21

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

Re: [SOLVED]Setup 2 network cards. one with dhcp and the other with...

Create a profile for each connection.

Offline

#6 2012-03-09 14:05:05

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [SOLVED]Setup 2 network cards. one with dhcp and the other with...

Have a look at /etc/network.d/examples/

Offline

#7 2012-03-09 14:38:00

balasarius
Member
From: NorthWest, United Kingdom
Registered: 2010-09-28
Posts: 10

Re: [SOLVED]Setup 2 network cards. one with dhcp and the other with...

hey Guys,

thanks for all your replies.

I've had a good look at the examples in /etc/network.d/examples folder and what the wiki had to say here https://wiki.archlinux.org/index.php/Netcfg

and have setup two network profiles into the

I've setup eth0 with:

CONNECTION='ethernet'
DESCRIPTION='A basic dhcp ethernet connection using iproute'
INTERFACE='eth0'
IP='dhcp'

and eth1 with:

CONNECTION='ethernet'
DESCRIPTION='A basic static ethernet connection using iproute'
INTERFACE='eth1'
IP='static'
ADDR='192.168.56.102'

and then added the NETWORKS=() array into the rc.conf along with net-profiles in the DAEMONS=() array and reboot the box smile

magic

Offline

Board footer

Powered by FluxBB