The IP Protocol
Recall earlier: the TCP (transport layer) protocol is implemented
in the two end systems involved in communications.
TCP relies on the Internet Protocol to deliver packets of data from one
end system to another. The packets which IP delivers are also called
datagrams.
Datagrams navigate zero or more (sometimes many) routers,
interconnecting
the individual networks which together make up the Internet:

IP Addressing
The concept of a global Internet addressing scheme is fundamental to IP.
Every Internet-connected system has a unique Internet host address. This is a 32
bit, or 4 byte, binary number.
Internet addresses are written as a dotted sequence of the form:
aa.bb.cc.dd
where aa, bb, etc, are the decimal values (ranging from 0 to 255) of
the 4 bytes
which make up the internet address, for example:
149.144.20.60
This is called the "Common Internet Address Notation"
"Two Part" Addresses
The 4 byte internet address consists of 2 parts, the network part and the host
part.
- The network part must be the same for all hosts connected to the same
network.
- The host part must be unique within each specific network. It is used to
deliver the datagram once it has been routed to the appropriate network.
IP Address Classes
The structure of an IP address differs depending on the class of the local
network to which the host is connected:
- Class A Network
- the first (or leftmost) field, or byte, of the address
specifies the network number and class, and can take values from 1 to 126.
- Class B network
- the leftmost two fields (bytes) specify the network
number and
class. The first field is in the range from 128 to 191, and the second from 1
to 254.
- Class C network
- the leftmost three fields specify network number and
class.
The first field can be from 192 to 223, the second from 0 to 255, and the third
from 1 to 254.
IP Address Classes #2
The Internet address format can be described graphically:

For example, in a class A network, only values from 00000000 to
01111111 are
possible. Of these 128 combinations, 126 are permitted (networks 0 and 127 are
reserved for other purposes). Hence there can only ever be 126 class A networks,
each of which can have a huge number of hosts.
Network numbers above 223 are also reserved for special purposes, outside the
scope of this subject.
Broadcast Address
The broadcast address is the address used to send a datagram to all
hosts on the
local network simultaneously. This is the address given by the network number
followed by all binary 1's in the host part of the address.
For example: A broadcast address for a host on an example Class-B network is:
149.144.255.255
An example Class C broadcast address might be:
195.96.97.255
Subnet Addresses
Where Class-B networks (and, nowadays, class C also) are in use, the host part
of the address is commonly split, for management purposes, to allow
subnetting -
typically this involves defining 254 subnets each of 254 hosts. Each
of these
subnets behaves, for all intents, like an independent class-C network: thus:

Exactly which bits of the subnetted address are used for the network/subnet part
and the host part is defined using an address mask, or netmask thus:
255.255.255.0
This lecture is also available in PostScript format.
The tutorial for this lecture is Tutorial #07.
Phil Scott