100% found this document useful (4 votes)
2K views

Internetworking, Fragmentation, IPv4

The document discusses various topics related to internetworking including: 1) How different networks can be connected at the physical, data link, and network layers using devices like hubs, bridges, switches, and routers. 2) How virtual circuits can be concatenated across networks using multiprotocol routers to create long virtual circuits or datagram networks. 3) The process of fragmentation where large packets are broken into smaller fragments that are reassembled at the destination. 4) Protocols like IP, ICMP and addressing schemes including IP addresses, subnet masking, and issues with classful addressing.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT or read online on Scribd
100% found this document useful (4 votes)
2K views

Internetworking, Fragmentation, IPv4

The document discusses various topics related to internetworking including: 1) How different networks can be connected at the physical, data link, and network layers using devices like hubs, bridges, switches, and routers. 2) How virtual circuits can be concatenated across networks using multiprotocol routers to create long virtual circuits or datagram networks. 3) The process of fragmentation where large packets are broken into smaller fragments that are reassembled at the destination. 4) Protocols like IP, ICMP and addressing schemes including IP addresses, subnet masking, and issues with classful addressing.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT or read online on Scribd
You are on page 1/ 43

Internetworking

• How Networks Differ


• How Networks Can Be Connected
• Concatenated Virtual Circuits
• Connectionless Internetworking
• Tunnelling
• Internetwork Routing
• Fragmentation
Connecting Networks

L
LAN
LAN
FD
DI
LA Internet
N Satellite
LAN Link

SNA
SNA ATM WAN
WAN

BUS LAN
Mainfram
es
A collection of interconnected
networks
How Networks Differ
• Connection-oriented vs.
Connectionless
• Flat addressing vs. Hierarchical
• Frame/Packet size (max)
• Error handling and Flow control
• Congestion control
• Quality of Service
• Security
• Multicast/Broadcast, Etc.
How Networks Can Be Connected
• Physical layer – hubs and repeaters
signal amplification
• Data link layer – bridges and
switches
protocol conversion, primitive routing,
switching
• Network layer – multiprotocol
routers
wide area routing, network protocol
conversion.
• Transport layer – transport gateways
Concatenated Virtual
Circuits

• Series of Virtual Circuits,


• joined by Multiprotocol Routers
• to make a long Virtual Circuit…..
Connectionless
Internetworking

• Series of datagram networks


• joined together at the network layer
• by Multiprotocol Routers
• to make larger datagram network.
Connectionless verses
Connection oriented
Internets
• Connection-oriented internetworks have
much the
same problems as connection oriented
subnets (what are
they?). But they also have the same
disadvantages (which
are?).
• Connection-oriented internetworks are
difficult, if
not impossible to run across datagram
subnets.
• Connectionless internetworks have much
the same
characteristics as connectionless subnets
Tunnelling
• Put IP packets into Ethernet frames.
• Multiprotocol router puts IP packets
into WAN packets and sends.
• Multiprotocol router takes IP packets
out of WAN packets and puts in into
Ethernet frames
Internetwork routing
Fragmentation
• Why fragmentation?
• Transparent & Non-Transparent
fragmentation
Transparent
Fragmentation
Network
Network
Packet 2 Packet
1
G3 G4
G1 G2

G4
G1 G3 reassembles
G2 reassembles
fragments refragments again
the fragments
a large again
packet
1) Gateway must know when it has received
all the pieces
--Count field or “End of packet” bit
2) All packets must follow same route

3) If Disjoint routs then performance lost

4) Performance overhead

ATM requires fragmentation (segmentation)


Non-Transparent
Fragmentation
Packet

G1 G2 G3 G4

G1 The fragments are not


fragments
a large
reassembled until the final
packet destination is reached

1) Every host must be able to do


reassembly
2) Overhead, as each fragment must
have a header.
Fragmentation
--When packet is fragmented, the fragments must be
numbered in such a way that the original data stream
can be reconstructed.
0

Gateway

0.0 0.1 0.2

Gateway

0.0. 0.0.1 0.1.


0 2
IP
• IP --Internet Protocol
• IP sends simple datagram over network
• It provides unreliable & connection less
delivery service
• Large packets may be fragmented &
reassembled in transmission
• IP packet is transmitted in big endian
order (i.e. From left to right)
INTERNET PROTOCOL (IP)
HEADER
IPv4 (internet protocol) header Normal size of IP
header is 20 bytes plus Options

Header

10101011101010101010010101010100101010100
11010010101010010101111111010000011101111
10100001011101010100110101011110100000101
00100000000010101000011010000111111010101
......... 1011011001010100011001001010110
Data
IP Header Fields
• Version field keeps track of which version of the
protocol
• IHL 4 bit field for Header Length . Gives how long the
header is in 32 bit words. Minimum is 5, maximum is 15
which limits the header length to 60 bytes and thus
options field to 40 bytes.
• Type of Service is 6 bit field, a three bit
precedence field (i.e. Priority) & three flags, D, T & R
(Delay, Throughput, Reliability).
• Total Length includes both header & data length.
Maximum length is 65,536.
• Identification field is needed to allow the
destination host to determine which datagram a newly
arrived fragment belongs to.
• Flags is a 3 bit field. First bit is unused & then two 1 bit
fields are DF & MF
• Fragment Offset tells where the current datagram
IP Header Fields
• Time to Live field is a counter used to limit the
packet lifetime allowing maximum life time of 255 sec.
• When the network layer has assembled a complete
datagram , Protocol field tells it which transport
process to give it to.
• Header Checksum verifies the header only.
Useful for detecting errors.
• Source Address & Destination Address
indicate network number & host number
• Option e.g. Route the packet must follow., Gives list of
routers not to miss, Record Route, Timestamp
IP Address
• Specifies both network and host
• Current length is 32-bit, future length
is 128 bit. It is also called as Dotted Decimal
Format.
• General Syntax:- 4 components separated
by dots, decimal numbers 0-255.
• E.g. 18.26.0.1

network 32-bits host


IP Address
32 bits

Class

A 0 NetID

B 10 HostID

C 110 HostID

D 1110 Multicast Address

E 1111 Reserved for Future use


8 bits 8 bits 8 bits 8 bits
Information about Five
IP address classes
Class Net id bits Host Bits Range Identificati
on bits

A 7 24 0 - 126 0
B 14 16 128 - 191 10
C 21 8 192 - 223 110
D 28 0 224-239 1110
E 27 0 240-255 1111

This is also known as classful addressing scheme


Special IP Addresses

00000000000000000000000 THIS host

00000000000 HOST A host on


this network

11111111111111111111111 Broadcast on
the local Network
127 Anything Loopback

Network 1111111 ..... 111 Broad cast


on distant network
SUBNET
To allow a single network address to span multiple physical
PC
networks is called subnet addressing or subnetting
COMP TO
ISP

IT

E&TC
Main Router

MBA

MCA

Ethernet
Subnet Mask
• A subnet mask (or number) is used to
determine the number of bits used for the
subnet and host portions of the address.
• The mask is a 32-bit value that uses one-
bits for the network and subnet portions
and zero-bits for the host portion.
• The main router needs a subnet mask that
indicates the split between network +
subnet no. & host.
• Subnet mask is also written in dotted
decimal format with addition of slash
followed by the number of bits in the
network + subnet part. E.g.
EXAMPLEs
e.g.

10 Network Subnet Host

Subnet
11111111111111111111110000000000
mask

E.g.:- a packet addressed to 130.50.15.6 and arriving at the main router is


ANDed with the subnet mask 255.255.252.0/22 to give the address
130.50.12.0

Thus subnetting reduces the router table space by creating the


hierarchy of network, subnet, host.
Disadvantages of Classful Addressing

– Wasteful address architecture


– Network boundaries are fixed at 8, 16 or
24 bits
(class A, B, and C)
ICMP
(Internet Control Message Protocol)

• ICMP is an error reporting and network


management system.
• ICMP attempts to keep the Internet
running as
efficiently as possible.
• ICMP works to correct network
problems, although does not try to
correct individual packet problems.
ICMP Packets
• ICMP packets are sent in IP Datagrams.
They have no special priority,

ICMP
Header
ICMP Data Area

IP
Header
IP Data Area

Frame
Header
Frame Data
Area

•Two levels of encapsulation that occur when an ICMP message is sent.


•The ICMP message is encapsulated in a datagram, which is
encapsulated in a frame for transmission across a physical network.
ICMP Header
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
+-+-+-+-+
• The Type field indicates the type of
ICMP message.
• The Code field provides data specific to
the type.
• The Checksum detects errors in the
ICMP packet.
ICMP Message Types
Message Type Description
Destination Packet could not be
Unreachable delivered
Time exceeded Time to live field hits to 0
Parameter Problem Invalid header field
Source Quench Choke packet
Redirect Teach a router about
geography
Echo Ask machine if it is alive
Echo reply Yes, I m alive
Timestamp request Echo request with time
stamp
Timestamp reply
Some Uses for ICMP
1. Echo (ping)
2. Tells the source a packet exceeded the TTL.
3. Tell the source that a packet had to be
fragmented.
4. Redirect the host to a better router.
5. Controls the rate at which a host sends
packets.(Source Quench)
6. Tell the source the destination is unreachable.
Either the network or the host is down.
7. Request subnet mask.
ARP (Address Resolution Protocol)

• Mapping between a protocol address & a hardware address is called


resolution.

• In computer networking, the Address Resolution Protocol (ARP) is the


method for finding a host's link layer (hardware) address when only its
Internet Layer (IP) or some other Network Layer address is known
Overview

TCP UDP Transport


Layer

ICMP IP IGMP Network


Layer

Network
ARP Access
RARP Link Layer

Media

32
ARP and RARP
• Note:
– The Internet is based on IP addresses
– Data link protocols (Ethernet, FDDI, ATM) may
have different (MAC) addresses
• The ARP and RARP protocols perform the
translation between IP addresses and MAC
layer addresses
ARP Ethernet MAC
IP address
address
(32 bit)
(48 bit)
RARP

33
Processing of IP packets by network device
drivers

IP Output IP Input

Put on IP IP destination = multicast Put on IP


Yes
input queue or broadcast ? input queue
No
Yes
IP destination of packet Ethernet
IP datagram
= local IP address ? Driver
loopback
Driver No: get MAC
ARP demultiplex
address with ARP
ARP
Packet Ethernet Frame

Ethernet

34
Address Translation with
ARP
ARP Request:
Argon broadcasts an ARP request to
all stations on the network: “What is
Argon Router137
the hardware address of 128.143.137.1
128.143.137.144
Router137?”
00:a0:24:71:e4:44 00:e0:f9:23:a8:20

ARP Request:
What is the MAC address
of 128.143.71.1?

35
Address Translation with
ARP
ARP Reply:
Router 137 responds with an ARP
Reply which contains the hardware
Argon Router137
address
128.143.137.144 128.143.137.1
00:a0:24:71:e4:44 00:e0:f9:23:a8:20

ARP Reply:
The MAC address of 128.143.71.1
is 00:e0:f9:23:a8:20

36
ARP Packet Format
Hardware type (2 bytes) Protocol type (2 bytes)
Hardware address Protocol address
Operation code (2 bytes)
length (1 byte) length (1 byte)
Source hardware address*

Source protocol address*

Target hardware address*

Target protocol address*

* Note: The length of the address fields is determined by the corresponding address length fields

37
Sending an ARP Message

ARP Message

Frame
Frame Data Area CRC
Header
• ARP Request from Argon:
Source hardware address: 00:a0:24:71:e4:44
Source protocol address: 128.143.137.144
Target hardware address: 00:00:00:00:00:00
Target protocol address: 128.143.137.1

• ARP Reply from Router137:


Source hardware address: 00:e0:f9:23:a8:20
Source protocol address: 128.143.137.1
Target hardware address: 00:a0:24:71:e4:44
Target protocol address: 128.143.137.144

ARP CACHE-
Since sending an ARP request/reply for each IP datagram is
inefficient, hosts maintain a cache (ARP Cache) of current
entries. The entries expire after 20 minutes.

39
Things to know about ARP
• What happens if an ARP Request is made for a non-existing
host?
Several ARP requests are made with increasing time
intervals between requests. Eventually, ARP gives
up.
• On some systems (including Linux) a host periodically
sends ARP Requests for all addresses listed in the ARP
cache. This refreshes the ARP cache content, but also
introduces traffic.
• Gratuitous ARP Requests: A host sends an ARP request for
its own IP address:
– Useful for detecting if an IP address has already been
assigned.

40
• All IP addresses have a network and host portion. In classful addressing,
the network portion ends on one of the separating dots in the address (on
an octet boundary). Classless addressing uses a variable number of bits for
the network and host portions of the address.
•  
• Decimal 192 160 20 48 Binary 11000000 10100000 00010100 0011 0000  
<-------- 28 bits Network -------> 4 bits host Classful addressing divides an
IP address into the Network and Host portions along octet boundaries.
Classless addressing treats the IP address as a 32 bit stream of ones and
zeroes, where the boundary between network and host portions can fall
anywhere between bit 0 and bit 31. The network portion of an IP address is
determined by how many 1's are in the subnet mask. Again, this can be a
variable number of bits, and although it can fall on an octet boundary, it
does not necessarilly need to. A subnet mask is used locally on each host
connected to a network, and masks are never carried in IPv4 datagrams.
All hosts on the same network are configured with the same mask, and share
the same pattern of network bits. The host portion of each host's
IP address will be unique.
•  
CIDR (Classless InterDomain
Routing)
• The rapid growth in the size of the global
Internet’s routing tables

• The eventual exhaustion of the 32-bit IPv4


address space

• CIDR eliminates the traditional concept of Class A,


Class B, and Class C network addresses.
NAT (Network Address Translation)

• = temporary binding and address/port rewriting in IP and L4


packet headers
– table of (internal 5-tuple, external 5-tuple)
– must allow unique mapping of return packets
• Typically uses private address space
– 10.0.0.0/8, 172.16.0.0-172.31.0.0., 192.168.0.0/24
– 169.254.0.0/16 reserved for automatic IP addressing
• Designed for client-server TCP applications with short session
lifetimes
– = web, email retrieval
• Binding is temporary (minutes)
– causes failures for long-lived applications
–  application-layer “keep-alives” in ssh, IMAP, SIP, …

You might also like