LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-01-2003, 07:13 PM   #1
binkybuckle
Member
 
Registered: Jul 2003
Distribution: debian
Posts: 40

Rep: Reputation: 15
How can I add extra NIC's?


Hi everyone,

I have installed debian with four NIC's in machine (all of them are the same model intel PRO 100's), on installation of debian it showed all four NIC's but it gave me the option to give only one of the NIC's a IP address and subnet mask. Now that debian is installed I have only one NIC fully working (the one I gave an address to on installation).

I have read a howto from www.tldp.org called 'ethernet howto' and it told me that if the module is loaded all I would have to do is add aliases for each ethernet card into the 'modules.conf' file.

I opened the modules.conf file to find that their is no aliases for eth0 (the one that is working) and the file said not to modify this file directly but to read the man page on 'update-modules' instead.

So I thought I would do the right thing and read the man pages for 'update-modules', apon read this it has not told me of any way to add aliases successfully and also has confused me. For example one of the things it told me was to look at the modprobe man page, I did that and modprobe told me to run the command 'modprobe -t net' to load all the modules in the net directory, I ran this command and modprobe errored.

I have also tried just adding eth1, Ip address and everything else into the file /etc/network/interfaces. then running the command 'ifconfig eth1 up' (which seems to work) still can't ping anything through any of the NIC's except eth0. I am getting very fustrated.

Can someone please detail how to get the other NIC's working, thankyou.
 
Old 12-01-2003, 07:56 PM   #2
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
On Debian you want to edit /etc/modules

Then add the entries in /etc/network/interfaces and then bring them up with your preferred method.

HTH
 
Old 12-01-2003, 08:44 PM   #3
binkybuckle
Member
 
Registered: Jul 2003
Distribution: debian
Posts: 40

Original Poster
Rep: Reputation: 15
the driver module is already in /etc/modules

I added eth1,eth2 and eth3 into /etc/network/interfaces exactly the same as eth0 is except with different ip addresses. then I ran the command '/etc/init.d/networking restart', tried to ping from any of the newly installed cards (eth1,eth2.eth3) to another machine and it didn't work. I tried to ping the ip addresses I gave eth1,eth2 and eth3 with only eth0 patched into the network and all pings were successful (ie it has given eth0 aliases of the new ip addresses). I then ran ifconfig and eth0, eth1, eth2 and eth3 all have different hardware addresses than each other.

Can someone tell me what is going on and how to fix it?
 
Old 12-01-2003, 08:48 PM   #4
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
You place the alias inside of /etc/modules in Debian. Is that what you did? How about show us your /etc/modules and /etc/network/interfaces files.

Are the 1,2,3 cards static? Do you have a gateway and route for them?

Let's see the output of route, `cat /etc/modules` and `cat /etc/network/interfaces`

--ll
 
Old 12-02-2003, 03:07 AM   #5
binkybuckle
Member
 
Registered: Jul 2003
Distribution: debian
Posts: 40

Original Poster
Rep: Reputation: 15
I didn't place alias inside of /etc/modules, how do you do that.
I can't show you the /etc/modules or /etc/network/interfaces file until tomorrow because I haven't got the linux box here at the moment.

Are the 1,2,3 cards static? yes
Do you have a gateway and route for them?

Yes I have a gateway for them, the 1,2,3 cards are configured exactly the same as the 0 card in the /etc/network/interfaces (I copied and pasted from the 0 card). The only things I changed was all instances of eth0 to eth1,2,3 and the IP addresses from xxx.xxx.xxx.1 to xxx.xxx.xxx.11,21,31.

If I can't solve my problem by tommorrow I will post the output from `cat /etc/modules` and `cat /etc/network/interfaces`.

Thankyou for all everyones help sofar, its been eye opening.
 
Old 12-02-2003, 11:46 AM   #6
yowi
Member
 
Registered: Dec 2002
Location: Au
Distribution: Debian
Posts: 209

Rep: Reputation: 55
if ifconfig -a shows info for the interfaces they are ready to be configured.
post what it says too.
 
Old 12-02-2003, 04:33 PM   #7
binkybuckle
Member
 
Registered: Jul 2003
Distribution: debian
Posts: 40

Original Poster
Rep: Reputation: 15
// here is the contents of my /etc/modules file:

# /etc/modules: kernel modules to load at boot time.
#
# This file should contain the names of kernel modules that are
# to be loaded at boot time, one per line. Comments begin with
# a "#", and everything on the line after them are ignored.

usb-uhci
input
usbkbd
keybdev
eepro100
eepor100
eepro100
eepro100

// here is the contents of my /etc/network/interfaces file:

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
address 10.121.110.6
netmask 255.255.254.0
network 10.121.110.0
broadcast 10.121.111.255
gateway 10.121.111.254

auto eth1
iface eth1 inet static
address 10.121.110.7
netmask 255.255.254.0
network 10.121.110.0
broadcast 10.121.111.255
gateway 10.121.111.254

auto eth2
iface eth2 inet static
address 10.121.110.8
netmask 255.255.254.0
network 10.121.110.0
broadcast 10.121.111.255
gateway 10.121.111.254

auto eth3
iface eth3 inet static
address 10.121.110.9
netmask 255.255.254.0
network 10.121.110.0
broadcast 10.121.111.255
gateway 10.121.111.254

// here is the output of the 'ifconfig -a' command:

eth0 Link encap:Ethernet HWaddr 00:50:8B:05:0EB
inet addr:10.121.110.6 Bcast:10.121.111.255 Mask:255.255.254.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:67896 errors:0 dropped:0 overruns:0 frame:0
TX packets:109 errors:0 dropped:0 overruns:57 carrier:0
collisions:0 txqueuelen:100
RX bytes:5069873 (4.8 MiB) TX bytes:9218 (9.0 KiB)
Interrupt:11 Base address:0xb000

eth1 Link encap:Ethernet HWaddr 00:50:8B:04:C9E
inet addr:10.121.110.7 Bcast:10.121.111.255 Mask:255.255.254.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:411 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:28716 (28.0 KiB) TX bytes:0 (0.0 b)
Interrupt:10 Base address:0xd000

eth2 Link encap:Ethernet HWaddr 00:50:8B:04:C9:AE
inet addr:10.121.110.8 Bcast:10.121.111.255 Mask:255.255.254.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1492 (1.4 KiB) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0xf000

eth3 Link encap:Ethernet HWaddr 00:50:8B:05:10:0B
inet addr:10.121.110.9 Bcast:10.121.111.255 Mask:255.255.254.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:152 (152.0 b) TX bytes:0 (0.0 b)
Interrupt:9 Base address:0x1000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:83 errors:0 dropped:0 overruns:0 frame:0
TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6032 (5.8 KiB) TX bytes:6032 (5.8 KiB)

-------------------------------------------------------------------------------------------
 
Old 12-02-2003, 10:07 PM   #8
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
OK, the cards are configured. So you provide a route and gateway for them? Also, why do you have 4 NIC's? What is the end goal? Maybe that can help us...

Is that gateway pingable? What's the output of `route`?

Are you using this box as a router? Can you ping each device's IP?

If you want a router, please let us know.
 
Old 12-03-2003, 01:02 AM   #9
binkybuckle
Member
 
Registered: Jul 2003
Distribution: debian
Posts: 40

Original Poster
Rep: Reputation: 15
By providing a route I assume you mean to run a command simular to the following:
'route add 0.0.0.0 netmask 0.0.0.0 dev eth1'
If so, yes I have done that.
I can ping the gateway from eth0, I can't ping anything at all from eth1,2,3.

I don't want to use the box as a router. I work for a government school that has liitle amount of funds (basicly none). This box is to be the proxy for all students at the school. A usual day has a average of 100 students on the internet at one time, so one proxy through a 100mps card is not enough. The school cannot afford anymore computers for proxy machines, it cannot afford a gigabit network card. The proxy is to have authentication from ADS and site logging. So as you see I am between a rock and a hard place (they can't even afford to employee me as of may next year) but they are upgrading the ADSL (I don't make these disissions, a teacher does).

So I am trying to have a proxy where a percentage of the machines (based on location) go through eth0,1,2,3.

The addresses I assign eth0,1,2,3 are 10.121.110.6, 10.121.110.7, 10.121.110.8, 10.121.110.9. All of the addresses successfully ping from a XP machine through eth0 (when only eth0 is patched into the network). None of the addresses are pingable when eth0 is not patched in but eth1,2,3 are patched in.
 
Old 12-03-2003, 03:49 AM   #10
yowi
Member
 
Registered: Dec 2002
Location: Au
Distribution: Debian
Posts: 209

Rep: Reputation: 55
What makes you think 1x100Mb/s card is insufficient? At ~10MB/s that gives you 100KB/s per user. More than enough to browse a few web pages.

If you really want to continue down this path check your routing table with netstat -r
and any ethernet errors will show up with netstat -i.

Have you found any docs specifically describing how to set this up? I can't recall the term used to describe this in Linux land. I believe it's referred to as teaming elsewhere.

Last edited by yowi; 12-03-2003 at 03:56 AM.
 
Old 12-03-2003, 04:11 AM   #11
binkybuckle
Member
 
Registered: Jul 2003
Distribution: debian
Posts: 40

Original Poster
Rep: Reputation: 15
Currently, when in the schools hours, big delays are caused by the proxy being a bottleneck. Most students at the school go to the same, regular web pages that have been cached. With is fact in mind and the fact that ping delay's are excessively slow when students are 'online', I have determined that the proxy needs more that 100mb/s. Student are having problems accessing webpages.

That's what I meant when I said I don't make these decisions. If I did I would try buying a gigabit ethernet card for the proxy server before upgrading the adsl at a cost of $10,000 (that's the cost I was told).

Students, being kids, are always chewing up the proxies bandwidth by always being on the internet. It's more like a couple of hundred web pages.

No I haven’t found any docs on doing this but I have been looking hard for them. If someone could point out any docs to help that would be great. If I get this working I plan to make a How-To and give it to TLDP website.
 
Old 12-04-2003, 04:23 PM   #12
binkybuckle
Member
 
Registered: Jul 2003
Distribution: debian
Posts: 40

Original Poster
Rep: Reputation: 15
Problem Solved.

The setup of the 4 network cards was perfect, but apparently you can't have more the one network card on the linux machine in the same subnet as another one. This was causeing the linux box to assign all the addresses for all network cards to one interface (eth0). If I changed the routing table then all addresses would be through interface eth3.

I couldn't find any documentation on how to team the cards, so I changed the subnet to 255.255.255.192 and changed the network cards addresses to 10.121.110.10, 10.121.110.80, 10.121.110.140, 10.121.111.247.

This was suggested by a person in another forum. Now all machines ping the correct network card for the subnet they are contained in.

This is not exactly how I wanted to do it but at least it works thanks to a very smart person who helped me.
Thankyou everyone for your help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
1 IP for 2 NIC's turbo_acura Linux - Networking 4 10-10-2005 04:33 PM
2 NIC's help troycus Linux - Networking 18 04-07-2005 08:01 PM
Two NIC's Meatball1337 Linux - Hardware 4 11-10-2004 09:14 PM
easiest way to add an extra harddrive for /home bigfatdud Linux - Newbie 8 10-27-2004 02:32 AM
TWO NIC's bhughesiii Linux - Networking 8 09-23-2004 09:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration