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 usually called datagrams.
Datagrams navigate zero or more (sometimes many) routers, interconnecting the individual networks which together make up the Internet. The word "Internet" is just a contraction of the phrase "Interconnected Networks".
A router is essentially a special-purpose computer whose sole function is to transfer datagrams between networks. In earlier times, they were called "IP Gateways". The general structure of the Internet can thus be envisaged:
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.21.60
This is called the "Common Internet Address Notation". Internet addresses are commonly referred to as "IP addresses".
Note that 149.144.21.60 is the IP address of
"ironbark
", or to use its full name,
ironbark.bendigo.latrobe.edu.au.
We shall see later how
the name of a computer (ironbark, redgum, bindi, etc) is
mapped to its IP address.
Note that the traditional Internet literature refers to internet-connected computers as hosts, which reflects the historical nature of computers as multi-user timeshared systems.
The 4 byte internet address consists of 2 parts, the network part and the host part.
The structure of an IP address differs depending on the class of the local network to which the host is connected:
The Internet address format can be described graphically:
149.144.21.60
This is a class B
network (149.144
), and ironbark's
host ID is 21
.60
203.17.3.5
is a class C address.
The network number is 203.17.3
, and
the host number is 5
.
Network numbers above 223 are also reserved for special purposes, outside the scope of this subject.
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-C network is:
195.96.97.255
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
IP transmits data in packets called datagrams. A datagram contains a header and some data, thus:
Notes:
IP data transfer across an internet is based on three fundamental principles:
These specifications allow the IP service to concentrate on its job: delivering packets. As we have seen, higher level protocols (usually TCP) transform the IP service into a reliable, sequenced interprocess communications mechanism.
There are two levels of complexity involved in IP routing:
The Internet consists of networks (or, more commonly nowadays -
subnets) connected by routers. The traceroute
utility
shows the path a datagram takes - the following
traceroute
is from ironbark to the Victorian Regional
Network (VRN).
1 r-busbgo.bendigo.latrobe.edu.au (149.144.21.254) 1 ms 2 ms 1 ms 2 r-bgoatm34.bendigo.latrobe.edu.au (149.144.10.250) 1 ms 1 ms 1 ms 3 r-sctech-atm.latrobe.edu.au (131.172.239.3) 5 ms 4 ms 3 ms 4 cisco-ltu-fddi.latrobe.edu.au (131.172.20.12) 5 ms 4 ms 4 ms 5 vic-gw.vrn.EDU.AU (203.21.130.129) 4 ms 5 ms 4 ms
The User Datagram Protocol provides a connectionless alternative transport service to TCP for applications where reliable stream service is not needed. UDP datagrams can be droppped, duplicated or delivered out of order, exactly as for IP.
The UDP transport service add to IP the ability to deliver a datagram to a specified destination process using a port abstraction, in an analogous way to that used by TCP.
Examples of applications where UDP is used include: