You are on page 1of 79

Internetworking:

Issues and Solution


Topics to be covered

 Concept of Universal Service


 Requirements of Universal Service
 TCP/IP model
 IP Services and other issues
 Other Protocols: ARP/RARP, ICMP,
DHCP

7/28/2020 Department of IT, RCOEM, Nagpur 2


Universal Service

 No single Networking Technology is best


for all needs
 If the networking requirements are
diverse, an organization ends up having
several types of networks
Each network forms an island
 Major problem:
Computer attached to a given network
can only communicate with others on the
same network!!!

7/28/2020 Department of IT, RCOEM, Nagpur 3


 To send a message across
appropriate network, the user has
to shift to that network
 Result: Less satisfaction and
productivity
 Basic requirement: Universal
Service (analogy: telephone
system)

7/28/2020 Department of IT, RCOEM, Nagpur 4


 Universal Service allows arbitrary pairs of
computers to communicate
 Two possibilities:
 Adopt single network technology or
 Provide a service which would cater to multiple
technologies
 Connecting two different networks is not
easy because
 Electrical incompatibilities
 Incompatible packet formats and
 Incompatible addressing scheme

7/28/2020 Department of IT, RCOEM, Nagpur 5


 Universal Service is implemented by
having additional hardware and software
 Hardware (router) is used to interconnect
the networks and Software on all the
computers then provides a Universal
Service
 The resulting system of connected
physical networks is known as
Internetwork or Internet

7/28/2020 Department of IT, RCOEM, Nagpur 6


o A single router can also be used to connect all the four
networks

7/28/2020 Department of IT, RCOEM, Nagpur 7


Fig a: Illusion of single
Network provided
by software

Fig b: Underlying
physical structure

7/28/2020 Department of IT, RCOEM, Nagpur 8


Protocols for Internetworking

 Commonly used Protocols:


TCP/IP protocols (suite)
 It’s a popular model also called
Internet Layering model or Internet
Reference model
 The TCP/IP reference model
consists of 5 layers

7/28/2020 Department of IT, RCOEM, Nagpur 9


7/28/2020 Department of IT, RCOEM, Nagpur 10
Internet Protocol Addresses
 To provide uniform addressing in an
internet, protocol software defines an
abstract addressing scheme that assigns
each host a unique protocol address.
These addresses are then used by users
and applications to communicate
 Each host is assigned a unique 32 bit
address
 Each 32 bit address consists of two parts:
Prefix: Identifies a network and
Suffix: Identifies individual computer

7/28/2020 Department of IT, RCOEM, Nagpur 11


IP Addressing cont..

Properties:
1) Unique Addresses
2) No Global coordination for suffixes

7/28/2020 Department of IT, RCOEM, Nagpur 12


Classes of IP Addresses

7/28/2020 Department of IT, RCOEM, Nagpur 13


Classes of IP Addresses cont..
 Classes A,B,C are called Primary
classes
 Primary classes use octet
boundaries to partition address into
Prefix and Suffix
 IP addresses are self identifying
 IP software computes class of the
destination address whenever it
receives a packet

7/28/2020 Department of IT, RCOEM, Nagpur 14


Classes of IP Addresses cont..

 First four bits can determine a class

7/28/2020 Department of IT, RCOEM, Nagpur 15


Dotted Decimal Notation

 It expresses each 8 bit section of 32


bit address as a decimal value Ex:
129.52.6.0
 Treats each octet as unsigned
integer
 Address range: 0.0.0.0 to
255.255.255.255
 A class needs to be recognized from
decimal value in first octet
7/28/2020 Department of IT, RCOEM, Nagpur 16
7/28/2020 Department of IT, RCOEM, Nagpur 17
7/28/2020 Department of IT, RCOEM, Nagpur 18
Maximum no. of networks and hosts
per class

7/28/2020 Department of IT, RCOEM, Nagpur 19


 Classes are chosen according to size
of network
 Network numbers for global internet
are obtained through ISP’s
 For private internet the choice of
network prefix is made by the
organization (RFC 1597)

7/28/2020 Department of IT, RCOEM, Nagpur 20


Example:
 Requirement: 01 small, 02 medium and 01 large
network

7/28/2020 Department of IT, RCOEM, Nagpur 21


 To make routing decision, the router takes the
destination address from the IP packet and
extracts the network id (Prefix) from it using a
mask
 A mask consists of all 1’s for Prefix and all 0’s for
Suffix for each of the primary classes(A,B and C)
 For classful addressing three masks are possible:

7/28/2020 Department of IT, RCOEM, Nagpur 22


Routing Table (conceptual)

7/28/2020 Department of IT, RCOEM, Nagpur 23


Routing table for classful addressing
scheme
30.0.0.7 40.0.0.8 128.1.0.9

30.0.0.0 R1 40.0.0.0 R2 128.1.0.0 R3 192.4.10.0

40.0.0.7 128.1.0.8 192.4.10.9

Routing table in R2:

Destination Mask Next hop


30.0.0.0 255.0.0.0 40.0.0.7
40.0.0.0 255.0.0.0 Deliver direct
128.1.0.0 255.255.0.0 Deliver direct
192.4.10.0 255.255.255.0 128.1.0.9
7/28/2020 Department of IT, RCOEM, Nagpur 24
 Routing strategy:
Let D be the destination address in
packet then for ith entry in routing
table:
if((Mask[i]&D)== Destination[i])
forward to Next Hop[i]

7/28/2020 Department of IT, RCOEM, Nagpur 25


 The Addressing scheme discussed is called
Classful IP Addressing
 Limitation: Many addresses may be unused
 Solution: Subnet addressing and Classless
addressing
 Division between suffix and prefix occurs
on an arbitrary bit boundary
Ex: A network with 9 hosts
Only 4 bits are required for representing
hosts!!
If class C is allotted by ISP 8 bits would be
used for the hosts

7/28/2020 Department of IT, RCOEM, Nagpur 26


 Classless addressing allows the ISP
to assign 28 bits for prefix and the
boundary between Prefix and Suffix
is now arbitrary
 Hence, additional information in the
form of subnet mask is stored with
address which specifies the boundary
between prefix and suffix
 The mask is then used by the router
to make routing decisions
7/28/2020 Department of IT, RCOEM, Nagpur 27
 The router contains 32 bit subnet mask (M) along
with the 32 bit IP address (A)
 Whenever a packet with destination address D
comes, the router performs the following
computation:
A=(D&M)
 Note: Inside the router the mask is stored as 32 bit
value
 It is possible to represent this mask using a
modified dotted decimal notation called CIDR
(Classless Inter Domain Routing) notation
 CIDR notation specifies a mask by appending a
slash to IP address followed by size of mask
Ex. 128.10.0.0 can given as 128.10.0.0/16

7/28/2020 Department of IT, RCOEM, Nagpur 28


Example of CIDR notation
 ISP receives request from two customers
for connection each having 12 hosts
 ISP allots the following address:
128.211.0.16 / 28 and
128.211.0.32 / 28
 Though both the customers have same
mask size, their prefixes are different.
Also ISP retains most of the addresses for
future allotment!!

7/28/2020 Department of IT, RCOEM, Nagpur 29


CIDR host addresses
Network prefix 128.211.0.16/28
0 28 31
10000000 11010011 00000000 0001 0 0 0 0

Address mask 255.255.255.240


0 28 31
11111111 11111111 11111111 1111 0 0 0 0

Lowest host address 128.211.0.17


0 28 31
10000000 11010011 00000000 0001 0 0 0 1

Highest host address 128.211.0.30

0 28 31
10000000 11010011 00000000 0001 1 1 1 0
7/28/2020 Department of IT, RCOEM, Nagpur 30
Special IP Addresses
 Network Address: refers to a specific network,
suffix all 0’s Ex:128.211.0.0
 Directed Broadcast Address: allows to send a
copy of packet to all hosts on a physical network,
suffix all 1’s Ex:128.211.1.1
 Limited Broadcast Address: refers to broadcast on
local network, prefix and suffix all 1’s. Used to
send a packet to every other host on the network
 This Computer Address: All 0’s in prefix or suffix
or both. Used during the startup
 Loop Back Address: Used to test network
applications. Prefix 127 is reserved for this
address. Ex: 127.0.0.1

7/28/2020 Department of IT, RCOEM, Nagpur 31


Summary of special Addresses

7/28/2020 Department of IT, RCOEM, Nagpur 32


Subnetting (Three level Addressing)
 IP Addresses were originally designed
with two levels of addressing (Network
and Host)
 More levels are required because:
1) Better Security and Management
2) Class A and B addresses are exhausted
and Class C addresses are insufficient for
most big organizations
 In Subnetting a network is divided into
several smaller subnetworks each having
its own subnetwork address

7/28/2020 Department of IT, RCOEM, Nagpur 33


 When we divide a network into
subnetworks, we need subnetwork
masks
 If n is the length of netid, nsub is
the length of each subnetid and s is
the no. of subnets with equal no. of
hosts then
nsub= n + log2s

7/28/2020 Department of IT, RCOEM, Nagpur 34


Subnetting example
Subnet1 Site Router Subnet2
141.14.0.0/18 141.14.64.0/18

R1
Subnet3 Subnet4
141.14.128.0/18 141.14.192.0/18

Network:141.14.0.0/16

R2 Internet Router
n bits 32-n bits
Network
netid hostid
Mask
change

Subnetwork subnetid hostid


Mask
7/28/2020 Department of IT, RCOEM, Nagpur 35
Example of subnetting cont..
 One of the addresses in subnet 2 is 141.14.120.77. If
a packet comes with this as destination address then
the router can immediately find the subnetwork
address as follows:
Address: 141.14 .120.77
Mask : 255.255.192.0
Subnet : 141.14 .64 .0
Address
Add: (120) : 0 + 64 + 32 + 16 + 8 + 0 + 0 + 0
Mask:(192):128+ 64 + 0 + 0 + 0 + 0 + 0 + 0
Result:(64): 0 + 64 + 0 + 0 + 0 + 0 + 0 + 0

7/28/2020 Department of IT, RCOEM, Nagpur 36


Points to be remembered
 Given the network address assigned
by the ISP in CIDR notation, it is
possible to extract the following
information from it:
 The total number of addresses, N
N=232-n where n is the netid
 The first address in the block
First address=(address given) AND
(network mask)
 Last address = (address given) OR
(NOT(address mask))
7/28/2020 Department of IT, RCOEM, Nagpur 37
Example: Address assigned by
ISP:167.199.170.82 / 27
 Number of address: 25=32 (n is 27)
 First address: address AND mask
Addr: 10100111 11000111 10101010 01010010
Mask: 11111111 11111111 11111111 11100000
Faddr: 10100111 11000111 10101010 01000000
167. 199. 170. 64 / 27
 Last Address: address OR (NOT(mask))
Addr: 10100111 11000111 10101010 01010010
Cmask:00000000 00000000 00000000 00011111
Laddr: 10100111 11000111 10101010 01011111
167. 199. 170. 95 / 27
7/28/2020 Department of IT, RCOEM, Nagpur 38
Rules for Subnetting
 Number of addresses in each subnet should
be a power of 2
 Prefix length of each subnet can be found
as: nsub= n + log2(N / N sub)
where, N = Total addresses assigned to an
organization,
N sub = number of addresses in each subnet
 The starting address in each subnet should
be divisible by the number of addresses in
that subnet

7/28/2020 Department of IT, RCOEM, Nagpur 39


Example: Address:130.34.12.64/26
Requirement: 4 subnets with equal no. of
hosts

 N = 2 32-26 = 64 // total addresses


 First address: 130.34.12.64/26
 Last address: 130.34.12.127/26
 16 addresses would be assigned to each
subnetwork (Nsub)
 Length of Subnetwork mask(nsub): 28
 First Address for each subnet:
130.34.12.64/28;130.34.12.80/28;
130.34.12.96/28 and 130.34.12.112/28

7/28/2020 Department of IT, RCOEM, Nagpur 40


 Router is assigned 2 or more IP addresses

7/28/2020 Department of IT, RCOEM, Nagpur 41


Binding Protocol Addresses: ARP
 IP Addressing scheme assigns high level
addresses to hosts and routers
 IP Addresses are virtual
 Frame transmitted across a physical
network must contain hardware address
of destination!!
 Thus protocol software should convert
protocol addresses to hardware
addresses. This translation is called
Address Resolution
 Address Resolution is local to the network

7/28/2020 Department of IT, RCOEM, Nagpur 42


ARP Example

7/28/2020 Department of IT, RCOEM, Nagpur 43


Address Resolution Techniques

 Table Lookup
Bindings or mappings are stored in a table in memory
Separate binding is required for each physical network

7/28/2020 Department of IT, RCOEM, Nagpur 44


 Closed form Computation
 Hardware address is generated from from protocol
address using Boolean and Arithmetic operations
 Used in networks supporting configurable
addressing
 Ex: If IP Address=220.123.5.0/24 then, computers
can be assigned IP and Hardware addresses as:

IP Addr H/W Addr


220.123.5.1 1
220.123.5.2 2
220.123.5.3 3
….. ….

The conversion formula then is: hardware_addr=ip_addr & 0xff


7/28/2020 Department of IT, RCOEM, Nagpur 45
Message Exchange
 Resolution is achieved by sending a
message (a request containing IP
address) across the network and getting a
reply (hardware address)
 Two possible designs:
 One or more servers can act as resolvers
 Each computer on the network participates in
address resolution and agrees to answer the
request for its address

7/28/2020 Department of IT, RCOEM, Nagpur 46


Address Resolution Protocol (ARP)

 Used to specify format and meaning of


messages used to resolve addresses
 Two message types: Request (contains IP
Addr) and Reply (contains both IP and
Hardware Addr)
 ARP standard specifies how ARP
messages should be sent across the
network

7/28/2020 Department of IT, RCOEM, Nagpur 47


7/28/2020 Department of IT, RCOEM, Nagpur 48
ARP Message Format

7/28/2020 Department of IT, RCOEM, Nagpur 49


Sending an ARP Message

o Issues:
 Identifying ARP frame
 Caching ARP responses
 Processing ARP frames
7/28/2020 Department of IT, RCOEM, Nagpur 50
IP Services and Datagrams
 Two fundamental communication
services: connection oriented and
connectionless
 IP is inherently connectionless
 The service allows the sender to transmit
individual packets of data across an
internet. Each packet travels
independently and contains information
that identifies the intended receiver
 Routers use the information in the
packets to forward them to ultimate
destination

7/28/2020 Department of IT, RCOEM, Nagpur 51


IP datagram

 A packet sent across a TCP/IP


Internet is called an IP datagram
 Size of the datagram is determined
by the application that sends data
 General format:

7/28/2020 Department of IT, RCOEM, Nagpur 52


Datagram forwarding
 Each router along a path from source to
destination receives the datagram,
extracts the destination address from its
header and uses the destination address
to determine the next hop to which the
datagram should be sent
 For selecting the next hop, the router
uses a routing table
 Conceptually the routing table contains a
set of entries that specify the destination
and the next hop to reach that destination

7/28/2020 Department of IT, RCOEM, Nagpur 53


IP Datagram Header Format

7/28/2020 Department of IT, RCOEM, Nagpur 54


Best Effort Delivery!!!

 IP makes best effort attempt to


deliver each datagram
 It however does not guarantee that
it will handle the problems of:
 Datagram Duplication
 Delayed or out of order packets
 Corruption of data
 Datagram loss

7/28/2020 Department of IT, RCOEM, Nagpur 55


Encapsulation

7/28/2020 Department of IT, RCOEM, Nagpur 56


Maximum Transmission Unit (MTU)

 MTU: Maximum amount of data a frame


can carry on a network
 Network hardware is not designed to
accept or transfer frames that carry more
data than the MTU allows
 Solution: Fragmentation
 IP router divides large datagrams into
fragments and sends each fragment
independently

7/28/2020 Department of IT, RCOEM, Nagpur 57


 Fragments have same format as a
datagram
 No. and size of fragments is decided by
network MTU and datagram header size

7/28/2020 Department of IT, RCOEM, Nagpur 58


IP support for Fragmentation
 Three fields used:
Identification: 16 bit field identifies the datagram originating
from the source host. This field is copied in every fragment of
the datagram
Flags: A 3 bit field, first bit is reserved, second bit is D (do not
fragment) if set, the datagram is not fragmented, third bit is M
(More fragments) if set, it indicates that the fragment is not the
last one, it is 0 in last fragment
Fragment Offset :13 bit field gives relative position of fragment
w.r.t the whole datagram. It is the offset of the data in original
datagram measured in units of 8 bytes. Ex. If size of original
datagram is 4000 bytes, it can be fragmented into 3 fragments
as follows:
fragment1: 0000—1399 offset: 0000/8=0
fragment2: 1400—2799 offset: 1400/8=175
fragment3: 2800—3999 offset: 2800/8=350

7/28/2020 Department of IT, RCOEM, Nagpur 59


 Reassembly: Process of creating the
original datagram from fragments is
called Reassembly
 Last fragment has a bit set in header to
indicate it
 Reassembly is done at ultimate
destination
 Issues:
 Datagram identification
 Fragment loss
 fragmenting a fragment

7/28/2020 Department of IT, RCOEM, Nagpur 60


ICMP: Internet Control Message
Protocol
 IP offers Best Effort Delivery service
 IP reports problems when they occur and
attempts to avoid them
 Only error detection mechanism:
checksum
 Problems less severe than transmission
errors result in error conditions which can
be reported
 ICMP is used for reporting errors
 ICMP and IP are interdependent
 ICMP Messages: Error messages and
Informational messages

7/28/2020 Department of IT, RCOEM, Nagpur 61


Messages:
 Error messages:
 Source Quench
 Time Exceeded
 Destination Unreachable
 Redirect
 Parameter Problem
 Info. Messages:
 Echo Request / Reply
 Address mask Request / Reply
 Router Solicitation and Advertisement
7/28/2020 Department of IT, RCOEM, Nagpur 62
ICMP message transport

7/28/2020 Department of IT, RCOEM, Nagpur 63


Initialization of Protocol software
 When the system boots, it is necessary to
initialize the protocol software before it can be
used for communication (Protocol Configuration)
 For TCP/IP protocol software following inputs are
required:
 IP Addresses
 Default Router Address
 Address Mask
 DNS Server Address
 Printer Server Address…etc
 The information required by protocol software
during initialization can be obtained through
 Configuration file that is stored manually onto the
disk or
 Automatically

7/28/2020 Department of IT, RCOEM, Nagpur 64


 Methods for Automated Protocol
Configuration:
 Using RARP (Reverse Address
Resolution Protocol)
 Using ICMP
 Using BOOTP
 Using DHCP (Dynamic Host
Configuration Protocol)

7/28/2020 Department of IT, RCOEM, Nagpur 65


Reverse Address Resolution Protocol
(RARP)

 Generally used in Ethernet for getting IP


Address from server
 A RARP request containing hardware
address of host is send to the Server
which returns an RARP reply containing
the IP Address
 Server stores the H/W and S/W address
bindings in database
 The host actually broadcasts the request
to get reply from the server

7/28/2020 Department of IT, RCOEM, Nagpur 66


Using ICMP
 Use of ICMP is similar to RARP
 A host broadcasts a Route
Discovery and Address Mask
Request Messages to get the IP
subnet mask from the router
 Similarly, ICMP Gateway Discovery
message is used to find IP address
of default router and add a default
route to routing table

7/28/2020 Department of IT, RCOEM, Nagpur 67


BOOTP (Bootstrap Protocol)
 Issuing a separate request for each piece of
configuration information is inefficient
 BOOTP allows hosts to obtain more than one item
of configuration information from the server
 Based on request reply paradigm
 BOOTP uses IP for sending Request and Receiving
Response
 For sending the BOOTP request IP uses Limited
Broadcast Address (destination address: all 1’s
and source address: all 0’s)
 The server can return back the response using
the hardware address on the incoming frame

7/28/2020 Department of IT, RCOEM, Nagpur 68


Format for BOOTP Request and
Response Messages

7/28/2020 Department of IT, RCOEM, Nagpur 69


DHCP (Dynamic Host Configuration
Protocol)

 BOOTP is a Static Configuration Protocol


 A host can move from one network to
another or may want a temporary IP
Address for a particular period of time!!!
 DHCP caters to mobility
 The DHCP Client and Server can be on the
same Network or on different Network

7/28/2020 Department of IT, RCOEM, Nagpur 70


 DHCP is normally used for providing a temporary IP
address for limited period of time
 DHCP has two databases
1) First for static bindings between MAC address
and IP address
2) Second containing pool of IP addresses that may
be assigned for a period of time
 A Client request to DHCP causes server to see if
MAC is in static database. If so, it assigns static IP
entry to client. If not, it chooses IP address from
available pool (second database)
 Assigned addresses are temporary (leased). When
clients lease expires, it must renew or stop using
the IP address

7/28/2020 Department of IT, RCOEM, Nagpur 71


Message Exchanges

7/28/2020 Department of IT, RCOEM, Nagpur 72


7/28/2020 Department of IT, RCOEM, Nagpur 73
DHCP Transition diagram

7/28/2020 Department of IT, RCOEM, Nagpur 74


7/28/2020 Department of IT, RCOEM, Nagpur 75
Success and Limitations of IPv4

 Handles heterogeneous networks


 Accommodates changes in hardware
technologies
 Accommodates extreme large scale
 Why change?
 Limited address space
 New internet applications

7/28/2020 Department of IT, RCOEM, Nagpur 76


New Protocol: IPng or IPv6
 Similarities with IPv4:
 Connectionless
 New features:
 Address size: 128 bits
 Better Header formats
 Support for Audio and Video and Other Real
Time applications
 Extensible protocol
 Built in Encryption and Authentication

7/28/2020 Department of IT, RCOEM, Nagpur 77


References

 TCP/IP Protocol Suite by Behrouz


A.Forouzan, TMH, 3rd Edition
 Computer Networks and Internets by
Douglas Comer and M.S.Narayanan,
Pearson Education, 4th Edition
 TCP/IP guide by Charles M. Kozierok,
SPD Publication

7/28/2020 Department of IT, RCOEM, Nagpur 78


7/28/2020 Department of IT, RCOEM, Nagpur 79

You might also like