Open System Interconnection (OSI)

Download Report

Transcript Open System Interconnection (OSI)

Computer Networks
This PPT is Dedicated to my inner controller
AMMA BHAGAVAN – ONENESS Founders.
Developed by,
EDITED BY,
S.V.G.REDDY,
B.Keerthi Reddy,
Associate professor,
student of M.tech(SE).
Dept.of CSE, GIT,
GITAM UNIVERSITY.
OSI MODEL


A model defines the stages
or tasks of a protocol as it
prepares to send data
OSI
OPEN
SYSTEM
INTERCONNECTION



Open meaning standards
available to all.
The model is divided into
seven distinct layers
Each subsequent layer
should perform a welldefined function and the
layer
boundaries
are
designed to minimize the
information flow across the
interfaces.
OSI model
OSI MODEL LAYERS

Application Layer
◦ Provides a user interface (examples: HTTP, SMTP)
◦ Includes file, print, database, app. Services

Presentation Layer
◦ Presents the data (example: JPEG)
◦ Includes encoding techniques,encryption, compression and translation
services

Session Layer
◦ This provides a session between source & destination and decides the
mode of communication(simplex, half duplex & full duplex)

Transport Layer
◦ Provides reliable delivery with alignment of packets
◦ Performs error detection
◦ Includes end to end connection
OSI MODEL LAYERS

Network Layer
◦ Provides logical addressing and identifies the network
◦ Generates the Route to the destination

Data Link Layer
◦ Combines packets into bytes then into frames
◦ Performs error detection (not correction)
◦ Provides Media access addressing (point-to-point) and identifies the
client system
◦ Media Access Control and Data Link Control

Physical Layer
◦ physical movement of bits between devices.
Tcp/Ip model
TCP/IP MODEL
•
TCP (Transmission Control Protocol) is the main transport protocol utilized
in IP networks. The TCP protocol exists on the Transport Layer of the OSI
Model.
•
The TCP protocol is a connection-oriented protocol which provides end-toend reliability.
•
Internet protocol is the set of techniques used by many hosts for
transmitting data over the Internet.
•
The TCP/IP model is a description framework for computer network
protocols and it is evolved from ARPANET which was the world's first
wide area network and a predecessor of the Internet.
•
This model sometimes called internet model .
There are four layers in this model.

Application layer:
Defines how TCP/IP application protocols and how host programs interface
with transport layer services to use the network. protocols regarding this
layer are FTP,HTTP,SMTP,TELNET,SNMP.

Transport layer:
Provides communication session management between host computers.
Defines the level of service and status of the connection used when
transporting data. Protocols involved in this layer are TCP,UDP.

Internet layer:
Packages data into IP datagram's, which contain source and destination
address information that is used to forward the datagram's between hosts
and across networks. Performs routing of IP datagram's. Internet layer is
also having some protocols ARP, RARP, IGMP, ICMP.

Physical layer:
The physical movement of bits from source to destination.
Multiple Access Protocols

If multiple nodes tries to access the single channel for data
transmission,
CHANNEL
ALOHA

Here every node is allowed to transmit its data packets in the same channel

Then, when one node is transmitting data, then if some other node also
transmits then it leads to COLLISIONS

In this ALOHA, lot of chances to have more collisions

collision probability increases:
◦ frame sent at t0 collides with other frames sent in [t0-1,t0+1]
PURE ALOHA EFFICIENCY
P(success by given node) = P(node transmits) .
P(no other node transmits in [t0-1,t0] .
P(no other node transmits in [t0,t0+1]
= p . (1-p)N-1 . (1-p)N-1
= p . (1-p)2(N-1)
… choosing optimum p and then letting n -> 
Efficiency = 1/(2e) = .18
SLOTTED ALOHA

Here every node is given an equal amount of time slot.

when its turn comes, the node will transmit its data packets in that time
slot .

Here less chances to have collisions.
SLOTTED ALOHA EFFICIENCY




Efficiency is the long-run fraction of successful slots when there are
many nodes, each with many frames to send
Suppose N nodes with many frames to send, each transmits in slot
with probability p
prob that node 1 has success in a slot = p(1-p)N-1
prob that any node has a success = Np(1-p)N-1
CARRIER SENSE MULTIPLE ACCESS(CSMA)

Here the node listens to the channel before transmission

If channel is idle: transmit entire frame

If channel is busy, defer transmission

Human analogy: don’t interrupt
CSMA/CD (COLLISION DETECTION)

If two nodes simultaneously sense the channel and if the channel is idle and
both will attempt to transmit, which leads to collisions.

if any two or more nodes senses the channel and gets the Idle status, then
this protocol will take care by Blocking the nodes and minimise collisions.
COLLISION FREE PROTOCOLS
Bit-Map Method:

In this method, there will be N time slots. If node0 has a frame to send, it
sets the bit ‘1’ during the first slot and transmit the frame in first slot. No
other node is allowed to transmit during this slot.

This is done for all the nodes. In general node j may declare the fact that it
has a frame to send by inserting ‘1’ into slot j.

The basic problem with this protocol is its inefficiency during low load. If a
node has to transmit and no other node needs to do so, even then it has to
wait for the bitmap to finish.
Bit-Map Method
Binary Countdown

In this protocol, a node which wants to signal that it has a frame to send
does so by writing its address into the header as a binary number.

The arbitration is such that as soon as a node sees that a higher bit position
that is 0 in its address has been overwritten with a 1, it gives up.

The final result is the address of the node which is allowed to send. After
the node has transmitted the whole process is repeated all over again.

Given below is an example situation. Nodes Addresses
A 0010 , B 0101 , C 1010 , D 1001 ---- Node C 1010 having higher priority
gets to transmit.

The problem with this protocol is that the nodes with higher address always
wins. Hence this creates a priority which is highly unfair and hence
undesirable
Binary Countdown
LAN
Local area network - A group of computers that share a common
connection and are usually in a small area or even in the same building. For
example an office or home network. They are usually connected by
Ethernet cables and have high speed connections. If it was a wireless setup
it would be called a WLAN, which would have a lower connection speed
LAN
MAN
Metropolitan area network - This is a larger network that connects
computer users in a particular geographic area or region. For example a
large university may have a network so large that it may be classified as a
MAN. The MAN network usually exist to provide connectivity to local
ISPs, cable TV, or large corporations. It is far larger than a LAN and
smaller than a WAN. Also large cities like London and Sydney, Australia
have metropolitan area networks.
MAN
WAN
Wide area network - This is the largest network and can
interconnect networks throughout the world and is not restricted to a
geographical location. The Internet is an example of a worldwide
public WAN. Most WANs exist to connect LANs that are not in the
same geographical area.
WAN
ETHERNET




Dominant wired LAN technology
cheap $20 for 100Mbs!
first widely used LAN technology
Simpler, cheaper than token LANs and ATM
Kept up with speed race: 10 Mbps – 10 Gbps
Ethernet
sketch
ETHERNET TOPOLOGIES
Bus Topology: Shared
All nodes connected to a wire
Star Topology:
All nodes connected to a
central repeater
Network Topologies
ETHERNET CONNECTIVITY
10Base5 – ThickNet
< 500m
Controller
Vampire Tap
Bus Topology
Transceiver
ETHERNET CONNECTIVITY
10Base2 – ThinNet
< 200m
Controller
Transceiver
BNC T-Junction
Bus Topology
ETHERNET CONNECTIVITY
10BaseT
< 100m
Controller
Star Topology
ETHERNET FRAME STRUCTURE
Sending adapter encapsulates IP datagram (or other
protocol packet) in Ethernet frame
network layer
Preamble:

7 bytes with pattern 10101010 followed by one byte with pattern
10101011

Used to synchronize receiver, sender clock rates (Manchester encoding)
ETHERNET FRAME STRUCTURE

Addresses: 6 bytes
◦ if adapter receives frame with matching destination address, or with
broadcast address (eg ARP packet), it passes data in frame to net-layer
protocol
◦ otherwise, adapter discards frame


Type: multiple network layer protocols may be in use at the same
time on the same machine, when ethernet frame arrives, kernel has
to know it .
CRC: checked at receiver, if error is detected, the frame is simply
dropped
ETHERNET SPECIFICATIONS





Coaxial Cable
 Up to 500m
Taps
 > 2.5m apart
Transceiver
 Idle detection
 Sends/Receives signal
Repeater
 Joins multiple Ethernet segments
 < 5 repeaters between any two hosts
< 1024 hosts
ETHERNET MAC ALGORITHM

Sender/Transmitter
 If line is idle (carrier sensed)
 Send immediately
 Send maximum of 1500B data (1527B total)
 Wait 9.6 s before sending again
 If line is busy (no carrier sense)
 Wait until line becomes idle
 Send immediately
 If collision detected
 Stop sending and jam signal
 Try again later
ETHERNET MAC ALGORITHM
Node A
Node B
At time almost T,
node A’s message has
almost arrived

Node A starts
transmission at time 0
Node B starts transmission
at time T
How can we ensure that A knows about the collision?
MANCHESTER ENCODING
1
1
0
0
0
0
1
0
1
1
1
• This is a return to zero (RTZ) signal.
• Each bit period is divided into two equal intervals.
• Binary “1” -> High Voltage level in the first half and Low Voltage level in the
second half.
• Binary “0” -> Just opposite of the above.
DIFFERENTIAL MANCHESTER ENCODING
1
1
0
0
0
0
1
0
1
1
1
• In each bit interval there is a transition of the level in the middle.
• If the bit value is “0” then there is a presence of a transition at the start of
interval.
• If the bit value is “1”, then there is absence of a transition at the start of
interval.
• One of the properties of this signal is that is self clocking.
SWITCHED ETHERNET
A simple example of switched Ethernet.
Switched Ethernet

An Ethernet LAN that uses switches to connect individual hosts or
segments. This type of network is sometimes called a desktop switched
Ethernet.

In the case of individual hosts, the switch replaces the repeater and
effectively gives the device full 10 Mbps bandwidth (or 100 Mbps for Fast
Ethernet) to the rest of the network.

In the case of segments, the hub is replaced with a switching hub.

Switched Ethernets are becoming very popular because they are an
effective and convenient way to extend the bandwidth of existing Ethernets.
FAST ETHERNET (100BASE-T)
How to achieve 100 Mbps capacity?
LLC
MAC
Data Link
Layer
Convergence Sublayer
MII
Media Independent Interface
Physical
Layer
Media Dependent Sublayer
Media Independent Interface provides three choices.
FAST ETHERNET [IEEE 802.3U]
Fast ethernet uses fiber distributed data interface(FDDI)
FDDI CHARACTERISTICS:

100 Mbps data rate

Distances of up to 200 km

Up to 1000 hosts attached

Based on fiber optic cabling
GIGABIT ETHERNET (1000 BASE X)


Provides speeds of 1000 Mbps (i.e., one billion bits per second
capacity) for half-duplex and full-duplex operation.
Uses Ethernet frame format and MAC technology
◦ CSMA/CD access method with support for one repeater per collision
domain.
◦ Backward compatible with 10 BASE-T and 100 BASE-T.



Uses 802.3 full-duplex Ethernet technology.
Uses 802.3x flow control.
All Gigabit Ethernet configurations are point-to-point!
GIGABIT ETHERNET TECHNOLOGY
Gigabit Ethernet cabling.
1000 BASE SX
1000 BASE LX
1000 BASE CX
1000 BASE T
fiber - short wavelength
fiber - long wavelength
copper - shielded twisted pair
copper - unshielded twisted pair
GIGABIT ETHERNET (1000 BASE-T)
LLC
MAC
GMII
Gigabit Media Independent Interface
Physical Layer
Media Dependent Interface
Medium
Data Link
Layer
GIGABIT ETHERNET
(a) A two-station Ethernet. (b) A multistation Ethernet.
WIRELESS LAN


A wireless LAN (or WLAN, for wireless local area network,
sometimes referred to as LAWN, for local area wireless network) is
one in which a mobile user can connect to a local area network
(LAN) through a wireless(radio) connection.
The IEEE 802.11 group of standards specify the technologies for
wireless LANs. 802.11 standards use the Ethernet protocol and
CSMA/CA (carrier sense multiple access with collision avoidance)
for path sharing and include an encryption method
WIRELESS LANS





The 802.11 Protocol Stack
The 802.11 Physical Layer
The 802.11 MAC Sub layer Protocol
The 802.11 Frame Structure
Services
THE 802.11 PROTOCOL STACK
Part of the 802.11 protocol stack.
Wireless LAN uses different parts of the spectrum. They are





Infrared - speed upto 1 mbps - signal which is used in TV remote
control.
FHSS(frequency hopping spread spectrum) & DSSS(direct
sequence spread spectrum) - speed upto 1-2 mbps – signal which is
used in cordless telephones which does not require licensing.
OFDM(orthogonal frequency division multiplexing) - speed upto
54 mbps.
HRDSSS(high rate DSSS) - speed upto 11 mbps
OFDM(orthogonal frequency division multiplexing) - another
version of OFDM – speed upto 54 mbps at a different frequency
band.
THE 802.11 MAC SUBLAYER PROTOCOL
(a) The hidden station problem.
(b) The exposed station problem.
THE 802.11 MAC SUBLAYER PROTOCOL

The hidden station problem – In fig(a), station C is transmitting to
station B.If A senses the channel, it will not hear anything and falsely
conclude that it may now start transmitting to B.

The exposed station problem – In fig(b), B wants to send to C so it
listens to the channel. When it hears a transmission, it falsely
concludes that it may not send to C, even though A may be
transmitting to D(not shown).

The MAC sub layer is responsible for the channel allocation procedures,
protocol data unit(PDU) addressing, frame formatting, error checking and
fragmentation and reassembly

The transmission mode can operate in the contention mode exclusively,
requiring all stations to contend for the channel for each packet transmitted.

IEEE 802.11 three different types of frames: management ,control and data

The management frames is used for station association and disassociation
with the AP, timing and synchronization, and authentication and
deauthentication.

Control frames is used for handshaking during the CP, for positive
acknowledgments during the CP, and to end the CFP.

Data frames are used for the transmission of data during the CP and CFP,
and can be combined with polling and acknowledgments during the CFP.
THE 802.11 MAC SUBLAYER PROTOCOL
THE 802.11 MAC SUBLAYER PROTOCOL
Once A received CTS it
A wants to transmit starts to send frame and
to B
starts an ACK timer
B transmits ACK
frame saying that
frame arrived intact
C in range of A
D in range of B but not A
The use of virtual channel sensing using CSMA/CA.
If A’s ACK timer times out before receipt of ACK frame from
B the whole protocol needs to be repeated
THE 802.11 FRAME STRUCTURE
The 802.11 data frame.
Protocol version:
Allows 2 versions of the
protocol to operate in
the same cell
Frame Type:
Data
Control
Management
Subtype:
CTS, RTS etc
THE 802.11 FRAME STRUCTURE
The 802.11 data frame.
To & From DS:
Cell 1
Cell 3
Indicates if the frame is going
to or coming from the intercell
distribution systems, I.e.
Ethernet
Cell 2
Base
stations
Outside
world
THE 802.11 FRAME STRUCTURE
The 802.11 data frame.
MF :
More Fragments of a
Frame to follow
Marks the
retransmission of an
earlier frame
Pwr: used by base
station to send station
into and out of sleep
state: I.e. Power
management
THE 802.11 FRAME STRUCTURE
The 802.11 data frame.
Sender has more
frames to follow
Specifies that frame
body has been
encrypted:
WEP:
Wired Equivalent
Privacy
Indicates if frames
must be
processed in
ORDER
THE 802.11 FRAME STRUCTURE
The 802.11 data frame.
Sequence: allows fragments to be
numbered
12 bits identify frame
4 bits identify fragment
How long the frame and
acknowledgement will
occupy the channel
Source & destination addresses
+
CELL source & destination addresses
THE 802.11 FRAME STRUCTURE
The 802.11 data frame
Data payload:
up to 2312 bytes
Checksum
802.11 SERVICES
Distribution Services
•
Association
Mobile stations OR base station breaks
relationship
Station: before shutting down or leaving
Base station: going down for maintenance
•
Disassociation
•
Reassociation
•
Distribution
Allows mobile station to switch base stations
i.e. move from one cell to another
Determines how to route frames sent to base
station
i.e. from within cell
from outside of cell
•
Integration
Handles translation from 802.11 format to
format required for destination network
802.11 SERVICES
Intracell Services
Authentication
Single Cell
Once accepted by Base station
mobile station must authenticate
itself – prove it belongs to the
network
Base station send a challenge frame: see if
mobile station knows secret key (password)
Mobile station returns the challenge frame
encrypted using the key
Deauthentication
•
Privacy
Mobile breaks connection and will
need to authenticate again if it wants
back into the network
Encryption & Decryption
•
Data Delivery
RC4 algorithm
Higher layers must deal with
detecting and correcting errors
BLUETOOTH




Bluetooth is a specification for the use of low-power radio
communications to wirelessly link phones, computers and other
network devices over short distances.
Bluetooth technology was designed primarily to support simple
wireless networking of personal consumer devices and peripherals,
including cell phones, PDAs, and wireless headsets.
Wireless signals transmitted with Bluetooth cover short distances,
typically up to 30 feet (10 meters). Bluetooth devices generally
communicate at less than 1 Mbps.
Bluetooth networks feature a dynamic topology called a piconet or
PAN. Piconets contain a minimum of two and a maximum of eight
Bluetooth peer devices. Devices communicate using protocols that
are part of the Bluetooth Specification.
BLUETOOTH ARCHITECTURE
Two piconets can be connected to form a scatter net.
NETWORK TOPOLOGY

Radio Designation
◦
◦

S
P
M
sb
M
P
Piconet
◦
◦

Connected radios can be
master or slave
Radios are symmetric
(same radio can be
master or slave)
Master can connect to seven
simultaneous or 200+ active
slaves per piconet
Each piconet has maximum
capacity (1 MSPS)
 Unique hopping
pattern/ID
Scatter net
◦
◦
High capacity system
 Minimal impact with up to
10 piconets within range
Radios can share piconets!
S
P
sb
S
S
BLUETOOTH APPLICATIONS
The Bluetooth profiles.
THE BLUETOOTH PROTOCOL STACK
The 802.15 version of the Bluetooth protocol architecture.





In the above fig, physical radio layer deals with radio transmission
and modulation.
Next, baseband layer deals with time slots and how these slots are
grouped into frames.
Next, Link Manager handles the establishment of logical channels
between devices including power management, authentication &
quality of service.
Next, middleware layer is designed to deal with legacy devices such
as Rfcomm, telephony, service discovery.
Last, is the application layer which make use of the protocols ij
lower layers to get their work done.
THE BLUETOOTH FRAME STRUCTURE
A typical Bluetooth data frame.

The frame structure begins with an access code that usually identifies the
master so that slaves within radio of two masters can tell which traffic is for
them.

The 54-bit header contains typical MAC sub layer fields

The data field which is up to 2744 bits for a single time slot, the format is
the same except that data field is 240 bits.

Within the header the Address field identifies which of the eight active
devices the frame is intended for.

Type means it tells the type of frame-ACL(asynchronous connectionless)
or SCO(synchronous connection oriented)

The flow bit is asserted by a slave when the buffer is full and cannot
receive any more data.

The acknowledgment bit is used for piggyback an ACK onto a frame

The sequence bit is used for number the frames to detect retransmissions.
Network devices
REPEATER: At the bottom,in
the physical layer,we find the
“repeaters”.These are analog
devices that are connected to
two table segments.A signal
appearing on one of them is
amplified and put out on the
other.Repeaters
do
not
understand frames,packets,or
headers.They understand volts.
Hub
A HUB has number of input
lines
that
it
joins
electrically.HUBs differ from
repeaters in that they do not
usually amplify the incoming
signals and are designed to hold
multiple linecards each with
multiple
inputs,but
the
differences are slight.
Bridge
We find bridges and switches in
datalink
layer.A
bridge
connects two or more LANs
.When frame arrives,software
in the bridge extracts the
destination address from the
frame header and looks it up in
a table to see where to send the
frame .
Switch

A network switch is a
computer networking device
that connects network
segments.
Router

It is a device like a switch
that
connects
more
networks or computers
and which has inbuilt
software to find the
routes & their shortest
paths.
Gateway
These
connect
two
computers
that
use
different
connection
oriented
transport
protocols. Application
gateways understand the
format and contents of
the data and translate
messages from one
format to another.
Bridge
Spanning tree Bridge
Remote Bridge
BRIDGE
Bridge is a network device which is used to join two small & different
networks or it is used to divide a big network into two segments.
It takes the request from one network/segment and passes to other
network/segment and performs the data transmission.
In fig 4.40, bridge acts as a mediator between two different networks
802.11 & 802.3 and performs data transmission.
PORTS
A
B
E
F
G
H
BRIDGE
C
D
SELECTIVE FORWARDING
A
B
E
F
BRIDGE
C


D
G
H
If A sends a frame to E - the frame must be forwarded by the
bridge.
If A sends a frame to B - there is no reason to forward the
frame.
NETWORK LAYER
•
•
•
•
•
Network Layer Design Issues
Store-and-Forward Packet Switching
Services Provided to the Transport Layer
Implementation of Connectionless Service
Implementation of Connection-Oriented Service
Comparison of Virtual-Circuit and Datagram Subnets
Store-and-Forward Packet Switching
Switching refers to the transmission of packets from h1 to h2 passing through
different network devices.
A device when it gets a data packet from source, it stores and acquire the route and it
forwards to the destination.
IMPLEMENTATION OF CONNECTIONLESS SERVICE
Here we will not have a dedicated channel from H1 to H2
.
Data packets will be transmitted in the available & shortest routes.
IMPLEMENTATION OF CONNECTION-ORIENTED SERVICE
Here we will have a dedicated channel from H1 to H2
.
Data packets will be transmitted in the same dedicated channel.
COMPARISION OF VIRTUAL-CIRCUIT & DATAGRAM SUBNETS
ROUTING ALGORITHMS
•
•
•
•
•
•
•
•
•
•
The Optimality Principle
Shortest Path Routing
Flooding
Distance Vector Routing
Link State Routing
Hierarchical Routing
Broadcast Routing
Multicast Routing
Routing for Mobile Hosts
Routing in Ad Hoc Networks
THE OPTIMALITY PRINCIPLE
Optimality principle: if router j is on the optimal path from router
I to router k, then the optimal path from j to k also falls along the
same route.
F->A->B best path =>A->B best path
Optimal routes from all sources to a destination form a tree rooted
at the destination
a) A subnet. (b) A sink tree for router B.
SHORTEST PATH ROUTING (DİJKSTRA)

Here we need to find the shortest route from A to H.

Start from A and go to B as the AB is smaller than AB(2) and AG(6). From B, go to
E, then to G.

Here we can reach H from E through (EF, FH) or (EG,GH).But the route (EF,FH)
will be taken as it is lesser(shortest path).

Hence A,B,E,F,H is the shortest route.
FLOODING

Another static routing algorithm is flooding: Every incoming packet is sent out on
every outgoing line except the one it arrived on.

Measures for damming the flood:

A hop counter is included in the header of each packet, which is decremented at each
hop.

A packet is discarded when the counter reaches zero.

A sequence number is included in each packet.

Each router maintains a list per source router telling which sequence numbers
originating at that source have already been seen.

A packet is discarded when it contains a sequence number which is in the list.

Selective flooding: an incoming packet is sent on those lines that are going
approximately in the right direction.

Random walk: an incoming packet is sent on a line at random.

Possible applications of flooding:

In military applications, to withstand large numbers of routers crashes at any instant.

As a metric (always choose the shortest path) against which other routing algorithms
can be compared.
DISTANCE VECTOR ROUTING
(a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.
DISTANCE VECTOR ROUTING

Used by ARPANET, Internet (RIP), DECnet, Novell (IPX), AppleTalk, and Cisco
routers.

Each router maintains a routing table, with one entry for each other router in the
subnet.

Each entry contains two parts: the preferred outgoing line for that destination, and
the estimation of the delay time (or number of hops, distance, queue length, etc.) to
that destination.

Each router knows the “distance” to each of its neighbors and updates its routing
table based on the routing information from its neighbors.

Each router periodically exchanges explicit routing information with each of its
neighbors.

Example – In fig(b), It shows the delay(time) vectors from station A to all other
stations.i.e. from A to A - 0, A to B -12, A to C - 25 etc.

Now suppose we want to transmit packet from J to G. Then at a particular moment
of time the available routes are (JA,AG),(JI,IG), (JH,HG) & (JK,KG).The delay
vectors for (JA,AG - 8+18),(JI,IG – 10+31), (JH,HG – 12+6) & (JK,KG – 6+31).

From the above we can say that (JH,HG -12+6) is the shortest path where we can
transmit packet with less delay .
THE COUNT-TO-INFINITY PROBLEM
A comes up: Good news spreads fast
A goes down: Bad news spreads slow
Example In fig(b), distance vectors from A to B,C,D,E are 1,2,3,4.
suddenly if A fails, B cannot reach A directly, Then it thinks that it can reach A through C i.e.
(BC+CA – 1+2 = 3).
Now AB is marked as the 3 which is the latest distance vector. Then now C will modify its
distance vector as (CB+CA = 1+3 = 4).
Lastly if C to A is 4, then B will modify it as (BC+CA = 1+4 = 5)…
Like this the process goes on to infinity modifying the distance vectors.
LINK STATE ROUTING
Distance vector routing was used in the ARPANET until 1979,
when it was replaced by link state routing.
1.
2.
3.
4.
5.
Each router must do the following:
Discover its neighbors, learn their network address.
Measure the delay or cost to each of its neighbors.
Construct a packet telling all it has just learned.
Send this packet to all other routers.
Compute the shortest path to every other router.
LEARNING ABOUT THE NEIGHBOURS
When a router is booted, it sends a HELLO packet to each outgoing
line and all the routers in the LAN respond back telling its system
details. Like this, a Router can trace its neighbours.
(a) Nine routers and a LAN. (b) A graph model of (a).
MEASURING LINE COST
The most direct way to determine this delay is to send over the line a
special echo packet that the other side is required to send back
immediately. By measuring the Round-trip time and dividing by two, we can
get the delay.
even for better results, the test can be conducted several times and the
average can be used.
A subnet in which the East and West parts are connected by two lines.
BUILDING LINK STATE PACKETS
Once the information needed for the exchange has
been collected, the next step is for each router to build
a packet containing all the data as below in fig(b).
(a) A subnet. (b) The link state packets for this subnet.
DİSTRİBUTİNG THE LİNK STATE PACKETS

The link state packets of previous phase will be distributed in the network.
Then the routers getting the first ones will change their routes.

Flooding
◦ Each router records the (source, seq. no.)
◦ Only flood and record packets from a source with higher seq.no. than
previous will be recorded.

Sequence numbers or router records of them can get corrupt.
◦ Include age after seq. no. and decrement it per second. Discard packets
with age zero.
Lastly, Once all the process is over, Run Dijkstra’s algorithm to
know the shortest routes to all the destinations.
HIERARCHICAL ROUTING
HIERARCHICAL ROUTING
To save the memory, CPU time, and network bandwidth, for maintaining
routing tables, hierarchical routing is used when the number of routers in
the network is very large.
In the above fig(a), some set of routers in the network are grouped as a
Region. In a region, all the routers will have the complete information
about all the other routers and how to route their packets in the same
region.i.e.1A,1B,1C of region1 will know about each other.
But a router of region1 will not have any details about router of region2.
i.e. 1A router of region1 will not know about 2A router of region2.
BROADCAST ROUTİNG
•
Broadcasting packets can be done in five ways
 Send a distinct packet to each destination
 Flooding - Each node copies the packet to all outgoing lines
 Multidestination routing – first, we know the list of destinations or by
using bitmap. Then we determine the list of output lines for the
destinations.
 Sink tree/spanning tree: Copy on all the spanning tree lines except the
one packet arrived from.
 Reverse path forwarding: From a router,if any packet arrives, it will
check whether packets are meant to be sent to the source. Then, the
broadcast packet arrived on a line other than the preferred one for
reaching the source, the packet is discarded as a likely duplicate.
•
The last three methods are BW efficient.
MULTICAST ROUTİNG
This process will be done in two ways
The packet can be broadcast to all the nodes in the network
though it is not required to send to unintended recipients.
Next, all the destinations can be formed as a group and the packet
can be sent to the group which is nothing but multicasting.
ROUTING FOR MOBILE HOSTS
ROUTING FOR MOBILE HOSTS
Mobile host is a Laptop carrying by a person and if he want to read an e-mail
and some Network need to identify him and help in the data transmission.
Foreign agent – Foreign network, Home agent – Home network
 This will be done in a systematic process as follows(see fig above)

◦ Basically each Foreign agent broadcasts a packet telling its existence, then mobile
host can request it. Otherwise, mobile host will send a request packet for any
foreign agent.
◦ Then mobile host requests foreign agent by giving its home agent details.
◦ Then foreign agent contacts home agent with the given security information by the
mobile host.
◦ If home agent feels ok with the foreign agent, then it will permit foreign agent to
carry on the transmission.
◦ When foreign agent gets positive acknowledgement from home agent, then it will
make entry of this mobile host in its table and performs the data transmission.
ROUTING IN ADHOC NETWORKS
No fixed router (base station), router and host are on the same mobile machine
and network is a set of machines that communicate with their neighbors.
-Dynamic topology, validity of paths change spontaneously.
Possibilities when the routers are mobile:
1.
Military vehicles on battlefield.
– No infrastructure.
2.
A fleet of ships at sea.
– All moving all the time
3.
Emergency works at earthquake .
– The infrastructure destroyed.
4.
A gathering of people with notebook computers.
– In an area lacking 802.11.
ON DEMAND ROUTE DISCOVERY (AODV)
Graph of nodes (router+host). Connected by a line only if two nodes
communicate directly (not necessarily in each other’s range)
•(a) Range of A's broadcast.(b) After B and D have received A's broadcast.
•(c) After C, F, and G have received A's broadcast. (B and D reject each
other’s broadcast)(d) After E, H, and I have received A's broadcast.
Shaded nodes are new recipients. Arrows show possible reverse routes.
ON DEMAND ROUTE DISCOVERY (AODV)
ROUTE REQUEST packet processing (broadcast):
-if (Source address,Request ID) is new, record pair
- else discard packet and stop
-if a fresh route (assessed by Dest. Seq. #) to destination is known,
send back ROUTE REPLY
-else increment Hop count, broadcast ROUTE REQUEST , make an
entry in reverse route table and start a timer.
ON DEMAND ROUTE DISCOVERY (AODV)
Lifetime: how long the route is valid
Hop count: how far away the destination is
ROUTE REPLY packet processing at each intermediate node
on the way back (unicast):
-make an entry into forward routing table for a route to
destination, if no such route exists, route exists, but is old
(Dest. Seq. #), or route exists, but new route is shorter (Hop
Count)
-nodes not on the reverse path erase their reverse route table
entry after timer expires.
ON DEMAND ROUTE DISCOVERY (AODV)



In order to limit traffic due to many broadcasts
ROUTE REQUEST is sent in areas inside of increasingly wider
rings.
Enabled by setting time to live to 1 at first attempt and 2,3,... at
further attempts and decreasing time to live by one at each hop.
ROUTE MAINTENANCE
Discover which neighbors are no longer available by either periodically
polling them or when no reply comes back for a packet sent.
Purge destinations reached over that neighbor that is now unavailable
Inform those active neighbors (users) that reach any such destination
over that unavailable neighbor.
(a) D's routing table before G goes down.
(b) The graph after G has gone down.
NODE LOOKUP IN PEER-TO-PEER NETWORKS
A set of 32 node identifiers arranged in a circle. The shaded ones
correspond to actual machines. The arcs show the fingers from
nodes 1, 4, and 12. The labels on the arcs are the table indices
CONGESTION
When too many packets are present in the subnet, performance
degrades.This situation is called “congestion”.
Congestion mainly occurs due to Insufficient memory, slow
processors, low bandwidth lines.
CONGESTION PREVENTION POLICIES
Policies that affect congestion.
CONGESTION CONTROL IN VIRTUAL-CIRCUIT SUBNETS
In fig(a), there are two areas where congestion has taken place.
In fig(b), construct a new sink tree by just avoiding the congested
devices and find the new shortest routes for data transmission.
CONGESTION CONTROL IN DATAGRAM SUBNETS
Let us now turn to some approaches that can be used in datagram
subnets.
a) Warning Bit:The old DECNET architecture signaled the warning state by setting a
special bit in the packet’s header.
b) Choke Packets:The router sends a choke packet back to the source host,giving it the
destination found in the packet.
c) Hop-by-Hop Choke Packets(see fig below): Here it tells the congestion status to the
previous Hop and requests to reduce or stop the transmission.
d) Load Shedding: When none of the methods make the congestion disappear,routers
can bring out the heavy artillery:”load shedding”. Load shedding is a fancy way of
saying that when routers are being inundated by packets that they cannot handle,they
just throw them away.
e) Jitter control: For applications such as audio and video streaming,it does not matter
much if the packets take 20 msec or 30 msec to be delivered ,as long as the transit
time is constant.The variation in the packet arrival times is called “jitter”.The range
chosen must be feasible ,of course.It must take into account the speed_of_light
transit time and the minimum delay through the routers and perhaps leave a little
stack for some inevitable delays.
HOP-BY-HOP CHOKE PACKETS
(a) A choke packet
that affects
only the source.
(b) A choke packet
that affects
each hop it passes
through.
IP ADDRESS(IPV4)
Here it contains five classes of addresses i.e. class A,B,C,D,E.
IP address is divided into 4 segments, each 8 bit size i.e. 4 byte length
The Range of values for any class are as below.
Example: take class C- starts with 110.
Then minimum value for that address in binary is
110 00000.00000000.00000000.00000000
Which is equivalent to 192.0.0.0
Then maximum value for the above address in binary is
110 11111.11111111.11111111.11111111 Which is equivalent to 223. 255.255.255
THE IP PROTOCOL
The IPv4 (Internet Protocol) header.
IPV6 HEADER

It is the advancement to IPV4.

These are 16 byte length addresses.

The Header is simplified to 7 fields.

The Header fields are optional too.

It is a big advance in security.

More attention is given for the quality of service.
TRANSPORT LAYER - SERVICE PRIMITIVES
To allow users to access the transport service,the transport layer
must provide some operations to application programs,that is,a
trasport service interface. Each transport service has its own
interface.
There are 5 trasport primitives.
1.LISTEN
2.CONNECT
3.SEND
4.RECEIVE
5.DISCONNECT
THE PRIMITIVES FOR A SIMPLE TRANSPORT SERVICE
PRIMITIVE
PACKET SENT
MEANING
LISTEN
(NONE)
BLOCKS UNTIL SOME
PROCESS TRIES TO
CONNECT
CONNECT
CONNECTION REQ
ACTIVELY ATTEMPT
TO ESTABLISH A
CONNECTION
SEND
DATA
SEND INFORMATION
RECEIVE
(NONE)
BLOCK UNTIL A
DATA PACKET
ARRIVES
DISCONNECT
DISCONNECTION
REQ
THIS SIDE WANTS TO
RELEASE THE
CONNECTION
BERKELEY SOCKETS
These are another set of transport primitives.The socket primitives
used in Berkeley UNIX for TCP.These primitives are widely used
for internet programming.
There are 8 primitives.
1.SOCKET
2.BIND
3.LISTEN
4.ACCEPT
5.CONNECT
6.SEND
7.RECEIVE
8.CLOSE
THE SOCKET PRIMITIVES FOR TCP
1.SOCKET: It creates a new end point and allocates table space for it
with in the transport entity.
2.BIND: Network addresses are assigned using the BIND primitive.
3.LISTEN: It allocates space to queue incoming calls for the case that
several clients try to connect at the same time.
4.ACCEPT: To block waiting for an incoming connection,the server
executes an ACCEPT primitive.
5.CONNECT: This primitive blocks the caller and actively starts the
connection process.
6&7.SEND &RECEIVE: Both sides can now use SEND and RECV
to transmit and receive data over the full_dulpex connection.
8.CLOSE: When both sides have executed a CLOSE primitive,the
connection is released.
ELEMENTS OF TRANSPORT PROTOCOLS
The transport service is implemented by a “transport protocol”
used between the two transport entities.In some ways ,transport
protocolos resemble the data link protocols.
Both have to deal
with error control,sequencing,flow control among other issues.To
perform these operations transport layer have some elements.
Those elements are the following.
1.ADDRESSING.
2.CONNECTION ESTABLISHMENT
3.CONNECTION RELEASE
4.FLOW CONTROL AND BUFFERING
5.MULTIPLEXING
6.CRASH RECOVERY
1.ADDRESSING
When an application process wishes to set up a
connection to a remote application process,it must
specify which one to connect to.The method normally
used is to define transport addresses to which process
can listen for connection requests.
In the internet these end points are called PORTS.We
will use the generic term TSAP(transport service access
point).The analogous end points in the network layer are
then called NSAPs.
TSAP, NSAP & TRANSPORT CONNECTIONS
APPLICATION
TSAP1208
PROCESS
TRANSPORT
CONNECTION
SERVER 1
SERVER2
TSAP 1522
TSAP 1836
NSAP
NSAP
HOST 1
HOST 2
CONNECTION ESTABLISHMENT
The problem with establishing a connection occurs when the subnet can
lose, store, and duplicate packets.

How to deal with the problem of delayed duplicated and establish
connections in a reliable way ?

Method 1: use throwaway TSAP addresses.

Method 2:

Each connection is assigned a connection identifier (i.e., a sequence
number incremented for each connection established), chosen by the
initiating party, and put in each TPDU, including the one requesting the
connection.

Method 3:

Let be some small multiple of the true maximum packet lifetime. is
protocol-dependent. If we wait a time after a packet has been sent, we can
be sure that all traces of it are gone.
CONNECTION RELEASE
Releasing a connection is easier than establishing one.
Asymmetric release is abrupt and may result in data loss,
as shown in Fig. .Abrupt disconnection with loss of data.
CR
ACK
No data
Delivered
After a
Disconnect
request
DATA
DATA
DR
HOST1
HOST2
One way to avoid data loss is to use symmetric release,
in which each direction is released independently of the
other one.
 A more sophisticated release protocol is required to
avoid data loss.
 says:``I am done. Are you done too ?''
 If responds:``I am done too. Goodbye.''

FLOW CONTROL AND BUFFERING




How connections are managed while they are in use ?
For flow control, a sliding window is needed on each connection to
keep a fast transmitter from overrunning a slow receiver (the same
as the data link layer).
The sender should always buffer outgoing TPDUs until they are
acknowledged.
The receiver may not dedicate specific buffers to specific
connections. Instead, a single buffer pool may be maintained for all
connections. When a TPDU comes in, if there is a free buffer
available, the TPDU is accepted, otherwise it is discarded.


However, for high-bandwidth traffic (e.g., file transfers), it is better
if the receiver dedicate a full window of buffers, to allow the data to
flow at maximum speed.
How large the buffer size should be ?
TPDU1
TPDU2
TPDU3
CHAINED FIXED SIZE BUFFERS
TPDU4
CHAINED VARIABLE SIZED
BUFFERS
TPDU5
ONE LARGE SIZED CIRCULAR BUFFER
MULTIPLEXING



The reasons for multiplexing:
To share the price of a virtual circuit connection:
mapping multiple transport connections to a single
network connection (upward multiplexing).
To provide a high bandwidth: mapping a single
transport connection to multiple network connections
(downward multiplexing).
L
A
Y
E
R
S
TRANSPORT
ADDRESS
4
3
NETWORK
ADDRESS
2
ROUTER
LINES
1
UPWARD MULTIPLEXING
DOWNWARD MULTIPLEXING
CRASH RECOVERY
In case of a router crash, the two transport entities must
exchange information after the crash to determine which
TPDUs were received and which were not. The crash
can be recovered by retransmitting the lost ones.
 It is very difficulty to recover from a host crash.
 No matter how the sender and receiver are programmed,
there are always situations where the protocol fails to
recover properly.

STRATEGY BY
SENDING HOST
FIRST ACK,THEN WRITE
AC(W)
AWC C(AW)
FIRST WRITE,THEN
ACK
C(WA) WAC WC(A)
OK
DUP DUP
ALWAYS
RETRANSMIT
OK
DUP
OK
NEVER
RETRANSMIT
LOST
OK
LOST
LOST OK
OK
RETRANSMIT IN
S0
OK
DUP
LOST
LOST DUP
OK
RETRANSMIT IN
S1
LOST
OK
OK
OK
DUP
OK
STRATEGY USED BY RECEIVING HOST
OK=protocol functions currectly
DUP=protocol generates a duplicate message
LOST=protocol losses a message
DIFFERENT COMBINATIONS OF CLIENT AND SERVER STRATEGY
TRANSMISSION CONTROL PROTOCOL(TCP)
TCP is a connection oriented transport protocol designed
to work in conjunction with IP. TCP provides its user
(application layer) with the ability to transmit reliably a
byte stream to a destination and allows for multiplexing
multiple TCP connections within a transmitting or
receiving host computer.
TCP was specifically designed to provide a reliable endto-end byte stream over an unreliable internet work.
TCP SERVICE MODEL




TCP service is obtained by creating end points called “SOCKETS”.
Each socket consists of a socket number and port number.
A single daemon (called the inetd in Unix) waits on multiple ports
for an incoming connection.
Port numbers below 1024 are called “well_known ports” and are
reserved for
standard services.
SOME ASSIGNED PORTS
PORT
PROTOCOL
USE
21
FTP
FILE TRANSFER
23
TELNET
REMOTE LOGIN
25
SMTP
E-MAIL
69
TFTP
TRIVIAL FILE TRANSFER PROTOCOL
79
FINGER
LOOK UP INFORMATION ABOUT A USER
80
HTTP
WORLD WIDE WEB
110
POP-3
REMOTE E-MAIL ACCESS
119
NNTP
USE NET NEWS
TCP SEGMENT HEADER










Sequence number is used to mark the first byte.
acknowledgement number is the next byte that is expected. Note
that each byte is marked with sequence number.
Header Length tells how many 32-bit words are in the header.
Following the Header Length is an unused 6 bit field
URG is the urgent pointer (set to 1 if used). Indicates a byte offset
from the current sequence number at which urgent data are to be
found. Typically not used.
ACK bit is set to1 to indicate that the acknowledgment number is
valid. The value 0 means don’t use the acknowledgement number.
PSH indicates PUSHed data; i.e. a request to the receiver to deliver
the received data to the application and not buffer it.
RST is used to reset the connection.
SYN is used to establish connections. A connection request will
typically have SYN=1 and ACK=0.
connection reply carries SYN=1 and ACK=1

FIN is used to teardown a connection.

The window size tells how many bytes may be sent starting at the byte
acknowledged. Primarily this is used for flow control. Recall that TCP uses
sliding window protocol.

Checksum is used for error detection.

The options are typically used for some other information not included in
the standard header fields.

Such as options may include information on how much TCP payload a host
is willing to receive and how much to back track during retransmissions.
TCP CONNECTION ESTABLISHMENT
Connections are established in TCP by means of the three-way
handshake
“Three-way handshake”
.






synchronies both ends of a connection by enabling both sides to
agree upon initial sequence numbers.
Example-Host A starts a connection to host B.
A sends a packet with a random initial sequence number and SYN
bit set.
Host B receives the packet, creates its own packet with SN bit on, a
random sequence number and the ACK value set
Host A sends a reply packet in a similar fashion as B, without the
SYN bit.
TCP CONNECTION ESTABLISHMENT -NORMAL CASE
SYN(SEQ=X)
T
I
M
E
SYN(SEQ=Y,ACK=X+1)
(SEQ=X+1,ACK=Y+1)
HOST A
HOST B
TCP CONNECTION RELEASE
Although TCP connections are fullduplex,to understand how
connections are released it is best to think of them as a pair of
simplex connections. Each simplex connection is released
independently of its sibling,To release a connection,either party can
send a TCP segment as no more data to transmit. When the FIN is
acknowledged,that direction is shut down for new data.When both
directions have been shutdown,the connection is released.
TCP CONNECTION MANAGEMENT MODELING
The steps required to establish and release connections can be
represented using 11 states. In each state certain events are
legal.When a legal event happens,some action may be taken.If some
other event happens,an error is reported.
Each connection starts in the CLOSED state.It leaves that state
when it does either a passive open or an active open.
A connection is established and the state becomes
ESTABLISHED.Connection release can be initiated by either
side.When it is complete the state returns to CLOSED.
THE STATES USED IN TCP
STATES
DESCRIPTION
CLOSED
NO CONNECTION IS ACTIVE OR PENDING
LISTEN
THE SERVER IS WAITING FOR AN INCOMING CALL
SYN RCVD
A CONNECTION REQUEST HAS ARRIVED,WAIT FOR
ACK
SYN SENT
THE APPLICATION HAS STARTED TO OPEN
CONNECTION
ESTABLISHED
THE NORMAL DATA TRANSFER STATE
FIN WAIT 1
THE APPLICATION HAS SAID IT IS FINISHED
FIN WAIT 2
THE OTHER SIDE HAS AGREED TO RELEASE
TIMED WAIT
WAIT FOR ALL PACKETS TO DIE OFF
CLOSING
BOTH SIDES HAVE TRIES TO CLOSE SIMULTANIOUSLY
CLOSE WAIT
THE OTHER SIDE HAS INITIATED A RELEASE
LAST ACK
WAIT FOR ALL PACKETS TO DIE OFF
TCP TIMER MANAGEMENT





TCP uses multiple timers to do its work.The most imporant of these
is the “retransmission timer”.
􀂉 Problem: how long should be the timeout interval of the
retransmission timer?
􀂉 Solution: dynamically adjust the timeout interval based on
continuous measurements of network performance.
􀂉 Estimating round trip time (RTT):
Record time from segment sent to ACK receipt, denoted by M
RTT = a*RTT + (1-a)*M, typically a = 7/8.
TIMER MANAGMENT
TCP CONGESTION CONTROL
When the load offered to any network is more than it can
handle,congestion builds up.The internet is no exception.Now let us
look at the “Internet congestion control algorithm.” It uses a third
parameter,the “threshold”,initially 64 KB,in addition to the receiver
and congestion windows.When a timeout occurs,the threshold is set
to half of the current congestion window ,and the congestion
window is reset to one maximum segment.
TCP CONGESTION CONTROL
20
Congestion
avoidance
Congestion occurs
15
Congestion
window
Threshold
10
5
Fast recovery
would cause a
change here.
Slow
start
0
Round-trip times
151
WIRELESS TCP



•
TCP congestion control algorithm leads to poor performance on a
wireless network.
When a packet is lost on a wired network, the sender should slow
down.
When a packet is lost on a wireless network, the sender should
speed up.
How to make the correct decision on a timeout when the path from
sender to receiver is heterogeneous?
WIRELESS TCP
USER DATAGRAM PROTOCOL
It is also fast compared to the use of TCP, since there is no
connection establishment phase. Moreover, UDP is important since
RTP (Real time Transport Protocol) is supported over UDP.


UDP (User Datagram Protocol) is a simple OSI transport layer
protocol for client/server network applications based on Internet
Protocol (IP). UDP is the main alternative to TCP and one of the
oldest network protocols in existence, introduced in 1980.
UDP is often used in videoconferencing applications or computer
games specially tuned for real-time performance. To achieve higher
performance, the protocol allows individual packets to be dropped
(with no retries) and UDP packets to be received in a different order
than they were sent as dictated by the application.
UDP PACKET FORMAT
Figure 20: UDP Packet Format

UDP port numbers allow different applications to maintain their
own channels for data similar to TCP. UDP port headers are two
bytes long; therefore, valid UDP port numbers range from 0 to
65535.

The UDP datagram size is a count of the total number of bytes
contained in header and data sections. As the header length is a
fixed size, this field effectively tracks the length of the variablesized data portion (sometimes called payload). The size of
datagrams varies depending on the operating environment but has a
maximum of 65535 bytes.

UDP checksums protect message data from tampering. The
checksum value represents an encoding of the datagram data
calculated first by the sender and later by the receiver. Should an
individual datagram be tampered with or get corrupted during
transmission, the UDP protocol detects a checksum calculation
mismatch. In UDP, checksumming is optional as opposed to TCP
where checksums are mandatory.






UDP Datagrams
UDP network traffic is organized in the form of
datagrams. A datagram comprises one message unit.
The first eight (8) bytes of a datagram contain header
information and the remaining bytes contain message
data.
A UDP datagram header consists of four (4) fields of
two bytes each:
source port number
destination port number
datagram size
checksum
DOMAIN NAME SERVER (DNS)


DNS allows the use of 'friendly names': names that are
easier to read and memorize for humans.
It is able to do mappings between these Domain names
and IP-addresses. For instance:
◦ www.ietf.org => 132.151.1.19
◦ www.ns.nl => 195.108.47.18



Many applications use DNS for user convenience (e.g.
your Web-Browser).
DNS uses a (world-wide) distributed database based on
hierarchically structured domains.
DNS is specified in RFC 1034 and RFC 1035.
DNS Resource Record
The resource record will be in this format
Domain_name time_to_live class type value
Domain_name - it tells the domain name
time_to_live - the existance of record for 1day/hr/min
Class – it is generally IN(internet information)
Type – it denotes a Host/name server/mail server etc..
Value – it can be a number/domain name/Ascii string
Eg:
www.yahoo.com 86400 IN NS 130.37.16.112
www.gitam.edu
86400 IN MX 192.168.34.56
DNS
root
edu
com mil
mit.edu
org
int
net
ietf.org
gov
… nl … be … uk …
nasa.gov
www.ietf.org
domain
host
www.cs.utwente.nl
utwente.nl
cs.utwente.nl
demeter.cs.utwente.nl
Web page Retrieval
ISP server
DNS server
client
server
Yahoo
Web server
Web page Retrieval

In the above figure, a user (client) of a particular network makes a request
for a web page.

Then for eg: user has given www.yahoo.com in the address bar of
browser(internet explorer)in his client system.

Then soon HTTP comes into picture, takes the request of user and pass it
onto the local server, then from there the request will be passed onto the
ISP(eg - BSNL) server and from there it will be passed onto the DNS
server.

Then DNS will search for that address, if it is found then that request will
be passed onto the yahoo web server and the yahoo server will act on the
request, process it, respond back with the requested web page in the
same path.

If address is not found in DNS then it will come back with empty
response.
E-MAIL




E-mail means or system for transmitting messages electronically
(as between computers on a network)
messages sent and received electronically through an e-mail
system.
These messages usually consist of individual pieces of text which
you can send to another computer user even if the other user is not
logged in (i.e. using the computer) at the time you send your
message. The message can then be read at a later time. This
procedure is analogous to sending and receiving a letter.
When mail is received on a computer system, it is usually stored in
an electronic mailbox for the recipient to read later. Electronic
mailboxes are usually special files on a computer which can be
accessed using various commands. Each user normally has their
individual mailbox.
User agent 
A user agent is normally a program that accepts a variety of commands
for composing, receiving, and replying to messages.

Agent
• a.k.a. “mail reader”.

composing, editing, reading mail messages.

e.g., Eudora, Outlook, elm,Netscape Messenger.

outgoing, incoming messages stored on server.

COMMON EMAIL PROTOCOLS
Sending Mail:
◦ SMTP (Simple Mail Transport Protocol)
Servers include Sendmail, Postfix, Exim, Qmail
Receiving Mail
◦ IMAP (Internet Message Access Protocol)
◦ POP3 (Post Office Protocol v3)
Servers Include Dovecot, Courier, Qmail
SMTP - If ever configuring a mail server, try to separate these two types of services
 Outgoing Mail Server
◦ Should have some kind of authentication
◦ Queue messages when receiving server is unavailable
◦ Sends bounce message to sender after retrying delivery
 Incoming Mail Server (or MX server)
◦ Receives incoming messages from the Internet
◦ Delivers message to a mailbox
◦ (Should never send a bounce)

POP3 - Retrieves messages from a mail server.

Typically, messages are downloaded to your mail client, and deleted from the server.

Designed for use with dial-up connections when people were intermittently connected.

Listens on Port 110 (with Secure POP generally on port 995).

IMAP - Listens on port 143 (IMAP/SSL on port 993)

Mail stays on the server. Mail Client caches information locally

Extremely useful for multiple users, multiple machines, Webmail, etc

Searches are done on the server
WORLD WIDE WEB
Components of world wide web
HTTP
 HTML
 INTERNET
 BROWSER
 URL

COMPONENTS OF WWW
HTTP






HTTP – Hyper text transfer protocol
It is a software which is used across web to take the Request of a
client and pass it to the web server and come back with the
Response with some set of rules.
HTTP is a request/response standard as is typical in client-server
computing.
The client is an application (e.g. web browser, spider etc) on the
computer used by an end-user.
The server is an application running on the computer hosting the
web site.
The client which submits HTTP requests is also referred to as the
user agent. The responding server—which stores or creates
resources such as HTML files and images—may be called the origin
server.
HTML





HTML is a language for describing web pages.
HTML stands for Hyper Text Markup Language
HTML is not a programming language, it is a markup language
A markup language is a set of markup tags
HTML uses markup tags to describe web pages
INTERNET
It is a network of networks that
consists of millions of private
and public, academic, business,
and government networks of
local to global scope that are
linked by a broad array of
electronic
and
optical
networking technologies.
 The Internet carries a vast array
of information resources and
services, most notably the interlinked hypertext documents of
the World Wide Web (WWW)
and the infrastructure to
support.
 It
is
a
collection
of
interconnected documents and
other resources, linked by
hyperlinks and URLs.

BROWSER




A browser is an application program that provides a way to look at
and interact with all the information on the World Wide Web.
A browser converts HTML source code(markup tags) to beautiful
text, images, graphical motions etc.
Technically, a Web browser is a client program that uses HTTP
(Hypertext Transfer Protocol) to make requests of Web servers
throughout the Internet on behalf of the browser user.
The first Web browser with a graphical use interface was Mosaic,
which appeared in 1993. Many of the user interface features in
Mosaic went into Netscape Navigator. Microsoft followed with its
Internet Explorer (IE).
URL



A common way to get to a Web site is to enter the URL of its home
page file in your Web browser's address line. However, any file
within that Web site can also be specified with a URL.
The URL contains the name of the protocol to be used to access the
file resource, a domain name that identifies a specific computer on
the Internet, and a pathname, a hierarchical description that
specifies the location of a file in that computer.
A URL is a type of URI (Uniform Resource Identifier, formerly
called Universal Resource Identifier.)
WEB DOCUMENTS

The documents in the WWW can be grouped into different
categories: static, dynamic. The category is based on the time the
contents of the document are determined.

Static Documents
Dynamic Documents

STATIC DOCUMENT
DYNAMIC DOCUMENT
In a dynamic web page, there will be a provision for I/O. i.e. When
the web page is running, We will give some input to the web page,
correspondingly there will be a change in the output of the web page.
HTTP REQUEST AND RESPONSE
REQUEST AND RESPONSE MESSAGES
METHODS
STATUS CODES