You are not logged in.

#1 2005-10-12 22:49:07

gaah
Member
From: Sweden
Registered: 2003-09-12
Posts: 124

dual nics

I have just reinstalled linux, ftp install, and this time the network config didn't find my usual card, only the other so I used it for the installation... But anyway, I want to use the other card in linux. So how do I set it up? I guess I would have eth0 and eth1, but should I also have two lo interfaces? and how do I bind them aso?

Offline

#2 2005-10-13 00:51:34

syamajala
Member
From: here, there, everywhere
Registered: 2005-01-25
Posts: 604
Website

Re: dual nics

you would only have 1 lo

Offline

#3 2005-10-13 04:37:57

ffderrick
Member
Registered: 2004-03-13
Posts: 11

Re: dual nics

Yes there should be an eth0 and eth1 if both cards are supported in the kernel.
When you edit /etc/rc.conf, try setting eth1 and commenting out eth0.
for instance.

eth1="dhcp"

  if you use dhcp.  substitute your network settings if not.
Change

eth0="dhcp"

To

#eth0="dhcp"

This comments out the first network interface.


"I hate rude behavior in a man.  Won't tolerate it."

Offline

#4 2005-10-13 15:47:41

gaah
Member
From: Sweden
Registered: 2003-09-12
Posts: 124

Re: dual nics

to set eth1="dhcp" didn't work at all... any other ideas?

and about that only one lo thing... the ip 127.0.0.1 is a loopback address. wouldn't every nic has its own loopbackaddress? so my other nic would have 127.0.0.2 or something?

Offline

#5 2005-10-13 17:19:53

sh__
Member
Registered: 2005-07-19
Posts: 271

Re: dual nics

AFAIK the loopback interface is independent of hardware. You can have a loopback interface even if there is not a single nic in the computer.

As for your other question, try first disabling the loading of the module for the other nic, and load only the module for the card you want to use. Just leave eth0="dhcp" in rc.conf (if you're using dhcp, that is).

Offline

#6 2005-10-15 00:32:41

cs25x
Member
Registered: 2004-05-04
Posts: 150

Re: dual nics

what module(s) do your NICs use? I have a reaktek (8139too) and a natsemi (natsemi) which work together. Have you tried hwd -s? that will tell you what is discovered and hwd -h then gives the dirty details on the module. lspci might help too.


--(*(cs25x--));

Offline

#7 2005-10-15 12:34:50

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,306

Re: dual nics

I had a similar problem, 1 of my networkcards was activated, the other wasn't.

After digging in logs and wiki i changed my daemons in etc/rc.conf

DAEMONS=(syslog-ng !hotplug hwd !pcmcia network netfs crond)

As you can see hotplug is now not started, instead hwd/lshwd does that job.
suddenly both network cards are recognized.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#8 2005-10-15 15:27:13

gaah
Member
From: Sweden
Registered: 2003-09-12
Posts: 124

Re: dual nics

I have fixed this now. I can connect to the internet with the card I wanted to (loaded the wrong module). Now when I load only the module for this card it works, but one of the questions remain: If I wan both the cards to be active, how do I do that? I want one card to connect to the internet, and the other should forward traffic to my second computer.

I use hwd to find out which modules to load and write them into rc.conf. hotplug during bootup is so slow!

Offline

#9 2005-10-15 15:41:10

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,443

Re: dual nics

rtfman


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#10 2005-10-15 20:26:40

Deciare
Member
From: UTC -5:00
Registered: 2005-05-05
Posts: 78

Re: dual nics

gaah wrote:

If I wan both the cards to be active, how do I do that? I want one card to connect to the internet, and the other should forward traffic to my second computer.

I have that exact setup at home. As others have said, you need to find out what module your second card uses, load that module, and give your second card a different IP address either statically or through DHCP.

I'm not sure if it's possible to receive an IP address via DHCP assignment if your computer also happens to be the main router (which is normally responsible for running dhcpd), though...

From my /etc/rc.conf:

lo="lo 127.0.0.1"
eth0="eth0 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255"
eth1="eth1 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(lo eth0 eth1)
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

eth0 connects to my LAN, and eth1 connects to the ADSL modem. I put them on different class C networks to make firewall/NAT management easier.

All computers on the LAN (except for the router itself) use 192.168.0.1 (eth0) as the default gateway route.

Offline

#11 2005-10-16 01:23:07

gaah
Member
From: Sweden
Registered: 2003-09-12
Posts: 124

Re: dual nics

rtfman

Oh thank you so much, such a nice attitude!

And a REAL thank you to you Deciare, I'm gonna try set it up tomorrow when I hopefully get arround to install everything on my second pc. (it's completely empty now after I tried beos on it)

Offline

#12 2005-10-16 01:27:58

cs25x
Member
Registered: 2004-05-04
Posts: 150

Re: dual nics

A firewall generator like quicktables should also take care of forwarding from your computer to another. You have to turn on forwarding 

with echo 1 > /proc/sys/net/ipv4/ip_forward 

Put that in /etc/rc.local. then iptables does the rest.


--(*(cs25x--));

Offline

#13 2005-10-16 12:21:18

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,443

Re: dual nics

gaah wrote:

Oh thank you so much, such a nice attitude!

Pleasure. I wonder how you will go further on. You seem to be to lazy to just read the comments in rc.conf, or take time to understand basic techniques before you start to bore others. This is a forum for arch users, if you have any questions concerned to arch, you are welcome. If you want us to teach you basics of tcpip configuration and networking the number of users that want to help you out is rather limited.

I bet, the next day one demands to have the question answered "Help - Installed arch and do not know how to plug in a keyboard".

:evil:

http://wiki.archlinux.org/index.php/Static_IP_and_DHCP
http://www.archlinux.org/docs/en/
http://www.yolinux.com/TUTORIALS/LinuxT … rking.html


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#14 2005-10-16 17:26:31

sh__
Member
Registered: 2005-07-19
Posts: 271

Re: dual nics

Moo-Crumpus wrote:

This is a forum for arch users, if you have any questions concerned to arch, you are welcome. If you want us to teach you basics of tcpip configuration and networking the number of users that want to help you out is rather limited.

The number of users willing to help might be limited, but apparently nonzero.

Setting up networking for dual nics will most likely require editing some Arch specific config files, so I don't see how sharing that knowledge (even how trivial it might be) could hurt anyone.

Offline

#15 2005-10-16 21:42:51

gaah
Member
From: Sweden
Registered: 2003-09-12
Posts: 124

Re: dual nics

You seem to be to lazy to just read the comments in rc.conf

Last time I looked there were no comments about dual nics in that file. I also had problems with getting one nic up and running, which I have done several times in my other arch installs. I've never had any problems with it before, and since there was quite a large update to arch recently, maybe something had changed!? <- meaning arch specific. And lazy you say, I looked in the wiki, I searched the forums and google before I posted. And since I have done this several times before I know how it works, I just couldn't understand what went wrong this time.

If you want us to teach you basics of tcpip configuration and networking the number of users that want to help you out is rather limited.

Apparantly not so limitied as people being rude. I've always had a good experience in the arch forum with people being nice and helpful. Arch isn't always that user friendly, but the forum have always been. But of course, there have to be exceptions also, that have you proved! If my questions are so off target for this forum, why do you even bother to take time and write this stuff? And if you didn't notice, I posted in the newbie section! And last time I looked, the newbie section had this written to it: "New to Arch? There are no stupid questions here!" Or were you too lazy to read that?

Enough said, I will not respond anymore to this shit! I've waisted enough time on this and this forum is for arch specific questions, not personal insults! Have a good life...

Offline

#16 2005-10-17 02:23:29

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: dual nics

I too have dual nics on my machine and have had weird experiences.  I have yet to really sit down and figure out how to get them both working properly.  During the initial FTP installation of Arch it automatically detected and used one of them, and as soon as I reboot, it automatically detected and used the other one, switching the original one off...took me awhile to figure out what happened.

Keep us updated on your progress...

Offline

#17 2005-10-17 12:45:51

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,443

Re: dual nics

"New to Arch? There are no stupid questions here!"

Good point, indeed ... I beg your pardon.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#18 2005-10-17 12:48:23

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,443

Re: dual nics

elasticdog wrote:

I too have dual nics on my machine and have had weird experiences.  I have yet to really sit down and figure out how to get them both working properly.  During the initial FTP installation of Arch it automatically detected and used one of them, and as soon as I reboot, it automatically detected and used the other one, switching the original one off...took me awhile to figure out what happened.

Keep us updated on your progress...

Depends on which module was installed first, if the nics use different hw. I had the same problem with 2 nics, and solved it by loading the modules in the modules section of the rc.conf.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

Board footer

Powered by FluxBB