Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Unit-Iii CN

Download as pdf or txt
Download as pdf or txt
You are on page 1of 50

115 Computer Networks SIET

UNIT – III- NETWORK LAYER


The basic functionality of network layer is to provide end – to – end communication
capability on networks

It is the lowest layer that deals with end – to – end transmission. The network layer
protocols are concerned with the exchange of packets of information between
transport layer entities.

A packet is a group of bits that includes data bits plus source and destination address
the service provided by the network layer to the transport is called network service.

The network layer functions are carried out by a layer adding a header to every
network service data unit (NSDU) forming network protocol data unit (NPDU).

1. It keeps track which MAC, the unique number that each network call has
address to send i.e. divide which system receiver the information.
2. It makes routing of data through network source to destination.
3. Virtual circuits are established in this layer
4. It translates logical network address into physical machine address.

Logical addressing:

Computer networks logical addressing: In this article, we are going to learn about the
IPV4 addresses which are part of logical addressing.

Usually, computers communicate through the Internet. The packet(data) transmitted


by the sender computer may pass through several LANs or WANs before reaching the
destination computer. For this level of communication, we need a global addressing
scheme what we call logical addressing. An IP address is used globally to refer to the
logical address in the network layer of the TCP/IP protocol.

The Internet addresses are 32 bits in length; this gives us a maximum of 232 addresses.
These addresses are referred to as IPv4 (IP version 4) addresses or popularly as IP
addresses.

IPV4 addresses

An IPv4 address is a 32-bit address that uniquely and universally defines the
connection of a device (for example, a computer or a router) to the Internet. They are
unique so that each address defines only one connection to the Internet. Two devices
on the Internet can never have the same IPV4 address at the same time.

Department of ECE, SIET K.Narasimha, Asst. Professor


116 Computer Networks SIET

On the other hand, if a device operating at the network layer has m connections to the
Internet, it needs to have m addresses, for example, a router.

The IPv4 addresses are universal in the sense that the addressing system must be
accepted by any host that wants to be connected to the Internet. That means global
addressing.

Address Space:

IPv4 has a certain address space. An address space is the total number of addresses
used by the protocol. If a protocol uses N bits to define an address, the address space
is 2N. IPv4 uses 32-bit address format, which means that the address space is 232 or
4,294,967,296. The Notations are show an IPv4 address:

1) Binary Notation

In binary notation, the IPv4 address is displayed as 32 bits. Each octet is often referred
to as a byte. So it is common to hear an IPv4 address referred to a 4-byte address. The
following is an example of an IPv4 address in binary notation: 01110111 10010101
00000001 00000011.

2) Dotted-Decimal Notation

IPV4 addresses are usually written in decimal form with a decimal point (dot)
separating the bytes since it’s more compatible. The following is an example:
119.149.1.3 (above one and this one is same just different notation)

: Each number in dotted-decimal notation is a value ranging from 0 to 255.

Internetwork routing:

2 B 3 Network

C Multiprotocol
1 D router
E

4 F 5

Figure: internetwork

Department of ECE, SIET K.Narasimha, Asst. Professor


117 Computer Networks SIET

In internetworking the networks are directly connected to multi protocol routers


between each and every node.

The inter network graph is as shown below

A B

C
D

E F

Figure: graph of internet work

From an above figure where every router directly access every other router
connected to any network which it is connected.

Router B cans directly access A and C via network 2 and also d via network 3.

While, constructing the graph of internetwork the distance vector routing algorithm is
applied to the set of multiple protocols. Which may gives two level routing algorithm.

The first level is interior gateway protocol algorithm and second one is exterior gate
way protocol algorithm.

The interior gate way protocol algorithm is used within each network and between the
two networks an exterior gateway protocol is used.

The internet packets start out on its LAN addresses to the local multiprotocol router.

After reaching at router, the network layer code divides which multiprotocol router to
forward the packet to using its own routing tables.

In a LAN when no. of users or stations are more and if the stations are located at a
longer distances forming bigger LAN is not always possible due to following limitation.

1. Constraint of the maximum no. of stations which can be connected on a single


LAN
2. Constraint of maximum physical size of a LAN
3. Network security

Department of ECE, SIET K.Narasimha, Asst. Professor


118 Computer Networks SIET

4. Investment already done and further to be done.

If LANs which are geographically separated or if they are needed to be connected


or communicated, again these LAN’s may not be of the same type i.e. one of these may
be CSMA/CD LAN and other may be FDDI LAN.

The LANs and switched data sub networks are interconnected to allow the users to
communicate across several sub networks. This extended network so formed is called
internetwork.

Sub networks inter connected may differ in technologies topologies protocols and
their services.

The internet work devices such as bridge, router are used to connected the two or
more LANS or subnets.

Importance of internetworking:

1. It provides link between networks.


2. Provides routing and delivery of data between process on different networks.
3. Provides an accounting service that keeps track of the various networks and
routers and that maintains status information.
4. Internetworking facility accommodate a number of different maximum packet
size, difference access mechanism, error recovery, status reporting technique
etc.

Department of ECE, SIET K.Narasimha, Asst. Professor


119 Computer Networks SIET

Tunneling: it is a strategy used when two computers want to communicate with each
other and packet must pass through a region. In order to reach packet to the region
it must have IP address.

Figure:- Tunneling

To send ip packet from host a to host B the packet contains IP address of host
B. then the packet is transmitted from host A.

When packet reaches to the router R, it removes IP packet.

The router R1 insert a pay load field of the WAN network layer packet. After
inserting pay load field it send to router R2.

When router R2 gets the packet, it removes IP packet and send it to host B
inside the header frame.

Address Mapping:

IP address:

The IP address corresponds to the network layer in the OSI reference model and
provides a connection less. Best effort delivery services to the transport layer. An
internet protocol has a fixed length of 32 bits.

The IP address is unique; the two devices on the internet can never have the
same address at the same time.

The IP address structure was originally defined to have a network id and host
id.

Department of ECE, SIET K.Narasimha, Asst. Professor


120 Computer Networks SIET

The network id identifies the network the host is connected to the host id
identifies the network connection to the host rather than the actual host.

An address space is the total no. of addresses used by the protocol. If protocol
used N bits to define an address the address if protocol uses N – bits to define an
address, the address space is 2N.

IP address are usually written in dotted decimal notation so that they can be
communicated conveniently by people.

The IP address is broken into four bytes with each byte being represented by a
decimal number and separated by a dot.

Example: 192.168.1.2 is a dotted decimal notation.

The address 192.168.1.2 in a binary notation is given by

27 26 25 24 23 22 21 20
│ │ │ │ │ │ │ │
128 64 32 16 8 4 2 1

An IP is a numeric identifier assigned to each machine on IP network

1100000 1010100 0000000 0000001


0 0 1 0
192 168 1 2

An IP address is a software address hot a hardware address which is has loaded in


the machine NIC

An IP address is made up of 32 bits of information

These bits are divided into four parts containing 8 – bits each.

Every machine on the same network shares that network address as part of its IP
address.

The IP address 192.168.1.2 the bytes 192.168 is the network address and 1.2 is the
node address.

The node address is uniquely identifies each machine on network.

Department of ECE, SIET K.Narasimha, Asst. Professor


121 Computer Networks SIET

Internet classes (IP address):

Byte 1 Byte 2 Byte 3 Byte 4


Class A id
0 Net id Host

Class B 10
id id
Net Host

Class C 110
Net id Host id

Class D 1110 Multicast address

Class E 1111
for future use
Reserved

Ranges:

From To
Class A 0.0.0.0. 127.255.255.255
Class B 128.0.0.0 191.255.255.255
Class C 192.0.0.0 223.255.255.255
Class D 224.0.0.0 239.255.255.255
Class E 240.0.0.0 255.255.255.255

Class Full Addressing:


The IP address structure is divided into five classes as shown in above

Class A, B, C, D & E

In class A address are used for large sized organization with a large no. of attached
hosts on routers.

In class B address were designed for mid-sized organizations with tens of thousands
of attached hosts or routers.

Department of ECE, SIET K.Narasimha, Asst. Professor


122 Computer Networks SIET

In class C addresses were designed for small sized organizations (Home, offices and
corporate companies).

Class D addresses are used for multicast services that allow a host to send information
to a group of hosts simultaneously.

Class E resented for the futures use.

In class full addressing each class is divided into a fixed no. of blocs with each block
having a fixed size.

Class No. of Blocks Blocks size


A 128 1677216
B 16384 65536
C 2097152 256
D 1 268435456
E 1 268435456

Classless Addressing

In classless addressing variable length blocks are assigned the belong to no class.

In this entire address space is divided into blocks of different sizes

Figure: class less addressing

In classless addressing, when an entity, small or large needs to be connected to the


internet it is granted a block of address.

The size of the block varies based on the nature and size of the entity.

In IPV4 addressing a block of address can be defined as 192.168.1.2/8 in which


192.168.1.2 defines one of the address and /8 is define the mask on no. of bits.

The IPV4 is the delivery mechanism used by TCP / IP protocols.

IPV4 is an unreliable connectionless datagram protocol

Department of ECE, SIET K.Narasimha, Asst. Professor


123 Computer Networks SIET

IPV4 is also a connection less protocol for packet switching network that uses the
datagram approach.

IPV4 Header Format:


Packets in the IPVH layer are called datagram’s.

A datagram is a variable length packet consisting of two parts. Header and data.

0 8 15 16 19 31
7 18
Version IHL Service type Datagram Length
4 - bit 4 - bit 8 - bit (16-Bits)

Data gram identification Flags Fragment


16 – bits 3 - bits offset
13 - bits 20
Time to live Protocol Header checksum bytes
8 – bits 8 - bit 16 – bit
32 – bit source address
32 – bit destination address
Options Padding
Figure IPV4 header format

header payload trailer


4 - bits 8 - bits 4 – bits

16 – bit

Datagram

1. Version: it is the field contains the IP protocol version the current version is an
experimental version. IPVH (or) IPVH.S

2. IHL (IP Header Length): it is the length of the ip header in multiples of 32 – bits
without the data field. The maximum value of header is (60 bytes) and minimum value
of (20 bytes)

3. Service type: it is a differentiated service the IP monitors the quality of the service
of datagram.

Department of ECE, SIET K.Narasimha, Asst. Professor


124 Computer Networks SIET

4. Total length: it is specifies the total length of the data gram, header and data, in
octets.

5. Datagram identification:

Which fragments the packets a unique numbers assigned by the sender.

6. Flogs: it contains 3 flags:

1. The flag is zero – it is reserved for zero.


2. The 2nd flag is DF (Do not fragment flag) ‘0’ means allow fragmentation and set
to ‘1’ means no fragmentation allowed
3. The 3rd last flag is MF (more fragment flag). ‘0’ means that is the last fragment.
And set to ‘1’ means more fragmentation of packets.

7. Fragment offset:

It is used to reassemble the full datagram. The value in this field contains the no. of
zero.

8. Time – to – live (TTL):

It specifies the time (in Secs) the datagram allowed to travel.

It uses as hop counter to detect routing loops.

9. Protocol: the IPVH protocol is in the TCP segment.

It indicates that the protocol high level to which IP should the data in this datagram.

(ICMP =1, TCP = 6, UDP = 17, OSPF=89)

10. Header Checksum: it is checksum for information contained in the header. If the
checksum does not match the contents, the datagram is discarded.

11. Source and Destination Address:

It is a 32 – bit source and destination address in which the datagram are to be


forwarded successfully

12. Options: it is a variable length field used for control (or) debugging and
measurement.

13. Padding: it is used to ensure that the IP header ends on a 32 – bit boundary.

IPV6:

Department of ECE, SIET K.Narasimha, Asst. Professor


125 Computer Networks SIET

IPV4 provides the host to host communication between system in the internet.
In early 1990 the IETF began to work on the successor of IPV4 that would solve the
address exhaustion problem and other scalability.

IPV6 addresses are 128 – bits in length. Addresses are assigned to individual
interface on nodes, not to the node themselves.

A single interface may have multiple unique unicast address. The first field of
any IPV6 address is the variable length prefix format.

IPV6 addresses: the new notation has been written in 16 – bytes address format.

It can be eight groups of four hexadecimal digits with colons between the group

8000: 0000: 0000: 0000: 0123 : 4567 : 89AB; CDEF

The leading zeros within a group can be omitted so 0123 can be written as 123.

One or more groups of 16 zero bits can be replaced by a pair of colons.

The new address is given as

8000: 0123: 4567: 89AB: CDEF.

IPV 6 Packet Format:

The IPV6 each packet is composed of base header followed by the pay load.

40 bytes 65, 535

Base Payload
header

Extension Data packet from


header upper layer

Department of ECE, SIET K.Narasimha, Asst. Professor


126 Computer Networks SIET

IPV6 Header Format:


0 18 16 24 31
15 23
Version 4 - Traffic class Flow label 24 - bits
bit

Pay load length 16 – bits Next header Hop limit


8 - bits 8 - bits

Time to live 8 - bits Protocol 8 - Header checksum 16 – bit


bit
128 - bit source address
128 – bit destination address
Figure IPV6 header format

1. Version: this 4 – bit field defines the version number of IP. The value is 6 for IPV6

2. Traffic Class: In this field the first MSB of 6 – bit provides the quality of service
and remaining 2 – bits which con use for explicit congestion control (ECN)

3. Flow Label: it is 24 – bits field that is designed to provide sequential flow of data
for particularly.

4. Pay Load Length: the 16 bits pay load length field defines the lengths of the ip data
gram excluding the base header.

The pay load length is starts from 16 – bit and its extend up to 65, 535 bytes.

Next Header: it is 8 – bit field defining the header that follows the base header in the
datagram.

It indicates that header (or) extension if the extension header is not present then it
indicates the upper layer.

Hop Limit: It is the 8 – bit field, used to stop packet to loop in the network

This is same as that of TTL (Time to Live) in IPV4

The value of hop limit field is decremented by 1 as it passes a link (router/hop) when
field reaches 0 the packet is discarded.

Source Address: this field is 128 – bits indicate that address of originator of the
packet.

Department of ECE, SIET K.Narasimha, Asst. Professor


127 Computer Networks SIET

Destination Address: this field provides the address of intended recipient of the
packet.

Extension Headers: in IPV 6 the fixed header contains only that much information
which is necessary, avoiding those information which is either not required or is rarely
used.

All such information is put between the fixed header and the upper layer header in
the form of extension headers.

The Following Extension Header:

Extension header Next header Description


value
Hop – by – hop option Read by all devices to pass info
header 0
Routing header If combines the methods to
43 support making routing decisions.
Fragment header Contains parameters of datagram
44 fragmentation.
Destination options 60 Used when heads by destinations
header devices
Authentication header Information regarding
51 authentication.
Encapsulating It provides confidentiality and
security payload 50 ensure integrity of data.
header

CIDR (Class Inter Domain Routing):


The addresses that are divided into A, B, C, & D classes turned out be inflexible.

IP is rapidly becoming a victim of its own popularity, is running out of addresses.

In 1993 the classful address space restriction was lifted. An arbitrary prefix
length to indicate the network number known as classless interdomain routing (CIDR)
adopted in place of classful scheme. Using a CIDR notation, a prefix 205.100.0.0 of
length 22 is written as 205.100.0.0/22.

The corresponding prefix range from 205.100.0.0 through 205.100.3.0 (the /22
notation indicates that the network mask is 22 – bits. CIDR routes packets according

Department of ECE, SIET K.Narasimha, Asst. Professor


128 Computer Networks SIET

to the higher order bits of the IP address. The entries in a CIDR routing table contains
a 32 – bit address and a 32 – bit mask.

CIDR uses a technique called super netting so that a single routing entry covers
a block of classful addresses.

For Example: address of class C i.e. 205 .100.0.0, 205.100.1.0,


205.100.2.0,205.100.3.0, the CIDR allow a single entry 205.100.16.0/22

The use of the variable length prefixed requires that the routing tables be
searched to find the longest prefix match.

ICMP (Internet Control Message Protocol):

ICMP is companion protocol to IP. These two are implemented together.

It is to sit on the top of the IP (IP protocol =1).

It allows routers to send error or control messages to other routers or hosts; it


provides communication between the internet protocol software on the machine and
the internet protocol software another.

It is an error reporting and testing mechanism. It provides a way for router that
encounters an error report the error to the original source.

ICMP Message Format:

8 - bits 8 - bits 16 - bits

Type Code Checksum

Department of ECE, SIET K.Narasimha, Asst. Professor


129 Computer Networks SIET

When over packets sending from source, the one of the routers which may
treated as error packet and which are discarded by the router and ICMP sends an
error report to the original source. The source itself modify the error packet when
forwarded to the destinations.

The ICMP sends message by encapsulating them in IP packets and setting the
header protocol by 1.

The ICMP can send only to the source, hot to an intermediate router. Because
the datagram carries only the addresses of the original sender and the final
destination.

The main functions associated with the ICMP are as follows.

1. Error reporting
2. Reach ability testing
3. Congestion control
4. Route change notification
5. Performance measuring

The ICMP messages are given by

Name Type / Code Usage


Destination un 3/0 (or) 1 Lack of
reachable (node, net, connectivity
and host)
Destination 3/4 Path MTU
unreachable discovery
(fragments)
Time exceeds 11/0 Trace router
Echo request (or) 8 or 0 ping
reply

Destination un reachable means packet is not delivered to the destination router


cannot find the destination.

Time exceeded is used when time to live field hits to zero. Life time of data gram
expires.

Echo replay means the device in the network is alive.

Department of ECE, SIET K.Narasimha, Asst. Professor


130 Computer Networks SIET

ARP (address resolution protocol):

The address resolution protocol (ARP) is used to associate a logical address with
physical address.

On typical physical networks such as LAN, each device on a link is identified by


a physical or station address when its internet address is known.

Any time a host or a router has an IP datagram to send to another host or router,
it has the logical IP address of the receiver.

An IP datagram must be encapsulated in a frame to be able to pass through the


physical network. This means that the sender needs the physical address of the
receiver.

A mapping corresponds a logical address to a physical address. The mapping


can be done dynamically which means that the sender asks receiver to announce its
physical address when needed.

In always sends a ARP query packet. The packet includes the physical address
and IP address of the sender and the IP address of the receiver.

Consider a example computer A and computer B share a share physical


network. Each computer has an assigned IP address and physical address.

Address mapping must be performed at each step along the path from the
original source to the destination. The sender must map the intermediate routers
internet address to a physical address. From on above broad cast ARP host A

Department of ECE, SIET K.Narasimha, Asst. Professor


131 Computer Networks SIET

broadcast an ARP request containing system B IP address to al computer on the


network.

Figure (2) shows that host B responds with an ARP reply that contains the pair (IP at
B and physical address at B) whenever a computer receiver an ARP replay it saves the
senders IP address and its corresponding address in its cache.

When transmitting a packet, a computer always looks in its cache for a binding before
sending an ARP request.

If a computer finds the desired binding in its ARP cache, it need not broadcast on the
network

When ARP message travel from one computer to other they must carried in physical
frame.

ARP message

Frame header Frame data area

The above figure shows that the ARP message is carried in the data portion of a frame.

ARP Packet format:

Hardware Type: this is the 16 – bit field defining the type of network on which ARP is
running. Ethernet value is 1

Protocol Type:

This is the 16 – bit field defining the protocol the value of this field for the IPV4 protocol
is 0800H.

32 - bits
Hardware type Protocol type
Hard length Protocol Operation
length
1. request 2. reply
Sender protocol address
Target hardware address
Target protocol address

Department of ECE, SIET K.Narasimha, Asst. Professor


132 Computer Networks SIET

Hardware Length: this is an 8 – bit field defining the length of the physical address
in bytes Ethernet value is 6.

Protocol Length: This is an 8 – bit field defining the length of logical address in bytes
for the IPV 4 protocol the value is 4.

Operation: it is defining the type of packet

1. APR Request
2. APR reply

Sender Hardware Address: this is variable length field defending the physical address
of the sender (6 – byte long)

Sender Protocol Address: this is also a variable length field defining the logical
address of the sender (4 – bytes long)

Target Hardware Address: this is a variable length field defining the physical address
of the target. (6 – bytes long)

Note: for ARP request message, this field is all 0’s because the sender doesn’t know
the physical address of the target.

Target Protocol Address: It is also a variable length field defining the logical address
of the target. (4 – bytes long)

RARP (Reverse Address Resolution Protocol):

In some of the instances, a host may know its MAC address but not its IP address.

For example, when a diskless computer such as an ∝ terminal is being bootstrapped,


it can send the MAC address from its Ethernet card.

Its IP address is usually kept separately in a disk at the server. The problem of getting
an IP address from MAC address can be handled by RARP, which works on the fashion
of similar to ARP

Department of ECE, SIET K.Narasimha, Asst. Professor


133 Computer Networks SIET

The sender broadcast a RARP request that specifies itself as both. The sender and
target machine and supplied its physical address in the target hardware address filled.

All the machines on the network receive the request, but only those authorized to
supply the RARP service process the request and send a reply, such machines are
known as RARP server.

If RARP succeeded means, the network must contain at least one RARP server.

Request: like ARP messages, a RARP message is sent from one machine to the another
encapsulated in the data portion of a network frame.

A frame carrying a RARP request has the usable preamble, Ethernet source and
destination addresses, and packet type field in front of the frame.

Reply: Server answers request by filling in the target protocol address field, changing
the message type from request to reply, and sending reply back directly to the machine
making the request.

DHCP (Dynamic Host Control Protocol):

DHCP provides static and dynamic address allocation that can be manual or
automatic.
DHCP does not require an administrator to add an entry for each computer to the
data base that a server uses.
DHCP provide mechanism that allows a computer to join a new network and obtain IP
address without manual invention.
The DCHP works like a phos & play networking
DHCP is in wide use because it provides a mechanism for assigning temporary IP
network address to hosts. This capability is used extensively by internet service
providers to maximum the usage of their limited IP address space.
DHCP has a pool of available IP address when a DCHP client request a temporary IP

Department of ECE, SIET K.Narasimha, Asst. Professor


134 Computer Networks SIET

address the DHCP server goes to the pool of available IP addresses (unused IP
address)and assigns an IP address for a negotiable period of time. An administrator
can configure a DHCP server to have two types of address. Permanent addresses to be
allocated on demand. When a computer boots and send a request to DHCP the DHCP
server consults its database to find configuration information.
DHCP uses a same technique as Bootp: each computer waits a random time before
transmitting or retransmitting a request
When a host wishes to obtain an IP address the host broadcasts a DHCP discover
message in its physical network.
The server in the network may respond with a DHCP offer message that provides an IP
address and other configure information.
When a computer discover a DHCP server the computer saved the servers address in
a cache on permanent storage once it obtains an IP address, the computer saves the
IP address in cache.

Flooding:
The flooding technique requires no network information. A packet is sent by a source
node to all its adjacent nodes.

At each node, every incoming packet is retransmitted on every outgoing links, except
the link that it arrived from.

Flooding generates large no. of duplicate packets. One way to prevent this is for each
node to renumber the identity of those packets it has already sent. When duplicate
packets arrive they are discarded.

Department of ECE, SIET


135 Computer Networks SIET

One such measure is to have a hop counter contained in the header of each packet,
which is decremented at each hop.

When count reaches to zero, the packet is discarded the counter is set to maximum
value i.e, diameter of the subnet.

In selective flooding the router do not retransmit every incoming packets on all links
but only on those links that are in the right direction.

The main disadvantage of flooding is the total traffic load that is generates, is directly
proportional to the connectivity of the network. Also flooding requires much large band
width.

The advantage of flooding is that it is highly robust.

The following figures shows that flooding process the subnet is given as.

B C

A
H

D E

The first hope is:

B C

A
H

D E

The second hop is

Department of ECE, SIET K.Narasimha, Asst. Professor


136 Computer Networks SIET

B C

A
H

D E

The third hop is:

B C

A
H

D E

Routings Algorithm – Optimal Principle:


A host or a router has a routing table with an entry for each destination, or a
combination of destinations, to route IP packets.

A routing table can be either static or dynamic

A static routing table contains information entered manually. The administrator


enters the route for each destination into the table.

Dynamic routing table is updated periodically by using one of the dynamic routing
protocols such as RIP, OSPE or BGP

The main function of the network layer is to route packets from source to destination,
to accomplish this on route through the network must be selected, generally more
than one route is possible.

Optimality refers to the ability of the rouging algorithm to select the best route the
best route depends on the metrics and metric weightings used to make the calculation.

Department of ECE, SIET K.Narasimha, Asst. Professor


136 Computer Networks SIET

For example, one routing algorithm might delay more heavily in the calculation.

The figure shows that principle of optimality

Optimality principle states that if router J is on the optimal path from router 1 to
router k, then the optimal path from J to k also falls, along the same route,

Suppose route from I TO J is R1 and rest of the route is called r2.

If a route better then r 2 is existed from J to K, it could be concatenated with r 1 to


improve the route from I to K, So that r 1 r2 is optimal.

From an above figure shows the subnet and sink tree with distance metric is measured
as the number of hops.

Sink tree is not necessarily unique; other trees with the same path lengths may exist.

Sink tree does not contain any loops so each packet will be delivered within a finite
and bounded number of hops.

Shortest Path Routing or Dijkstras Algorithm:


In shortest path routing the path length between each node is measured as a function
of distance, band width average traffic, communication cost, mean queue length
measured delay etc.

Department of ECE, SIET K.Narasimha, Asst. Professor


137 Computer Networks SIET

By changing the weighting function, the algorithm then computes the shortest path
measured according to any one of a number of criteria or a combination of criteria.

For this we draw a graph of subnet

In this each node of graph representing a router and each arc of the graph representing
a communication link.

Each link has a cost associated with it.

To choose a route between a given pair of routers, the algorithm just finds the shortest
path between there on the graph.

The algorithm for computing the shortest path between two needs of a graph are called
Dijkstra’s algorithm

Dijkstra’s Algorithm:
In dijkstra’s algorithm each node is labeled with its distance from the source node
along the best-known path.

Initially no paths are known, so all nodes are caballed with infinity (𝛼). As the
algorithm proceeds, the paths are found, the labels are changed, reflecting better
paths,

The algorithm is follows as step by step

1. Source node is initialized and can be indicated assailed circle.


2. Initial path cost to neighboring nodes (adjacent nodes) or link cost is computed
and these nodes are relabeled considering source node.
3. Examine the all adjacent nodes and find the smallest label, make it permanent.
4. The smallest lable node is how working nock, then step 2 & step 3 are repeated
till the destination node reached

3
B C
2 5

3
A
H
1
D E 2
1

Department of ECE, SIET K.Narasimha, Asst. Professor


138 Computer Networks SIET

Step 1: node A is initialized as source node

3
B C
2 5

3
A
H
1
D E 2
1

Step 2: link cost is computed for the adjacent node.

(2, A)
B C
2

A
H
1
D E 1
(1, A)

Step 3: Since AD is the smallest path, how D is working node.

(2, A)
B C

A
H

D E
(1, A)

Department of ECE, SIET K.Narasimha, Asst. Professor


139 Computer Networks SIET

Step 4: adjacent nodes to D are C & E

(2, A) (3, D)
B C

A
H

D E
(1, A)
(1, D)

Step 5: since shortest is E, how E is working node.

(2, A) (3, D)
B C

A
H

D E
(1, A)
(1, D)

Step 6:

B C

A
H

D E
(1, A)
(1, D)

Hence the shortest path between node A & node H is ADEH

Department of ECE, SIET K.Narasimha, Asst. Professor


140 Computer Networks SIET

Distance Vector Routing:


Distance vector routing algorithm is the dynamic routing algorithm. It was mainly
designed for small network topologies.

Distance vector routing sometimes also called as

Bellman – ford routing algorithm and the ford – Fulkerson algorithm.

The term distance vector derives from the fact that the protocol includes its routing
updates with a vector distance or hop counts.

In this algorithm, each router maintains a routing table indexed by, and containing
one entry for, each router in the subnet.

Entry contains two parts.

1. The preferred outgoing line to use for that destination


2. An estimate of the time or distance to that destination.

The metric used might be number of hops, time delay in milliseconds total no. of
packets queued along path, etc.

Assume that delay is used as a metric and that router knows that delay to each of its
neighboring nodes.

Nodes participating in the same local network are considered as neighboring nodes.

Ones every time (m sec) each router sends to each neighbor a list of its estimated delay
to reach destination.

B C
A D

F G
E H

L
I J K

It also receives a similar list from each neighbor

Department of ECE, SIET K.Narasimha, Asst. Professor


141 Computer Networks SIET

By performing calculation for each neighbor, a router can find out which estimate
seems the best and use that estimate and the corresponding line in its new routing
table.

Distance vector routing principle:

1. Each node creates its own least cost tree with the rudimentary information
(immediate neighbors)
2. The in complete tree are exchanged between immediate neighbors to make the
trees more and more complete and to represent the whole network
3. Routers continuously tell and all of their neighbors (periodically)

A
A 0
0 2 7
B 2
A B C C 7
D 3
G 9 E 6
F 8
D E F G 9
3 6 8

Figure: figure at node A (Tree node)

From an above figure, A least – cost tree is a combination of least – cost paths glued
together to form a tree.

Distance vector unglues their paths to create a distance vector.

The distance vector is given by

2 5
A B C 3

3
4 4 G

D E F 1
5 2

Examine the all nodes and its maintain a routing table (Distance vector)

Department of ECE, SIET K.Narasimha, Asst. Professor


142 Computer Networks SIET

A B C D E E F G
A→ 0 2 ∝ 3 ∝ ∝ ∝ ∝
B→ 2 0 5 ∝ 4 ∝ ∝ ∝
C→ ∝ 5 0 ∝ ∝ 4 4 3
D→ 3 ∝ ∝ 0 5 ∝ ∝ ∝
E→ ∝ 4 ∝ 5 0 2 2 ∝
F→ ∝ ∝ 4 ∝ 2 0 0 1
G→ ∝ ∝ 3 ∝ ∝ 1 1 0

According to bellman ford routing algorithm update the vectors by it neighbor s to


exchange their distance.

The bellman ford equation is given by

dx(u) = MinV{ C(x, V) + DV(y)}

dx(y) = least cost path from node x & u

MinV = minimum value of x’s neighbors

By updating the distance vectors

Taking the node B and Their neighbors A, E and C to produce new value of B after
exchanging of information

First iteration---A

New B Old B A
A 2 2 ←A 0
A
B 0 0 B 2
B
C 5 5 C ∝
C
D 5 ←D ∝ D 3
E 4 4 E ∝
E
F ∝ F ∝ F ∝
G ∝ ∝ G ∝
G
B[ ] = Min (B [ ] + 2 + A [ ] )

Department of ECE, SIET K.Narasimha, Asst. Professor


143 Computer Networks SIET

2nd iteration--E

New Old B E
B
A 2 2 A ∝
A
B 0 0 B 4
B
C 5 5 C ∝
C
D 5 5 5
D D
E 4 4 E 0
E
F 6 F ∝ F 2
G ∝ ∝ G ∝
G

B [ ] = min B [ ] , 4 + E [ ] )

The third iteration for the B & C is given by.

New Old B C
B
A 2 2 A ∝
A
B 0 0 B 5
B
C 5 5 C 0
C
D 5 5 ∝
D D
E 4 4 E ∝
E
F 4 F 6 F 4
G 8 ∝ G 3
G

This is the update distance vector for B node.

Similarly examine the all nodes & its neighbor according to bellman ford algorithm,
the least cost is measured by comparing all the other nodes.

Department of ECE, SIET K.Narasimha, Asst. Professor


144 Computer Networks SIET

It any link break on the network the convergence of links is terminated an d estimate
the least cost path for the updating.

It ‘s completely done with concept of dynamic routing algorithm.

Count – To Infinity Problem:


The count – to – infinity problem occurs when the subnet is given as

In the above shows an imagined network and denotes the distances from router A to
every other router.

Suppose that link (A,B) fails (or) broken router B observed it, but in routing table of
B, C has a router to a with 2 hops

The problem is, that B does not know that C has a router B as Successor in routing
table on the route to A. this followed count – to – infinity problem.

Router B actualizes own routing table and takes the router to A over router C. we can
see tha new distances to A.

In router C’s routing the router to A contains router B as next hop router, so if B has
increased his costs to A,C is forced to do so.

Router C increase his cost to A about B+1 = 4

Now we see the consequence of the distributed Bellman ford protocol.

Department of ECE, SIET K.Narasimha, Asst. Professor


145 Computer Networks SIET

Router B takes the path over C to A, and re actualizes own routing table and So

on. There are several partial solutions to the count – to – infinity problem

1. Some relatively small number as an approximation of infinity

Example: we may decide that the maximum no. of hops to get across a certain.
Network is never going to be more than 16 and so we could pick 16 as the value
that represents infinity.

This bounds the amount of time that it takes to count to infinity of course it
could also present a problem if our network grew to a point where some nodes
were separated by more than 16 hops

2. Another is to improve the time to stabilize routing is called split horizon.

This technique implies that routing information about some network stored in
the routing table of a specific router is never sent to the router from which it was
received.

Hierarchical Routing

Department of ECE, SIET K.Narasimha, Asst. Professor


146 Computer Networks SIET

From an above figure, At a certain point the network may grow to the point
where it is no longer feasible for every router to have an entry for other
router, so the routing will have to be done hierarchically

When this routing is used, the routers are divided into regions. It contains all
the details about how to route packets to destination within its own region.

Some time, two – level hierarchy may be in – efficient it is necessary to group the
regions into clusters the clusters into zones and zones into groups and so on.

The above figure shows routing in a two level hierarchy.

Hirerchy For Table 1A:

Destination Line Hops

1A - -

1B 1B 1

1C 1C 1

Department of ECE, SIET


147 Computer Networks SIET

2 1B 2

3 1C 2

4 1C 3

5 1C 5

Full table for 1A

Destination Line Hops

1A - -

1B 1B 1

1C 1C 1

2A 1B 2

2B 1B 3

2C 1B 3

2D 1B 4

3A 1C 3

3B 1C 2

4A 1C 3

4B 1C 4

4C 1C 4

5A 1C 5

5B 1C 6

5C 1B 5

5D 1C 7

Department of ECE, SIET


148 Computer Networks SIET

5E 1C 6

From an above routing table, for router 1A has 17 entries in full routing table.
When hierarchical routing is used only 07 entries valid for 1A

There are entries for local routers but all other regions have been condensed into a
signal router.

Hierarchical routing increases the saving the table space

Routing Information Protocol (RIP):

Routing Information Protocol (RIP) is a dynamic routing protocol which uses hop count
as a routing metric to find the best path between the source and the destination
network. It is a distance vector routing protocol which has AD value 120 and works
on the application layer of OSI model. RIP uses port number 520.

Hop Count:

Hop count is the number of routers occurring in between the source and destination
network. The path with the lowest hop count is considered as the best route to reach
a network and therefore placed in the routing table. RIP prevents routing loops by
limiting the number of hopes allowed in a path from source and destination. The
maximum hop count allowed for RIP is 15 and hop count of 16 is considered as
network unreachable.

The main objective of the RIP are:

1. Updates of the network are exchanged periodically.

2. Updates (routing information) are always broadcast.

3. Full routing tables are sent in updates.

4. Routers always trust on routing information received from neighbor routers. This
is also known as Routing on rumours.

Department of ECE, SIET


149 Computer Networks SIET

OSPF(Open Shortest Path First):

OSPF is abbreviated as Open Shortest Path First. OSPF is an intradomain routing


protocol and it is the implementation of link state routing protocol. It falls into the
group of interior gateway protocols (IGPs), operating within a single autonomous
system (AS). OSPF was designed as an interior gateway protocol. It is used in an
autonomous system such as a local area network (LAN).

To handle routing efficiently and on time, this protocol divides an autonomous system
into areas. Area is collection of routers, hosts, networks all contained within an
autonomous system. An autonomous system can be divided into many different areas,
but at the same time all networks inside an area must be connected.

Department of ECE, SIET K.Narasimha, Asst. Professor


150 Computer Networks SIET

From the above given figure we can see that the network is divided and it can be
structured, or subdivided, into routing areas to simplify administration and optimize
traffic and resource utilization. Routers within an area flood the area with routing
information. At the border of areas there lies a special router “area border routers”.
These routers summarizes the information about the area in which it lies and send
the information to some other area. Among the areas there is an area called
“backbone” to which all the other areas are connected and serves as the primary area.
Each area has an identification. Two different areas can’t be connected directly but
they need to be connected through the backbone network and it is compulsory. The
routers which are at the border of two area for example area 1 and area 3 are
connected through is area border router.

The OSPF protocol supports authentication and its updates are sent through
multicast address 224.0.0.5/6. If one of the link fails the protocol finds the other
shortest path to reach the destination hence it posses faster convergence.While
communication hello packets are sent over each 10 sec, and when the reply is not
received within 40 sec it is considered time out. Also when there is slight change in
the router configuration (routers added/removed ), the routing table is updated very
fast. It is based on link state routing protocol.

As the name suggested “shortest path first”, OSPF calculate the shortest route to a
destination through the network based on an algorithm. It uses disjktra algorithm for
calculating shortest path.

A connection is also known as link. A link can also be connection between two
routers/networks. In OSPF four different types of links are defined:

Point to Point: These types of links are present in between two routers and as it is
point to point, there lies no hosts, routers in between the two connected routers.

Department of ECE, SIET K.Narasimha, Asst. Professor


151 Computer Networks SIET

Transient link: If there lies large number of routers attached to a network. There can
be Lan, wifi, several different routers then this configuration is termed as transient
link.It can be represented with two topology: Realistic and Unrealistic.

Stub: It is a network that is connected with a single network. The data packets are
sent and received are through the same router.

Virtual link: There may be some situation arises when link is broken due to some
reason. At that time the network administrator create a virtual link between the two
communicating routers. These types of link are called virtual link.

There are five different types of packet in the OSPF protocol and they are:

1. Hello packet
2. Database description
3. Link state request
4. Link state update
5. Link state acknowledgement

When there comes a situation of passing a packet, the question is to which network it
should be passed and the decision is based on optimisation. One of the way is to
assign a cost for passing through a network and this cost is termed as metric. However
the metric assigned to each network depends on the type of protocol. Protocol such as
OSPF allows the administrator to assign a cost for passing through a network based
on the type of service. It can be based on maximum delays, maximum throughput,
speed and error free etc. There can be several routing tables based on different types
of services.

OSPF uses a reference bandwidth of 100 Mbps for cost calculation. The formula to
calculate the cost is reference bandwidth divided by interface bandwidth. For example,
in the case of Ethernet, it is 10 Mbps / 10 Mbps = 1.

Department of ECE, SIET K.Narasimha, Asst. Professor


152 Computer Networks SIET

Border Gateway Protocol (BGP):

BGP is an interdomain routing protocol using path vector routing. It first appeared in
1989 and has gone through four versions. Types of Autonomous Systems As we said
before, the Internet is divided into hierarchical domains called autonomous systems.
For example, a large corporation that manages its own network and has full control
over it is an autonomous system. A local ISP that provides services to local customers
is an autonomous system. We can divide autonomous systems into three categories:
stub, multihomed, and transit.

Stub AS: A stub AS has only one connection to another AS. The interdomain data
traffic in a stub AS can be either created or terminated in the AS. The hosts in the AS
can send data traffic to other ASs. The hosts in the AS can receive data coming from
hosts in other ASs. Data traffic, however, cannot pass through a stub AS. A stub AS
is either a source or a sink. A good example of a stub AS is a small corporation or a
small local ISP.

Multihomed AS: A multihomed AS has more than one connection to other ASs, but
it is still only a source or sink for data traffic. It can receive data traffic from more
than one AS. It can send data traffic to more than one AS, but there is no transient
traffic. It does not allow data coming from one AS and going to another AS to pass
through. A good example of a multihomed AS is a large corporation that is connected
to more than one regional or national AS that does not allow transient traffic.

Transit AS: A transit AS is a multihomed AS that also allows transient traffic. Good
examples of transit ASs are national and international ISPs (Internet backbones).

Path Attributes: The path was presented as a list of autonomous systems, but is, in
fact, a list of attributes. Each attribute gives some information about the path. The
list of attributes helps the receiving router make a more-informed decision when
applying its policy. Attributes are divided into two broad categories: well known and
optional.

A wellknown attribute is one that every BGP router must recognize. An optional
attribute is one that needs not be recognized by every router. Well-known attributes
are themselves divided into two categories: mandatory and discretionary.

A well-known mandatory attribute is one that must appear in the description of a


route. A well-known discretionary attribute is one that must be recognized by each
router, but is not required to be included in every update message. One wellknown
mandatory attribute is ORIGIN. This defines the source of the routing information
(RIP, OSPF, and so on). Another well-known mandatory attribute is AS_PATH. This

Department of ECE, SIET K.Narasimha, Asst. Professor


153 Computer Networks SIET

defines the list of autonomous systems through which the destination can be reached.
Still another well-known mandatory attribute is NEXT-HOP, which defines the next
router to which the data packet should be sent.

The optional attributes can also be subdivided into two categories: transitive
and nontransitive. An optional transitive attribute is one that must be passed to the
next router by the router that has not implemented this attribute. An optional
nontransitive attribute is one that must be discarded if the receiving router has not
implemented it. BGP Sessions The exchange of routing information between two
routers using BGP takes place in a session. A session is a connection that is
established between two BGP routers only for the sake of exchanging routing
information. To create a reliable environment, BGP uses the services of TCP.

In other words, a session at the BGP level, as an application program, is a


connection at the TCP level. However, there is a subtle difference between a connection
in TCP made for BGP and other application programs. When a TCP connection is
created for BGP, it can last for a long time, until something unusual happens. For this
reason, BGP sessions are sometimes referred to as semi pennanent connections.
External and Internal BGP If we want to be precise, BGP can have two types of
sessions: external BGP (E-BGP) and internal BGP (I-BGP) sessions. The E-BGP session
is used to exchange information between two speaker nodes belonging to two different
autonomous systems. The I-BGP session, on the other hand, is used to exchange
routing information between two routers inside an autonomous system. Figure 22.32

Multicast Routing Protocols:

To route our multicast traffic, we need to use a multicast routing protocol. There
are two types of multicast routing protocols:

 Dense Mode
 Sparse Mode

Department of ECE, SIET K.Narasimha, Asst. Professor


154 Computer Networks SIET

Dense Mode
Dense mode multicast routing protocols are used for networks where most subnets
in your network should receive the multicast traffic. When a router receives the
multicast traffic, it will flood it on all of its interfaces except the interface where it
received the multicast traffic on. Here’s an example:

Above we have a video server sending multicast traffic to R1. When R1 receives these
packets, it will flood them on all of its interfaces. R2 and R3 will do the same so our
two hosts (H2 and H3) will receive the multicast traffic. In the example above both of
our hosts are interested in the multicast traffic but what if there are hosts that don’t
want to receive it?

A multicast router can tell its neighbour that it doesn’t want to receive the multicast
traffic anymore. This happens when:

 The router doesn’t have any downstream neighbors that require the multicast
traffic.
 The router doesn’t have any hosts on its directly connected interface that
require the multicast traffic.

Department of ECE, SIET K.Narasimha, Asst. Professor


155 Computer Networks SIET

Above we see R1 that receives the multicast traffic from our video server. It floods
this multicast traffic to R2 and R3 but these two routers don’t have any interest in
the multicast traffic. They will send a prune message to signal R1 that it should no
longer forward the multicast traffic.

There are a number of dense mode routing protocols:

 DVMRP (Distance Vector Multicast Routing Protocol)


 MOSPF (Multicast OSPF)
 PIM Dense Mode

PIM (Protocol Independent Multicast) is the most popular multicast routing protocol
which we will discuss in other multicast lessons.

RPF (Reverse Path Forwarding)


Multicast routing is vulnerable to routing loops. One simple loop-prevention
mechanism is that routers will never forward multicast packets on the
interface where they received the packet on. There is one additional check
however called RPF (Reverse Path Forwarding). Take a look at the example below:

Above we have R1 which receives a multicast packet which is flooded on all


interfaces except the interface that connects to the video server. I’m only showing the
packet that is flooded towards R3 here:

 R1 floods the packet to R3.


 R3 floods the packet to R2.
 R2 floods it back to R1.

Department of ECE, SIET K.Narasimha, Asst. Professor


153 Computer Networks SIET

We now have a multicast routing loop. We can prevent this by implementing the RPF
check:

When a router receives a multicast packet on an interface, it looks at the source IP


address and does two checks:

 Do we have an entry that matches the source address in the unicast routing
table?
 If so, what interface do we use to reach that source address?

When the multicast packet is received on the interface that matches the information
from the unicast routing table, it passes the RPF check and we accept the packet.
When it fails the RPF check, we drop the packet.

Let me visualize this with an example:

Above we see R1 which floods the multicast traffic to R2 and R3. R2 also floods it to
R3.

R3 will now perform a RPF check for both multicast packets. It sees the source
address is 192.168.1.100 and checks the unicast routing table. It finds an OSPF
entry for 192.168.1.0/24 that points to R1.

The packet that it receives from R1 will pass the RPF check since we receive it on the
Fa0/0 interface, the one it receives from R2 doesn’t. The multicast packet from
R2 will be dropped.

R3 will then flood the multicast packet towards R2 who will also do a RPF check. It
will drop this packet since R2 uses its interface towards R1 to reach 192.168.1.100.

Department of ECE, SIET K.Narasimha, Asst. Professor


154 Computer Networks SIET

Another way to look at this is that the RPF check ensures that we only accept
multicast packets from the shortest path. Multicast packets that travel longer
paths are dropped. For R3 the shortest path to 192.168.1.100 is through R1.

Sparse Mode
At this moment you might be thinking that dense mode is very inefficient with its
flooding of multicast traffic. When you only have a few receivers on your network
then yes, you will be wasting a lot of bandwidth and resources on your routers.

The alternative is sparse mode which is far more efficient. Sparse mode multicast
routing protocols only forward the multicast traffic when another router
requests it. It’s the complete opposite of dense mode:

Department of ECE, SIET K.Narasimha, Asst. Professor


155 Computer Networks SIET

Connecting Devices:

Repeaters: It is an device, it operates only in the physical layer. The purpose of the
repeater is to extend the distance of LAN.

A repeater receives a signal and before it becomes too weak or corrupted, generates
the original bit pattern. The repeaters then sends the refreshed signal.

A repeater does not actually connect two LANs it connects two segments of the
same LAN. A repeater is not a device that can connect two LANs of different
protocols.

A repeater doesn’t amplify signal; it generates signal. When it receives a week


or corrupted signal, it creates a copy, bit for bit, at the original strength.

Characteristics of Repeater:

1. Repeaters are used to regenerate an existing base band signal.


2. Repeater will pass a broad cast.
3. Repeater issued primarily in a co – axial bus topology
4. Repeater operates at physical layer of OSI model.
5. Segments connected by a repeated must use the same media access control
method.
6. Repeater doesn’t filter packets.

Types of Repeaters: four types of repeaters

1. Single port repeater


2. Multiport repeater

Department of ECE, SIET K.Narasimha, Asst. Professor


156 Computer Networks SIET

3. Smart repeaters
4. Optical repeaters.

1. Single port repeater

1. Single port repeater operates in two segments, one type has a signal taken it to
boost and pass to the next segment
2. In multiport repeater has one input port and multiple output port
3. Smart repeater is a hybrid device and very similar to a bridge in functionality.
Packet filter is done by smart repeaters.
4. In optical repeaters, in which the repeater repeats the optical signals. Repeaters
are implemented in all cables.

Switches: switch operates at the data link layer (DLL) of the OSI model. It can
interpret address information.

Switch reassembles bridges and can be considered as multiport bridges. With these
the limited band width utilization and prove more cost – effective than bridge.

Switches divided a network into several isolated channels. Packets sending from one
channel will not go to another is not specify

Each channel has its own capacity and need not be shared with other channels.

Advantages of Switches:

1. Switches divide a network into several isolated channels or collision domains.


2. Reduce the possibility of collision.
i. Collision only occurs when two devices try to get access to one channel.
ii. It can be solved by buffering one of them for later access.

3. Each channel has its own network capacity and it is suitable for real time
application. E.g. video conference

Layer 2 switch:

It performs at the physical and data link layer.

It is a bridge with many ports and a design that allows better performance. It operates
using physical network addresses, identify individual devices.

Layer 3 switches:

The layer 3 switch use network or IP address that identify location on the network.
They read network address more closely then layer 2 switches.

Department of ECE, SIET K.Narasimha, Asst. Professor


157 Computer Networks SIET

They identify network location as well as the physical device. A location can be a LAN
work station, a location in computer memory or even a different packet of data
travelling through a network.

Layer 4 Switches:

This layer 4 switch of the OSI model communicate and co – ordinate between the
systems. Layer 4 switch are capable of identifying which application protocol (HTTP,
SNMP, FTP) are include with each packet and they use this information to hand off
the packet to the appropriate higher layer software.

Layer 4 switches make packet forwarding decisions based on not only on the MAC
address and IP address, but also on the application to which a packet belongs.

Gate Way:

Gate way connects two independent networks a gate way is a protocol converter.

A gateway can accept a packet formatted for one protocol (Ex: TCP/IP) and
converts it to a packet formatted for another protocol before forwarding it.

The gate way must adjust the data rate, size and data format. Gateway is
generally software installed within a router.

Hubs: all the networks (except those using co – axial cable) require a central location
to bridge media segment together, these central locations are called hubs.

Hubs are special repeaters that overcome the electromechanical limitations of a media
signal path.

Function of Hub:

1. Facilitate adding, deleting or moving work stations.


2. Extend the length of the network
3. Provided flexibility by supporting multiple inter face.
4. If offers fault tolerance feature.

Department of ECE, SIET K.Narasimha, Asst. Professor


158 Computer Networks SIET

5. Provide centralize management services.


Types of Hubs: three types of hubs
1. Passive hub
2. Active hub
3. Intelligent hub.

Passive hub: A passive hub is just a connector. It simply combines the signals of
network segments. There is no regeneration of signal.

It is a part of transmission media

Active Hub: An active hub is actually a multipoint repeater. An active hub that
regenerates or amplifies the signals.

By using active hubs, the distance between the devices can be increased. It is
very expensive than passive hub.

The drawback of the active hub is that they amplify noise along with signal.

Intelligent hub regenerates the signal and performs some network management and
intelligent path selection.

It indicates that alternate path, will be the quickest and send the signal that way.

Permanently connecting to the hub because each segment will be used only when a
signal is sent to a device using that segment.

Department of ECE, SIET K.Narasimha, Asst. Professor


159 Computer Networks SIET

Routers:

A router is a three layer device that routes packet based on their logical address.
Router connects two (or) more networks. It consists of combination of the hardware
and software.

A router normally connects LANs & WANs in the internet and has a routing
table that is used for making decision about the route.

Router connects dissimilar networks together and have access to information


from physical, data link and network layer.

The key factor of a router is to determine a shortest path to destination. A router


forwards packet by examining protocol address at network layer, look up the address
in the routing table, then forward the packet to the next hop.

Bridges: A bridge operates in both the physical and data link layer. A bridge extends
the maximum distance of network by connecting separate network segment.

A bridge simply passes on all the signals it receives. It reads the address of all the
signal it receivers.

Bridges performs data link functions such as error detection, frame formatting and
frame routing.

Department of ECE, SIET K.Narasimha, Asst. Professor


160 Computer Networks SIET

Bridge Architecture:

The layered architecture of two Port bridge as shown in fig.

At each port of bridge, it has physical layer and MAC sub layer

The physical layer and MAC layer protocols at each port of bridge match with
the protocols of the respective LAN.

The MAC sub layers have relay and routing function between them. When MAC
frame is received by it examine the destination address, it reformats the frame as
required by the other LAN.

Department of ECE, SIET K.Narasimha, Asst. Professor

You might also like