LinuxQuestions.org
Help answer threads with 0 replies.
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 11-13-2007, 12:43 AM   #1
ilp
LQ Newbie
 
Registered: Nov 2007
Location: Bangalore, India
Distribution: Fedora 20
Posts: 7

Rep: Reputation: 0
Two ethernet don't work simultaneously


Hi,

I am using a redhat EL4 with a newly compiled 2.6.22-10 kernel. I have two ethernets cards in my system, one to connect to to the internet and another to connect to the local network. I am trying to share internet with ip fowarding, but now the problem is that my two cards don't work simultaneously. The two ethernet cards are of the same make. The internet(eth0) does not work when local network card (eth1) is activated(ifup).
What might be the problem? I have the ethernet card driver compiled into the kernel, it is not there as a module. Is is wrong that I din't compile as a module?
 
Old 11-13-2007, 06:38 AM   #2
lotec25
Member
 
Registered: Oct 2003
Location: Holiday Fl
Distribution: Slackware-current
Posts: 77

Rep: Reputation: 19
what is the output of Ifconfig with both cards activated? also show your configure file of the cards.
 
Old 11-13-2007, 06:50 PM   #3
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
if ifconfig or ifup does not report errors when you bring them up, can you try doing a ping out of one interface by using the -I flag. May be interesting to see what your NICs are trying to do.
 
Old 11-13-2007, 07:19 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Are the IP addresses on different subnets? Do you maybe have acpi disabled?
 
Old 11-13-2007, 08:20 PM   #5
ilp
LQ Newbie
 
Registered: Nov 2007
Location: Bangalore, India
Distribution: Fedora 20
Posts: 7

Original Poster
Rep: Reputation: 0
Hi,
Here is the output of ifconfig:

eth0 Link encap:Ethernet HWaddr 00:E0:20:B4:2B:CA
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:20ff:feb4:2bca/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:182 errors:0 dropped:0 overruns:0 frame:0
TX packets:155 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:21574 (21.0 KiB) TX bytes:16838 (16.4 KiB)
Interrupt:10 Memory:efdfff00-efdfffff

eth1 Link encap:Ethernet HWaddr 00:E0:20:72:4F:96
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:20ff:fe72:4f96/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:600 errors:0 dropped:0 overruns:0 frame:0
TX packets:652 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:548498 (535.6 KiB) TX bytes:108880 (106.3 KiB)
Interrupt:3 Memory:efdffe00-efdffeff

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:34 errors:0 dropped:0 overruns:0 frame:0
TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3600 (3.5 KiB) TX bytes:3600 (3.5 KiB)

and the configuration file:
// ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no
HWADDR=00:e0:20:b4:2b:ca
NETMASK=255.255.255.0
IPADDR=192.168.0.1
GATEWAY=192.168.0.2

//ifcfg-eth1
IPV6INIT=no
ONBOOT=yes
USERCTL=no
PEERDNS=yes
GATEWAY=192.168.1.254
TYPE=Ethernet
DEVICE=eth1
HWADDR=00:e0:20:72:4f:96
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.1.1
 
Old 11-13-2007, 08:39 PM   #6
ilp
LQ Newbie
 
Registered: Nov 2007
Location: Bangalore, India
Distribution: Fedora 20
Posts: 7

Original Poster
Rep: Reputation: 0
Can you try doing a ping out of one interface by using the -I flag?

When I type this:

ping -I 192.168.0.2 returns the usage.

In the man page it is given as ping -I Interface or address

but

ping -I eth0 gives the same usage.

Is this the way to use it?
 
Old 11-13-2007, 08:41 PM   #7
ilp
LQ Newbie
 
Registered: Nov 2007
Location: Bangalore, India
Distribution: Fedora 20
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jschiwal View Post
Are the IP addresses on different subnets? Do you maybe have acpi disabled?
I get this when I am booting, but I have used acpi=force in my grub.conf file.
ACPI: BIOS age (1997) fails cutoff (2001), acpi=force is required to enable ACPIACPI: acpi=force override
 
Old 11-13-2007, 10:29 PM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If both interfaces were on the same subnet, that could cause a problem. However, you have both on different subnets. I asked about acpi because, once upon a time, there could be a problem with two NIC cards getting the same I/O address range or interupt and I thought if you had acpi disabled you might have the same problem. Plus without acpi I don't know if devices can share interupts.

Could you look at the output of "sudo /sbin/lspci -v".

Also, take a peek at /etc/modprobe.conf. There are some examples where a module has the address space and the interupt given there:
Code:
# options ne             io=0x300 irq=5

# Use this if you have two cards:
# options ne             io=0x300,0x320 irq=5,7

# options tulip          options=0
# options 3c59x          options=0
# options 3c501          io=0x280 irq=5
# options 3c503          io=0x280 irq=5 xcvr=0
# options 3c505          io=0x300 irq=10
# options 3c507          io=0x300 irq=10
# options 3c509          irq=10
Notice the line I emphasized. If lspci shows that both devices use the same address space then editing the module's arguments in modprobe.conf might be a solution. There is also a "reserve" kernel option command that might be used to have the kernel not probe a device. If you have the kernel source Documentation installed, this is usually where you can find the kernel module options.

To route the traffic, you will need to set /proc/sys/net/ipv4/ip_forward: echo >1 /proc/sys/net/ipv4/ip_forward, but you can usually do this using your distro's network setup. I've found that the ip_conntrack module needs to be loaded. The name seems to have changed to nf_conntrack_ipv4 or nf_conntrack but they may be blacklisted so I'm not certain on this.
 
Old 11-14-2007, 09:40 AM   #9
ilp
LQ Newbie
 
Registered: Nov 2007
Location: Bangalore, India
Distribution: Fedora 20
Posts: 7

Original Poster
Rep: Reputation: 0
Hi,

Quote:
Originally Posted by jschiwal View Post
Also, take a peek at /etc/modprobe.conf.
I have compiled the ethernet drivers directly into the kernel, so I think that modprobe is not necessary(right?). I used

Code:
ether=0,0,eth1
in my grub.conf as kernel parameters. Both my NICs are detected and both are using different IRQs. I googled and did some (re)searching on this, but no fix. I want to use linux as my primary system, but for internet i have to rely on my windows system. I don't want to do that, I want to share internet to other systems using Linux. Now I work using ssh(putty) and xming from my windows system. Any other ways that I can do this?

--
Santosh

Last edited by ilp; 11-14-2007 at 09:41 AM.
 
Old 11-14-2007, 10:39 AM   #10
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Quote:
Originally Posted by ilp View Post
Can you try doing a ping out of one interface by using the -I flag?

When I type this:

ping -I 192.168.0.2 returns the usage.

In the man page it is given as ping -I Interface or address

but

ping -I eth0 gives the same usage.

Is this the way to use it?


Code:
it-etch:~# ping -I eth0 192.168.0.1
PING 192.168.0.1 (192.168.0.1) from 192.168.0.4 eth0: 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.367 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.261 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.258 ms
or
Code:
it-etch:~# ping -I 192.168.0.4  192.168.0.1
PING 192.168.0.1 (192.168.0.1) from 192.168.0.4 : 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.357 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.258 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.262 ms

Last edited by farslayer; 11-14-2007 at 10:42 AM.
 
  


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
Tripped over ethernet cord, ethernet doesn't work anymore 1veedo Linux - General 2 10-20-2007 11:02 PM
Getting Ethernet card to work Kensai Linux - Hardware 1 11-17-2004 07:29 AM
Ethernet and Wireless simultaneously? CelloJake Linux - Wireless Networking 2 08-18-2004 03:56 PM
Ethernet does not work in Knoppix cgammel Linux - Newbie 3 12-03-2003 12:48 PM
ethernet won't work busbarn Slackware 28 07-11-2002 10:17 PM

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

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