LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-20-2007, 12:08 PM   #1
OTIM
Member
 
Registered: Nov 2007
Posts: 37

Rep: Reputation: 15
problem with my third nic


Hello,

I added a third interface card to my linux box (fedora 7) and i don't know how to configure it/make it work
Here is the output of ifconfig:
eth0 Link encap:Ethernet HWaddr 00:E0:4C:50:1F:3C
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:19 Base address:0x4000

eth1 Link encap:Ethernet HWaddr 00:11:2F:23:64:BB
inet addrpublic ip) Bcast:x.x.x.x Mask:255.255.255.128
inet6 addr: fe80::211:2fff:fe23:64bb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2783 errors:0 dropped:0 overruns:0 frame:0
TX packets:3687 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:199933 (195.2 KiB) TX bytes:4998503 (4.7 MiB)
Interrupt:18

eth2 Link encap:Ethernet HWaddr 00:15:77:26:99:B1
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::215:77ff:fe26:99b1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:461 errors:0 dropped:0 overruns:0 frame:0
TX packets:172 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46942 (45.8 KiB) TX bytes:36985 (36.1 KiB)
Interrupt:18 Base address:0xe000

I have another computer which is connected to eth0 or eth2 ( don't remember exactly) and that computer has the ip address of 192.168.0.3.
When i ping from 192.168.0.3 to 192.168.0.1 or 192.168.0.2 it doesn't do anything it just sits , then i do ctrl+c and see that the packets are transmited but 0 packets received.
On the first computer when i ping 192.168.0.3 it says:
PING 192.168.0.3 (192.168.0.3) 56(84) bytes of data.
From 192.168.0.1 icmp_seq=2 Destination Host Unreachable


I think the problem is that i have to configure somehow the third nic or to add the drivers...please help me...or at least give me some links to read about this.

Thank you
 
Old 12-20-2007, 12:20 PM   #2
OTIM
Member
 
Registered: Nov 2007
Posts: 37

Original Poster
Rep: Reputation: 15
I think one problem is that i have to change the ip address on eth0 or eth2 to be on different networks. ( or how do i bridge them? )
But the most important problem is : lspci output:

Ethernet controller: Marvell Technology Group Ltd. 88E8001 Gigabit Ethernet Controller (rev 13)

00:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

00:13.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)


Fedora doesn't recognise my third nic. My third nick is a Allied Telesyn not realtek
 
Old 12-20-2007, 01:06 PM   #3
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by OTIM View Post
Fedora doesn't recognise my third nic. My third nick is a Allied Telesyn not realtek
I count three NICs in the list. The Realtek chipset is used by a lot of third party vendors, so it is not unusual to see "Brand X" show up as a "Realtek". Look on the card to verify that it has the goofy Realtek logo and a part number that starts with "RTL".

As far as answering your other questions, how about you try to tell us what you want to do, and we will tell you if you need a bridge, bond, or some other fancy configuration.
 
Old 12-20-2007, 01:26 PM   #4
OTIM
Member
 
Registered: Nov 2007
Posts: 37

Original Poster
Rep: Reputation: 15
Hi David,

Thank you for your help.

I am not new to networking but i am new to linux. In my current job i work mostly with cisco.

So what i want to do : i have a linux box ( the fedora box with 3 nics) , one internet connection, and other 2 computers ( a desktop and a laptop)
I would like to do NAT so that the other computers can have internet too.I'm thinking of using the same network number in my internal network (desktop and laptop) but adding a third NIC, as i understand it, means another layer 3 interface and it must use another network number.

Regarding your first question i will reply asap with more information

edit: You were right David . I just changed the ip address on one interface ( i mean to be in another network, i put 10.0.0.7 255.0.0.0 , and everything worked fine)
So regarding second question how do i use the same network number on both nics? or how can i make the second and third nics act as switch ports?

Last edited by OTIM; 12-20-2007 at 01:35 PM.
 
Old 12-20-2007, 02:01 PM   #5
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by OTIM View Post
edit: You were right David . I just changed the ip address on one interface ( i mean to be in another network, i put 10.0.0.7 255.0.0.0 , and everything worked fine)
Glad to be of service.

Quote:
Originally Posted by OTIM View Post
So regarding second question how do i use the same network number on both nics? or how can i make the second and third nics act as switch ports?
Are you trying to use the machine with the three NICs as a router? If so, it would have been cheaper not to buy the third NIC, but to buy a 5-port switch.

If you are determined to use both NICs, you will have to put them in a bond using broadcast policy, and then use iptables (or the equivalent) to handle the routing.

To create a bond operating with broadcast policy, use "modprobe bonding mode=broadcast". If this fails, your kernel was built without bonding support.

If it succeeds, you need to bring up the bond using "ifconfig bond0 up". To add the two NICs, use "ifenslave bond0 ethX", where X is the number of the interface. Then you can treat the "bond0" as a NIC. Give it an IP address using "ifconfig" or "dhclient".
 
Old 12-20-2007, 04:32 PM   #6
OTIM
Member
 
Registered: Nov 2007
Posts: 37

Original Poster
Rep: Reputation: 15
thanks ! and yes i would like to use the fedora box as a router.


I will read some more about your solution.

Also i found a good tutorial which ( i hope) is what i was looking for:
http://linux.derkeiler.com/Newsgroup.../msg00208.html

I think i need to bridge the two internal nics or use your solution(which seems easier) and for routing iptables.

Best regards,

OTIM
 
Old 12-20-2007, 05:33 PM   #7
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by OTIM View Post
I think i need to bridge the two internal nics or use your solution(which seems easier) and for routing iptables.
The bridge solution will only allow you to have one IP address for the box, but is definitely simpler.

With a bond, you can use iptables to forward from the external IP (e.g. 192.168.x.x) to the internal IP (e.g. 10.x.x.x) and vice versa, which is called routing.
 
  


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
problem with the NIC htamayo Linux - Hardware 1 11-13-2006 09:13 PM
Bi-NIC problem mstrswrd06 Linux - Networking 1 09-09-2006 04:42 PM
NIC problem? Please help. wildcardmy Linux - Newbie 3 01-27-2005 09:53 PM
2 External Nic, 1 Internal Nic Router Problem trevanda Linux - Networking 0 10-13-2004 01:20 AM
3 nic problem, 1 nic don't work ldp Linux - Networking 3 07-20-2004 12:24 PM

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

All times are GMT -5. The time now is 07:32 AM.

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