UNIT 4,5 CN-1
UNIT 4,5 CN-1
UNIT 4,5 CN-1
outing and protocols: Unicast routing - Distance Vector Routing - RIP - Link State
R
Routing – OSPF– Path-vector routing - BGP - Multicast Routing: DVMRP – PIM
4.1Routing
● A Router is a process of selecting path along which the data can be transferred from
source to the destination. Routing is performed by a special device known as a router.
● A Router works at the network layer in the OSI model and internet layer in
TCP/IP model
● A router is a networking device that forwards the packet based on the information
available in the packet header and forwarding table.
● The routing algorithms are used for routing the packets. The routing algorithm is
nothing but a software responsible for deciding the optimal path through which
packet can be transmitted.
● The routing protocols use the metric to determine the best path for the packet
delivery. The metric is the standard of measurement such as hop count, bandwidth,
delay, current load on the path, etc. used by the routing algorithm to determine the
optimal path to the destination.
● The routing algorithm initializes and maintains the routing table for the process
of path determination.
Types of Routing
Routing can be classified into three categories:
Static Routing
●
● Default Routing
● Dynamic Routing
Static Routing
S
● tatic Routing is also known as Nonadaptive Routing.
● It is a technique in which the administrator manually adds the routes in a
routing table.
● A Router can send the packets for the destination along the route defined by
the administrator.
● In this technique, routing decisions are not made based on the condition or topology
of the networks
● N o Overhead:It has ho overhead on the CPU usage ofthe router. Therefore, the
cheaper router can be used to obtain static routing.
● Bandwidth:It has not bandwidth usage between therouters.
● Security:It provides security as the system administratoris allowed only to
have control over the routing to a particular network.
● F or a large network, it becomes a very difficult task to add each route manually to
the routing table.
● The system administrator should have a good knowledge of a topology as he has
to add each route manually.
Default Routing
● D efault Routing is a technique in which a router is configured to send all the
packets to the same hop device, and it doesn't matter whether it belongs to a
particular network or not. A Packet is transmitted to the device for which it is
configured in default routing.
● Default Routing is used when networks deal with the single exit point.
● It is also useful when the bulk of transmission networks have to transmit the data
to the same hp device.
● When a specific route is mentioned in the routing table, the router will choose the
specific route rather than the default route. The default route is chosen only when
a specific route is not mentioned in the routing table.
Dynamic Routing
● A ll the routers must have the same dynamic routing protocol in order to exchange
the routes.
● If the router discovers any change in the condition or topology, then router broadcast
this information to all other routers.
I t is easier to configure.
●
● It is more effective in selecting the best route in response to the changes in the
condition or topology.
4.2Unicast routing
he routing protocol is used to calculate the best route from source to destination based on
T
the distance or hops as its primary metric to define an optimal path. The distance vector
refers to the distance to the neighbor nodes, where routing defines the routes to the
established node.
Step-01:
Each router prepares its routing table. By their local knowledge. each router knows about-
A
● ll the routers present in the network
● Distance to its neighboring routers
tep-02:
S
Each router exchanges its distance vector with its neighboring routers.
● Each router prepares a new routing table using the distance vectors it has
obtained from its neighbors.
● This step is repeated for (n-2) times if there are n routers in the network.
● After this, routing tables converge / become stable.
I n the network shown below, there are three routers, A, B, and C, with the following weights
− AB =2, BC =3 and CA =5.
tep1−InthisDVRnetwork,eachroutersharesitsroutingtablewitheveryneighbor.For
S
example,AwillshareitsroutingtablewithneighborsBandCandneighborsBandCwill
share their routing table with A.
orm A
F
A
B
C
A 0 2 3
B
C
orm B
F A B C
A
B 2 0 1
C
orm C
F A B C
A
B
C 3 1 0
tep2−Ifthepathviaaneighborhasalowercost,thentherouterupdatesitslocaltable
S
toforwardpacketstotheneighbor.Inthistable,therouterupdatesthelowercostforAand
C by updating the new weight from 4 to 3 in router A and from 4 to 3 in router C.
orm A
F
A
B
C
A 0 2 3
B
C
orm B
F A B C
A
B 2 0 1
C
orm C
F A B C
A
B
C 3 1 0
tep 3− The final updated routing table with lowercost distance vector routing protocol for
S
all routers A, B, and C is given below –
Router A
Form A A B C
Router B
Form B A B C
RIP Protocol
IP stands for Routing Information Protocol. RIP is an intra-domain routing protocol used
R
within an autonomous system. Here, intra-domain means routing the packets in a defined
domain, for example, web browsing within an institutional area. To understand the RIP
protocol, our main focus is to know the structure of the packet, how many fields it contains,
and how these fields determine the routing table.
Before understanding the structure of the packet, we first look at the following points:
● R IPisbasedonthedistancevector-basedstrategy,soweconsidertheentirestructure
as a graph where nodes are the routers, and the links are the networks.
● In a routing table, the first column is the destination, or we can say that it is a
network address.
● The cost metric is the number of hops to reach the destination. The number of
hops available in a network would be the cost. The hop count is the number of
networks required to reach the destination.
● In RIP, infinity is defined as 16, which means that the RIP is useful for smaller
networks or small autonomous systems. The maximum number of hops that RIP
can contain is 15 hops, i.e., it should not have more than 15 hops as 16 is infinity.
● The next column contains the address of the router to which the packet is to be sent
to reach the destination.
When the router sends the packet to the network segment, then it is counted as a single hop.
I n the above figure, when the router 1 forwards the packet to the router 2 then it will count as
1 hop count. Similarly, when the router 2 forwards the packet to the router 3 then it will count
a s 2 hop count, and when the router 3 forwards the packet to router 4, it will count as 3 hop
count. In the same way,RIPcan support maximum upto15 hops, which means that the 16
routers can be configured in a RIP.
ow, we look at the structure of the RIP message format. The message format is used to
N
share information among different routers. The RIP contains the following fields in a
message:
● C ommand: It is an 8-bit field that is used for request or reply. The value of the request
is 1, and the value of the reply is 2.
● Version: Here, version means that which version of the protocol we are using.
Suppose we are using the protocol of version1, then we put the 1 in this field.
● Reserved: This is a reserved field, so it is filled with zeroes.
● Family: It is a 16-bit field. As we are using the TCP/IP family, so we put 2 value in
this field.
● Network Address: It is defined as 14 bytes field. If we use the IPv4 version, then
we use 4 bytes, and the other 10 bytes are all zeroes.
● Distance: The distance field specifies the hop count, i.e., the number of hops used
to reach the destination.
inkstateroutinghasadifferentphilosophyfromthatofdistancevectorrouting.Inlinkstate
L
routing, if each node in the domain has the entiretopologyofthedomainthelistofnodes
andlinks,howtheyareconnectedincludingthetype,cost(metric),andconditionofthelinks
(up or down)-the node can use Dijkstra's algorithm to build a routing table.
he figure shows a simple domain with five nodes. Each node uses the same topology to
T
create a routing table, but the routing table for each node is unique because the calculations
are based on different interpretations of the topology. This is analogous to a city map. While
each person may have the same map, each needs to take a different route to reach her specific
destination
I n link state routing,four sets of actions are requiredto ensure that each node has the
routing table showing the least-cost node to every other node.
a)Creation of the states of the links by each node, called the link state packet (LSP).
tree.Types of Links
I n OSPF terminology, a connection is called alink.Four types of links have been defined:
point-to-point, transient, stub, and virtual.
I n OSPF terminology, a connection is called alink.Four types of links have been defined:
point-to-point, transient, stub, and virtual.
As shown in the Fig. routers R1, R2 andR7 are internal routers. Routers R3, R6,
●
R8are area border routers. Routers R3, R4, R5, R6, R8are backbone routers. Router R4 is
an ASBR
3 .Packet length: This field specifies the length of OSPF packet in bytes,
4.Router ID: It identifies the sending router.
istance vector and link state routing are both intradomain routing protocols. Theycanbe
D
used inside an autonomous system, but not between autonomous systems. These two
protocolsarenotsuitableforinterdomainroutingmostlybecauseofscalability.Bothofthese
routingprotocolsbecomeintractablewhenthedomainofoperationbecomeslarge.Distance
vector routing is subject to instability if there are more than a few hops in the domain of
operation.
inkstateroutingneedsahugeamountofresourcestocalculateroutingtables.Italsocreates
L
heavytrafficbecauseofflooding.Thereisaneedforathirdroutingprotocolwhichwecall
path vector routing.
athVectorRoutingisaroutingalgorithminunicastroutingprotocolofnetworklayer,andit
P
is useful for interdomain routing. The principle of path vector routing is similar to that of
distancevectorrouting.Itassumesthatthereisonenodeineachautonomoussystemthatacts
on behalf of the entire autonomous system is called Speaker node . Itisdifferentfromthe
distance vector routing and link state routing. Each entry in the routing table contains the
destination network, the next router and the path to reach the destination.
unctions
F
Prevention Of Loop
Policy Routing
Optimum Path
BGP
order Gateway Protocol (BGP) is used to Exchange routing information for the internet,
B
used to route traffic from one autonomous system (AS) to another.
ifferent Types of Autonomous Systems?
D
Since the BGP helps in routing between different autonomous systems, it is important to
learn about different types of autonomous systems:
1.Stub AS:
● here is only one connection to another AS in the Stub AS.
T
● Data traffic cannot pass through a stub autonomous system.
● The traffic can move within an autonomous system.
● A stub is either a source or a sink
2.Multi-Homed AS:
GPconnectionsinsideanautonomoussystemarecalledinternalBGP(iBGP)andBGP
B
connectionsbetweendifferentautonomoussystemsarecalledexternalBGP(eBGP).Fig.
shows the internal and external BGP
GP messages : Header of the all BGP messages is fixed size that identifies the
B
message type. Fig. shows the BGP message header format
isadvantages of BGP
D
1.BGP is complex.
2.BGP routes to destination networks, rather than to specific hosts or routers.
Multicast Routing: DVMRP – PIM
ulticastis a method of group communication wherethe sender sends data to multiple
M
receivers or nodes present in the network simultaneously. Multicasting is a type of one-to-
many and many-to-many communication as it allows sender or senders to send data
packets to multiple receivers at once across LANs or WANs. This process helps in
minimizing the data frame of the network
● istance Vector Multicast Routing Protocol (DVMRP)
D
● Multicast Source Discovery Protocol (MSDP)
● MOSPF (Multicast OSPF)
● Multicast BGP
● Protocol Independent Multicast (PIM)
1 . A router transmits its distance vector to each of its neighbors in a routing packet.
2. Each router receives and saves the most recently received distance vector from
each of its neighbors.
3. A router recalculates its distance vector when:
o It receives a distance vector from a neighbor containing different
information than before.
o It discovers that a link to a neighbor has gone down.
he DV calculation is based on minimizing the cost to each destination
T
Dx(y) = Estimate of least cost from x to y
C(x,v) = Node x knows cost to each neighbor v
Dx = [Dx(y): y∈N ] = Node x maintains distance vector
Node x also maintains its neighbors' distance vectors
– For each neighbor v, x maintains Dv = [Dv(y): y∈N ]
Example –Consider 3-routers X, Y and Z as shown infigure. Each router have their routing table.
Every routing table will contain distance to the destination nodes.
onsiderrouterX,Xwillshareitroutingtabletoneighborsandneighborswillshare
C
it routing table to it to X and distance from node X todestinationwillbecalculated
using bellmen- ford equation.
s we can see that distance will be less going from X to Z when Y is intermediate node(hop)
A
so it will be update in routing table X.
Similarly for Z also –
● It is simpler to configure and maintain than link state routing.
Disadvantages of Distance Vector routing –
PIM
IM is a collection of three protocols - PIM Sparse Mode, PIM Dense Mode and PIM Bi-
P
directional . PIM is termed protocol-independent because PIM does not include its own
topology discovery mechanism, but instead uses routing information supplied by other
routing protocols
IMSparseMode(PIM-SM)isamulticastroutingprotocoldesignedontheassumptionthat
P
recipients for any particular multicast group will be sparsely distributed throughout the
network. In other words, it is assumed that most subnets in the network will notwantany
given multicast packet. In order to receive multicast data, routers must explicitly tell their
upstream neighbors about their interest in particular groups and sources. Routers use PIM
Join and Prune messages to join and leave multicast distribution trees.
IM Dense Mode (PIM-DM) is a multicast routing protocol designed with the opposite
P
assumption to PIM-SM, namely that the receivers for any multicast group are distributed
denselythroughoutthenetwork.Thatis,itisassumedthatmost(oratleastmany)subnetsin
thenetworkwillwantanygivenmulticastpacket.Multicastdataisinitiallysenttoallhosts
inthenetwork.RoutersthatdonothaveanyinterestedhoststhensendPIMPrunemessages
to remove themselves from the tree.
Bi-directional PIM
i-directional PIM(BIDIR-PIM)isathirdPIMprotocol,basedonPIM-SM.Themainway
B
BIDIR-PIMdiffersfromPIM-SMisinthemethodusedtosenddatafromasourcetotheRP.
WhereasinPIM-SMdataissentusingeitherencapsulationorasource-basedtree,inBIDIR-
PIM the data flows to the RP along the shared tree, which is bi-directional -dataflowsin
both directions along any given branch.
NIT V DATA LINK AND PHYSICAL LAYERS
U
Data Link Layer – Framing – Flow control – Error control – Data-Link Layer Protocols –
HDLC –PPP - Media Access Control – Ethernet Basics – CSMA/CD – Virtual LAN –
Wireless LAN (802.11)- Physical Layer: Data and Signals - Performance – Transmission
media- Switching – Circuit
Logical Link Control:It deals with protocols, flow-control, and error control
Media Access Control:It deals with actual control of media
Framing
Addressing
● rame Header − It contains the source and the destination addresses of the frame.
F
● Payload field − It contains the message to be delivered.
● Trailer − It contains the error detection and error correction bits.
● Flag − It marks the beginning and end of the frame.
Types of framing
1 . Fixed-size:The frame is of fixed size and there isno need to provide boundaries
to the frame, the length of the frame itself acts as a delimiter.
rawback:It suffers from internal fragmentation ifthe data size is less than the
D
frame size
Solution:Padding
2 . Variable size: The size of the frame is variable during this form of framing. In
variable-size framing, we are in need of a way to outline the tip of the frameandalsothe
startingofthesucceedingframe.Thiscanbeutilizedinlocalareanetworks(LAN).Thereare
2 different methods to define the frame boundaries, such as length field and finish decimeters.
2 .1 Length field–To confirm the length of the field, alength field is used. It is
utilized in Ethernet (1EEE 802.3).
2 .2 End Delimeter–To confirm the size of the frame, a pattern is worn as a delimiter.
This methodology is worn in the token ring. Inshort,itisreferredtoasED.Twodifferent
methods are used to avoid this condition if the pattern happens within the message.
2.2.1Bit-Oriented Framing
ostprotocolsuseaspecial8-bitpatternflag01111110asaresultofthedelimiterto
M
stipulate the beginning and so the end of theframe.Bitstuffingiscompletedatthe
sender end and bit removal at the receiver end.
I f we have a tendency to get a zero(0) after 5 1s. we have a tendency to tend to still
stuff a zero(0). The receiver will remove the zero. Bit stuffing is in addition said as bit
stuffing.
2.2.2Byte-Oriented Framing
ytestuffingisoneofthemethodsofaddinganadditionalbyteoncethereisaflagor
B
escape character within the text. Take an illustration of bytestuffingasappearedin
the given diagram.
he sender sends the frame by adding three additional ESC bits and therefore the
T
destination machine receives the frame and it removes the extra bits to convert the
frame into an identical message.
5.3Flow Control
low controlis a set of procedures that restrictthe amount of data a sender should send
F
before it waits for some acknowledgment from the receiver.
Stop-and-wait Protocol
Working :
heslidingwindowprotocolistheflowcontrolprotocolfornoisychannelsthatallowsthe
T
sender to send multiple frames even before acknowledgments are received. It is called a
Sliding window because the senderslidesitswindowuponreceivingtheacknowledgments
for the sent frames.
Working:
he sender and receiver have a “window” of frames. A window is a space that
T
consists of multiple bytes. The size of the window on the receiver side is always 1.
Each frame is sequentially numbered from 0 to n - 1, where n is the window size
at the sender side.
The sender sends as many frames as would fit in a window.
fter receiving the desired number of frames, the receiver sends an
A
acknowledgment. The acknowledgment (ACK) includes the number of the next
expected frame.
5.4Error Control
rror control in data link layer is the process of detecting and correcting data frames that have
E
been corrupted or lost during transmission.
The error control mechanism in data link layer involves the following phases −
etection of Error− Transmission error, if any, isdetected by either the sender or
D
the receiver.
Acknowledgment− acknowledgment may be positive ornegative.
o Positive ACK− On receiving a correct frame, the receiversends a positive
acknowledge.
o Negative ACK− On receiving a damaged frame or a duplicateframe, the
receiver sends a negative acknowledgment back to the sender.
etransmission− The sender maintains a clock andsets a timeout period. If an
R
acknowledgment of a data-frame previously transmitted does not arrive before the
timeout, or a negative acknowledgment is received, the sender retransmits the frame.
A timeout counter is maintained by the sender, which is started when a frame is sent.
I f the sender receives acknowledgment of the sent frame within time, the sender is
confirmed about successful delivery of the frame. It then transmits the next frame
in queue.
Ifthesenderdoesnotreceivetheacknowledgmentwithintime,thesenderassumes
thateithertheframeoritsacknowledgmentislostintransit.Itthenretransmitsthe
frame.
If the sender receives a negative acknowledgment, the sender retransmits the frame.
Go-Back-N ARQ
oth the sender and the receiver have buffers called sending window and receiving
B
window respectively.
The sender sends multiple frames based upon the sending-window size, without
receiving the acknowledgment of the previous ones.
The receiver also receives multiple frames within the receiving window size.
he receiver keeps track of incoming frame’s sequence numbers, buffers the frames in
T
memory.
It sends ACK for all successfully received frames and sends NACK for only frames
which are missing or damaged.
The sender in this case, sends only packet for which NACK is received.
SDLC:
DLC stands for synchronous data link control protocol, is a communication protocol of a
S
computer.
I t is usually used to carry system network architecture traffic. Synchronous data link protocol
connects all the remote devices to the mainframe computer at the Central location.
Thisconnectionisdoneintwoformats,pointtopointformati.e.onetooneconnection,and
p oint to multipoint format, i.e. one to many connections.
SDLC support one to many connections even in case of error detection or error recovery.
SDLCensuresthatallthereceiveddataunitsarecorrectandflowisrightfromonenetwork
p oint to the next network point.
HDLC:
DLC stands for High-level data link control protocol, is a bit-orientatedcodetransparent
H
synchronous protocol developed by ISO (International organization for standardization)
in1979.
I tprovidesbothconnection-orientatedandconnectionlessservices.HDLCprotocolcontains
various wide-area protocols.
It is based on the SDLC protocol that supports both point-to-point and multipoint
c ommunication.
DLCframesaretransferredoversynchronousorasynchronousserialcommunicationlinks.
H
HDLC uses various modes such as normal response mode, asynchronous response mode,
asynchronous balanced mode.
ormal response mode is used to share the secondary to primary link without contention.
N
asynchronous response mode is used for full-duplex links. asynchronous balanced mode,
support combined terminal which can act as both primary and secondary.
SLIP:
LIPstandsforSeriallineinterfaceprotocolwhichisusedtoaddframingbyteattheendof
S
the IP Packet. SLIP is a datalinklayerprotocolThattransformstheIPpacketsamongISP
(Internet Service Providers) and home user over dial-up links.
LIP is designed to work with ports and router connections. SLIP does not provide error
S
detection, being reliant on upper-layer protocols for this.Therefore,SLIPonitsownisnot
satisfactory over an error-prone dial-up connection.
PPP:
PP stands for Point to point protocol. PPP is a data link layer protocol that provides the
P
same services as the Serial line interface protocol.
I t is a robust protocol that transfers the other types of pockets also with theIPpackets.It
providestwoprotocolsLCPandNCP,thatwewilldiscussinthenextsection.Pointtopoint
protocol uses framing methods that describe the frames.
oint to point protocol is also called character oriented protocol which is used to detect
P
errors. PPC provides Connection authentication, data compression, encryption, and
transmission.Itisusedovervariousnetworkssuchasphonelines,cellulartelephones,serial
cables, trunk lines, ISDNs, Specialized radio links, etc.
LCP:
CP stands for Link control protocol, is a part of point-to-point control protocol. LCP packets
L
determine the standards of data transmission.
LCP protocol is used to determine the identity of the linked devices, if the device is correct it
accepts it otherwise it rejects the device.
I t also determines whether the size of the packet is accepted or not. If requirements exceed
the parameters, then the link control protocol terminates that link.
LAP:
AP stands for Link access procedure is a data link layer protocol that is used for framing
L
and transfer the data across point-to-point links.
here are three types of Link access procedure – LAPB ( Link Access procedure balanced),
T
LAPF ( Link Access Procedure Frame-Mode Bearer Services), and LAPD (Link Access
Procedure D-Channel.
AP was originally derived from HDLC (High-Level Data Link Control), but was later
L
updated and renamed LAPB (LAP Balanced).
NCP:
CP stands for Network control protocol, is a part of the point-to-point protocol. The
N
network control protocol is used to negotiate the parameter and facilities for the network
layer.
oreveryhigher-layerprotocolsupportedbyPPP,oneNCPisthere.IPCP(InternetProtocol
F
control protocol), DNCP (DECnet Phase IV Control Protocol), OSINLCP (OSI Network
Layer Control Protocol), IPXCP (InternetworkPacketExchangeControlProtocol),NBFCP
(NetBIOS Frames Control Protocol), IPV6CP (IPv6 Control Protocol) are some of the NCPs.
5.6HDLC
igh-level Data Link Control (HDLC) is a group of communication protocols of the data link
H
layer for transmitting data between network points or nodes. Since it is a data link protocol,
data is organized into frames. A frame is transmitted via the network to the destination that
verifies its successful arrival. It is a bit - oriented protocol that is applicable for both point - to
-point and multipoint communications.
Transfer Modes
DLC supports two types of transfer modes, normal response mode and asynchronous
H
balanced mode.
Normal Response Mode (NRM)− Here, two types of stationsare there, a primary
station that send commands and secondary station that can respond to received
commands. It is used for both point - to - point and multipoint communications.
synchronous Balanced Mode (ABM)− Here, the configurationis balanced, i.e. each
A
station can both send commands and respond to commands. It is used for only point - to -
point communications.
HDLC Frame
DLC is a bit - oriented protocol where each frame contains up to six fields. The structure
H
varies according to the type of frame. The fields of a HDLC frame are −
● F lag − It is an 8-bit sequence that marks the beginning and theendoftheframe.
The bit pattern of the flag is 01111110.
● Address−Itcontainstheaddressofthereceiver.Iftheframeissentbytheprimary
station, it contains the address(es) of the secondary station(s). If it is sent by the
secondary station, it contains the address of the primary station. The address field
may be from 1 byte to several bytes.
● Control− It is 1 or 2 bytes containing flow and errorcontrol information.
● Payload− This carries the data from the network layer.Its length may vary from one
network to another.
● FCS− It is a 2 byte or 4 bytes frame check sequencefor error detection. The standard
code used is CRC (cyclic redundancy code)
5.7PPP
oint - to - Point Protocol (PPP) is a communication protocol of the datalinklayerthatis
P
used to transmit multiprotocol data between two directly connected (point-to-point)
computers. Itisabyte-orientedprotocolthatiswidelyusedinbroadbandcommunications
having heavy loads and high speeds.
Components of PPP
PP is a byte - oriented protocol where each field of the frame is composed of one or more
P
bytes. The fields of a PPP frame are −
lag− 1 byte that marks the beginning and the endof the frame. The bit pattern of
F
the flag is 01111110.
Address− 1 byte which is set to 11111111 in caseof broadcast.
Control− 1 byte set to a constant value of 11000000.
Protocol− 1 or 2 bytes that define the type of data contained in the payload field.
ayload− This carries the data from the network layer.The maximum length of the payload
P
field is 1500 bytes. However, this may be negotiated between the endpoints of
communication.
FCS− It is a 2 byte or 4 bytes frame check sequencefor error detection. The standard
code used is CRC (cyclic redundancy code)
5.8.2MAC Addresses
ure ALOHA
P
•In pure ALOHA, the stations transmit frames whenever they have data to send.
• When two or more stations transmit simultaneously, there is collision and the
frames are destroyed.
•In pure ALOHA, whenever any station transmits a frame, it expects the acknowledgement
from the receiver.
•If acknowledgement is not received within specified time, the station assumes that the frame
(or acknowledgement) has been destroyed.
I f theframeisdestroyedbecauseofcollisionthestationwaitsforarandomamountoftime
and sends it again. This waiting time must be random otherwise same frames will collide
again and again.
• ThereforepureALOHAdictatesthatwhentime-outperiodpasses,eachstationmust
wait for a random amount of time before resending its frame. This randomness will help
avoid more collisions.
•Figure shows an example of frame collisions in pure ALOHA.
• In fig there are four stations that .contended with one another for access to shared
channel. All these stations are transmitting frames. Some of these frames collide because
multiple frames are in contention for the shared channel. Only two frames, frame 1.1 and
frame 2.2 survive. All other frames are destroyed.
• Whenever two frames try to occupy the channel at the same time, there will be a
collisionandbothwillbedamaged.Iffirstbitofanewframeoverlapswithjustthelastbitof
a frame almost finished, both frames will be totally destroyed and both will have to be
retransmitted.
Slotted ALOHA
• Slotted ALOHA was invented to improve the efficiency of pure ALOHA as chances of
collision in pure ALOHA are very high.
• InslottedALOHA,thetimeofthesharedchannelisdividedintodiscreteintervals
calledslots.Thestationscansendaframeonlyatthebeginningoftheslotandonlyone
frame is sent in each slot.
• InslottedALOHA,ifanystationisnotabletoplacetheframeontothechannelatthe
beginningofthesloti.e.itmissesthetimeslotthenthestationhastowaituntilthebeginning
of the next time slot.
• In slotted ALOHA, there is still a possibility of collision if two stations try to send at the
beginning of the same time slot as shown in fig.
• Slotted ALOHA still has an edge over pure ALOHA as chances of collision are
reduced to one-half.
5.9Ethernet Basics
thernet is a set of technologies and protocols that are used primarily in LANs. However,
E
EthernetcanalsobeusedinMANsandevenWANs.Itwasfirststandardizedinthe1980sas
IEEE 802.3 standard. Since then, it has gone through four generations, as shown in the
following chart
tandard Ethernet has many physical layer implementations. The four main physical
S
layer implementations are shown in the following diagram
10Base5 was the first Ethernet specification to use a bus topology with an external
transceiver(transmitter/receiver) connected via a tap to a thick coaxial cable.
In this case, the transceiver is normally part of the network interface card (NIC),
which is installed inside the station.
The third implementation is called 10Base-T or twisted-pair Ethernet.
10Base-T uses a physical star topology. The stations are connected to a hub via two
pairs of twisted cable.
Although there are several types of optical fiber 10-Mbps Ethernet, the most
common is called 10Base-F.
10Base-F uses a star topology to connect stations to a hub.
The stations are connected to the hub using two fiber-optic cables.
5.10CSMA/CD
¬Carrier Sense in CSMA/CD means that all the nodessense the medium to check whether it
is idle or busy.
●If the carrier sensed is idle, then the node transmits the entire frame.
●If the carrier sensed is busy, the transmission is postponed.
¬Collision Detect means that a node listens as ittransmits and can therefore detect when a
frame it is transmitting has collided with a frame transmitted by another node.
Transmitter Algorithm in CSMA/CD
¬Transmitter Algorithm defines the procedures fora node that senses a busy medium.
¬They are
1 .Non-Persistent Strategy
2.Persistent Strategy : 1-Persistent & P-Persistent
Non-Persistent Strategy
●In the non-persistent method, a station that has a frame to send senses the line.
●If the line is idle, it sends immediately.
●If the line is not idle, it waits a random amount of time and then senses the line again.
● The non-persistent approach reduces the chance of collision because it is unlikely
that two or more stations will wait the same amount of time and retry to send
simultaneously.
● However, this method reduces the efficiency of the network because the medium
remains idle when there may be stations with frames to send.
ersistent Strategy
P
1-Persistent :
The 1-persistent method is simple and straightforward.
●
● In this method, after the station finds the line idle, it sends its frame immediately
(with probability 1).
● This method has the highest chance of collision because two or more stations may
find the line idle and send their frames immediately.
-Persistent :
P
●In this method, after the station finds the line idle it follows these steps:
●With probability p, the station sends its frame.
●With probability q = 1 − p, the station waits for the beginning of the next time slot and
checks the line again.
● The p-persistent method is used if the channel has time slots with a slot duration
equal to or greater than the maximum propagation time.
● The p-persistent approach combines the advantages of the other two strategies. It
reduces the chance of collision and improves efficiency
XPONENTIAL BACK-OFF
E
● Once an adaptor has detected a collision and stopped its transmission, it waits a
certain amount of time and tries again.
●Each time it tries to transmit but fails, the adaptor doubles the amount of time
it waits before trying again.
● This strategy of doubling the delay interval between each retransmission
attempt is a general technique known asexponentialback-off.
5.11Virtual LAN
irtual Local Area Networks or Virtual LANs (VLANs) are a logical group of computers that
V
appear to be on the same LAN irrespective of the configuration of the underlying physical
network. Network administrators partition the networks to match the functional requirements
of the VLANs so that each VLAN comprise of a subset of ports on a single or multiple
switches or bridges. This allows computers and devices in a VLAN to communicate in the
simulated environment as if it is a separate LAN.
Types of VLANs
rotocol VLAN− Here, the traffic is handled basedon the protocol used. A switch or
P
bridge segregates, forwards or discards frames the come to it based upon the traffics
protocol.
Port-based VLAN− This is also called static VLAN.Here, the network
administrator assigns the ports on the switch / bridge to form a virtual network.
Dynamic VLAN− Here, the network administrator simplydefines network
membership according to device characteristics.
¬The idea behind Spread spectrum technique is tospread the signal over a wider frequency
band than normal, so as to minimize the impact of interference from other devices.
¬There are two types of Spread Spectrum:
Frequency Hopping Spread Spectrum (FHSS)
●
●Direct Sequence Spread Spectrum (DSSS)
Frequency Hopping Spread Spectrum (FHSS)
¬Frequency hopping is a spread spectrum techniquethat involves transmitting the signal
over a random sequence of frequencies.
¬That is, first transmitting at one frequency, thena second, then a third, and so on.
¬The receiver uses the same algorithm as the senderand initializes it with the same seed and
hence is able to hop frequencies in sync with the transmitter to correctly receive the frame.
Direct Sequence Spread Spectrum (DSSS)
¬Each bit of data is represented by multiple bitsin the transmitted signal.
¬DSSS takes a user data stream and performs an XORoperation with a pseudo –random
number.
¬This pseudo random number is called as chippingsequence.
● An infrastructure network is the network architecture for providing communication
between wireless clients and wired network resources.
● The transition of data from the wireless to wired medium occurs via a Base Station
called AP(Access Point).
●An AP and its associated wireless clients define the coverage area.
d-Hoc Topology(Peer-to-Peer Topology)
A
●An adhoc network is the architecture that is used to support mutual communication between
wireless clients.
● Typically, an ad- hoc network is created spontaneously and does not support
access to wired networks.
●An adhoc network does not require an AP.
5.13Physical Layer
hysical layer in the OSI model plays the role of interacting with actual hardware and
P
signaling mechanism. Physical layer is the only layer of OSI network model which actually
deals with the physical connectivity of two different stations.
hysical layer provides its services to Data-link layer. Data-link layer hands over frames to
P
physical layer. Physical layer converts them to electrical pulses, which represent binary
data.The binary data is then sent over the wired or wireless media.
5.13.1Data and signals
Data or the signal whichever is used in a network, it can be either digital or analog.
nalog data refers to data that is of continuous format whereas digital data is one which has
A
discrete states. So the analog data takes continuous values and digital data takes discrete
values. Analog data can be directly converted into an analog signal or sampled and converted
to digital signal. In quite a similar fashion digital data can also be converted to digital signal
or into analog signal after modulation. These are converted so that efficient transmission can
take place.
imilar to data, the signals which represent these can also be digital or analog. Analog signals
S
are known to have many levels of intensity over a given period of time. As the wave moves
from one value to another, along the path it traverses via infinite number of values. Digital
signals rather have only definite set of values. These are represented using a pair of
perpendicular axes. The vertical axis represents the strength of the signal and the horizontal
axis gives the time period.
5.13.2Transmission Media
I n data communication terminology, a transmission medium is a physical path between the
transmitter and the receiver i.e. it is the channel through which data is sent from one place
to another. Transmission Media is broadly classified into the following types:
High Speed
●
● Secure
● Used for comparatively shorter distances
⇢
● Least expensive
● ⇢Easy to install
● ⇢High-speed capacity
Disadvantages:
⇢
● Susceptible to external interference
● ⇢Lower capacity and performance in comparison toSTP
● ⇢Short distance transmission due to attenuation
Applications:
Advantages:
⇢Eliminates crosstalk
⇢Comparatively faster
Disadvantages:
⇢More expensive
⇢Bulky
( ii)Coaxial Cable –
It has an outer plastic covering containing an insulation layer made of PVC or Teflon and 2
parallel conductors each having a separate insulated protection cover. The coaxial cable
transmits information in two modes: Baseband mode(dedicated cable bandwidth) and
Broadband mode(cable bandwidth is split into separate ranges). Cable TVs and analog
television networks widely use Coaxial cables.
Advantages:
● igh Bandwidth
H
● Better noise Immunity
● Easy to install and expand
● Inexpensive
Disadvantages:
● T
he cable can be unidirectional or bidirectional. The WDM (Wavelength Division
Multiplexer) supports two modes, namely unidirectional and bidirectional mode.
Advantages:
● I ncreased capacity and bandwidth
● Lightweight
● Less signal attenuation
● Immunity to electromagnetic interference
● Resistance to corrosive materials
Disadvantages:
D
● ifficult to install and maintain
● High cost
● Fragile
(iv)Stripline
(v)Microstripline
In this, the conducting material is separated from the ground plane by a layer of dielectric.
2 .Unguided Media:
It is also referred to as Wireless or Unbounded transmission media. No physical medium is
required for the transmission of electromagnetic signals.
Features:
T
● he signal is broadcasted through air
● Less Secure
● Used for larger distances
( i)Radio waves –
These are easy to generate and can penetrate through buildings. The sending and receiving
antennas need not be aligned. Frequency Range:3KHz – 1GHz. AM and FM radios and
cordless phones use Radio waves for transmission.
( ii)Microwaves –
It is a line of sight transmission i.e. the sending and receiving antennas need to be properly
aligned with each other. The distance covered by the signal is directly proportional to the
height of the antenna. Frequency Range:1GHz – 300GHz. These are majorly used for mobile
phone communication and television distribution.
( iii)Infrared –
Infrared waves are used for very short distance communication. They cannot penetrate
through obstacles. This prevents interference between systems. Frequency Range:300GHz –
400THz. It is used in TV remotes, wireless mouse, keyboard, printer, etc.
5.13.3Switching
I n large networks, there can be multiple paths from sender to receiver. The switching
technique will decide the best route for data transmission.
Switching technique is used to connect the systems for making one-to-one communication.
Circuit Switching
● C
ircuit switching is a switching technique that establishes a dedicated path
between sender and receiver.
● I n the Circuit Switching Technique, once the connection is established then the
dedicated path will remain to exist until the connection is terminated.
● Circuit switching in a network operates in a similar way as the telephone works.
● Circuit switching is used in public telephone network. It is used for voice
transmission.
● Fixed data can be transferred at a time in circuit switching technology.
Communication through circuit switching has 3 phases:
C
● ircuit establishment
● Data transfer
● Circuit Disconnect
● S
pace Division Switching is a circuit switching technology in which a single
transmission path is accomplished in a switch by using a physically separate set
of crosspoints.
he incoming and outgoing signals when received and re-transmitted in a different time
T
slot, is calledTime Division Switching.
Message Switching
Packet Switching
● T he packet switching is a switching technique in which the message is sent in one
go, but it is divided into smaller pieces, and they are sent individually.
● The message splits into smaller pieces known as packets and packets are given a
unique number to identify their order at the receiving end.
● Every packet contains some information in its headers such as source
address, destination address and sequence number.
● Packets will travel across the network, taking the shortest path as possible.
A
● ll the packets are reassembled at the receiving end in correct order.
● If any packet is missing or corrupted, then the message will be sent to resend
the message.
● If the correct order of the packets is reached, then the acknowledgment message
will be sent.
V
● irtual Circuit Switching is also known as connection-oriented switching.
● In the case of Virtual circuit switching, a preplanned route is established before the
messages are sent.
● Call request and call accept packets are used to establish the connection
between sender and receiver.
● In this case, the path is fixed for the duration of a logical connection.