CS6551 Computer Networks
CS6551 Computer Networks
Physical Layer
It coordinates the functions required to carry a bit stream over a physical medium.
Encoding—To be transmitted, bits must be encoded into signals, electrical or
optical. Data rate—It defines the transmission rate (number of bits sent per
second).
Physical topology—It defines how devices are connected (mesh, star, ring, bus or
hybrid) Transmission mode—Defines the direction of transmission between two
devices:
simplex, half-duplex, or full-duplex
Network Layer
It is responsible for source-to-destination delivery of a data unit called packet.
Transport Layer
Transport layer is responsible for process-to-process delivery of the entire message.
Port addressing—It includes a service-point or port address so that a process from
one computer communicates to a specific process on the other computer.
Segmentation and reassembly—A message is divided into transmittable segments,
each containing a sequence number. These numbers enable the transport layer to
reassemble the message correctly at the destination and to identify which were
lost/corrupt.
Connection control—Protocols can be either connectionless or connection-oriented.
Session Layer
It establishes, maintains, and synchronizes interaction among communicating
systems. Dialog control—It allows two systems to enter into a dialog and
communicate
Synchronization—Allows to add checkpoints to a stream of data. In case of a crash
data is retransmitted from the last checkpoint.
Binding—binds together the different streams that are part of a single application.
For example, audio and video stream are combined in a teleconferencing
application.
Presentation Layer
It is concerned with syntax and semantics of the information exchanged between
peers. Translation—Because different computers use different encoding systems,
the
presentation layer is responsible for interoperability between these encoding
methods.
Encryption—To carry sensitive information, a system ensures privacy by encrypting
the message before sending and decrypting at the receiver end.
Features
Internet architecture is a four layered model, also known as TCP/IP architecture.
It evolved out of a packet-switched network called ARPANET.
TCP/IP does not enforce strict layering, i.e., applications are free to bypass transport
layer and can directly use IP or any of the underlying networks.
IP layer serves as focal point in the architecture.
o Defines a common method for exchanging packets to any type of
network o Segregates host-to-host delivery from process-to-process
delivery.
For any protocol to be added to the architecture, it must also be accompanied by at
least one working implementation of the specification. Thus efficiency is ensured.
Layers
Subnetwork TCP/IP does not define any specific protocol for the lowest level.
o All standard and proprietary protocols such as Ethernet, FDDI, etc are
supported.
o The protocols are generally implemented by a combination of
hardware/software. IP The major protocol in TCP/IP is Internetworking Protocol (IP).
o It supports the interconnection of multiple networking technologies into a
logical
internetwork.
o It is an unreliable and connectionless protocol.
o IP sends data in packets called datagrams, each of which is transported
separately and independently.
o Other protocols supported in this layer are ARP, RARP, ICMP and IGMP.
Transport layer is responsible for delivery of a message from one process to another
process. The two protocols supported in this layer are:
o Transmission Control Protocol (TCP) for connection-oriented reliable
byte-
stream channel.
o User Datagram Protocol (UDP) for connectionless unreliable datagram
delivery channel.
Application supports a wide range of protocols such as FTP, TFTP, Telnet (remote
login), SMTP, etc., that enables the interoperation of popular applications.
Latency refers to how long it takes for the message to travel to the other end (delay).
It is a factor of propagation delay, transmission time and queuing delay
Latency = Propagation + Transmit + Queue
Speed of light propagation depnds on medium (vaccum/copper cable/optical fiber)
in which it travels and distance.
Propagation = Distance / SpeedOfLight
4. Explain error detection methods in detail with example (April/May 15, May/June
16)
Error detection is only to see if data is corrupted or not. A single-bit or burst error is
immaterial.
Sender adds k redundant bits for n data bits (k << n) to a frame, which is used by the
receiver to determine if errors are there or not.
Two-Dimensional Parity
Data is divided into seven byte segments.
Even parity is computed for all bytes (Vertical Redundancy Check).
Even parity is also calculated for each bit position across each of the bytes
(Longitudinal Redundancy Check).
Thus a parity byte for the entire frame, in addition to a parity bit for each byte is sent.
Receiver computes row and column parities for data bits. If all parity bits and parity
byte match, then the frame is accepted else discarded.
Two-dimensional parity catches all 1, 2 and 3-bit errors, and most 4-bit errors.
Internet Checksum
16-bit Internet checksum is widely used by UDP and not in link layer.
Sender
Given data is divided into 16-bit
words. Initial checksum value is 0.
All words are added using one's complement
arithmetic. Carries (if any) are wrapped and added to
the sum.
The complement of sum is known as checksum and is sent with data
Receiver
7 0111 0111
11 1011 1011
12 1100 1100
6 0110 0110
Initial Checksum 0000 Received Checksum 1001
Sum 100100 Sum 101101
Carry 10 Carry 10
Sum 0110 Sum 1111
Checksum 1001 New Checksum 0000
Sender Receiver
Analysis
Checksum is well-suited for software implementation and is not strong as CRC.
If value of one word is incremented and another word is decremented by the
same amount, the errors are not detected because sum and checksum remain the
same.
Cyclic Redundancy Check (CRC)
CRC developed by IBM uses the concept of finite fields.
A n bit message is represented as a polynomial of degree n - 1.
Message M(x) is represented as a polynomial by using the value of each bit as
7 4 3
coefficient for each term. For example, 10011001 is represented as x + x + x + 1
For calculating a CRC, sender and receiver agree on a divisor polynomial, C(x) of degree
k such that k n – 1
Sender
k
Multiply M(x) by x i.e., append k zeroes. Let the modified poly be
M'(x) Divide M'(x) by C(x) using XOR operation. The remainder has
k bits
Subtract the remainder from M'(x) using XOR, say T(x) and transmit T(x) with n + k bits.
Sender Receiver
Receiver
Scenarios
a) ACK is received before the timer expires. The sender sends the next frame.
b) The frame gets lost in transmission. Sender eventually times out and retransmits
frame.
c) ACK frame gets lost. The sender eventually times out and retransmits the frame.
d) The sender times out soon before ACK arrives and retransmits the frame.
Sequence number
In scenarios (c) and (d), since the receiver has acknowledged the received frame, it
treats the arriving frame as the next one. This leads to duplicate frames.
To address duplicate frames, the header for a stop-and-wait protocol includes a 1-bit
sequence number (0 or 1) based on modulo-2 arithmetic.
Drawbacks
It allows the sender to have only one outstanding frame on the link at a time
Inefficient if the channel has a large bandwidth and the round-trip delay is long.
The window defines range of sequence numbers for both sender and receiver to
deal with. The window position change (slides) due to transmission of frame and
acknowledgement
Sender
The sender assigns a sequence number SeqNum to each frame.
When an acknowledgment arrives, the sender moves LAR to the right, thereby
allowing the sender to transmit the subsequent frames.
The sender buffers up to SWS frames (for retransmission), until they are acknowledged.
Receiver
Similarly the receiver maintains three state variables:
o The receive window size RWS gives the upper bound on number of out-of-
order frames that the receiver is willing to accept.
o LAF denotes acceptable frame with the largest sequence number
o LFR denotes sequence number of the last frame received
o The invariant LAF LFR RWS is always maintained.
Lost/Corrupt frames
When frames are lost or corrupt, there is less data in transit, since the sender cannot
advance its window without an acknowledgement.
When an out-of-order frame arrives, receiver sends a negative acknowledgement
(NAK) forcing the sender to retransmit the expected frame. This is known as Selective
Repeat.
NAK speeds up retransmission of a frame before timer expires and improves
performance.
Sequence Number
m
Sequence numbers are modulo 2 where m is the size of sequence field and wrap
around. To avoid the issue of identifying sequence numbers of different sets, SWS is
defined as
SWS < (MaxSeqNum + 1) / 2
Advantages
It delivers frames reliably across an unreliable link using timeout and
acknowledgement. It preserves the order in which frames are transmitted. The
receiver ensures that it does
not pass a frame to the upper layer until all lower numbered frames are passed.
It supports flow control. The receiver through acknowledgement informs the sender
about how many frames it can still receive.
Byte-Counting Approach
An alternative to detect end-of-frame is to include number of bytes in the frame
body as part of the frame header.
Digital Data Communication Message Protocol (DDCMP) uses the count approach.
The Count field specifies how many bytes are contained in the frame’s body.
If Count field is corrupted, then it is known as framing error. The receiver comes to
know of it when it comes across the SYN field of the next frame.
BIT-ORIENTED PROTOCOL
The bit-oriented protocols such as High-Level Data Link Control (HDLC) view the
frame as a collection of bits. The frame format
CLOCK-BASED FRAMING
Synchronous Optical Network (SONET) standard is clock-based framing of fixed size.
SONET runs on the carrier's optical network and offers rich set of services such as
voice channel apart from data transfer.
Lowest speed SONET link STS-1 frame consist of 9 rows with 90 bytes each row.
First 2 bytes of the frame contain a special bit pattern indicating start of
frame. First 3 bytes of each row are overhead and rest containing data.
Bit stuffing is not employed here
Receiver looks for the special bit pattern every 810 bytes. If not, the frame is
discarded. Overhead bytes of a SONET frame are encoded using NRZ encoding. It
allows the
receiver to recover sender’s clock, the payload bytes are scrambled.
SONET supports the multiplexing of multiple low-speed links. The links range from
51.84 Mbps (STS-1) to 2488.32 Mbps (STS-48).
STS-1 frame is 810 bytes long with speed 51.84 Mbps, whereas STS-3 frame is 2430
bytes long at rate 155.52 Mbps.
STS-N signal can being used to multiplex N STS-1 frames. The payload from STS-1
frames are linked together to form a STS-N payload, denoted as STS-Nc.
Part A
Address Resolution Protocol is a function of the IP layer of the TCP/IP protocol stack. It is
necessary to translate a hosts software address (IP address) to a hardware address (MAC
address). Typically, a host uses ARP to determine the hardware address of another host.
The system maintains a table that maps IP addresses to MAC addresses of different
systems and routers on your network.
Part B
1. Explain IEEE 802.3 standard or Ethernet in detail. (April/May 15, Nov/Dec 15, Nov/Dec
16)
Ethernet was developed by DEC, Intel and Xerox. It was standardized as IEEE 802.3
Standard Ethernet is the most successful LAN technology with a data rate of 10 Mbps.
It has evolved to Fast Ethernet (100 Mbps), Gigabit Ethernet (1 Gbps) and Ten-Gigabit
Ethernet (10 Gbps).
Physical Properties
Hosts are tapped on to the Ethernet segment, each at least 2.5 m apart.
Transceiver is responsible for transmitting/receiving frames and collision detection.
Protocol logic is implemented in the adaptor.
Ethernet can support a maximum of 1024 hosts.
Maximum length of Ethernet is 2500 m.
Manchester encoding scheme is used with digital signaling at 10 Mbps.
Various forms of Standard Ethernet are 10Base5 (thick ethernet), 10Base2 (thin
ethernet), 10Base-T (twisted-pair) and 10Base-F (fiber-optic).
Ethernet segments can be connected using repeater or a hub.
If LSB of the first byte in a destination address is 0, then it is unicast else multicast.
In broadcast address, all bits are 1s (FF:FF:FF:FF:FF:FF).
Transmitter
Ethernet is a working example of CSMA/CD.
Minimum frame length of 64 bytes is required for operation of CSMA/CD.
Signals placed on the ethernet propagate in both directions and is broadcasted.
Ethernet is a 1-persistent protocol. When there is a frame to be sent:
o If link is idle, the frame is transmitted immediately.
o If link is busy, it waits till it becomes idle and then transmits immediately.
When two or more nodes transmit frame simultaneously, they collide. CSMA/CD works
as follows:
o Current transmission is aborted.
o A 96-bit runt frame (64-bit preamble + 32-bit jamming sequence) is sent.
o Other nodes refrain from transmission on receiving runt frame.
o Retransmission is attempted after a back-off procedure (k × 51.2µ s, k =
1,2,3,…). o After 16 attempts, retransmission is given up.
Receiver
Each frame transmitted on an Ethernet is received by every adaptor on that network.
A frame is accepted if destination address:
o matches its address,
o contains broadcast address,
o multicast address, if it's part of that multicast group.
Frames are discarded, if it is not meant for that host.
All frames are accepted, if configured in promiscuous mode.
Ethernet does not acknowledge received frames.
Advantages and disadvantages of Ethernet.
Easy to administer and maintain.
Relataively inexpensive.
Produces better output only when lightly loaded (< 200 hosts).
It is an unreliable medium.
2. Why the minimum frame length in Ethernet should be at least 64 bytes (512
bits)?(May/Jun 14)
Consider the following worst case scenario in which hosts A and B are at either ends.
Nodes communicate directly with each other if they are reachable (eg, A and C)
Communication between two nodes in different APs occurs via two APs (eg, A and E)
Whenever a mobile node joins a network, it selects an AP. This is called active
scanning. o Node sends a Probe frame.
o All APs within reach reply with a Probe Response frame.
CS6551-COMPUTER NETWORKS Page 19
o Node selects an AP and sends an Association Request frame. o
Corresponding AP replies with an Association Response frame
Access points periodically send a Beacon frame advertising its features such as
transmission rate. This is known as passive scanning.
Hidden / Exposed Node Problem
All nodes are not within the reach of each other.
Carrier sensing may fail because of hidden node and exposed node problem.
Hidden Node
Suppose node B is sending data to A. At the same time, node C also wishes to send to A.
Since node B is not within the range of C, C finds the medium free and transmits to A.
Frames from nodes B and C sent to A collide with each other.
Thus nodes B and C are hidden from each other.
Frame Format
Control―indicates frame type (RTS, CTS, ACK or data) and 1-bit ToDS / FromDS
Duration―specifies dura on of frametransmission.
Addresses―The four address fields depend on value of ToDS and FromDS subfields.
5. List and compare the features of any two wireless technologies. (May/Jun 16)
Bluetooth WiFi WiMax 3G
IEEE standard 802.15.1 802.11 802.16
Link length 10 m 100 m 10 km Tens of km
Bandwidth 2.1 Mbps (shared) 54 Mbps (shared) 70 Mbps 384 Kbps
Usage Link a peripheral Link a computer Link a building Link a cell phone
to a computer to a wired base to a wired tower to a wired tower
Datagram Delivery
Best-effort, connectionless service is used by IP to deliver a datagram
Packets can be lost or corrupted. It can also be delivered out of order.
IP provides neither error control nor flow control. It is an unreliable service.
Packet Format
IPv4 datagram is a variable-length packet consisting of two parts, header and data.
Header is 20–60 bytes long and contains information essential to routing and delivery
Minimum packet length is 20 bytes and maximum 65,535 bytes.
When different customers are connected to a service provider, prefixes can be assigned
such that they share a common, further aggregation can be achieved.
Consider an ISP providing internet connectivity to 8 customers. All customer prefix starts
with the same 21 bits.
Since all customers are reachable through the same provider network, a single route is
advertised by ISP with common 21-bit prefix that all customers share.
8. Detail the process of determining the physical address of a destination host (ARP).
Physical interface on a host or router understands physical addressing scheme of that
network only. Therefore IP address has to be translated to link-level address.
To send datagram to a host or router, both logical and physical address must be known.
Address Resolution Protocol (ARP) enables a source host to know the physical address
of another node when the logical address is known.
ARP relies on broadcast support from physical networks such as ethernet, token ring, etc.
ARP enables each host to build a mapping table between IP address and physical address.
Packet Format
0 8 16 31
Part B
1. Explain distance vector routing (or) routing information protocol (or) bellman-ford
algorithm (Nov/Dec 15, May/Jun 16, April/May 15)
Distance vector routing is distributed, i.e., algorithm is run on all nodes.
Each node knows the distance (cost) to each of its directly connected neighbors.
Nodes construct a vector (Destination, Cost, NextHop) and distributes to its neighbors.
Nodes compute routing table of minimum distance to every other node via NextHop
using information obtained from its neighbors.
Initial State
Each node updates its routing table by comparing with each of its neighbor's table
For each destination, Total Cost is computed as:
Total Cost = Cost (Node to Neighbor) + Cost (Neighbor to Destination)
If Total Cost < Cost then
Cost = Total Cost and NextHop = Neighbor
Node A learns from C's table to reach node D and from F's table to reach node G. o Total
Cost to reach node D via C = Cost (A to C) + Cost(C to D) = 1 + 1 = 2.
Since 2 < ∞, entry for destination D in A's table is changed to (D, 2, C) o
Total Cost to reach node G via F = Cost(A to F) + Cost(F to G) = 1 + 1 = 2
Since 2 < ∞, entry for destination G in A's table is changed to (G, 2, F)
Each node builds complete routing table after few exchanges amongst its neighbors.
Example Network
Routers advertise the cost of reaching networks. Cost of reaching each link is 1 hop. For
example, router C advertises to A that it can reach network 2, 3 at cost 0 (directly
connected), networks 5, 6 at cost 1 and network 4 at cost 2.
Each router updates cost and next hop for each network number.
Infinity is defined as 16, i.e., any route cannot have more than 15 hops. Therefore RIP
can be implemented on small-sized networks only.
Advertisements are sent every 30 seconds or in case of triggered update.
RIP packet format (version 2) contains (network address, distance) pairs.
Reliable Flooding
Each node sends its LSP out on each of its directly connected links.
When a node receives LSP of another node, checks if it has an LSP already for that node.
o If not, it stores and forwards the LSP on all other links except the incoming one. o
Else if the received LSP has a bigger sequence number, then it is stored and
forwarded. Older LSP for that node is discarded.
o Otherwise discard the received LSP, since it is not latest for that node.
Thus recent LSP of a node eventually reaches all nodes, i.e., reliable flooding.
For the given network, the process of building routing table for node D is tabulated
Step Confirmed Tentative Comment
1 (D, 0, –) D is moved to Confirmed list initially
6.
Part B
1. Write short notes on simple demultiplexer (or) UDP. (May/Jun 16)
User Datagram Protocol (UDP) is a connectionless, unreliable transport protocol.
Adds process-to-process communication to best-effort service provided by IP.
Simple demultiplexer allows multiple processes on each host to communicate.
Does not provide flow control / reliable / ordered delivery.
UDP is suitable for a process that requires simple request-response communication
with little concern for flow control/error control.
UDP Header
UDP packets are known as user datagrams It has a 8-byte header.
SrcPort and DstPort—Source and destination port number.
Length—total length of the user datagram, i.e., header plus data.
Checksum—computed over UDP header, data and pseudo header. Pseudo header
consist of IP fields (Protocol, SourceAddr, DestinationAddr) and UDP Length field.
UDP delivers message to the correct recipient process using checksum.
Ports
Processes (server/client) are identified by an abstract locator known as port.
Applications
Used for management processes such as SNMP.
Used for route updating protocols such as RIP.
It is a suitable transport protocol for multicasting.
UDP is suitable for a process with internal flow and error control mechanisms such
as Trivial File Transfer Protocol (TFTP).
2. List the features of TCP. Draw TCP segment format and explain its fields.(April/May 15,
Nov/Dec 16)
Transmission Control Protocol (TCP) offers connection-oriented, byte-stream service.
Guarantees reliable, in-order delivery of message.
TCP is a full-duplex protocol.
Like UDP, TCP provides process-to-process communication.
Has built-in congestion-control mechanism.
Ensures flow control, as sliding window forms heart of TCP operation.
Some well-known TCP ports are 21–FTP, 23– TELNET, 25–SMTP, 80–HTTP, etc.
Sending TCP buffers bytes in send buffer and transmits data unit as segments.
Segments are stored in receive buffer at the other end for application to read.
TCP’s demux key is < SrcPort, SrcIPAddr, DstPort, DstIPAddr >
Segment Format
Data unit exchanged between TCP peers are called segments.
3. Explain TCP connection management (or) TCP architecture (or) state transition
diagram.(Nov/Dec 15)
TCP is connection-oriented.
Client performs an active connection to establish connection with a passive
open server, prior to data communication
r Eventually connection is terminated after data transmission.
Connection Establishment
Connection establishment in TCP is a three-way handshaking.
o Client sends a SYN segment to the server containing its initial sequence number
(Flags = SYN, SequenceNum = x)
p Server responds with a segment that acknowledges client’s segment and specifies its
initial sequence number (Flags = SYN+ ACK, Ack = x + 1 SequenceNum = y).
q Finally, client responds with a segment that acknowledges server’s sequence
number (Flags = ACK, Ack = y + 1).
Connection Termination
Connection termination or teardown can be done in two ways
Three-way close—Both client and server close simultaneously.
o Client sends a FIN segment. The FIN segment can include last chunk of
data. o Server responds with FIN + ACK segment to inform its closing.
o Finally, client sends an ACK segment.
Half-Close—Client stops sending but receives data. This is known as half-
close. o Client half-closes the connection by sending a FIN segment.
o Server sends an ACK segment. Data transfer from client to the server stops.
Opening
s Server invokes a passive open on TCP, which causes TCP to move to LISTEN state
t Client does an active open, which causes its TCP to send a SYN segment to the
server and move to SYN_SENT state.
u When SYN segment arrives at the server, it moves to SYN_RCVD state and responds
with a SYN + ACK segment.
v Arrival of SYN + ACK segment causes the client to move to ESTABLISHED state and
sends an ACK to the server.
w When ACK arrives, the server finally moves to ESTABLISHED state.
Closing
Client / Server can independently close its half of the connection or simultaneously.
Transitions from ESTABLISHED to CLOSED state are:
One side closes: ESTABLISHED→FIN_WAIT_1→FIN_WAIT_2→TIME_WAIT→CLOSED
Other side closes: ESTABLISHED → CLOSE_WAIT → LAST_ACK → CLOSED
Simultaneous close: ESTABLISHED→FIN_WAIT_1→CLOSING→TIME_WAIT→ CLOSED
4. Explain TCP flow control (or) adaptive flow control (or) TCP Sliding window in
detail.(April/May 17)
TCP uses a variant of sliding window known as adaptive flow control
that: o guarantees reliable delivery of data
ensures ordered delivery of data
Destination host copies the DECbit onto ACK and sends it back to the source.
Source checks how many ACK has DECbit set for previous window packets.
Black line (actual throughput), color line (expected throughput) α and β threshold (shaded region)
1. Explain email message transfer using Simple Mail Transfer Protocol. (May/Jun 16,
April/May 15)
LOGIN, AUTHENTICATE, SELECT, EXAMINE, CLOSE, LOGOUT, FETCH, STORE, DELETE, etc.,
are some commands issued by the client.
Server responses are OK, NO (no permission), BAD (incorrect command), etc.
When user wishes to FETCH a message, server responds in MIME format.
Message attributes such as size are also exchanged.
Flags (Seen, Answered, Deleted, Recent) are used by client to report user actions.
Post Office Protocol (POP3)
POP is simple and limited in functionality. Current version is POP3.
POP client is installed on the recipient computer and POP server on the mail server.
Client opens a connection to the server using TCP on port 110.
Client sends username and password to access mailbox and to retrieve messages.
\POP works in two modes namely, delete and keep mode.
x In delete mode, mail is deleted from the mailbox after retrieval
In keep mode, mail after reading is kept in mailbox for later retrieval.
Request Message
Request Line
Request Header : Value
Body (optional)
Request Line
Request line contains fields:
Request type URL HTTP version
HTTP version specifies current version of the protocol i.e., 1.1
Request type specifies methods that operate on the URL. Some are:
Method Description
GET Retrieve the URL filename
HEAD Retrieve meta-information about the URL filename
PUT Store document under specified URL
POST Give information to server
TRACE Loopback request message (echoing).
DELETE Delete specified URL
CONNECT Used by proxies
Request Header
Headers defined for request message include:
Request Header Description
Authorization specifies what permissions the client has
From e-mail address of the user
Host host name of the server
If-modified-since server sends the URL if it is newer than specified date
User-agent name of the browser
For example, request message to retrieve file result.html on host annauniv.edu is:
GET result.html HTTP/1.1
Host : www.annauniv.edu
Body
Status Line
Status line contains three fields:
HTTP version Status code Status phrase.
3-digit status code classifies HTTP result based on leading digit (1xx–Informational,
2xx– Success, 3xx–Redirection, 4xx–Client error and 5xx–Server error).
Status phrase gives brief description about status code. Some are:
Code Phrase Description
100 Continue Initial request received, client to continue process
200 OK Request is successful
301 Moved permanently Requested URL is no longer in use
404 Not found Document not found
500 Internal server error An error such as a crash, at the server site
Response Header
Provides additional information to the client. Some are:
Response Header Description
Content-type specifies the MIME type
Expires date and time up to which the document is valid
Last-modified date and time when the document was last updated
Location specifies location of the created or moved document
For example, response for a moved page is:
HTTP/1.1 301 Moved Permanently
Location : http://www.princeton.edu/cs/index.html.
TCP Connection
HTTP 1.1 uses persistent connection, i.e., client and server exchange multiple messages
over the same TCP connection. The advantages are:
o Eliminates connection setup overhead and additional load on the server.
o Congestion window is very efficient by avoiding slow start phase for each
page. o Server closes the connection on timeout.
Caching
Caching enables the client to retrieve document faster and reduces load on the
server. Caching is implemented at Proxy server, ISP router and Browser.
Server sets expiration date (Expires header) for each page, beyond which it is not cached.
Cache document is returned to client only if it is an updated copy by checking against If-
Modified-Since header.
If cache document is out-of-date, then request is forwarded to the server and response is
cached along the way.
A web page will not be cached if no-cache directive is specified.
Define Uniform Resource Identifiers (URI).
URI is a string that identifies resources such as document, image, service, etc. It is of the
form scheme:scheme-specific
Hierarchy of CS Nameserver
Resource record is a 5-tuple with fields <Name, Value, Type, Class, TTL>
p Name—specifies the domain/zone name. It is used as primary search
key. o Type—indicates what kind of record it is. Commonly used types are:
NS Value field contains address of a name server
MX Value field contains a mail server.
A Value field contains an IP address
CNAME Canonical name or alias name for that host
Class field is always IN for internet domain names.
TTL field gives an indication of how long the resource record is valid.
Resource Records
Root name server contain a NS record for each TLD name server and an A record that
translates TLD into corresponding IP address.
edu, a3.nstld.com, NS, IN >
a3.nstld.com, 192.5.6.32, A, IN >
…
Each TLD name server has a NS record for each zone-level name server and an A record
that translates zone name into corresponding IP address.
Finally local NS resends the query to cs.princeton.edu and gets the A record
(128.112.155.166) for penguins.cs.princeton.edu
Local NS caches the response and sends it to the client. Client uses the IP address to
communicate with the server.
MIB Groups
Each agent has its own MIB, which is a collection of objects to be managed.
SNMP objects are located under mib-2 object, identifiers beginning with
1.3.6.1.2.1 MIB-II (version 2) classifies objects under ten groups. Some are:
sys (system information about the node such as name, location, lifetime, etc.
if (interface information about interfaces attached to the node such as physical
address, packets sent and received on each interface, etc.
at (address translation information about ARP table
MIB variables
MIB variables are of two types namely simple and table.
Simple variables are accessed using group-id (1.3.6.1.2.1.7) followed by variable-id and
0 (instance suffix). For example, udpInDatagrams is accessed as 1.3.6.1.2.1.7.1.0
Tables are ordered as column-row rules, i.e., column by column from top to bottom. Only
leaf elements are accessible in a table type.
UDP variables
Protocol Data Unit (PDU)
SNMP is request/reply protocol that supports various operations using
PDUs: o GET used by manager to retrieve value of agent variable.
o GET-NEXT used by manager to retrieve next entries in an agent's table.
o SET used by manager to set value of an agent's variable.
o RESPONSE sent from an agent to manager in response to GET/GET-NEXT that
contains value of variables.
o TRAP sent from agent to the manager to report an event such as reboot.
When administrator selects a piece of information, manager puts identifier for the MIB
variable and sends request message to the agent.
Agent maps the identifier, retrieves value of the variable, and sends encoded value back
to the manager.