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 10-07-2012, 10:46 AM   #1
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Rep: Reputation: Disabled
Unable to Route


I have two computers connected to the same router.

Both computers have different network range.

Computer A's ifcfg-eth0 file

Code:
IPADDR=192.168.1.10
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
Computer B's ifcfg-p2p1 file

Code:
IPADDR=10.0.0.10
NETMASK=255.255.255.0
GATEWAY=10.0.0.1
I have defined route on Computer A for Computer B but unable to ping computer A from B or vice versa.

Route on Computer A (route-eth0 file)

Code:
ADDRESS0=10.0.0.0
NETMASK0=255.255.255.0
GATEWAY0=192.168.1.254
 
Old 10-08-2012, 03:56 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
is there a route back again? please show us the full routing tables on both machines, not the config. "route -n" on both boxes should work (presuming they are both Unix)
 
Old 10-08-2012, 04:37 AM   #3
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
is there a route back again? please show us the full routing tables on both machines, not the config. "route -n" on both boxes should work (presuming they are both Unix)
On Computer A # route -n

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        192.168.1.254   255.255.255.0   UG    0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
0.0.0.0         192.168.1.254   0.0.0.0         UG    0      0        0 eth0
On Computer B

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 p2p1
192.168.1.0     10.0.0.1        255.255.255.0   UG    0      0        0 p2p1
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 p2p1
0.0.0.0         10.0.0.1        0.0.0.0         UG    0      0        0 p2p1
 
Old 10-08-2012, 09:48 AM   #4
KatrinAlec
Member
 
Registered: Feb 2012
Posts: 116

Rep: Reputation: 13
You could look up your interfaces, if they are really configured as your configuration file says.
If that's correct, maybe use tcpdump to see if your ping requests arrive on the other computer.
e.g.
tcpdump -i eth0 icmp
 
Old 10-08-2012, 08:57 PM   #5
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
Problem Solved!

I have set in the route-eth0 file on computer A the gateway as the ip i.e 192.168.1.10

Now both are pinging without any problems.

However, can anyone provide the link which explains the routing concept clearly!

Now Final configuration files for help for future users.

Computer A's ifcfg-eth0

Code:
IPADDR=192.168.1.10
NETMASK=255.255.255.0
GATEWAY=192.168.1.254

Computer A's route-eth0 file

Code:
ADDRESS0=10.0.0.0
NETMASK0=255.255.255.0
GATEWAY0=192.168.1.10

Computer B's ifcfg-p2p1 file

Code:
IPADDR=10.0.0.10
NETMASK=255.255.255.0
GATEWAY=10.0.0.1

Computer B's route-p2p1 file

Code:
ADDRESS0=192.168.1.0
NETMASK0=255.255.255.0
GATEWAY0=10.0.0.10

Last edited by sunveer; 10-08-2012 at 09:03 PM.
 
  


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
unable to route in Debian Testing (Etch) dbmacartney Linux - Networking 4 03-25-2007 04:19 PM
unable to route with ip alias using one NIC simayi Linux - Networking 0 10-27-2004 04:45 AM
unable to delete route-syntax problem? dthacker Linux - Networking 4 10-14-2004 11:23 AM
DHCP is unable to route cable connection Wolfy Linux - Networking 2 07-09-2004 09:52 PM
unable to use port25, always get a no route to host f1uke Linux - Networking 3 04-16-2003 10:12 PM

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

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