LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-21-2003, 10:40 AM   #1
WeNdeL
Member
 
Registered: Oct 2002
Location: At my desk...
Distribution: RedHat, Fedora, Ubuntu
Posts: 344

Rep: Reputation: 30
Quick dual-homed networking question...


I know the answer to this is probably very simple, yet for some reason it escapes me...

I am trying to configure a box to communicate to two seperate networks. No IP forwarding is needed. Here is the routing table:


Code:
[root@bigbrother network-scripts]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.2.254   0.0.0.0         UG    0      0        0 eth1
I cannot ping the 192.168.10.0 network. I have tried adding a gateway to this routing table which then looks like this:

Code:
[root@bigbrother network-scripts]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.10.0    192.168.10.3    255.255.255.0   UG    0      0        0 eth0
192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.2.254   0.0.0.0         UG    0      0        0 eth1
The ifcg-eth0 file is like so:

Code:
[root@bigbrother network-scripts]# cat ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.10.3
NETMASK=255.255.255.0
NETWORK=192.168.10.0
The only hardware issue I can see is that the NIC card *could* be bad. I don't think so at the moment...

Any ideas what might be the problem?
 
Old 05-21-2003, 12:50 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Here are a few things to check:

1) Can you ping 192.168.10.3 from the machine itself?
2) Do all link lights look OK?
3) If this is 2 machines connected directly - is a crossver cable used?
4) What is your network layout?
Code:
       [Server in question]
           /           \
          /             \
       [PC1]           [PC2]

OR

       [Server in question]
          /           \
         /             \
      [HUB1]         [HUB2]
      /    \         /    \
     /      \       /      \
  [PC 1]   [PC 2] [PC 3]  [PC 4]
 
Old 05-21-2003, 01:58 PM   #3
WeNdeL
Member
 
Registered: Oct 2002
Location: At my desk...
Distribution: RedHat, Fedora, Ubuntu
Posts: 344

Original Poster
Rep: Reputation: 30
ok... well...

1) Yes

2) Links are ok, after some more testing, I know the card is fine as is the cable.

3) I am basically making a test environment to set up ntop within in a switch. So, the box has one NIC connected to a switch and the other NIC is connected to a DIFFERENT switch that has only two other machines connected to it. Those two can see each other just fine.

4)
Code:
          
                 [ switch1 ]                [ switch 2 ]
                      |                      /    |    \
                      |                     /     |     \
                [ problem box ] -----------/      |     [ 192.168.10.1 ]
                192.168.2.114                     |
                192.168.10.3              [ 192.168.10.2 ]
The weird thing is this.... this is killin me...

I have tried turning both interfaces off. Bringing up just one of them at a time on the 192.168.2.0 network. Both interfaces worked when placed on the 192.168.2.0 network found in switch 1. When I tried the same on the other network/switch, no luck.

I even brought both interfaces up on the 192.168.2.0 network at the same time and they both worked.

Bringing up a damn interface should be cake. I have never run into this before. I am about stumped...

 
Old 05-21-2003, 02:13 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
What command did you use to add the route? Did you specify it as a network using "-net"?
 
Old 05-21-2003, 02:30 PM   #5
dorian33
Member
 
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 591

Rep: Reputation: 32
till now I have no idea but post the results of ifconfig output....
 
Old 05-21-2003, 02:36 PM   #6
WeNdeL
Member
 
Registered: Oct 2002
Location: At my desk...
Distribution: RedHat, Fedora, Ubuntu
Posts: 344

Original Poster
Rep: Reputation: 30
route add -net 192.168.10.0 netmask 255.255.255.0 gw 192.168.10.3

Code:
[root@bigbrother root]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:10:5A:15:BD:AE
          inet addr:192.168.10.3  Bcast:192.168.10.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1490 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1017 errors:0 dropped:0 overruns:0 carrier:157
          collisions:0 txqueuelen:100
          RX bytes:127547 (124.5 Kb)  TX bytes:88056 (85.9 Kb)
          Interrupt:10 Base address:0xd000

eth1      Link encap:Ethernet  HWaddr 00:A0:C9:A5:0D:52
          inet addr:192.168.2.114  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8865568 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6853185 errors:0 dropped:0 overruns:185 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:1328503763 (1266.9 Mb)  TX bytes:3170224632 (3023.3 Mb)
          Interrupt:11 Base address:0x5000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:423894 errors:0 dropped:0 overruns:0 frame:0
          TX packets:423894 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:124900214 (119.1 Mb)  TX bytes:124900214 (119.1 Mb)
 
Old 05-21-2003, 02:40 PM   #7
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
As far as I can see that should work fine. Do you have an objection to using 2 ip ranges - ie use 172 addresses for machines on the second switch. It makes the routing a little easier to manage.
 
Old 05-21-2003, 02:41 PM   #8
manthram
Member
 
Registered: Feb 2002
Location: Fairfax, VA
Distribution: RedHat 8, Mandrake9.1, Slack9
Posts: 456

Rep: Reputation: 31
Quote:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.10.0 192.168.10.3 255.255.255.0 UG 0 0 0 eth0
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.2.254 0.0.0.0 UG 0 0 0 eth1
i see you added the route for the network. but in the third line there is route for that network saying that the gateway is 0.0.0.0 i.e. the default gateway. delete that route and then try pinging.
 
Old 05-21-2003, 02:45 PM   #9
WeNdeL
Member
 
Registered: Oct 2002
Location: At my desk...
Distribution: RedHat, Fedora, Ubuntu
Posts: 344

Original Poster
Rep: Reputation: 30
STOP! Hold the presses...

To troubleshoot this a little we moved all three of these machines to the second switch. They could all talk to eachother...

So the problem lies in the switch... but where...

/me scratches head

Thanks for you're help thus far by the way...
 
Old 05-21-2003, 02:46 PM   #10
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Did you have the server plugged into the uplink port?
 
Old 05-21-2003, 03:21 PM   #11
WeNdeL
Member
 
Registered: Oct 2002
Location: At my desk...
Distribution: RedHat, Fedora, Ubuntu
Posts: 344

Original Poster
Rep: Reputation: 30
nope... hehe.. definitely not!
 
Old 05-21-2003, 03:29 PM   #12
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
So on switch one everything is fine.
On switch two - 2 machines can see each other but linux seems invisible.

I assume you have tried linux in a port that you know works from the fact that the other machines worked there.

What about speeds? What speeds are the switches (are they switches and not hubs)? What speeds are the cards?

You can use mii-tool to set the speed of your ethernet card.
 
Old 05-21-2003, 03:41 PM   #13
dorian33
Member
 
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 591

Rep: Reputation: 32
compare the 5th line of the ifconfig output for eth0:
"TX packets:1017 errors:0 dropped:0 overruns:0 carrier:157"
end eth1:
"TX packets:6853185 errors:0 dropped:0 overruns:185 carrier:0"

The 'carrier' <> 0 shows the problems with transmission.
I think the 'overruns'<>0 is also problematic.

Unfortunately these ifconfig output parms are not well documented.
I've looked at source files and it looked like an error counter but it was not worth to study it too much :)
 
Old 05-21-2003, 03:42 PM   #14
WeNdeL
Member
 
Registered: Oct 2002
Location: At my desk...
Distribution: RedHat, Fedora, Ubuntu
Posts: 344

Original Poster
Rep: Reputation: 30
Everything is 100 MB...

And all three boxes are linux. We're a RedHat shop.

I am going through every menu in the switch config now. So far nothing has turned up. I will pop back up with more clues if I get them...

*sigh*

I will look at this mii-tool... thanks!
 
Old 05-21-2003, 04:14 PM   #15
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
So basically you've got two different isolated network segments:

network card 1 network goes to switch 1
network card 2 network goes to switch 2 ?

I think you've got to bridge the two network cards together somehow, not sure how you to do that on linux yet, XP point and click bridge the two cards. Probably need some IP Tables routing rules,Don't think specifying a gateway on its own will get you anywhere as it'll be a gateway to nowhere - remember switches work with MAC addresses.

Happy to be wrong though


 
  


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
quick wireless networking question PorFavor Linux - Wireless Networking 2 09-17-2005 08:51 PM
dual homed network cards hrmwinn Linux - Networking 1 08-17-2005 01:51 PM
Linux routing on a dual homed pc friendklay Linux - Networking 4 06-08-2005 09:01 AM
Dual-homed machine gubak Linux - Newbie 4 07-28-2004 01:53 AM
Dual Homed server / Two ISPs GuitsBoy Linux - Networking 3 01-13-2004 03:37 PM

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

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