The Internet Notes
The Internet Notes
The Internet Notes
Multimedia Communications
Kiran Kumar KV
Contents
1. Introduction
2. IP Datagram's
3. Fragmentation and Reassembly
4. IP Addresses
5. ARP and RARP
6. Qos Support and IPv6
Introduction: History
The Internet began as a project for the Department of
Defense in 1962. ARPA, or the Advanced Research
Projects Agency, was responsible for designing a computer
network for military use. The goal was to ensure functionality
even if connections between computers were severed. The
idea was to create a network that could send and receive
transmissions through different data paths rather than just
one. This network was called ARPANET.
History
In 1969 more & more networks were linked to ARPA.
Mainly Universitys
By 1981, another network was developed for colleges that
were not able to access ARPANET. This nationwide network
was called National Science Foundation Network or
NSFNET.
By the early 1990's many networks were leaving ARPANET
for NSFNET due to the enhanced speed. NSFNET became
known as the Internet.
Introduction
The Internet Protocol (IP) is the principal communications
protocol in the TCP/IP protocol suite for relaying
datagram's across network boundaries. Its routing function
enables internetworking, i.e., establishes the Internet.
IP with TCP establishes a virtual connection b/w a
destination and source.
IP is used to identify each computer and device connected to
the global n/w of computers using an IP Address.
Note:
http://www.apple.com
17.172.224.47
The Domain Name System or DNS is a distributed database
comprised of all the websites on the Internet and their
corresponding IP addresses.
web address is often referred to as a URL or uniform
resource locator
DNS will look up a website's IP address, based on the levels
starting from top-level domain.
Internet Layer
The internet layer has the responsibility of sending packets across
potentially multiple n/w. Inter-networking requires sending data
from the source network to the destination network. (Routing)
The Internet Protocol performs two basic functions:
Host addressing and identification: This is accomplished with
a hierarchical IP addressing system.
Packet routing: This is the basic task of sending packets of data
(datagrams) from source to destination by forwarding them to the
next network router closer to the final destination.
Internet Protocols spanning OSI model
Internet networking components and
protocols.
Token ring LAN uses a different bit rate, frame format and
frame size when compared to Ethernet LAN
Bridges cannot be used for n/w interconnections
Hence, the routing & forwarding operations associated with
the gateway are performed at network layer.
Figure shows IP in 2 hosts, in each gateway and router for
routing & sync functions.
Note
Internet Addresses or IP Addresses
32 bits => 4 Octets v4
255.255.255.255 (n/w ID and host code)
Netid and hostid
000.000.000.000 (subnet mask)
Command Screen: Ipconfig
Ping apple.com => 127.0.0.0 Loop-back address
Each accesses n/w has a unique netid assigned to it.
IP Datagram Terms
IP provides contectionless best-effort service to Transport Layer
above it. (TCP or UDP)
Adds destination & source IP addresses head of TCP/UDP
PDU => IP Datagram
IP forwards it to local gateway => Packets
After routing the packet received at IP removes the header
=> payload
If the packet size is greater than the maximum frame size
(maximum transmission unit) at destination. IP divides
the frame into smaller blocks fragments.
Secondary Protocols of IP: Adjunct
Protocols
Address Resolution Protocol : If a machine talks to another
machine in the same network, it requires its physical or MAC
address. But ,since the application has given the destination's IP
address it requires some mechanism to bind the IP address with its
MAC address. IP_to_Mac Adderesses binding => ARP packets
RARP ( Reverse Address Resolution Protocol ) When a
new machine is set up, its RARP client program requests from the
RARP server on the router to be sent its IP address
OSPF: The open shortest path first protocols are present in
each internetworking router and are utilized to build up contents
of the routing table that is used to route packets across the global
internetwork.
Adjunct IP Protocols
ICMP: This protocol discusses a mechanism that gateways
and hosts use to communicate control or error information
If a gateway cannot route or deliver a datagram, or if the
gateway detects an unusual condition, like network
congestion, that affects its ability to forward the datagram, it
needs to instruct the original source to take action to avoid
or correct the problem
Internet group management protocol (IGMP) is used
with multicasting to enable a host to send a copy of a
datagram to the other hosts that are part of multicast group.
IP Datagram
IP Datagram
Data transmitted over an internet using IP is carried in messages
called IP datagram's.
Like all network protocol messages, IP uses a specific format for
its datagrams.
IPv4 datagram format divided into two pieces: the header and the
payload.
The header contains addressing and control fields, while the
payload carries the actual data to be sent over the internetwork.
The diagram shows graphically the all-important IPv4 datagram
format. The first 20 bytes are the fixed IP header, followed by an
optional Options section, and a variable-length Data area
IP Datagrams
Version: 4 bits, Identifies the version of IP used to generate the
datagram. For IPv4, this is of course the number 4. The purpose of
this field is to ensure compatibility between devices that may be
running different versions of IP. In general, a device running an
older version of IP will reject datagrams created by newer
implementations, under the assumption that the older version may
not be able to interpret the newer datagram correctly
IHL: Internet Header Length (IHL): 4 bits Specifies the length
of the IP header, in 32-bit words. This includes the length of any
options fields and padding. The normal value of this field when no
options are used is 5 (5 32-bit words = 5*4 = 20 bytes). Contrast
to the longer Total Length field of 60 bytes.
IP Datagrams
Type Of Service (TOS): (1 byte )A field designed to carry
information to provide quality of service features, such as
prioritized delivery, for IP datagrams. It was never widely
used as originally defined, and its meaning has been
subsequently redefined for use by a technique called
Differentiated Services (DS).
Total Length (TL): (2 bytes) Specifies the total length of the
IP datagram, in bytes. Since this field is 16 bits wide, the
maximum length of an IP datagram is 65,535 bytes, though
most are much smaller.
IP Datagrams
Identification: Uniquely identifies the datagram. This field
contains a 16-bit value that is common to each of the
fragments belonging to a particular message; for datagrams
originally sent un-fragmented it is still filled in, so it can be
used if the datagram must be fragmented by a router during
delivery. This field is used by the recipient to reassemble
messages without accidentally mixing fragments from
different messages. This is needed because fragments may
arrive from multiple messages mixed together, since IP
datagrams can be received out of order from any device
IP Datagrams
Flags (3 bits) : 1 bit each
Reserved,
Dont fragment: Testing MTU, datagrams should not be
fragmented.
more fragment: more fragments are yet to come in a message
Fragment Offset: When fragmentation of a message occurs,
this field specifies the offset, or position, in the overall
message where the data in this fragment goes. It is specified
in units of 8 bytes (64 bits). The first fragment has an offset of
0.
IP Datagrams
Time To Live (TTL): Short version: Specifies how long the
datagram is allowed to live on the network, in terms of
router hops. Each router decrements the value of the TTL
field (reduces it by one) prior to transmitting it. If the TTL
field drops to zero, the datagram is assumed to have taken
too long a route and is discarded.
Protocol: (1 byte) Identifies the higher layer protocol
(TCP/UDP) carried in the datagram. Tells IP where to send
the datagram up to. 6 means TCP and 17 means UDP
IP Datagrams
Header Checksum: (2 bytes) A checksum computed over
the header to provide basic protection against corruption in
transmission. This is not the more complex CRC code
typically used by data link layer technologies such as
Ethernet; it's just a 16-bit checksum. It is calculated by
dividing the header bytes into words (a word is two bytes)
and then adding them together. The data is not check
summed, only the header. At each hop the device receiving
the datagram does the same checksum calculation and on a
mismatch, discards the datagram as damaged.
IP Datagrams
Source Address: The 32-bit IP address of the source of the
datagram. Note that even though intermediate devices such as
routers may handle the datagram, they do not normally put their
address into this fieldit is always the device that originally sent
the datagram.
Destination Address: The 32-bit IP address of the intended
recipient of the datagram. Again, even though devices such as
routers may be the intermediate targets of the datagram, this field
is always for the ultimate destination.
Routing requirements can also be specified in the Options field,
along with options to do with security and debugging.
The data to be transmitted in the datagram, either an entire
higher-layer message or a fragment of one.
Fragmentation and Reassembly
Fragmentation and Reassembly
The Internet Protocol (IP) implements datagram
fragmentation, breaking it into smaller pieces, so that
packets may be formed that can pass through a link with a
smaller maximum transmission unit (MTU) than the original
datagram size.
Large IP datagrams divided into several fragments w.r.t LAN
MTU.
Reassembled only at the final destination
IP header bits are used to identify, order related fragments
Example:
IP Addresses
The Internet
IP Addresses
IP Addresses
Internet Addresses or Internet Protocol Version 4 Addresses
32 bits => 4 Octets v4
172.16.254.1 (n/w ID and host ID)
The highest order octet (most significant eight bits) in an
address was designated as the network number and the remaining
bits were called the rest field or host identifier and were used for
host numbering within a network. Netid and Hostid
Each accesses n/w has a unique netid assigned to it.
Class A,B and C are unicast addresses.
Class D and E are multicast addresses
IP Addresses Format
Class A, B and C
Class D and E
10.0.0.0 to 10.255.255.255 -- This falls within the Class A address
range of 1.0.0.0 to 127.0.0.0, in which the first bit is 0.
172.16.0.0 to 172.31.255.255 -- This falls within the Class B
address range of 128.0.0.0 to 191.255.0.0, in which the first two
bits are 10.
192.168.0.0 to 192.168.255.255 -- This falls within the Class C
range of 192.0.0.0 through 223.255.255.0, in which the first
three bits are 110.
Multicast (formerly called Class D) -- The first four bits in the
address are 1110, with addresses ranging from 224.0.0.0 to
239.255.255.255.
Reserved for future/experimental use (formerly called Class E)
-- addresses 240.0.0.0 to 254.255.255.254.
127.0.0.1 -- This is called the loopback address, meaning
your computer's way of identifying itself, whether or not it
has an assigned IP address
255.255.255.255 -- This address is reserved for network
broadcasts, or messages that should go to all computers on
the network.
If Host ID are all 1s, broadcast the
Network Masks
A network mask helps you know which portion of the address
identifies the network and which portion of the address identifies
the node. Class A, B, and C networks have default masks, also known as
natural masks, as shown here:
Class A: 255.0.0.0, Class B: 255.255.0.0 & Class C: 255.255.255.0
Once you have the address and the mask represented in binary, then
identifying the network and host ID is easier. Any address bits which
have corresponding mask bits set to 1 represent the network ID. Any
address bits that have corresponding mask bits set to 0 represent the
node ID.
8.20.15.1 = 00001000.00010100.00001111.00000001
255.0.0.0 = 11111111.00000000.00000000.00000000
-------------- ---------------------------------------
net id | host id
netid = 00001000 = 8
hostid = 00010100.00001111.00000001 = 20.15.1
ARP and RARP
Types of Addresses
Media Access Control (MAC) addresses in the
network access layer
Associated w/ network interface card (NIC)
48 bits or 64 bits
IP addresses for the network layer
32 bits for IPv4, and 128 bits for IPv6
E.g., 172.168.56.7
IP addresses + ports for the transport layer
E.g., 172.168.56.7:80
Domain names for the application/human layer
E.g., www.google.com
ARP
Primarily used to translate IP addresses to
corresponding Ethernet MAC addresses
Suppose want to send a packet over
(say) an Ethernet.
We only know the destination's IP address
to build the Ethernet frame, but we have
to know the Ethernet address that the
destination has.
This is what ARP does: Find the hardware
address corresponding to an IP address
ARP Request
ARP Reply
ARP Flow
1. ARP broadcasts an ARP Request packet
that contains the target IP address in an
Ethernet frame with destination address
ff:ff:ff:ff:ff:ff (and source its own Ethernet
address)
2. All hosts on the local network read the
frame
3. The target host recognises the request for
its IP address
ARP Flow
1. The target sends an ARP Reply packet
containing its own Ethernet address (the
other hosts need do nothing)
2. It knows the source's Ethernet address as
read from the request packet
3. The source gets the reply and reads out the
target's Ethernet address
4. It can now use that Ethernet address to
send IP packets
ARP Cache
For every outgoing packet sending ARP request and waiting
for responses is inefficient
6 6 2 28 10 4
* Note: The length of the address fields is determined by the corresponding address length fields
Proxy Arp
The ARP in a Gateway => Proxy ARP