Types of IP addresses
![]()
Class A
![]()
|
0 |
Net |
Host |
![]()
![]()
![]()
![]()
Class
B:
![]()
![]()
|
1 |
0 |
Net |
Host |
![]()
![]()
![]()
Class
C:
![]()
![]()
![]()
![]()
|
1 |
1 |
0 |
Net |
Host |
![]()
![]()
![]()
![]()
![]()
Dotted Decimal
Notation
Shorthand for IP address
Each dotted separated with a dot
d.d.d.d
Example :
128.10.2.3 à class B
10000000
Network Number 128.10.0.0
Host Number 0.0.2.3
192.5.48.3 à class C
11000000
Network Number : 192.5.48.0
Host Number : 0.0.0.3

The internet the routing is
hierarchical (only 2 levels).
In
the big picture of the internet :

The Backbone internet will make sure that packets are delivered to the corresponding router that links to the backbone to the network.
Router in the backbone will use the network number to do the routing.
Basically what it meant if I have a host in the purdue cs, 128.10.3.5
I cannot have 128.10.3.5 in 198.5.48.0 because I need the 128.10._._ prefix
Once the packet arrives to the router of the network, the host number is used to deliver the packet. The last 2 bytes will be use to deliver to the computer by the router.
The host number is divided by subnets numbers.
Why? Eg. 128.10.0.0 how many computer you can attached to the system? 64k. If all are connected, there will be too many collisions.
What happen is, the administrator distribute into subnet numbers.
Eg.
128.10.subnet.host in CS department, we have a class B and the host part is divided into subnet (8bits) and the subnet host number (8 bits also).
# of subnet we can have is = 256 subnets (2^8).
# hosts/subnet = 256 (2^8)
it’s not really 256 but 254. 0’s and 1’s are reserved.
The subnet mask is going to be 4 bytes number, where the 1’s determine the software part and the 0’s determine the host parts of the subnet.
For 128.10.sub.host what will be the subnet mask?
Its going to be 128.10.sub as the subnet host will be host number.
255.255.255.0 is the subnet mask. The decision is up to network admin.
Other subnet mask would be
Eg 255.255.240.0 à #subnet = 16 #host/sunmet = 16
![]()
11110000
eg. 255.255.255.142 à #subnet ---
The subnet mask is decided by the local administrator.
The backbone internet does not have the knowledge about how the subnet masks.
The subnet masks will be used by the local router. To route the packets.
Pic 5
The subnet mask is part of the configuration of the routers.
The network administrator will configure the routers and it will label the IP subnet of each interface and also the subnet mask.
In the case of the host you can manually add the subnet mask, but there are also you can configure a host automatically. (they are called VHCP)
A host needs the following information when it is attached to a network.
- IP address, must be unique to the computer
- Subnet mask. Because even it is a host, the subnet mask will tell whetever the host want to send a packet if the destination is the same network or not. Because if let say 128.10.3.5 and 128.10.3.6, they will know they are attached to the same network by subnet masks. If they are in the same network, then they can send packets directly
- Default Rauter or the Gateway
- DNS server à is going to map names to ip addresses
These configurations used to be done manually in hosts. Now there is a protocol DHCP that provides this information at boot time.
Dynamic Host Configuration Protocol
10/31/03
19
Address resolution
We have IP address, they are virtual
addresses, it is just a software but we needed these
abstraction to an address.
They are maintained by software.
Ethernet address 6 bytes (H/W addr)
![]()

If I want to send from A to B I will get IP the address locally.
But what about A to C? A àR àC
1st method :
Table
lookup
![]()
![]()
![]()
IP address,
If the IP address gets too big, it will take more time to find it.
Indexing or Hashing can help to solve the problem.
![]()
![]()
![]()
![]()
Eg
2nd method is closed form computation:
128.10.5.3
3rd method is message exchange :
ip address(A)
Resolving addresses
1. hardware only recognizes MAC addresses
2. IP only uses IP addresses
3. Consequence : software needed to perform translation
a. Part of network interface
b. Known as address resolution
Address Resolution Protocol(ARP)
Keep bindings in table
Table entry contains pair of addresses for one computer
- IP address
- Hardware address
Build table automatically as needed

ARP request
IP(A) IP(c)
HW(A)
![]()
ARP
request
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Optimization
1. cache at sender
2. cache at receiver