LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   dual ethernet port problem (https://www.linuxquestions.org/questions/linux-networking-3/dual-ethernet-port-problem-352848/)

the_raj 08-13-2005 09:47 AM

dual ethernet port problem
 
Hi,

I've just installed SUSE 9.3 Pro on my server. The server has 2 ethernet ports eth0 and eth1. When I connect eth1 to a router for Internet it doesn't work. When I connect it to eth0 it works. Can anyone help me get eth1 working with the router too please or explain why this isn't working.

Many thanks,

Raj

Pcghost 08-13-2005 09:53 AM

You failed to mention whether you are using DHCP or static addresses. Additionally, when in YaST, what are the settings for the cards? Are the cards on the same subnet? A little more info may help us find the problem.

Artanicus 08-13-2005 10:09 AM

Sometimes (read randomly) the eth devices switch order, and are assigned badly. This is the case with dual port ethernet cards. Well, atleast with all of them ive encountered. So, give it a try attaching to port 2, but instead using eth2. Once my port2 had hopped all the way over to eth3, and silly I was wondering why eth1 wasnt working.. (:

But this is just something worth trying out, it most likely isnt the solution.

the_raj 08-13-2005 04:23 PM

Hi,

Background. eth0 and eth1 are on a webserver. eth0 is connected to a router connected to other network computers (DHCP) and eth1 is connected to a router for the Internet (DHCP).

I've got eth0 connected to a router which works:
DHCP IP range 192.168.2.1 to 192.168.2.3
subnet 255.255.255.0
192.168.2.1 assigned to router, the others to network computers. All checked using ifconfig.

I've got eth1 connected to router which doesn't work fully. This is for Internet.
DHCP IP range 192.168.0.1 to 192.168.0.2
subnet 255.255.255.0
192.168.0.1 assigned to router, 192.168.0.2 assigned to computer (ethernet port) and checked using ifconfig.

I can connect and change the settings on both routers whien both are connected indicating that the server can see the routers. I can't get Internet through eth1 though.
Strange thing is that if I disconnect the computer network router (connected to eth0) that networks to the rest of the computers and put the Internet router into eth0 then I can get Internet to work. It's almost as if Internet requests only go to eth0. Is that right? How can I change it so that Internet works on eth1?

Many thanks,

Raj

carl.waldbieser 08-13-2005 07:55 PM

Quote:

Originally posted by the_raj
Hi,

Background. eth0 and eth1 are on a webserver. eth0 is connected to a router connected to other network computers (DHCP) and eth1 is connected to a router for the Internet (DHCP).

I've got eth0 connected to a router which works:
DHCP IP range 192.168.2.1 to 192.168.2.3
subnet 255.255.255.0
192.168.2.1 assigned to router, the others to network computers. All checked using ifconfig.

I've got eth1 connected to router which doesn't work fully. This is for Internet.
DHCP IP range 192.168.0.1 to 192.168.0.2
subnet 255.255.255.0
192.168.0.1 assigned to router, 192.168.0.2 assigned to computer (ethernet port) and checked using ifconfig.

I can connect and change the settings on both routers whien both are connected indicating that the server can see the routers. I can't get Internet through eth1 though.
Strange thing is that if I disconnect the computer network router (connected to eth0) that networks to the rest of the computers and put the Internet router into eth0 then I can get Internet to work. It's almost as if Internet requests only go to eth0. Is that right? How can I change it so that Internet works on eth1?

Many thanks,

Raj

What does your routing table look like?
Code:

$ route

the_raj 08-14-2005 04:36 AM

Hi,
Here's the routing table.

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.2.1 0.0.0.0 UG 0 0 0 eth0

Does this mean that Internet requests (that should go through router on 192.168.0.1) are actually aimed to the default (192.168.2.1)? If so, how can I change this so that Internet requests go through the Internet router (192.168.0.1)?

Maybe I'm interpreting it wrongly. Any other suggestions?

Many thanks,

Raj

carl.waldbieser 08-14-2005 11:28 AM

Quote:

Originally posted by the_raj
Hi,
Here's the routing table.

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.2.1 0.0.0.0 UG 0 0 0 eth0

Does this mean that Internet requests (that should go through router on 192.168.0.1) are actually aimed to the default (192.168.2.1)? If so, how can I change this so that Internet requests go through the Internet router (192.168.0.1)?

Maybe I'm interpreting it wrongly. Any other suggestions?

Many thanks,

Raj

Yeah, I think you are correct. Delete the default route, then add a new default to send packets to eth1.
Code:

# route del 0.0.0.0
# route add -net 0.0.0.0 netmask 255.255.255.255 dev eth1

You might have to edit something in /etc/network to make the changes permanent across reboots.


All times are GMT -5. The time now is 08:48 AM.