Saturday 30 June 2018

LPM longest prefex match

Subnet Calculation:


IP Address:205.215.175.9411001101.11010111.10101111.01011110
Subnet Mask:240.0.0.011110000.00000000.00000000.00000000
Wildcard Mask:15.255.255.25500001111.11111111.11111111.11111111
Network Address:192.0.0.0/411000000.00000000.00000000.00000000 (Class C)
Broadcast Address:207.255.255.25511001111.11111111.11111111.11111111
First Host:192.0.0.111000000.00000000.00000000.00000001
Last Host:207.255.255.25411001111.11111111.11111111.11111110








Row 1: Network 10.0.0.0 / 255.255.255.0
Row 2: Network 10.0.0.0 / 255.255.0.0
Row 3: Network 10.0.0.0 / 255.0.0.0
Then, when a packet comes in, destined to, say, 10.10.10.10, the router will start at the top of the routing table, performing a bitwise AND between the destination IP and the netmask of the route in that table row.




Key = SubnetId = IP & Mask;













No comments:

Post a Comment