Network Architecture: Requirements of Computer Network
Network Architecture: Requirements of Computer Network
UNIT - I
LAYERING AND NETWORK ARCHITECTURE
Network Architecture
Requirements of computer network,
– Connectivity
– Cost effective resource sharing
– Support for common services
– Reliability
Network Architecture – It is a framework that guides the design and implementation of networks.
Widely used architectures,
– OSI architecture
– Internet architecture (TCP/IP Model)
Layering and Protocols
– Services offered by the underlying hardware, and then add a sequence of layers, each
providing a higher level of services.
– These services are implemented in terms of services provided by the lower layers.
Features of Layering,
– Decomposes the problem of building a network into more manageable components.
Each layer solves one part of the problem
– Modular design
Easy to add a new service
Only need to modify the functionality at one layer
The above layered system having two layers of abstraction sandwiched between the
underlying hardware and the application program.
Protocol Graph
Protocol Graph
Protocol Specification
– Combination of prose, pseudo code, state transition diagrams, packet formats and abstract
notations.
Encapsulation
– when application program sends a message to its peer by passing the message to protocol,
Protocol must communicate control information to its peers by attaching a
“Header” to the message.
Header – small piece of information used among peers to communicate each other.
Format of the header is defined by protocol specification.
Payload – data being transmitted by the application
– Encapsulation is adding an applications data into the new message created by the protocol.
– When a message arrives at the destination host, it is processed in the reverse order.
Removes the header attached by its peer, takes the action indicated by that header
and passes the body of the message to the application.
High level messages are encapsulated into the low level messages
OSI ARCHITECTURE
OSI – Open Systems Interconnection
Physical Layer
The physical layer defines the characteristics of the interface between the devices and the
transmission medium. It also defines the type of transmission medium.
Representation of bits - defines the type of encoding (how 0’s and 1’s are changed to signals).
Transmission rate (Number of bits sent per second) is defines by the physical layer.
Synchronization – sender and receiver clock is synchronized by physical layer.
It defines how the machines are connected to make a network.
Network Layer
Responsible for the source to destination delivery of the packets across multiple networks. If
two systems are connected to the same link, there is usually no need for a network layer.
Logical Addressing - If a packet passes the network boundary, we need to distinguish the
source and destination systems. The network layer adds a header to the packet that includes the
logical addresses of the sender and receiver.
Routing - When independent networks or links are connected to create internetworks (network
of networks) or a large network, the connecting devices (called routers or switches) route or
switch the packets to their final destination. One of the functions of the network layer is to
provide this mechanism.
Session Layer
Provides a name space that is used to tie together the potentially different transport streams that
are part of a single application.
Presentation Layer
Concerned with syntax and semantic information's exchanged between two systems.
Responsible for Encryption and compression.
Application Layer
Enable the user (human or software) to access the network.
Provides the user interface for services such as E-Mail, File transfer, etc…
INTERNET ARCHITECTURE
– Also called as “TCP/IP architecture”.
Internet architecture
– The “Sub Network” layer shown here is sometimes referred to as “Network Layer” or “link
layer” or “Host to Network Layer”.
Host to Network layer
Wide variety of protocols denoted NET1, NET2… NETn implemented by a combination of
hardware (eg. Network Adapter) and software (Eg. Network Device Driver).
Eg. Ethernet, FDDI
Internet Layer
Consist of a single protocol called “Internet Protocol” (IP) that supports the interconnection
of multiple networking technologies into a single, logical network.
Supporting protocols,
ARP (Address Resolution Protocol)
– Associates the logical address (IP) with a physical address.
RARP (Reverse Address Resolution Protocol)
– Allows host to discover the logical address when it knows the physical address.
ICMP (Internet Control Message Protocol)
– Querying and Error reporting protocol.
IGMP (Internet Group Message Protocol)
– Facilitate the simultaneous transmission of a message to a multiple recipients.
Transport Layer
Contains two main end to end protocols,
TCP – provides a reliable byte stream channel (Connection oriented)
UDP – provides a unreliable datagram channel (Connectionless)
Application Layer
Provides wide range of protocols for different applications.
Protocols provided by this layer are,
FTP (File Transport Protocol), TFTP (Trivial File Transport Protocol)
SMTP (Simple Message Transfer Protocol)
Telnet (Remote Login)
HTTP (Hyper Text Transfer Protocol), etc…
PHYSICAL LINKS
In lower level, a network can consist of two or more computers directly connected by some
physical medium, such as coaxial, twisted pair or an optical cable.
This physical medium is called as links.
Transmission medium is also defined as, a medium that can carry information from a source to a
destination.
Guided Media
– Provide a conduit from one device to another device.
– Coaxial
– Twisted Pair
– Fiber optic
– Here coaxial and twisted pair cables accept and transport signal in the form of electrical
signals.
– Fiber optic cable accepts and transport signals in the form of light.
i. Twisted Pair
– Consist of two conductors (metallic), each with its own plastic insulation.
Applications:
Telephone Network
Local Area Network (10BaseT, 100BaseT)
ii. Coaxial Cable
– Carries signals of higher frequencies than twisted pair.
– Coaxial has central core conductor of solid copper wire enclosed in an insulating sheath.
– The outer metallic wrapping serves both as a shield against noise and as the second
conductor, which completes the circuit.
– This outer conductor is also enclosed in an insulating sheath.
Category Use
RG-59 Cable TV
– Made of glass or plastic; signals are transmitted as light pulses from an LED or laser
– Light is also a form of electromagnetic energy
– Speed depends on density of medium it is traveling through; fastest when in a vacuum,
186,000 miles/second
– Propagation Modes,
Single Mode
Multi-Mode
Single Mode:
– Made from doped silica
– Very high bandwidth
– Very small core diameter
– Allows only one mode of propagation
Unguided Media
– Wireless medium
Multiple Access
Protocols
FRAMING
Framing:
Data link layer translates a stream of bits from the physical layer into the larger aggregate (or) discrete
unit called frames.
The hardware present in the data link layer is network adaptor. It enables the nodes to exchange frames.
When node A wishes to transmit a frame to node B, it tells its adaptor to transmit a frame from the
node’s memory. This results in a sequence of bits being sent over the link.
The adaptor on node B then collects together the sequence of bits arriving on the link and deposits the
corresponding frame in B’s memory.
Recognizing exactly what set of bits constitute a frame
i.e., determining where the frame begins and ends is the issue faced by the adaptor
Framing Protocols
Sentinel Approach
BISYNC
HDLC
PPP
DDCMP
-01111110
Address, control - default values
o Address – 11111111
o Control – 11000000
Protocol - Used for demultiplexing. It identifies the high level protocol such as IP /
IPX.
Payload – Frame data (default size is 1500 bytes)
Checksum - for error detection
Code – defines the type of the LCP packet. There are 11 types of LCP packet is
available.
• These 11 types of LCP packets are categorized into three category.
First category – comprising the first four packet types (o×01 - o×04)
used for link configuration during link establishment.
Second Category – comprising packet types o×05, o×06 for the
termination of the link.
Third Category – comprising last five packet types (o×07 - o×11)
used for link monitoring and debugging.
Id – value that matches the request and reply.
Length – defines the total length of the LCP packet.
Information – optional information.
AP (Authentication Protocol)
PPP is mainly designed for dial up links, where the user identity verification is
necessary
Authentication – validating the identity of a user.
PPP uses two authentication protocols,
PAP (Password Authentication Protocol)
CHAP (Challenge Handshake Authentication Protocol)
NCP (Network Control Protocol)
IPCP (Internet Protocol Control Protocol) is used as a network control protocol.
HDLC
Beginning and Ending Sequence – denotes both the starting & end of the frame with the
bit sequence 01111110.
- This sequence is also transmitted during any times that the link is idle, so that
the sender and receiver can keep their clock synchronization.
Bit Stuffing
Sending side:
On the sending side, any time five consecutive 1’s have been transmitted
from the body of the message (i.e. excluding when the sender is trying to
send the distinguished 01111110 sequence)
The sender inserts ‘0’ before transmitting the next bit.
Receiving side:
On the receiving side,
Five consecutive 1’s
Next bit 0 - Stuffed, so discard it
1 - Either End of the frame marker (or)
Error has been introduced in the bit stream
Look at the next bit
If 0 ( 01111110 ) End of the frame marker
If 1 ( 01111111 ) Error, discard the whole frame
The receiver needs to wait for next 01111110 before it
can start receiving again.
ERROR CONTROL
TYPES OF ERROR
Whenever bits flow from one point to another, they are subject to unpredictable changes because of
interference and thermal noise.
Types of Errors
Burst Error
The term burst error means that 2 or more bits in the data unit have changed from 1 to 0 or from 0
to 1.
ERROR CONTROL
CRC
It is based on “simple” (one-dimensional) parity, which usually involves adding one extra bit to
a 7-bit code to balance the number of 1s in the byte. For example,
Odd parity sets the eighth bit to 1 if needed to give an odd number of 1’s in the byte.
Even parity sets the eighth bit to 1 if needed to give an even number of 1’s in the byte.
Two-dimensional parity does a similar calculation for each bit position across each of the bytes
contained in the frame. This results in an extra parity byte for the entire frame, in addition to a parity bit
for each byte. Two-dimensional parity catches all 1-, 2-, and 3-bit errors and most 4-bit errors
Internet Checksum
Add up all the words that are transmitted and then transmit the result of that sum. The result is
called the checksum. The receiver performs the same calculation on the received data and compares the
result with the received checksum. If any transmitted data, including the checksum itself, is corrupted,
then the results will not match, so the receiver knows that an error occurred.
Consider the data being checksummed as a sequence of 16-bit integers.
Add them together using 16-bit ones complement arithmetic and then take the ones complement
of the result. That 16-bit number is the checksum.
In ones complement arithmetic, a negative integer −x is represented as the complement of x;
– Each bit of x is inverted.
When adding numbers in ones complement arithmetic, a carryout from the most significant bit needs to
be added to the result (Wrapping).
Sender Side:
The message is divided into 16-bit words.
The value of the checksum word is set to 0.
All words including the checksum are added using one's complement addition.
The sum is complemented and becomes the checksum.
The checksum is sent with the data.
Receiver Side:
The message (including checksum) is divided into 16-bit words.
All words are added using one's complement addition.
The sum is complemented and becomes the new checksum.
– If the value of checksum is 0, the message is accepted; otherwise, it is rejected.
Example:
Frame Data: 01101101 10010011 01101101
n=8
Sender Side:
Calculating Checksum,
01101101
10010011
01101101
---------------
01101110 --------1’s Compliment-- 10010001
---------------
Checksum = 10010001
So data transmitted over the link is: 01101101 10010011 01101101 10010001
Sender Side:
– Message M(x) has k bits; the code word P(x) has n bits.
– The size of the message M(x) is augmented by adding (n – k) 0’s to the right-hand side.
This message is called as zero extended message. i.e., T(x) = M(x) + E(x).
T(x) – Augmented Message
– Sender uses (n-k+1) size divisor C(x) to divide (Modulo 2 division) the augmented data
T(x).
i.e., sender computes T(x) / C(x)
– The remainder will be added to the augmented message T(x). The result of n - bits are
called as code word P(x).
Receiver side:
– Receiver divide the received message P(x) with the same divisor C(x)
If the remainder is zero – No error in the message (Accepted)
Otherwise, error in the message (Rejected)
Example:
Sender:
M(x) = x7+x4+x3+xi.e., 10011010
C(x) = x3+x2+1 i.e., 1101
Error detection,
LINK LEVEL FLOW CONTROL:
Flow Control – specifies how much data the sender can transmit before receiving permission or
acknowledgement to continue from the receiver.
Flow Control
o When an acknowledgement received, the sender moves LAR to the right, thereby
allowing the sender to transmit another frame.
o Sender has to buffer the frame up to SWS frames for retransmission purpose.
Receiver maintains three variables,
o Receiver Window Size (RWS) – upper bound on the number of out of order frames
that the receiver is willing to accept.
o Largest Acceptable Frame (LAF) – frame number of the largest acceptable frame.
o Last Frame Received (LFR) – frame number of the last frame received.
ARQ
Go – Back - N Selective
ARQ Repeat ARQ
Stop and Wait ARQ
Extension of stop and wait protocol.
Receiver sends an ACK if frame is correctly received. Sender waits for an ACK before
transmitting the next frame.
Retransmission,
- If sender does not receive anything before timeout period expires (due to frame
lost or ACK lost), it retransmits the frame.
- Suppose if sender receives the NAK (error in frame or damaged frame), it
retransmits that error frame.
For ACK / NAK loss, Go – Back – N is used. i.e., selective repeat work similar to Go
– Back – N.