cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
413
Views
0
Helpful
5
Replies

How come it works

carl_townshend
Spotlight
Spotlight

How come if im on a class A network, default gateway address 10.0.0.0 class A, if I put my pc on a class B 10 address it still works fine, How come this works ?

thanks

5 Replies 5

amit-singh
Level 8
Level 8

Carl,

What Ip u used. Whihc IP you were pinging. What was the DG on the PC. Where are the hosts conected. Give the full info.

regards,

-amit singh

Ip of pc, 10.1.20.20, 255.255.0.0

ip of default gateway 10.1.1.1, 255.0.0.0, pings dg fine ?

Look at it from the PC's perspective: it's on the 10.1.x.x/16 subnet. Any traffic it sends to a host on a network or subnet outside of that is sent to the default gateway: in your case, 10.1.1.1. That IP address happens to be a valid IP address for the PC's local subnet, so it can resolve the MAC address of the default gateway via ARP and put the traffic out onto the wire.

From the default gateway's perspective: it's on the 10.x.x.x/8 network. It will receive any traffic sent to its MAC address from the PC and process it. Any replies it needs to send back to the PC at 10.1.20.20 are put back out onto that same wire, because the router considers the PC's IP address to be on the same local subnet. Why? Because 10.1.20.20 is a valid address for the 10.x.x.x/8 network. So it gets the MAC address of the PC via ARP, and everything seems to work.

Where you will run into problems is when you start creating other 10.something subnets, and expecting traffic to flow between them. The router is currently configured to think that all 10.something traffic goes out that one interface. If you need to support multiple 10.something subnets on different interfaces, then you will need to properly subnet the router's LAN interface. (In fact, the router will probably prevent you from defining another 10.something subnet on a different interface, citing an IP address conflict or overlap.)

Would it work if I put a class C address in the pc also ?

With your current IP address on the PC no, as a device with a 10.1.20.x with a class C subnet mask (255.255.255.0) only sees IP addresses from 10.1.20.1-255, so a gateway with an Address of 10.1.1.1 the PC's range.

Take a look at this IP Addressing document which should help, too.

http://www.cisco.com/warp/public/701/3.html