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 03-02-2009, 10:53 AM   #1
chackercon
Member
 
Registered: Jan 2008
Location: Oklahoma
Distribution: Slackware, QNX, Centos 5.2, Dream Linux, BackTrack, Fedora
Posts: 53

Rep: Reputation: 18
Two NICs second nic plugs into a switch with no router


I have two nics each setup with a private address.

Nic 1. its setup for 10.166.200.50/24
Default gateway of 10.166.200.1
Nic 2. setup for 192.168.1.10/24 no default gateway.
This nic is just plugged into a switch with other machines that are on the same 192.168.1 range. There is no router

The issue that I have is that if I try to ping any of these machines I get network destination host unreachable.

so I attempted to give it an IP for the default 192.168.1.0 this did not work either.

Any help is great thank you.
 
Old 03-02-2009, 11:23 AM   #2
carlmarshall
Member
 
Registered: Jan 2004
Location: North Yorkshire, UK
Distribution: Centos 5
Posts: 133

Rep: Reputation: 16
Sorry, but just to clarify I am making the following assumptions:

You can ping external addresses via the default gateway.
You can ping the router
You can ping 192.168.1.10 (nic 2)
You can't ping 192.168.1.20 (assuming a machine on that IP exists)

What's in your routing table? Is there a static route set?

Carl.
 
Old 03-02-2009, 11:25 AM   #3
grepmasterd
Member
 
Registered: Aug 2003
Location: Seattle
Distribution: ubuntu, lately
Posts: 182
Blog Entries: 1

Rep: Reputation: 35
post your routing table and interface configuration.
$ route -n
$ ifconfig
and heck, post your arp table too
$ arp -an
or
$ cat /proc/net/arp
 
Old 03-02-2009, 12:46 PM   #4
chackercon
Member
 
Registered: Jan 2008
Location: Oklahoma
Distribution: Slackware, QNX, Centos 5.2, Dream Linux, BackTrack, Fedora
Posts: 53

Original Poster
Rep: Reputation: 18
carlmarshall

I can ping outside addresses, I can also ping the router. I can ping the ip on the second nic I just cant ping anything that the switch is connected to like 192.168.1.20

Sorry I should have put that in as well.

Thanks
 
Old 03-02-2009, 12:49 PM   #5
chackercon
Member
 
Registered: Jan 2008
Location: Oklahoma
Distribution: Slackware, QNX, Centos 5.2, Dream Linux, BackTrack, Fedora
Posts: 53

Original Poster
Rep: Reputation: 18
grepmasterd

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.166.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 10.166.200.1 0.0.0.0 UG 0 0 0 eth0
eth0 Link encap:Ethernet HWaddr 00:1C:C4:EB:80:30
inet addr:10.166.200.50 Bcast:10.166.200.255 Mask:255.255.255.0
inet6 addr: fe80::21c:c4ff:feeb:8030/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8444809 errors:0 dropped:0 overruns:0 frame:0
TX packets:220688 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1063280909 (1014.0 MiB) TX bytes:53421118 (50.9 MiB)
Interrupt:169 Memory:f8000000-f8012100

eth1 Link encap:Ethernet HWaddr 00:1C:C4:EB:80:2E
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21c:c4ff:feeb:802e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1066 errors:0 dropped:0 overruns:0 frame:0
TX packets:109 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:194123 (189.5 KiB) TX bytes:13092 (12.7 KiB)
Interrupt:177 Memory:fa000000-fa012100

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:2705 errors:0 dropped:0 overruns:0 frame:0
TX packets:2705 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4252879 (4.0 MiB) TX bytes:4252879 (4.0 MiB)

? (10.166.200.1) at 00:00:0C:07:AC:09 [ether] on eth0
? (10.166.200.80) at 00:18:FE:89:ED:9A [ether] on eth0

After looking at this it seems that everything is routing to the 10 subnet I should put a static route for 10 as well as 192. Is this correct.
 
Old 03-02-2009, 01:19 PM   #6
grepmasterd
Member
 
Registered: Aug 2003
Location: Seattle
Distribution: ubuntu, lately
Posts: 182
Blog Entries: 1

Rep: Reputation: 35
After looking at this it seems that everything is routing to the 10 subnet

nope, it means that it can't resolve arp for 192.168.1.20 (or whatever you're trying to ping)

10.166.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1

the routes look right, so you don't need to add any static routes.

to prove to yourself that the packets are being routed correctly, run a packet capture on eth1
$ sudo tcpdump -n -i eth1 arp or icmp
and from another prompt try to ping some addr on the 192.168.1.x subnet. If you see arp requests sent and no responses, then you have a layer 1 or 2 problem (switch/hub/cable) or are trying to ping a non-existent address.

then try pinging 192.168.1.1 from the *other* machine and watching the same packet capture. do you see the arp or icmp packets? then you have a connectivity problem.
 
Old 03-02-2009, 03:05 PM   #7
chackercon
Member
 
Registered: Jan 2008
Location: Oklahoma
Distribution: Slackware, QNX, Centos 5.2, Dream Linux, BackTrack, Fedora
Posts: 53

Original Poster
Rep: Reputation: 18
grepmasterd

I did what you asked and the node one (192.168.1.10 did as expected when I attempted to ping node two. However when I pinged from node two to note one I did get this as a response

(15:00:04.090058 arp reply 192.168.1.10 is-at 00:1c:c4:eb:80:2e) I would assume that this indicates that layers one and two are functioning however from node two I still get destination network is unreachable. However I have learned a new cool tool to use thank you
 
Old 03-02-2009, 04:52 PM   #8
grepmasterd
Member
 
Registered: Aug 2003
Location: Seattle
Distribution: ubuntu, lately
Posts: 182
Blog Entries: 1

Rep: Reputation: 35
if you're getting an arp 'is-at' pkt then the target is respoding on layer 2. however note that your ifconfig output indicates that eth1 is configure as .1, not .10 so I'm not sure I've got a correct picture of your setup.

another good tool for troubleshooting layer 2 issues is arping

from node 1
$ sudo arping -I eth1 192.168.1.20

from node 2
$ sudo arping -I eth0 192.168.1.10


if you get a reply each way then your layer 2 is ok. if you don't then check cables, hubs, nics etc. I'm guessing it fails in at least one direction.
 
Old 03-02-2009, 05:34 PM   #9
chackercon
Member
 
Registered: Jan 2008
Location: Oklahoma
Distribution: Slackware, QNX, Centos 5.2, Dream Linux, BackTrack, Fedora
Posts: 53

Original Poster
Rep: Reputation: 18
The 192.168.1.1 was a typo sorry about that
You are correct in that i am unable to arping checking cables now. Thanks
 
Old 03-03-2009, 09:00 AM   #10
chackercon
Member
 
Registered: Jan 2008
Location: Oklahoma
Distribution: Slackware, QNX, Centos 5.2, Dream Linux, BackTrack, Fedora
Posts: 53

Original Poster
Rep: Reputation: 18
The issue with this was I have a gig nic and it is plugged into a gig port but it will not communicate properly. to resolve this i put it in a 100 full port and that resolved my issue. I am going to need to resolve this issue however for now I am up and running

Thanks again for the help
 
  


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
tell me the process router to router, hub to hub and switch to switch communication. yakuza003 Linux - Networking 4 06-21-2008 07:55 AM
Make a Hub/Switch out of Linux Box with Multiple NICs? sancho Linux - Networking 1 07-15-2007 03:54 PM
box with 2 NICs, another with just 1 NIC TheOneAndOnlySM Linux - Networking 2 08-29-2006 09:36 AM
Combining multiple NICs to one virtual NIC damista Linux - Networking 2 04-26-2005 10:00 PM
two nics--ftp on outside nic--samba on inside nic tyler0123 Linux - Networking 2 04-15-2005 07:27 PM

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

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