08-11-2005 12:38 AM - edited 03-02-2019 11:40 PM
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
08-11-2005 02:20 AM
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
08-11-2005 04:30 AM
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 ?
08-11-2005 08:45 AM
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.)
08-12-2005 05:20 AM
Would it work if I put a class C address in the pc also ?
08-12-2005 05:36 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide