Types of IP Addresses:
Class A:

Class B:

Class C:

Dotted Decimal Notation:
- Shorthand for IP address
- Each octet is separated with a dot
- e.g.: d.d.d.d
Example 128.10.2.3
128 = 27 = 1000 0000 = Class B
Network number: 128.10.0.0
Host number: 0.0.2.3
Example 192.5.48.3
192 = 1100 0000 = Class C
Network number: 192.5.48.0
Host number: 0.0.0.3
- The routing in the internet is hierarchical (with 2 levels)

- the backbone internet will make sure that packets are delivered to the corresponding router that links the backbone to the network
- the router in the backbone will use the network number to do the routing
- once the packet arrives to the router of that network, the host number is used to deliver the packet
- the host number is divided also by subnet numbers, by the local administrator
o for example: 128.10.subnet.host
o in the CS department we have a class B address and the host number part is divided into subnet (8 bits) and the subnet host number (8 bits)
o number of subnets = 256 (28)
o number of hosts = 256 (28)
- the subnet is determined by the “subnet mask” that is a 4 byte number where the 1’s determine the subnet port and the 0’s determine the host port of the subnet
o 128.10.subnet.host
o mask = 255.255.255.0
o this gives other subnet masks as
§ 255.255.240.0
§ number of subnets = 16
§ number of hosts = 4096
§ 255.255.255.192
§ number of subnets = 210 = 1024
§ number of hosts = 26 = 64
- the subnet mask is decided by the local administrator
- the backbone internet does not have knowledge about the subnet mask
- the subnet mask will be used by the local routers to route the packet
- the switch mask is part of the configuration of the routers
- the network administrator will configure the router and it will label the IP subnet of each interface and also the subnet mask
- a host needs the following information when it is attached to a network
o IP address
o Subnet mask (it is needed to know if you can deliver a packet directly or to the router)
o Default router
o DNS server (map names to IP address)
- it used to be that this configuration was done manually in host, not there is a protocol, DHCP that provides this information at boot time
- DHCP = Dynamic Host Configuration Protocol
Address Resolution:
IP Address
- 4 bytes
- “protocol address”
- virtual
- maintained by software
IP Address maps into Ethernet Address
- 6 bytes
- “hardware address”

Table Lookup:
1.

- O(n) lookup time
- Uses hashing / indexing
2. Close form computation
128.10.5.3
128 & 10 & 5 & 3 = Hardware Address
3. Message Exchange
IP Address to the network
Resolving Addresses:
- Hardware only recognizes MAC address
- IP only used IP addresses
Translation is needed
o part of network interface
o known as address resolution
Address Resolution Protocol (ARP):
- keeps bindings in a table
- table entry contains pair of addresses for each computer
o IP Address
o Hardware Address
- the table is automatically built

- this is a broadcast
- all computers receive the broadcast
- “C” will generate an ARP reply

ARP Request:
Source: Destination:
--------- ---------------
IP(A) IP(C)
HW(A) Broadcast
ARP Reply:
Source: Destination:
--------- ---------------
IP(C) IP(A)
HW(A) HW(A)

- broadcast from A for ARP request
Optimization:
ARP Table:
- only contains entries for the local network
- IP prefixes are identical for all computers in the network
ARP Message Format:
- length of hardware address depends on type
- uses 48 bit addresses
- encapsulate in Ethernet frames
-
Ethernet type indicates an ARP packet