cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2942
Views
0
Helpful
2
Replies

same ip with different subnet masks

bvsivaprasad
Level 1
Level 1

Hi,

iam having one doubt.

In a LAN shall i can have same ip with different subnet masks i.e, two pcs with same ip but different subnet mask.if there is layer 3 switch is there to make communicate between different networks.If from other network if iam trying to ping that ip which pc will give response back.

Shall some body can clear this doubt please.

with regards

sivaprasad

2 Replies 2

ankbhasi
Cisco Employee
Cisco Employee

Hi Shiv,

You can have though but that is not a recommended ip design. As per the design no network device in same LAN should be having a same ip address.

You do not need any layer 3 device to make them talk to each other because when one initiate a packet it will get an arp reply from its own ip address as well as from other machine so there will be unpredictable results.

When ARP request is generated or if you initiate some packets to other machine it never carries the mask information so you will get a reply.

You can have something like

Host A - 10.10.10.1 /24

Host B - 10.10.10.2 /16

But

Host A - 10.10.10.1/24

Host B - 10.10.10.1/16 is not a recommended design.

HTH

Ankur

*Pls rate all helpfull post

scottmac
Level 10
Level 10

If you mean the exact same address on two machines ... NO, not if they can "see" each other, the address is still the address regardless of the mask.

An IP address must be unique within the network on which it is communicating.

The 192.168.x.x, 172.{16-31}.x.x, and 10.x.x.x addresses that are used everywhere are "private" addresses ... they are usually hidden behind systems and processes that hide them from the other networks / subnetworks that are also using them ... so they are still unique to their networks.

Good Luck

Scott

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