NS QUESTIONS
NS QUESTIONS
NS QUESTIONS
• 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.
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.
3. Explain the functioning of wireless LAN or IEEE 802.11 in detail (April/May 15,
Nov/dec15, April/May17)
Wireless LAN or WLAN or Wi-Fi is designed for use in a limited area (office, campus,
building, etc). It is standardized as IEEE 802.11
Physical Properties
WLAN runs over free space based on FHSS (frequency hopping over 79 1-MHz-wide
frequency bandwidth) and DSSS (11-bit chipping sequence) with data rate of 2 Mbps.
Variants of 802.11 are:
o 802.11b operates in 2.4-GHz frequency band with data rate of 11 Mbps.
802.11a/g runs in 5-GHz band using orthogonal FDM (OFDM) at 54 Mbps o
802.11n uses multiple antennas (multiple input/output) and offers up to
100
Mbps
Optimal bit rate for transmission is based on signal-to-noise ratio (SNR) in environment.
Distribution System
In wireless network, nodes are mobile and the set of reachable nodes change with
time. Mobile nodes are connected to a wired network infrastructure called access
points (AP) Access points are connected to each other by a distribution system (DS)
such as Ethernet.
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.
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
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 70 Mbps 384 Kbps
(shared)
Usage Link a peripheral Link a computer Link a building Link a cell phone
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.
In such case, DHCP relay agent receives broadcast message. o DHCP relay stores
relay address in giaddr before sending it to DHCP server. o DHCP server response is sent
to relay agent, which is sent back to the client.
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)
Segment Format
Data unit exchanged between TCP peers are called segments.
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 halfclose. 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.
q After sending all data, server sends FIN segment to client, which is
acknowledged by the client.
When load exceeds capacity, queues become full and the routers discard some
packets and throughput declines sharply.
TCP uses mechanisms to control or avoid congestion.
Slow start provides exponential growth and is designed to avoid bursty nature of
TCP.
TCP loses more packets initially, because it attempts to learn the available
bandwidth quickly through exponential increase.
If connection goes dead while waiting for timer to expire, slow start phase is used
only up to current value of CongestionWindow.
Fast Retransmit and Fast Recovery
TCP timeouts led to long periods of time during which the connection went dead
while waiting for a timer to expire.
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.
If less than 50% of ACK have DECbit set, then source increases its congestion
window by 1 packet, otherwise decreases the congestion window by 87.5%.
Increase by 1, decrease by 0.875 rule was based on AIMD for stabilization.
Random Early Detection (RED)
Router notifies the source that congestion is likely to occur by dropping packets
before its buffer space exhausts (early drop), rather than later due to congestion.
Source is implicitly notified by timeout or duplicate ACK.
Each incoming packet is dropped with a probability known as drop probability
when the queue length exceeds drop level. This is called early random drop.
Average queue length is computed as a weighted running average: AvgLen = (1 −
Weight) × AvgLen + Weight × SampleLen
Queue length thresholds defined by RED are MinThreshold and MaxThreshold.
When a packet arrives, gateway compares current AvgLen with these thresholds
and decides whether to queue or drop the packet as follows:
if
Queue the packet
if MinThreshold < AvgLen < MaxThreshold
Calculate probability P
Drop the arriving packet with probability P
if AvgLen ≥ MaxThreshold Drop
the arriving packet
AvgLen ≤ MinThreshold
When AvgLen exceeds MinThreshold, a small percentage of packets are dropped. It
forces TCP to reduce CongestionWindow, which in turn reduces the rate at which
packets arrive at the router. Thus, AvgLen decreases and congestion is avoided.
Drop probability P is computed as a function of AvgLen.
P = MaxP × (AvgLen − MinThreshold) / (MaxThreshold − MinThreshold)
Drop probability increases slowly when AvgLen is between two thresholds. On
reaching MaxP at the upper threshold, it jumps to unity.
MaxThreshold value is twice of MinThreshold due to bursty Internet traffic.
RED drops packets randomly. The probability that a flow’s packet being dropped
is proportional to its share of the bandwidth.
A flow’s BaseRTT is set to RTT of a packet when the flow is not congested. BaseRTT =
MIN(RTTs)
Expected throughput without overflowing is:
Black line (actual throughput), color line (expected throughput) α and β threshold (shaded region)
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
Response Message
Status Line
Response Header : Value
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 Requested URL is no longer in use
permanently
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
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 IfModified-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
Scheme identifies a resource type, such as mailto for mail address, file for file
name, etc. and scheme-specific is a resource identifier. Example is
mailto:[email protected] URI identifies a resource, whereas URL is used
to locate a resource.
Explain the role of DNS on a computer network (or) domain name resolution process.
(Nov/Dec 16, April/May 17)
DNS maps user-friendly domain names to router-friendly IP address, i.e., middle-ware.
Domain Naming System (DNS) includes:
namespace to define domain names without any collision o
binds domain names to IP address o name server to lookup
IP address for a given name.
Domain Hierarchy
DNS implements hierarchical name space for domains in the Internet.
Domain names are processed from right to left and use periods (.) as separator. DNS
hierarchy is represented as a tree, where each node is a domain and leaves are hosts.
Six top level domains (TLD) are .edu .com .gov .mil .org and .net
TLD also exists for each country, e.g., .fr (france) .in (india), etc.
Domain hierarchy is partitioned into zones. Each zone acts as central authority for that
part of the sub-tree. For example, in .edu domain, princeton is a zone.
Zones can be further sub-divided such as CS department under Princeton university.
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.
Resource records for TLD edu name server looks like:
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.