why the different network segment directly connect can comunication(ping succeed)

Answered Question
Dec 13th, 2009

Hello,dear all!

A strange problem I ‘v encountered.so I need your help,thank you!

I use the routers to simulate PCs in GNS3 like bellow:

Top:

RA(E1/0)----------------(E1/0)RB

(IOS:7200 Software (C7200-IK9O3S-M), Version 12.4(3))

Config:

RA:

no ip routing

interface Ethernet1/0

ip address 2.2.2.2 255.255.255.0

no ip route-cache

duplex half

RB:

no ip routing

interface Ethernet1/0

ip address 1.1.1.1 255.255.255.0

no ip route-cache

duplex half

Didn’t set the gateway!

But when I use Ping 1.1.1.1 command on the RA,it show like bellow:

A(config)#do p 1.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:

.!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max = 4/33/76 ms

RA’s arp table:

A(config)#do sh arp

Protocol  Address          Age (min)  Hardware Addr   Type   Interface

Internet  1.1.1.1                 0   ca01.0348.001c  ARPA   Ethernet1/0

Internet  2.2.2.2                 -   ca00.0348.001c  ARPA   Ethernet1/0

RA can ping succeed to RB.

I don’t know why this happened?

Another Question:

When the device (e.g.:The PC with WinXP OS) try to ping the other one,what will it check first? Arp table or Route table???

Some books said:

If they are in the same network segments,it will check the Arp table direcly:

if there have a entry in the table,then send them out;if no entry in the table,then send Arp request(broadcast).

If they are in the different network segments,it will sent a Arp reques to the gateway…

But the question is how the device know the destination is in the same network segment or differen network segment???

So I think the device will check Route table first,then check Arp table!

Tks…

Best regards!

Sky.h

I have this problem too.
0 votes
Correct Answer by Jon Marshall about 6 years 11 months ago

huangpo2005 wrote:

Hello,dear all!

A strange problem I ‘v encountered.so I need your help,thank you!

I use the routers to simulate PCs in GNS3 like bellow:

Top:

RA(E1/0)----------------(E1/0)RB

(IOS:7200 Software (C7200-IK9O3S-M), Version 12.4(3))

Config:

RA:

no ip routing

interface Ethernet1/0

ip address 2.2.2.2 255.255.255.0

no ip route-cache

duplex half

RB:

no ip routing

interface Ethernet1/0

ip address 1.1.1.1 255.255.255.0

no ip route-cache

duplex half

Didn’t set the gateway!

But when I use Ping 1.1.1.1 command on the RA,it show like bellow:

A(config)#do p 1.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:

.!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max = 4/33/76 ms

RA’s arp table:

A(config)#do sh arp

Protocol  Address          Age (min)  Hardware Addr   Type   Interface

Internet  1.1.1.1                 0   ca01.0348.001c  ARPA   Ethernet1/0

Internet  2.2.2.2                 -   ca00.0348.001c  ARPA   Ethernet1/0

RA can ping succeed to RB.

I don’t know why this happened?

Another Question:

When the device (e.g.:The PC with WinXP OS) try to ping the other one,what will it check first? Arp table or Route table???

Some books said:

If they are in the same network segments,it will check the Arp table direcly:

if there have a entry in the table,then send them out;if no entry in the table,then send Arp request(broadcast).

If they are in the different network segments,it will sent a Arp reques to the gateway…

But the question is how the device know the destination is in the same network segment or differen network segment???

So I think the device will check Route table first,then check Arp table!

Tks…

Best regards!

Sky.h

It's because you didn't set a default-gaeway that you see this behaviour. Because RA has no default-gateway it will arp out for any address and because you have connected the 2 devices together on ethernet then RB sees the arp request and replies with it's mac-address.

How does a device know whether it is on the same network or not -

when a device wants to send traffic to another device it compares it's IP address and subnet mask with the destination IP address and it's own subnet mask ie.

192.168.5.10 wants to talk to 192.168.6.10

2 examples of subnet masks -

1) in the first subnet-mask = 255.255.0.0

so 192.168.5.10 255.255.0.0  = 192.168. network

     192.168.6.10 255.255.0.0 = 192.168.  network

so in this example 192.168.5.10 believes 192.168.6.10 is on the same network and so will arp out for the mac-address of 192.168.6.10

2) subnet mask = 255.255.255.0

so 192.168.5.10 255.255.255.0  = 192.168.5. network

     192.168.6.10 255.255.255.0  = 192.168.6. network

so 192.168.5.10 believes 192.168.6.10 is on a different network and if it has one it will arp out for it's default-gateway mac-address

Jon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Jon Marshall Sun, 12/13/2009 - 02:32

huangpo2005 wrote:

Hello,dear all!

A strange problem I ‘v encountered.so I need your help,thank you!

I use the routers to simulate PCs in GNS3 like bellow:

Top:

RA(E1/0)----------------(E1/0)RB

(IOS:7200 Software (C7200-IK9O3S-M), Version 12.4(3))

Config:

RA:

no ip routing

interface Ethernet1/0

ip address 2.2.2.2 255.255.255.0

no ip route-cache

duplex half

RB:

no ip routing

interface Ethernet1/0

ip address 1.1.1.1 255.255.255.0

no ip route-cache

duplex half

Didn’t set the gateway!

But when I use Ping 1.1.1.1 command on the RA,it show like bellow:

A(config)#do p 1.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:

.!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max = 4/33/76 ms

RA’s arp table:

A(config)#do sh arp

Protocol  Address          Age (min)  Hardware Addr   Type   Interface

Internet  1.1.1.1                 0   ca01.0348.001c  ARPA   Ethernet1/0

Internet  2.2.2.2                 -   ca00.0348.001c  ARPA   Ethernet1/0

RA can ping succeed to RB.

I don’t know why this happened?

Another Question:

When the device (e.g.:The PC with WinXP OS) try to ping the other one,what will it check first? Arp table or Route table???

Some books said:

If they are in the same network segments,it will check the Arp table direcly:

if there have a entry in the table,then send them out;if no entry in the table,then send Arp request(broadcast).

If they are in the different network segments,it will sent a Arp reques to the gateway…

But the question is how the device know the destination is in the same network segment or differen network segment???

So I think the device will check Route table first,then check Arp table!

Tks…

Best regards!

Sky.h

It's because you didn't set a default-gaeway that you see this behaviour. Because RA has no default-gateway it will arp out for any address and because you have connected the 2 devices together on ethernet then RB sees the arp request and replies with it's mac-address.

How does a device know whether it is on the same network or not -

when a device wants to send traffic to another device it compares it's IP address and subnet mask with the destination IP address and it's own subnet mask ie.

192.168.5.10 wants to talk to 192.168.6.10

2 examples of subnet masks -

1) in the first subnet-mask = 255.255.0.0

so 192.168.5.10 255.255.0.0  = 192.168. network

     192.168.6.10 255.255.0.0 = 192.168.  network

so in this example 192.168.5.10 believes 192.168.6.10 is on the same network and so will arp out for the mac-address of 192.168.6.10

2) subnet mask = 255.255.255.0

so 192.168.5.10 255.255.255.0  = 192.168.5. network

     192.168.6.10 255.255.255.0  = 192.168.6. network

so 192.168.5.10 believes 192.168.6.10 is on a different network and if it has one it will arp out for it's default-gateway mac-address

Jon

Actions

This Discussion