Unit II Basic Internetworking
Unit II Basic Internetworking
BASIC
INTERNETWORKING
Introduction
• By using switches and bridges it is possible to build a large
network but it is only up to certain limit.
• In order to further increase the scalability of network , we
connect multiple networks by a device called as “Router”
• Hence the network layer comes in to picture which takes
the responsibility of packet delivery from source to
destination among multiple networks
• internet – logical network built out of collection of
physical networks.
• Network of networks
• Routers / gateways - interconnect networks
• internetwork
Internetworking
• collection of
networks
• interconnected to
provide host-host
to packet delivery
service.
internetwork :
H represents hosts
and R represents
routers
Basic Concepts
• IP – Internet Protocol
• CIDR – Classless Inter Domain Routing
• ARP – Address Resolution Protocol
• DHCP – Dynamic Host Control Protocol
• ICMP – Internet Control Message Protocol
Internetworking
• What is IP
• IP stands for Internet Protocol, runs over anything
• Key tool used today to build scalable, heterogeneous internetworks
• It runs on all the nodes in a collection of networks
• It defines the infrastructure that allows these nodes and networks to function
as a single logical internetwork
• Strategy
• Fragmentation occurs in a router when it receives a datagram that
it wants to forward over a network which has (MTU < datagram)
• Reassembly is done at the receiving host
• All the fragments carry the same identifier in the Ident field
• Fragments are self-contained datagrams
• IP does not recover from missing fragments
IP Fragmentation and Reassembly
Points to be noted:
• Dot notation
• 10.3.2.4
• 128.96.33.81
• 192.12.69.77
IPv4 Address Space
Solution
We replace each group of 8 bits with its equivalent decimal
number and add dots for separation.
27 = 126 class A IP Addresses
networks
Each of them
accommodate -----
224 -2 ( 16 million)
hosts
Class B – 65,534
hosts
Class C – 256 unique
host identifiers, 0
not valid, 255 –
broadcasting,
remaining 254
attached to hosts
(221)
• In classful is divided into five classes, the address space : A, B,
C, D, and E
• Find the class of each address.
• c. 14.23.120.8
• d. 252.5.15.111
Number of blocks and block size in classful IPv4 addressing
Find the error, if any, in the following IPv4 addresses.
IP Datagram Forwarding
• Strategy
• every datagram contains destination's address
• if directly connected to destination network, then forward to host
• if not directly connected to destination network, then forward to
some router
• forwarding table maps network number into next hop
• each host has a default router
• each router maintains a forwarding table
Example (router R2)
IP Datagram Forwarding
if (NetworkNum of destination = NetworkNum of one
of my interfaces) then
deliver packet to destination over that interface
else
if (NetworkNum of destination is in my forwarding
table) then
deliver packet to NextHop router
else
deliver packet to default router
32
Default mask and subnet mask
• The network address is the
beginning address of each
block.
• It can be found by applying
the default mask to any of
the addresses in the block
(including itself). It retains
the netid of the block and
sets the hostid to zero
• Add another level to Subnetting
address/routing hierarchy:
subnet
D = destination IP address
for each entry < SubnetNum, SubnetMask, NextHop>
D1 = SubnetMask & D
if D1 = SubnetNum (sending host – destination in
same subnet)
if NextHop is an interface
deliver datagram directly to destination
else
deliver datagram to NextHop (a router)
What is the subnetwork address if the destination address is
200.45.34.56 and the subnet mask is 255.255.240.0?
Solution
We apply the AND operation on the address and the
subnet mask.
Address ➡ 11001000 00101101 00100010 00111000
Subnet Mask ➡ 11111111 11111111 11110000 00000000
Subnetwork Address ➡ 11001000 00101101 00100000 00000000.
37
Comparison of a default mask
and a subnet mask
•
• Classless Inter Domain Routing (CIDR) tries to balance the desire
to minimize the number of routes that a router needs to know
against the need to hand out addresses efficiently.
• Observe that top 20 bits of all the addresses in this range are the same
(11000000 00000100 0001)
• We have created a 20-bit network number (which is in between class B network number
and class C number in terms of no. of hosts that it can support)
Classless Addressing
• We get high address efficiency of handing out address in chunks
smaller than class B network and a single network prefix that
can be used in forwarding tables.
• x.y.z.t defines one of the addresses and the /n defines the mask
• The convention is to place a /n after the prefix, where n is the prefix length in
bits
• For example, the 20-bit prefix for all the networks 192.4.16 through 192.4.31
is represented as 192.4.16/20
Solution
Solution
or
205.16.37.47
Classless Addressing
• The number of addresses in the block can be found by using the
formula 232−n.
• Solution:
• The first address in a block is normally not assigned to any
device; it is used as the network address that represents the
organization to the rest of the world.
Client IP address
Your IP address
Server IP address
Gateway IP address
Options
Internet Control Message Protocol (ICMP)
• IP unreliable, connectionless datagram delivery
• ICMP-Redirect
• From router to a source host
• Eg. It tells source, a better route to the destination
Internet Control Message Protocol (ICMP)
• ICMP provides two widely used debugging tools:
• Ping : uses ICMP echo messages to determine if a node is
reachable and alive