The Internet Notes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 91

The Internet

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

Requires more bandwidth


Consumes Time

ARP cache maintained at each node


Size limit = 512 entries (timer)
ARP Cache Table
If ARP just resolved an IP address, chances are a
few moments later someone is going to ask to
resolve the same IP address

When ARP returns a MAC address, it is placed in


a cache. When the next request comes in for
the same IP address, look first in the cache

Each host maintains a table of IP to MAC


addresses
ARP Messages and Cache Problems
Message types:
ARP request
ARP reply
ARP announcement

Cache space may be limited


Hosts move or change IP addresses
Solution?
Drop (invalidate) cache entries after a while (20 minutes is
normal)
ARP Packet Format
Ethernet II header

Destination Source Type


address address 0x8060
ARP Request or ARP Reply Padding CRC

6 6 2 28 10 4

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
Proxy Arp
The ARP in a Gateway => Proxy ARP

Acts an agent for ARP in the Destination host.

Router responds to ARP Request that arrives


from one of its connected networks for a host
that is on another of its connected networks
ARP Bridging
A bridge is a host with two interfaces, one on each network
If host h1 wishes to send to host h2 it must determine its hardware
address
So h1 sends an ARP broadcast for h2
The bridge sees this request and responds on behalf of h2 (a proxy
ARP), but it supplies its own hardware address b1
Now h1 sends data to what it thinks is h2, but is actually the bridge
The bridge reads the packet, sees it is destined for h2 (by its IP
address) and forwards it to the other network where h2 can read it
RARP
The Internet
RARP
RARP finds the logical address for a machine that
only knows its physical address.
This if often encountered on thin-client
workstations. No disk, so when machine is booted,
it needs to know its IP address (dont want to burn
the IP address into the ROM).
RARP requests are broadcast, RARP replies are
unicast
Qos Support
Qos Overview
The quality of service is one of most important areas of
Internet development. As the Internet originally developed
for data communications is now used more and more for
real-time applications, there is a need for better service than
the ``best effort''.
Concept quality of service,
important efforts to provide QoS in the Internet:
the Integrated Services and
the Differentiated Services models.
QoS Support
QoS, or Quality of Service, is a method for controlling traffic
priority on networks
There, QoS kicks in when theres a bottleneck and decides
which traffic is more important than the rest.
Exactly what is more important then the rest is based on
rules that you supply.
You can specify importance based on criteria such as IP
address, MAC address, and even service name.
QoS
QoS represents the set of techniques necessary to
manage network bandwidth, delay, jitter, and
packet loss .
From a business perspective, it is essential to assure
that the critical applications are guaranteed the
network resources they need, despite varying
network traffic load
Congestion
Root cause for congestion is (dynamic) lack of bandwidth.
Demand for bandwidth is greater than capacity.
Sudden surge in demand.
Unexpected traffic flowing into the links due to routing
How does congestion affect intangibles?
Delay
Packets start queuing up at the router interfaces.
Take more time to exit the router.
Packet loss
Queue buffers exhaust, routers start dropping packets!
Jitter
Packets in the same flow routed to links having variable delay
Traffic Characterization
Identify traffic sources and types
Need for appropriate handling
Realtime and Non-realtime
Voice (Delay sensitive)
Video (Bandwidth intensive)
Data (Loss sensitive)
HTTP, FTP, SMTP
Bursty and Constant type
Single or Multiple flows of the same type
QoS requirements
The main QoS requirements are:
Bandwidth :represents a data stream bandwidth.
Reliability : represents the tolerance for losses in a data stream.
Delay :The relative delay between packets and the round Trip
Delay.
The actual QoS assigned to a stream depends on many
parameters:
the server scheduling algorithm,
the server priority settings,
the server load,
the scheduling cost.
Qos Triangle
QoS Service Models
Best effort (No QoS) services :
messages may be lost en route
Integrated services (Hard QoS)
Collective service to put the traffic demands in domain, and to
Limit the demand & the reserve 8 resources.
Differentiated services (Soft QoS)
Classify the traffic into groups
Handles different traffic groups differently.
Integrated services (IntServ)
The IntServ architecture model (RFC 1633, June 1994) was
motivated by the needs of real-time applications such as
remote video, multimedia conferencing, visualization, and
virtual reality.
It provides a way to deliver the end-to-end Quality of Service
(QoS) that real-time applications require by explicitly
managing network resources to provide QoS to specific user
packet streams (flows).
It uses "resource reservation" and "admission control"
mechanisms as key building blocks to establish and maintain
QoS.
Intro
IntServ uses Resource Reservation Protocol (RSVP) to
explicitly signal the QoS needs of an application's traffic
along the devices in the end-to-end path through the
network.
If every network device along the path can reserve the
necessary bandwidth, the originating application can begin
transmitting.
Besides end-to-end signaling, IntServ requires several
functions on routers and switches along the path like
Admission Control, Classification, Policing,
Queuing and Scheduling.
Intro
IntServ defines three different classes of service: 3 different
types of packet flows within each router, 3 separate queues
are for each line/ classes.
Guaranteed: Maximum delay and jitter are specified,
Bandwidth are guaranteed. Real-time streams
Controlled load: No guarantee is provided, but the flow
obtained a constant level of service. Real-time streams having
the capability to adjusting the amount of real-time data that is
generated to the level it is offered.
Best-effort: text based applications.
Control Mechanism used in both
IntServ and DiffServ
Token Bucket Filter: The Token Bucket Filter is a queuing
discipline available for traffic control in both guaranteed and
predictive.
Portion of Bandwidth and amount of buffer space is reserved for
the packet flow relating to each call.
The token bucket is a container, fixed capacity bucket into which
tokens, normally representing a unit of bytes or a single packet of
predetermined size (fill buffer), are added at a fixed rate
(Bandwidth).
The traffic is filtered based on the expenditure of tokens. Each
packet consumes some tokens, no matter how small it is.
Token Bucket Filter
On creation, the TBF is stocked with tokens which
correspond to the amount of traffic that can be burst in one
go.
If no tokens are available, packets are queued, up to a
configured limit.
The TBF now calculates the token deficit, and throttles until
the first packet in the queue can be sent.
The peakrate can be configured to limit the speed at which
the bucket empties. It is implemented as a second TBF with a
very small bucket, so that it doesnt burst.
Weighted fair queuing
Weighted Fair Queuing (WFQ) is a packet scheduling
technique allowing guaranteed bandwidth services.
The purpose of WFQ is to let several sessions share the same
link.
In WFQ, the priority given to network traffic is inversely
proportional to the signal bandwidth. Thus, narrowband
signals are passed along first, and broadband signals are
buffered.
Random early detection
Random early detection (RED), also known as random
early discard or random early drop is a queuing
discipline for a network scheduler suited for congestion
avoidance (B/W utilization)
RED monitors the average queue size and drops (or marks
when used in conjunction with ECN) packets based on
statistical probabilities. If the buffer is almost empty, all
incoming packets are accepted. As the queue grows, the
probability for dropping an incoming packet grows too.
When the buffer is full, the probability has reached 1 and all
incoming packets are dropped.
RED
With RED, if a packet arrives at the o/p queue that is full.
Instead of discarding that packet, a random packet is selected
from the queue.
Thresholds are defined in the figure
MinTH
MaxTH
AveLEN
Resource reservation Protocol (RSVP)
RSVP is part of the Internet Integrated Service (IIS) model,
which ensures best-effort service, real-time service, and
controlled link-sharing.
RSVP is a set of communication rules that allows channels or
paths on the Internet to be reserved for the multicast (one
source to many receivers) transmission of video and other
high-bandwidth messages.
Example
With RSVP, people who want to receive a particular Internet
"program" (think of a television program broadcast over the
Internet) can reserve bandwidth through the Internet in
advance of the program and be able to receive it at a higher
data rate and in a more dependable data flow than usual.
When the program starts, it will be multicast to those
specific users who have reserved routing priority in advance.
RSVP also supports unicast (one source to one destination)
and multi-source to one destination transmissions.
How it works?
Lets assume a particular Movie is to be multicast at a certain
time on Friday evening.
Expecting to receive it, you send an RSVP request before the
broadcast (you'll need a special client program or perhaps
your browser includes one) to allocate sufficient bandwidth
and priority of packet scheduling for the program.
This request will go to your nearest Internet gateway with an
RSVP server. It will determine whether you are eligible to
have such a reservation set up and, if so, whether sufficient
bandwidth remains to be reserved to you without affecting
earlier reservations.
Contd.
Assuming you can make the reservation and it is entered, the
gateway then forwards your reservation to the next gateway
toward the destination (or source of multicast). In this manner,
your reservation is ensured all the way to the destination. (If the
reservation can't be made all the way to the destination, all
reservations are removed.)
When the multicast begins, packets from the source speed
through the Internet on a high-priority basis. As packets arrive at a
gateway host, they are classified and scheduled out using a set of
queues and, in some cases, timers.
An RSVP packet is very flexible; it can vary in size and in the
number of data types and objects. Where packets need to travel
through gateways that don't support RSVP, they can be "tunneled"
through as ordinary packets.
RSVP Principles
Differentiated Services Model
DiffServ can, for example, be used to provide low-latency to
critical network traffic such as voice or streaming media
while providing simple best-effort service to non-critical
services such as web traffic or file transfers.
DiffServ uses a 6-bit differentiated services code point
(DSCP) in the 8-bit Differentiated services Field (DS
field) in the IP header for packet classification purposes. The
DS field and ECN field replace the outdated IPv4 TOS (Type
of service) field
DiffServ
DiffServ class-based mechanism for traffic management. In
contrast to IntServ which is a flow-based mechanism
DiffServ is used to classify and mark packets as belonging to a
specific class
DiffServ-aware routers implement per-hop behaviors
(PHBs), which define the packet-forwarding properties
associated with a class of traffic. Different PHBs may be
defined to offer, for example, low-loss or low-latency.
PHB defines the policy and priority applied to a packet when
traversing a hop (such as a router) in a DiffServ network.
DiffServ
DiffServ operates on the principle of traffic classification,
where each data packet is placed into a limited number of
traffic classes, rather than differentiating network traffic
based on the requirements of an individual flow. Each router
on the network is configured to differentiate traffic based on
its class. Each traffic class can be managed differently,
ensuring preferential treatment for higher-priority traffic on
the network.
The premise of Diffserv is that complicated functions such as
packet classification and policing can be carried out at the
edge of the network by edge routers who then mark the
packet to receive a particular type of per-hop behavior.
DSCP differentiated services code
point
DSCP Bit Settings Meaning
000000 Best effort
Conforms to the requirements of Type of
bbb000
Service queuing precedence
bbbbb0 Available for standardization
bbbb11 For experimental of local network usage
For experimental of local network usage, but
bbbb01
may be taken for standardization
Differentiated Services Model
DiffServ Architecture RFC 2475
Scales well with large flows through aggregation
Creates a means for traffic conditioning (TC)
Defines per-hop behavior (PHB)
Edge nodes perform TC
Allows core routers to do more important processing
tasks
Tough to predict end-to-end behavior
Especially with multiple DiffServ Domains
DiffServ implementation versus Capacity planning

You might also like