Network Principles
Lecture 3
Internet Protocols
20th October 2005
Subnetting
Structure of a datagram
Fragmentation & reassembly
Protocol
A set of rules that govern data
communications
A protocol defines
What is communicated
How it is communicated
When it is communicated
Protocol ctd
Key functions:
Encapsulation
Fragmentation and reassembly
Connection control
Ordered delivery
Flow control
Error Control
Addressing
Multiplexing
Transmission services
4
Encapsulation
Data transferred in blocks called protocol data
units (PDU)
Each PDU contains not only data but also
control information
Occasionally, some PDUs consist solely of
control information and no data
Control Information:
Address
Error detecting code
Protocol code
Connection control
Two modes of operation:
Connectionless data transfer
An entity transmits data to another in such a way
that each PDU is treated independently of all
prior PDUs
Connection-oriented data transfer
Connection to be established between the
entities
Three phases occur:
Connection establishment
Data Transfer
Connection Termination
Ordered delivery
PDUs may not always arrive in the order
in which they sent because they may
traverse different paths through the
network
In connection-oriented protocols, it is
generally required that PDU order be
maintained
Each PDU is given a unique number and
numbers are assigned sequentially
8
Flow control
Function performed by a receiving entity to
limit the amount or rate of data that is sent
by a transmitting entity
Simplest form of flow control: stop-andwait procedure
Each PDU must be acknowledged before the
next can be sent
Error Control
To guard against loss or damage of data and
control information
Typically implemented as two separate functions:
Error detection
Sender inserts an error-detecting code in the
transmitted PDU, which is a function of the other bits in
the PDU
Receiver checks the value of the code on the incoming
PDU
If an error is detected, the receiver discards the PDU
Retransmission
Upon failing to receive an acknowledgement to the PDU
in a reasonable time, the sender retransmits the PDU
10
Addressing
Covers a number of issues:
Addressing level
Entity is named e.g IP address
Addressing scope
Unique address for device interface on the
network
Connection identifiers
Concerned with connection-oriented networks
Addressing mode
Unicast: address refers to a single system or port
Multicast: intended for a specific subset of entities
Broadcast: intended for all entities within a domain
11
Multiplexing
Multiple data streams that are converted
into a single
12
Transmission services
Protocol may provide a variety of additional
services e.g.
Priority
Quality of service
Security
13
Addressing
Addresses and routing are necessary
mechanisms for delivery at the network
layer, from host to host
A need to uniquely identify each device on
the Internet to allow global communication
between all devices
14
IP address
Also known as Internet address
IP = Internet Protocol
Identifier used in the network layer of the
Internet model to identify each device
connected to the Internet
32-bit binary address that uniquely and
universally defines the connection of a
host or a router to the Internet
15
IP address ctd
IP addresses are unique and universal
Two common notations:
Binary notation
Displayed as 32 bits with one or more spaces
inserted between each octet (or byte) (= 8 bits)
Example:
01110101 10010101 00011101 11101010
Dotted-decimal notation
16
Classes of IP addresses
5 classes of IP addresses: classes A, B, C, D, E
17
18
19
Types of addresses
Unicast
Addresses in classes A, B and C are for
unicast communication
Multicast
Addresses in class D are for multicast
communication
Reserved
Used for special purposes
20
21
Class A IP addresses
First bit = 0
Next 7 bits represent network
Number of possible networks = 27 2
Class B IP addresses
First bit = 10
Next 14 bits represent network
Number of possible networks = 214
Class C IP addresses
First bit = 110
Next 21 bits represent network
Number of possible networks = 221
IP Addressing Scheme
A problem of address assignment
inefficiency
126 Class A networks each with 16 million
hosts
16,384 Class B networks each with 65,534
hosts
>2 million Class C networks each with 254
hosts
Many IP addresses are wasted
Subnetting
Same network
IP address
subnet
subnet
router
router
subnet
subnet
router
26
Subnet Addressing
IP address
before
subnetting
Netid
Hostid
IP address
after
subnetting
Netid
Subnet id Hostid
11111111 11111111
11111111 00000000
27
28
30
31
Intranet Fragmentation
32
34
Internet Fragmentation
35
36
37
Internet
Not always making
maximum use of the
capacity of the
network/subnet
No time wasted at
each intermediate
node to re-assemble
the data unit
38
Reading list
Stallings, W., (2004), Data and Computer
Communications, Pearson Prentice Hall,
7th Edition: Chapter 18
39