LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   centos - able to ping computer that is in a different network. Pl.help (https://www.linuxquestions.org/questions/linux-newbie-8/centos-able-to-ping-computer-that-is-in-a-different-network-pl-help-882387/)

koshy 05-24-2011 01:59 AM

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

acid_kewpie 05-24-2011 03:05 AM

without telling us more about the networking there we can't say much. ifconfig -a and route -n outputs of both machines please.

koshy 05-25-2011 11:47 AM

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

T3RM1NVT0R 05-25-2011 12:15 PM

@ 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?

koshy 05-25-2011 09:48 PM

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

acid_kewpie 05-26-2011 12:18 AM

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.

koshy 05-26-2011 12:58 AM

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


All times are GMT -5. The time now is 06:10 AM.