LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-18-2006, 02:01 PM   #1
sarajevo
Member
 
Registered: Apr 2005
Distribution: Debian, OpenBSD,Fedora,RedHat
Posts: 228
Blog Entries: 1

Rep: Reputation: 31
Multiple NICs, how setup proper network scheme?


Hi all,

lspci on my machine (Debian 3.1 ) is as follows

0000:01:08.0 Ethernet controller: Intel Corp. 82801BA/BAM/CA/CAM Ethernet Controller (rev 03)
0000:01:0b.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 0d)
0000:01:0d.0 Ethernet controller: Olicom OC-2326 (rev 01)
0000:01:0f.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 0c)

this is just part related to network interfaces ( I put four NICs in linux box ).

hostA......1st NIC .......modem-----INTERNET
|.......2nd NIC ..........crossover -----eth0...hostB
|.......3rd NIC .......FREE
|........4th NIC.......FREE

when I do
ifconfig eth1 192.168.1.1 netmask 255.255.255.0 on hostA
and
ifconfig eth1 192.168.1.10 netmask 255.255.255.0 on hostB
ad try ping from hostA to hostB it did not work.

My question is: what is proper way to that hostA mark NICs, I mean should I write something like
ifconfig eth2 192.168.1.1 netmask 255.255.255.0 on hostA
or eth3 for configuring right NIC.
Should I use bond. I really do not understand this issue related to multiple network cards on linux machine.
So I am asking all people out there to write their opinions if they have time and will.

Regards
 
Old 12-18-2006, 03:24 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Bonding is for bringing multiple nics to the same IP when it is done. Or can be referred to as trunking. Instead of a single 100mbit with say 4 nics assigned to a bond you have 400mbit connection to the machine but it is one single IP and considered a single cable.

Now the first nic is eth0, second eth1, and so on. You can only assign a single IP to one nic. It is poosible to assign addition aliasing IPs. Search on alising IP if needed.

I am not sure exactly want you want to do. But if you want the connections on eth1 to pass through to eth0 to gain internet access then you are setting up nat masquerading gateway.

Assign eth0 IP, Subnet, and Gateway as required. This should be either static IP from provider or DHCP.
Assign eth1 say and IP of 192.168.1.1 subnet 255.255.255.0, and NO Gateway. Do not define a gateway for eth1.
Now I would either use this link to build a firewall gateway setup providing the info the questions ask. http://easyfwgen.morizot.net/gen/
Or goto say http://www.linuxguruz.com/iptables/ and use one of the scripts here and modify to match your setup.

Not sure what you wish to do with the additional nics.

Brian
 
Old 12-18-2006, 03:33 PM   #3
sarajevo
Member
 
Registered: Apr 2005
Distribution: Debian, OpenBSD,Fedora,RedHat
Posts: 228

Original Poster
Blog Entries: 1

Rep: Reputation: 31
thanks Brian,

I found NICs marking probing pppoe connection to only one and pppoeconf told me which interface has 0, 1, 2, and 3 with eth.
Now I marked them and it is ok.

I need multiple NICs for purpose of making linux based router for cca 200 hosts, and implementing that using iptables and linux ruoting rules.

Thank you very much
Regards
 
  


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
how to setup multiple network card? mrpc_cambodia Linux - General 1 01-05-2006 03:05 AM
Intel D845GLLY + Multiple Intel Pro 100 NICs + kernel 2.6.x = NICs don't work egable Linux - Hardware 0 02-04-2005 02:30 PM
multiple NICs paulonline2501 Linux - Hardware 2 07-23-2002 05:58 PM
Proper DNS setup tarballedtux Linux - Networking 2 03-21-2002 09:29 PM
Multiple NICs Server Setup swa1 Linux - Software 2 07-26-2001 09:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:36 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