Subnet Addressing (Contd)
- Internal routers & hosts use subnet mask to identify “subnet ID” and route packets between “subnets” within the “network”.
- Eg: Mask: 255.255.255.0 => subnet ID = 8 bits with upto 62 hosts/subnet
- Route table lookup:
- IF ((Mask[i] & Destination Addr) = =
Destination[i]) Forward to NextHop[i]
- Subnet mask can end on any bit.
- Mask must have contiguous 1s followed by contiguous zeros. Routers do not support other types of masks.