LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-24-2011, 02:59 AM   #1
koshy
LQ Newbie
 
Registered: Mar 2010
Posts: 20

Rep: Reputation: 0
centos - able to ping computer that is in a different network. Pl.help


Hi folks,
I am in a very strange and confusing situation.
I have two computers running centos 5.5 that have ip addresses in two different networks.(They were in the same network (192.168.1.0/24)and I changed IP address of one to 10.0.0.0/8). What is confusing me is that I am able to ssh/ping each other. Please help
 
Old 05-24-2011, 04:05 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
without telling us more about the networking there we can't say much. ifconfig -a and route -n outputs of both machines please.
 
Old 05-25-2011, 12:47 PM   #3
koshy
LQ Newbie
 
Registered: Mar 2010
Posts: 20

Original Poster
Rep: Reputation: 0
Sorry for the delay in posting. Below is the output of the ifconfig -a and route -n commands

#***#
#PC1#
#***#
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
eth0 Link encap:Ethernet HWaddr 00:18:F3:CD:00:64
inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:210 errors:0 dropped:0 overruns:0 frame:0
TX packets:224 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:139361 (136.0 KiB) TX bytes:46484 (45.3 KiB)
Interrupt:23 Base address:0xb400

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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

#***#
#PC2#
#***#
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
eth0 Link encap:Ethernet HWaddr 00:18:F3:CD:00:64
inet addr:192.168.1.1 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:214 errors:0 dropped:0 overruns:0 frame:0
TX packets:230 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:139613 (136.3 KiB) TX bytes:46832 (45.7 KiB)
Interrupt:23 Base address:0xb400

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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Please help
 
Old 05-25-2011, 01:15 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
@ Reply

Hi there,

Quote:
#***#
#PC1#
#***#
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
eth0 Link encap:Ethernet HWaddr 00:18:F3:CD:00:64
inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:210 errors:0 dropped:0 overruns:0 frame:0
TX packets:224 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:139361 (136.0 KiB) TX bytes:46484 (45.3 KiB)
Interrupt:23 Base address:0xb400

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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

#***#
#PC2#
#***#
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
eth0 Link encap:Ethernet HWaddr 00:18:F3:CD:00:64
inet addr:192.168.1.1 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:214 errors:0 dropped:0 overruns:0 frame:0
TX packets:230 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:139613 (136.3 KiB) TX bytes:46832 (45.7 KiB)
Interrupt:23 Base address:0xb400

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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Quote:

PC1

Code:
inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
PC2

Code:
 inet addr:192.168.1.1 Bcast:192.168.255.255 Mask:255.255.0.0
I can still see both the IP addresses in the same subnet. Did you change the IP address using ifconfig command because using that the changes will be lost after reboot. Instead you should have edited /etc/sysconfig/network-scripts/ifcfg files.

Also I am assuming that you are trying to ssh/ping using DNS hostname because that is the only reason you will not realize that the IP address has not been changed.

For further troubleshooting let us know the following:

1. How many network interfaces are there on both the system.
2. Give us the output of each network interface using the following command: ifconfg eth0 or ifconfig eth1
3. Just type route at the system console and let us know the routing table of both the system.
4. How these system are connected to each other. I mean is there a router between them?
 
Old 05-25-2011, 10:48 PM   #5
koshy
LQ Newbie
 
Registered: Mar 2010
Posts: 20

Original Poster
Rep: Reputation: 0
Hi,
The computers are in different networks. I mean, PC1- in 192.168.1.0/24 and PC2- in 192.168.0.0/16 as you can see from the output of ifconfig I had sent. What is confusing me is the entry of 169.254.0.0 entry in the routing table. There are already some solutions in the forum to edit the sysconfig to workaround. I have to experiment a bit more, I assume.

Koshy
 
Old 05-26-2011, 01:18 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
you said you put one into 10.0.0.0/8 but you clearly haven't. Ignore the 169.254 addresses, they aren't important. You just have two nodes on subnets which overlap, so they still think that the other node is indeed still in their subnet. There are no "solutions" here, nothing to "workaround" You've simply made a very bad choice of subnets, which you need to improve. Don't put a host in a /16 subnet, that's just daft. You want 65534 machines on the same vlan? No, you don't.
 
Old 05-26-2011, 01:58 AM   #7
koshy
LQ Newbie
 
Registered: Mar 2010
Posts: 20

Original Poster
Rep: Reputation: 0
OK and I agree that I don't need 64K machines on a single network. I was confused because I had a different experience if did the same thing on two Windows machines.
Koshy
 
  


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
can ping network computer, cannot ping google.com (help needed) ben_build#2.1.0 Linux - Wireless Networking 23 11-07-2010 01:55 PM
"ping" shows different delay from two computer on the same network ufmale Linux - Networking 2 07-21-2010 10:19 AM
Mandriva2007 box can ping anyother computer in network but not the way around. rocketero Linux - Networking 2 03-08-2007 02:21 AM
my computer(FC4 linux) can't ping other computer? oimm Linux - Networking 1 03-24-2006 09:20 AM
Ping from a computer with 2 network cards joseph_k Linux - Networking 3 05-27-2004 12:07 PM


All times are GMT -5. The time now is 04:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration