LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-13-2005, 09:47 AM   #1
the_raj
LQ Newbie
 
Registered: Jan 2005
Posts: 4

Rep: Reputation: 0
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
 
Old 08-13-2005, 09:53 AM   #2
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Arctic
Distribution: Fedora, Debian, OpenSuSE and Android
Posts: 1,820

Rep: Reputation: 46
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.
 
Old 08-13-2005, 10:09 AM   #3
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
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.
 
Old 08-13-2005, 04:23 PM   #4
the_raj
LQ Newbie
 
Registered: Jan 2005
Posts: 4

Original Poster
Rep: Reputation: 0
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
 
Old 08-13-2005, 07:55 PM   #5
carl.waldbieser
Member
 
Registered: Jun 2005
Location: Pennsylvania
Distribution: Kubuntu
Posts: 197

Rep: Reputation: 32
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
 
Old 08-14-2005, 04:36 AM   #6
the_raj
LQ Newbie
 
Registered: Jan 2005
Posts: 4

Original Poster
Rep: Reputation: 0
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
 
Old 08-14-2005, 11:28 AM   #7
carl.waldbieser
Member
 
Registered: Jun 2005
Location: Pennsylvania
Distribution: Kubuntu
Posts: 197

Rep: Reputation: 32
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.
 
  


Reply


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
dual ethernet port ping problem rani_162 Linux - Networking 2 12-11-2005 10:05 PM
x86 board PCM 6892 with dual ethernet port.eth1 doesnt ping if eth0 cable removed rani_162 Linux - Newbie 0 07-23-2005 12:29 PM
Detailed problem with *i think* dual boot and ethernet card. OneNight Linux - Networking 8 11-11-2004 05:02 PM
realtek 8139 ethernet port problem. poortl9109 Linux - Networking 10 01-09-2003 11:07 AM
anyone can recomend a quad/dual port 10/100 ethernet card manaskb Linux - Hardware 3 11-11-2002 10:32 PM

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

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