How does subnet mask affect the ip address?I have 3750 configured with VLAN with /19 subnet mask.I connected host with that VLAN but with /16 subnet mask,i can ping the ip add of the vlan interface.Am i getting the right result?
This is how it works: say you have a host with the following config:
IP address: 192.168.1.1
Subnet mask: 255.255.224.0
Default Gateway: 192.168.1.254
When the host wants to send a packet to a destination X, it will do the following:
- it will first determine the network part of that destination X based on the host's configured subnet mask
- it will also determine the network part of the host's own IP address based on the host's configured subnet mask.
- if the two network portions match, the host knows that the destination X is local.
- if the two don't match, the host knows that the destination is remote.
Once it works that out, it does the following:
- if the destination is local, it will ARP for it, in order to build an ethernet frame addressed to it.
- if the destination is remote, it will send the IP packet to its default gateway.
Based on my example addresses above:
- if the destination is 192.168.1.20, the logical AND'ing of this with 255.255.224.0 gives you 192.168.1.0. The destination is therefore local and the host will ARP for it
- if the destination is 192.168.120.20, the logical AND'ing of this with 255.255.224.0 gives you 192.168.96.0. The destination is therefore remote and the host will have to send it to the default gateway. The host will ARP for the default gateway's address if it does not have an entry for it in its ARP table.
To extend this to your case, use the above logic to determine whether the IP address of the VLAN interface, when AND'ed with the host's mask gives you the same network address as the AND'ing of the host's IP with its subnet mask.
This is actually a pretty cool feature, i didn't even know it existed until I was looking for a solution to advertise a subnet (prefix in BGP talk), only if a certain condition existed. This is exactly what conditional advertisements does
j ai une question j ai achete un routeur cisco 887VA-k9 , je le configuré avec la configuration ci- dessous
si je le lier avec mon pc portable sur l un de ses ports directement ça marche toute est bien ( la connexion internet + m...
Attached policy provides CLI access to the Cisco 4G router over text messaging. Two files are in the attached .tar file:
2. PDF with instructions on how to load and use the .tcl file.