LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 09-06-2006, 06:10 PM   #1
Padawan.AVT
Member
 
Registered: Feb 2006
Distribution: Gentoo, Slackware, Debian, Suse
Posts: 86

Rep: Reputation: 15
2 network interfaces trouble


The problem is: I have 2 network interfaces (eth0 and eth1 respectively)

eth0 configured and works properly

eth1 configured, but I cannot ping any other PC or ping eth1 from any PC
eth0 was configured earlier using "netconfig"

eth1 was configured in such a way:
ifconfig eth1 172.16.1.110 netmask 255.255.254.0 broadcast 172.16.1.255

Here are the actual settings of both interfaces:

ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0E:2E:22:A7:82
inet addr:172.16.1.111 Bcast:172.16.1.255 Mask:255.255.254.0
inet6 addr: fe80::20e:2eff:fe22:a782/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:76752 errors:0 dropped:0 overruns:0 frame:0
TX packets:131024 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6022266 (5.7 Mb) TX bytes:181674480 (173.2 Mb)
Interrupt:11 Base address:0x6000


ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:C0:26:A2:7F:03
inet addr:172.16.1.110 Bcast:172.16.1.255 Mask:255.255.254.0
inet6 addr: fe80::2c0:26ff:fea2:7f03/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13 errors:0 dropped:0 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:892 (892.0 b) TX bytes:1368 (1.3 Kb)
Interrupt:10 Base address:0x8000

I'm using Slackware. Kernel 2.6.15
 
Old 09-06-2006, 06:41 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 77
What is eth1 plugged into? Did you set up routing properly? A physical description of your network would help here...
 
Old 09-06-2006, 06:43 PM   #3
GrueMaster
Member
 
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848

Rep: Reputation: 30
If both interfaces are on the same switch and the same subnet, most network traffic will go to the first interface, then bleed over to the second one. I once set up a server for multiple web sites on our intranet with 4 interfaces (4 separate stactic IP addresses), and the same thing happened. Each web page was served by a particular ip address, and everything worked correctly, except the load was being handled by only one interface. Even configuring our Cisco switches to route separately to each interface, the traffic ended up on one interface.
 
Old 09-07-2006, 12:15 AM   #4
rahulk
Member
 
Registered: Mar 2006
Posts: 110

Rep: Reputation: 16
Quote:
Originally Posted by Padawan
The problem is: I have 2 network interfaces (eth0 and eth1 respectively)

eth0 configured and works properly

eth1 configured, but I cannot ping any other PC or ping eth1 from any PC
eth0 was configured earlier using "netconfig"

eth1 was configured in such a way:
ifconfig eth1 172.16.1.110 netmask 255.255.254.0 broadcast 172.16.1.255

Here are the actual settings of both interfaces:

ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0E:2E:22:A7:82
inet addr:172.16.1.111 Bcast:172.16.1.255 Mask:255.255.254.0
inet6 addr: fe80::20e:2eff:fe22:a782/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:76752 errors:0 dropped:0 overruns:0 frame:0
TX packets:131024 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6022266 (5.7 Mb) TX bytes:181674480 (173.2 Mb)
Interrupt:11 Base address:0x6000


ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:C0:26:A2:7F:03
inet addr:172.16.1.110 Bcast:172.16.1.255 Mask:255.255.254.0
inet6 addr: fe80::2c0:26ff:fea2:7f03/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13 errors:0 dropped:0 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:892 (892.0 b) TX bytes:1368 (1.3 Kb)
Interrupt:10 Base address:0x8000

I'm using Slackware. Kernel 2.6.15
please dont mind, but i simply dont understand why you want to have two NIC cards for a same subnet?? it will be better if you use a single NIC card (eth 0) and setup a virtual interface on it.
like:-

ifconfig eth0:1 172.16.1.110 netmask 255.255.254.0 broadcast 172.16.1.255


this way you will be able to use two IP addresses on a single NIC card without having to worry about the network load ending up on a single interface. It is always preferred to have virtual interfacing on a single subnet v/s two NICs on a single subnet.

you can add up the new IP address with hostname in /etc/hosts file to make it pingable. Once the entry is taken up by your DNS server, this problem should be solved.

Hope it helps,
Rahul.

Last edited by rahulk; 09-07-2006 at 12:17 AM.
 
Old 09-08-2006, 02:43 AM   #5
Padawan.AVT
Member
 
Registered: Feb 2006
Distribution: Gentoo, Slackware, Debian, Suse
Posts: 86

Original Poster
Rep: Reputation: 15
Thanl you all, the problem is solved. I just configured them for different subnetworks and it worked. I'm trying to set up a gateway for the first time, so I've got a lot of stupid questions
 
  


Reply

Tags
dual, nic, setup, two


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
/etc/network/interfaces king111 Linux - Wireless Networking 2 07-21-2006 03:32 PM
Manual Network Setup Works, /etc/network/interfaces doesn't verdeboy2k Linux - Wireless Networking 0 05-31-2006 06:56 PM
/etc/network/interfaces angel115 Linux - Networking 1 10-23-2005 04:29 AM
Two Interfaces on the same Network cspcom Linux - Newbie 6 06-18-2005 04:32 PM
Network Interfaces aussben Linux - Wireless Networking 3 12-18-2004 02:35 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration