cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7567
Views
9
Helpful
20
Replies

how to check if devices are on same network or not?

mahesh18
Level 6
Level 6

i have one host IP

172.16.10.100/16 and another host

172.16.20.200/24

how can we check that if they are in same network or not?

many thanks

mahesh

20 Replies 20

Jon Marshall
Hall of Fame
Hall of Fame

Mahesh

Not sure i fully understand.

172.16.10.100/16 is host 10.100 on network 172.16.

172.16.20.200/24 is a host 200 on network 172.16.20.

is there some connectivity issue you are having.

Jon

Hi jon,

i want to know if these two devices are on same subnet or not?

if they are on different subnet how can we check that?

many thanks

Mahesh

No they are not on the same subnet - see my previous answer.

Jon

Yes they are in the same subnet

The first ip address is part of the major subnet 172.16.0.0/16. 16 here would denote the network bits leaving the other 16 as host bits

The IP address 172.16.200.0/24 is a subset of the major subnet above

Time to read some ip addressing

http://www.ralphb.net/IPSubnet/

Narayan

Narayan, Edison

First time we have all disagreed.

Narayan - yes in same subnet

Edison - yes for one, no for the other

me - no for both.

How do we decide this :-)

Jon

Host

172.16.20.200 255.255.255.0

needs a router to reach

172.16.10.100 255.255.0.0? (Yes|No)

Host

172.16.10.100 255.255.0.0

needs a router to reach

172.16.20.200 255.255.255.0 (Yes|No)

Based on the answer above, you determine which host sees the other host as belonging to its own subnet. This is a broken network to begin with but the question is valid and can be seen as tricky CCNA question :)

__

Edison.

I understand how it works in the respect of 172.16.10.100 255.255.0.0 thinks 172.16.20.200 is on the same network because of it's own subnet mask ie. 255.255 but that wasn't the question or at least it wasn't the way i interpreted it.

The question was is 172.16.10.100/16 on the same network as 172.16.20.200 and not does 172.16.10.100/16 think 172.16.20.200 is on the same subnet.

172.16.10.100/16 = network = 172.16

172.16.20.200/24 = network = 172.16.20

maybe it's a terminology thing in terms of network/subnet.

And maybe it's just me as i seem to be having these sort of dicsussions with a few fellow NetPro's and the one thing they have in common is me !

Perhaps i just need a break :-)

Jon

The question was is 172.16.10.100/16 on the same network as 172.16.20.200/24

It is :)

The other way around, the host does not see the other host as its own subnet - needs a router :)

okay, you can put it in bold if you like :)

"The question was is 172.16.10.100/16 on the same network as 172.16.20.200/24"

It is on the same major network 172.16. but for the life of me i can't see how

172.16 = 172.16.200

From each addresses perspective i can see how 172.16.100.16 thinks 172.16.20.200 is the same network but i didn't think we were talking about perspective.

Forget it, it's me.

Jon

Jon, my friend. Step away from the computer :)

Seriously, I know how you feel. I've felt burned a couple of times from answering questions in NetPro in addition to holding a full-time job. Take a week or two off. It helps.

We don't have to compete in the 'Top NetPro' of the month anymore :)

Edison

Ironically i'm not working at the moment but i take the point, i'm actually busier than when i do work !

Since i have nothing but the highest respect for you i think i'll take your advice and have a week or so off.

"We don't have to compete in the 'Top NetPro' of the month anymore :)"

That used to be fun tho didn't it ?.

Still don't agree with Cisco memebers not being allowed to be on the boards :-)

Thanks Edison.

Jon

Best way is to put it to test

Router(config)#int fa 0/0

Router(config-if)#ip add

Router(config-if)#ip address 172.16.10.100 255.255.0.0

Router(config-if)#

Router(config-if)#no sh

Router(config-if)#

Router(config-if)#

Router(config-if)#int fa 0/1

*Mar 1 00:01:06.299: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state t

o up

*Mar 1 00:01:07.299: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthern

et0/0, changed state to up

Router(config-if)#

Router(config-if)#

Router(config-if)#ip add 172.16.20.200 255.255.255.0

% 172.16.20.0 overlaps with FastEthernet0/0

Router(config-if)#

Router(config-if)#

Narayan

Narayan,

I think you are missing the point :)

I agree

You were explaining more from a routing perspective whereas i was referring to the configuration on a single router :)

Narayan

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco