Ipadd
Ipadd
CS176A
Ramya Raghavendra
[email protected]
IP Addressing
• Primary job of IP – delivering messages
• IP Addressing
– Network Interface Identification
– Routing (direction finding)
• Become more complicated with subnetting
and classless addressing
• Rest of the class…
– IP addressing schemes
Dotted decimal notation
• 32 bit binary
• Four 8-bit octets
Ex: 11100011010100101001101110110001
11100011 - 01010010 - 10011101 - 10110001
E3 - 52 - 9D - B1
• What’s a subnet ?
– device interfaces with same subnet part of IP address
– can physically reach each other without intervening
router
Internet IP Address Structure
• 32 bits have an internal structure with 2 components
– Network Identifier (Network ID)
– Host Identifier (Host ID)
– Like a telephone number! (401) 555-7777
Subnet Bit Is A Zero: Here, we are ANDing with a 0, so the result is always
0 regardless of what the IP address is. Thus, when the subnet bit is a 0, the
IP address bit is always cleared to 0.
• A router that performs this function is left with the address of the subnet.
Since it knows from the class of the network what part is the network ID, it
also knows what subnet the address is on.
• Bit Allocation Example
– We can decide to use 1 bit for the subnet ID and 15 bits for the
host ID. If we do this, then the total number of subnets is 21 or 2:
the first subnet is 0 and the second is 1. The number of hosts
available for each subnet is 215-2 or 32,766.
Example: IP Subnetting
• Requirements
– Class, how many hosts, scalability, min, max