Internetworking, Fragmentation, IPv4
Internetworking, Fragmentation, IPv4
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
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
4) Performance overhead
G1 G2 G3 G4
Gateway
Gateway
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
Class
A 0 NetID
B 10 HostID
C 110 HostID
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
11111111111111111111111 Broadcast on
the local Network
127 Anything Loopback
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.
Subnet
11111111111111111111110000000000
mask
ICMP
Header
ICMP Data Area
IP
Header
IP Data Area
Frame
Header
Frame Data
Area
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
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*
* 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 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