Chapter 12 - Network Essentials
Chapter 12 - Network Essentials
Principles
Chapter 12
Network Essentials
TMH Chapter - 12 1
Network Essentials
Introduction
A network is an interconnection of two or more computers for the
purpose of sharing information and resources
Apart from computers a network may also include other devices like
printers, tape drives, hubs, switches, routers etc. Each of these devices
is generally referred to as a Node.
TMH Chapter - 12 2
Network Essentials
Terminology
Local Area Network (LAN) : A communication network consisting
of computers distributed over a relatively small geographical area
like a building or a group of buildings within a campus
TMH Chapter - 12 4
Network Essentials
Network Types
Peer-to-peer : All the computers on the networks act as peers i.e. they
have equal rights and priviledges, and share information equally.
Applications run on each system indipendently and no single system
controls the network
TMH Chapter - 12 5
Network Essentials
Network Types
The other class of machines called Clients are less powerful machines
which take resources from the servers.
Each client has a specific level of access that enables them to use, view
or manipulate data on the servers
TMH Chapter - 12 6
Network Essentials
Network Types
The advantages of a Client-Server network include the following:
• A central location of data enables easier management and maintenance
• Security measures like password protection and periodic backup of data
are easier to implement.
• Since the clients share the resources of the server, only one copy of the
resources are necessary instead of individual copies on all the clients
thereby avoiding duplication.
• Data being located at a single location, can be updated periodically
thereby providing consistency, instead of different versions of the data
on various clients.
• The total computing load is distributed among the clients and servers
thus allowing the machines to run more efficiently
TMH Chapter - 12 7
Network Essentials
Topology
A network topology denotes the physical pattern to which a network
conforms. The topology determines how data flows, the level of fault
tolerance, the management and trouble-shooting considerations.
Multiple topologies may be combined within a single network
TMH Chapter - 12 8
Network Essentials
Topology
Ring : Devices are connected to each other in a circle. If a single device
fails the rest of the network continues to function properly
TMH Chapter - 12 9
Network Essentials
Components
Network Interface Card is an expansion card that is added to a
computer to enable it to communicate on a network
It is also responsible for converting the data from the computer into a
form which can be sent out over the network and vice versa
The first 24 bits (00-40-95) is the vendor’s unique code while the
remaining bits (e0-5d-c7) is the unique device ID
TMH Chapter - 12 11
Network Essentials
Components
The Network medium is the general term used to describe all of the
cabling and connectors used to connect a network. The most common
types are :
(1) Coaxial Cables
(2) Twisted Pair Cables
(3) Fiber Optic Cables
Other than cables many wireless media are also used like Infra-
red and LASER devices, radio and cellular connections,
microwave antenna and digital satellites
TMH Chapter - 12 12
Network Essentials
Components
The coaxial cables implement the Ethernet specifications. Ethernet was
originally developed by Xerox Corp.in the 1970s as a broadcast
medium.
TMH Chapter - 12 13
Network Essentials
Components
Surrounding the layer of conductor is a layer of insulation and a braided
shield.
TMH Chapter - 12 14
Network Essentials
Components
TMH Chapter - 12 15
Network Essentials
Components
A transceiver drop cables connects the NIC to the transceiver. The drop
cable is referred to as AUI Cable (Attachment Unit Interface) and cable
be maximum of 50 meters length
TMH Chapter - 12 16
Network Essentials
Components
The other variant of coaxial cable is called Thin Ethernet or 10Base2. It
has similar internal structure but 0.2 inch in diameter and is much more
flexible.
TMH Chapter - 12 17
Network Essentials
Components
TMH Chapter - 12 18
Network Essentials
Components
The Ethernet 10BaseT specifications provides for twisted pair cables.
These come in two types : UTP (unshielded) and STP (shielded).
Maximum cable length is 100 m. One pair carries Transmit signals, the
other pair carries Receive signals
The two wires in each pair must be twisted together for the entire length
of the segment, a standard technique to improve the signal carrying
characteristics of a wire pair
CAT1 & 2 are used for voice and low speed transmissions, CAT3 for
10Mbps, CAT4 for 16Mbps and CAT5 for 100Mbps
TMH Chapter - 12 19
Network Essentials
Components
TMH Chapter - 12 20
Network Essentials
Components
In fiber optic cables the use of light pulses provides electrical isolation
for equipment at both ends
The FOMAU is connected to the Repeater hub with two strands of fiber
optic cable
A major advantage of the 10Base-FL fiber optic link is the long distance
it can span (2000 m). Another advantage is the high transmission
speeds (100 Mbps).
TMH Chapter - 12 21
Network Essentials
Components
TMH Chapter - 12 22
Network Essentials
Components
Network protocols are sets of rules based on which network devices
communicate with each other and share each other’s resources.
TMH Chapter - 12 23
Network Essentials
Components
SPX/IPX - Developed by Novell for its Netware operating system. It is
not a single protocol but a collection of procedures to connect
computers on a network running on Novell Netware. The IPX part is
responsible for transmitting packets between Netware nodes. SPX
accounts for splitting and combining the data at the source and
destination respectively. Major disadvantage is that it works only on the
Netware platform.
TMH Chapter - 12 24
Network Essentials
TCP/IP
For identifying each node on a network TCP/IP uses an addressing
scheme by which it allots a unique IP Address to each node.
Each IP address has two parts : a Host ID and a Network ID. The
Network ID identifies the particular network to which a host machine
belongs while the Host ID identifies the actual host within the network
TMH Chapter - 12 25
Network Essentials
TCP/IP
Class A networks have the first octet (aaaaaaaa) allocated to network
IDs while the other three octets (bbbbbbbb.cccccccc.dddddddd) are
allocated to host IDs
TMH Chapter - 12 26
Network Essentials
TCP/IP
Class-A Networks
Ranges from 00000000 (0) to 01111111 (127)
Network ID cannot be all 0s (reserved for local network) or 127 (reserved for internal
Network ID loopback function)
Thus permissible values are : 00000001 (1) to 01111110 (126)
Total number of network IDs permissible : 126
Ranges from 00000000 . 00000000 . 00000000 (0.0.0) to 11111111 . 11111111 . 11111111
(255.255.255)
Host ID cannot be all 0s (reserved for local network) or all 1s (reserved for broadcast
address)
Host ID
Thus permissible values are : 00000000 . 00000000 . 00000001 (0.0.1) to 11111111 .
11111111 . 11111110 (255.255.254)
Total number of host IDs permissible : [(0 to 255) X (0 to 255) X (0 to 255)] -2 (excluding
all 0s and all 1s) : 16777214
Thus Class-A IP addresses
00000001 . 00000000 . 00000000 . 00000001 (1.0.0.1)
range from
to 01111110 . 11111111 . 11111111 . 11111110 (126.255.255.254)
TMH Chapter - 12 27
Network Essentials
TCP/IP
Class-B Networks
Ranges from 10000000 . 00000000 (128.0) to 10111111 . 11111111 (191.255)
Network ID The above are all permissible values.
Total number of network IDs permissible : [(128 to 191) X (0 to 255)] : (64 X 256) : 16384
Ranges from 00000000 . 00000000 (0.0) to 11111111 . 11111111 (255.255)
Host ID cannot be all 0s (reserved for local network) or all 1s (reserved for broadcast
address)
Host ID
Thus permissible values are : 00000000 . 00000001 (0.1) to 11111111 . 11111110 (255.254)
Total number of host IDs permissible : [(0 to 255) X (0 to 255)] -2 (excluding all 0s and all
1s) : (256 X 256) -2 : 65534
Thus Class-B IP addresses
10000000 . 00000000 . 00000000 . 00000001 (128.0.0.1)
range from
to 10111111 . 11111111 . 11111111 . 11111110 (191.255.255.254)
TMH Chapter - 12 28
Network Essentials
TCP/IP
Class-C Networks
Ranges from 11000000 . 00000000 . 00000000 (192.0.0) to 11011111 . 11111111 .
11111111 (223.255.255)
Network ID The above are all permissible values.
Total number of network IDs permissible : [(192 to 233) X (0 to 255) X (0 to 255)] : (32 X
256 X 256) : 2097152
Ranges from 00000000 (0) to 11111111 (255)
Host ID cannot be all 0s (reserved for local network) or all 1s (reserved for broadcast
Host ID address)
Thus permissible values are : 00000001 (1) to 11111110 (254)
Total number of host IDs permissible : [(0 to 255)] -2 (excluding all 0s and all 1s) : 254
Thus Class-C IP addresses
11000000 . 00000000 . 00000000 . 00000001 (192.0.0.1)
range from
to 11011111 . 11111111 . 11111111 . 11111110 (223.255.255.254)
TMH Chapter - 12 29
Network Essentials
TCP/IP
For two machines to communicate with TCP/IP, both must have TCP/IP
running on them and both must be assigned a unique IP address.
…………………………………………
The TCP portion takes the data stream and breaks it up into small
packets of data. Each individual packet is called a “datagram”
… … … … … … … … … … … … …
T… T… T… T… T… T… T… T… T… T… T…
TMH Chapter - 12 30
Network Essentials
TCP/IP
Each packet is made up of several octets. TCP computes the checksum
by adding all octets of the packets and stores this also in the header.
T…C T…C T…C T…C T…C T…C T…C T…C T…C T…C T…C
IP takes each datagram and puts its own header which, among other
things, contains the source and destination IP addresses of the
machines.
IT…C IT…C IT…C IT…C IT…C IT…C IT…C IT…C IT…C IT…C
TMH Chapter - 12 31
Network Essentials
TCP/IP
IP then releases the packets on the physical medium of the
network.
TMH Chapter - 12 32
Network Essentials
TCP/IP
The router determines which network the packets should be sent to. It
may be the destination network itself or another router nearer to the
destination network
The router determines which network the packets should be sent to. It
may be the destination network itself or another router nearer to the
destination network
The packets may have to be routed by several routers before they reach
the destination network. Each of these routings is called a hop.
TMH Chapter - 12 33
Network Essentials
TCP/IP
TMH Chapter - 12 34
Network Essentials
TCP/IP
Once the destination network is reached, the host ID part of the
destination IP address is used to locate the actual destination host
The IP of the destination host accepts the packets and verifies the
destination IP address matches its own. If they do, it removes the IP
headers from the packets and hand them over to TCP
TCP verifies the checksum in the TCP header. If the checksums match,
TCP accepts the packet as valid. If they do not match, TCP assumes
that the packets have been damaged in transit and discards the
packets. It then asks the sending TCP to re-send the packet again.
TMH Chapter - 12 35
Network Essentials
TCP/IP
After all the packets have been validated and accepted, TCP uses the
sequence number to recombine the packets into the original information
and then uses the “port number” to send it to the proper application level
protocol like FTP, telnet, HTTP etc.
TMH Chapter - 12 36
Network Essentials
TCP/IP
TMH Chapter - 12 37
Network Essentials
TCP/IP
The International Standards Organization (ISO) has broken up the
function of moving data from one point to another into seven different
tasks. The implementation of the TCP/IP software gives rise to a four-
layered model.
ISO Model TCP/IP Model
7. Application Layer 4. Application Layer
6. Presentation Layer 3. Transport Layer
5. Session Layer 2. Internet Layer
4. Transport Layer 1. Physical Layer
3. Network Layer
2. Datalink Layer
1. Physical Layer
TMH Chapter - 12 38
Network Essentials
TCP/IP
The ISO model is more generalized built for accommodating any
set of protocols based on software engineering practices.
However it led to some discrepancy between design
considerations and actual implementation specifications. It was
also considered too complex.
TMH Chapter - 12 39
Network Essentials
TCP/IP
The Physical Layer
• Concerned with physical specifications of the signals like voltage levels
& pulse durations, and of network connectors like pin specifications.
TMH Chapter - 12 40
Network Essentials
TCP/IP
The Network Layer
• This layer determines which path the data should take for traveling from
source to destination based on network conditions, priority and other
factors. Implemented on hosts as well as routers. Usually works in
unreliable connection-less mode.
• The most commonly used protocol at this layer is the Internet Protocol
(IP) although a variety of other protocols, like ICMP and ARP, also
assist IP.
TMH Chapter - 12 41
Network Essentials
TCP/IP
The Transport Layer
• This layer splits data from higher layers into smaller units before
handing them to network layer. Usually works in reliable connection-
oriented mode.
• Reliable implies that TCP attempts to verify that all the messages have
reached the destination without any error. Connection oriented is
modeled after the telephone system and attempts to establish a
connection with the destination before sending messages e.g. FTP
• The main transport layer protocols are TCP, which provides reliable
delivery through error checking, and UDP, which does not guarantee
delivery will be accomplished.
TMH Chapter - 12 42
Network Essentials
TCP/IP
The Session Layer
• This layer enables two applications on different computers to establish,
use and end a connection called a “session”. Sessions manage dialog
control and synchronization between user tasks.
TMH Chapter - 12 43
Network Essentials
TCP/IP
The Application Layer
• Provides an interface for communication between the user-level
application programs and the network services. Includes
protocols like FTP, Telnet, SNMP etc.
TMH Chapter - 12 44
Network Essentials
TCP/IP
Internet Protocol (IP)
• Internet Protocol is the mailroom of the TCP/IP stack, where packet
sorting and delivery take place.
TMH Chapter - 12 45
Network Essentials
TCP/IP
Internet Protocol (IP)
• IP is an unreliable, best-effort, connectionless delivery service.
Unreliable because delivery is not guaranteed. A packet might be lost,
delivered out of sequence, duplicated or delayed. Reliability is the
responsibility of higher level protocols like TCP.
TMH Chapter - 12 46
Network Essentials
TCP/IP
Internet Protocol (IP)
Total Length (16 bits) : Specifies the total length of datagram (header +
data).
Time to Live (8 bits) : Specifies the number of hops the datagram can
experience before it is discarded.
Protocol (8 bits) : Identifies the upper-layer protocol that generated the
data payload. Enables the receiving IP to deliver data to appropriate
protocol.
Source Address (32 bits) : IP address of the host that originated
datagram.
Destination Address (32 bits) : IP address of destination of the
datagram.
TMH Chapter - 12 47
Network Essentials
TCP/IP
Internet Protocol (IP)
IP Address vs. MAC Address :
2. Physical addresses are long and cryptic and not very user-friendly.
Using TCP/IP an organization can assign IP addresses by creating a
numbering system that meets the needs of the network.
TMH Chapter - 12 48
Network Essentials
TCP/IP
Internet Protocol (IP)
IP Address vs. MAC Address :
3. Physical addresses are only used when both devices reside on the
same physical network. IP addresses provide a method of addressing
devices that reside on remote networks.
TMH Chapter - 12 49
Network Essentials
TCP/IP
Internet Protocol (IP)
• When a host has been configured with an IP address that does not have
the same network ID as the other hosts on that network, it will not be
able to communicate with any host on the network.
TMH Chapter - 12 51
Network Essentials
TCP/IP
Internet Protocol (IP)
• All bits in a subnet mask that correspond to the network address are set
to 1 and all bits corresponding to the host address are set to 0.
TMH Chapter - 12 52
Network Essentials
TCP/IP
Internet Protocol (IP)
IP Address : 172.25.16.51
Subnet Mask : 255.255.0.0
TMH Chapter - 12 53
Network Essentials
TCP/IP
Internet Protocol (IP)
TMH Chapter - 12 54
Network Essentials
TCP/IP
Address Resolution Protocol (ARP)
TMH Chapter - 12 55
Network Essentials
TCP/IP
Address Resolution Protocol (ARP)
TMH Chapter - 12 56
Network Essentials
TCP/IP
Address Resolution Protocol (ARP)
4. All hosts on the network receive the ARP request frame and attempt
to match the IP address in the frame with their own.
TMH Chapter - 12 57
Network Essentials
TCP/IP
Address Resolution Protocol (ARP)
• An ARP packet includes the following fields. The source host completes
all fields except the Target’s Hardware Address, which is filled by the
target host.
Target’s Hardware Address (48 bits) : This will contain the hardware
address of the target host. This is completed by the target when it
responds to the request.
TMH Chapter - 12 61
Network Essentials
TCP/IP
Address Resolution Protocol (ARP)
ARP Cache
• Broadcasts are costly because in addition to the traffic generated every
host on the network must perform some processing to determine
whether they should respond or ignore the message.
• The shorter the time, the more ARP broadcasts need to occur. Longer
cache times can cause problems if hardware addresses of target hosts
change (by installing a new network adapter).
• If the ARP cache reaches its maximum capacity before an entry expires
the oldest entries are deleted as new ones are added.
TMH Chapter - 12 63
Network Essentials
TCP/IP
Address Resolution Protocol (ARP)
ARP Cache
• When a host computer makes frequent ARP requests to a
specific host, it is possible to create a static entry in the ARP
cache without ageing.
TMH Chapter - 12 64
Network Essentials
TCP/IP
Address Resolution Protocol (ARP)
The arp utility
You can view and manage ARP cache using the arp utility. The syntax
for the arp command is as follows :
arp [-a][-d][-s] inet_addr [phys_addr]
-a : Displays current ARP entries in the ARP cache.
-d : Deletes specified entry from the ARP cache.
-s : Adds a static entry in the ARP cache to associate the IP address
inet_addr with the hardware address phys_addr.
TMH Chapter - 12 65
Network Essentials
TCP/IP
Address Resolution Protocol (ARP)
The arp utility
• To view current listing of the ARP cache entries on your computer use
arp -a.
• A static entry can be placed into the ARP cache by using arp -s.
TMH Chapter - 12 66
Network Essentials
TCP/IP
Address Resolution Protocol (ARP)
The arp utility
TMH Chapter - 12 67
Network Essentials
TCP/IP
Internet Control Message Protocol (ICMP)
• ICMP provides a mechanism for reporting errors due to datagram
delivery problems and helps in trouble-shooting TCP/IP problems.
• If a host is sending data faster that the receiving host can handle, the
receiver may generate an ICMP message called “source quench” to
inform the sending host that it should slow down.
TMH Chapter - 12 68
Network Essentials
TCP/IP
Internet Control Message Protocol (ICMP)
• The ping utility uses the ICMP “echo request” and “echo reply” packets
to determine whether a particular IP system on the network is functional.
• The ICMP packets start from the sending host and gets reflected back
from the destination host. ICMP messages are contained within IP
datagrams, which ensures that they will be able to find their way to the
appropriate target host.
TMH Chapter - 12 69
Network Essentials
TCP/IP
Internet Control Message Protocol (ICMP)
The ping utility
• To test TCP/IP on your own computer you can use the IP address
127.0.0.1. This address is called the “loopback address”.
TMH Chapter - 12 71
Network Essentials
TCP/IP
Transmission Control Protocol (TCP)
TMH Chapter - 12 72
Network Essentials
TCP/IP
Transmission Control Protocol (TCP)
TMH Chapter - 12 73
Network Essentials
TCP/IP
Transmission Control Protocol (TCP)
• During the session for each segment sent the receiving host must return
an acknowledgement (ACK) within a specified period for the data
received.
TMH Chapter - 12 75
Network Essentials
TCP/IP
Transmission Control Protocol (TCP)
1. The sending host specifies a sequence number for each segment and
places them in its send buffer.
TMH Chapter - 12 76
Network Essentials
TCP/IP
Transmission Control Protocol (TCP)
TMH Chapter - 12 77
Network Essentials
TCP/IP
Transmission Control Protocol (TCP)
• UDP operates in the same layer as TCP. But in contrast to the reliable,
connection-oriented delivery provided by TCP, datagram delivery by
UDP is unreliable and connection-less.
• If messages are short and updated frequently, it is not worth the effort
required to establish and maintain a session between two hosts. In
these cases UDP is used instead of TCP.
TMH Chapter - 12 79
Network Essentials
TCP/IP
User Datagram Protocol (UDP)
• UDP is also used for sending non-textual data like image and video,
where correctness of the data may not be so crucial.
• UDP also attaches a header to the data it receives from the upper-layer
protocols. These include the following fields :
UDP Source Port (16 bits) : Specifies the port number of the source
application.
UDP Destination Port (16 bits) : Specifies the port number of the
receiving application.
Message Length (16 bits) : The total length of the UDP packet.
TMH Chapter - 12 80
Network Essentials
TCP/IP
Reverse Address Resolution Protocol (RARP)
• ARP solves the problem of finding the hardware address corresponding
to an IP address. Sometimes the reverse problem has to be solved :
given a hardware address to find the IP address.
• But to know its working IP address, it uses RARP which broadcasts its
hardware address and asks for its IP address from a RARP server.
TMH Chapter - 12 81
Network Essentials
TCP/IP
Reverse Address Resolution Protocol (RARP)
• The RARP server on getting the request, looks up a database of IP
addresses and sends back a IP address to be used for the current
session.
TMH Chapter - 12 82
Network Essentials
DHCP
• One of the biggest problems in maintaining a TCP/IP network is the
difficulty in keeping track of all the IP addresses and host names.
TMH Chapter - 12 83
Network Essentials
DHCP
• DHCP reduces the administrative burden of adding, moving and
configuring computers on TCP/IP networks by using a dynamic method
of IP address assignment.
TMH Chapter - 12 84
Network Essentials
DHCP
Benefits of using DHCP :
TMH Chapter - 12 85
Network Essentials
DHCP
• DHCP Server manages the requests from the DHCP clients and
maintains the database of TCP/IP configuration parameters.
TMH Chapter - 12 86
Network Essentials
DHCP
Phase I : IP Lease Request
TMH Chapter - 12 87
Network Essentials
DHCP
Phase I : IP Lease Request
TMH Chapter - 12 88
Network Essentials
DHCP
Phase II : IP Lease Offer
• The DHCP Server temporarily reserves the IP address so that it will not
be offered to any other DHCP clients.
TMH Chapter - 12 89
Network Essentials
DHCP
Phase II : IP Lease Offer
TMH Chapter - 12 90
Network Essentials
DHCP
Phase III: IP Lease Select
• The client selects the IP address information from the first offer that it
receives and responds to the DHCP Server by broadcasting a
DHCPREQUEST packet confirming selection of the offered IP address.
• The other servers also receive the broadcast and retract their offers.
TMH Chapter - 12 91
Network Essentials
DHCP
Phase III: IP Lease Select
TMH Chapter - 12 92
Network Essentials
DHCP
Phase IV: IP Lease Acknowledgement
• The IP address and other configuration settings are saved on the DHCP
client so that the client can attempt to renew its previous settings.
TMH Chapter - 12 93
Network Essentials
DHCP
Phase IV: IP Lease Acknowledgement
TMH Chapter - 12 94
Network Essentials
DHCP
Phase V: IP Lease Renewal
TMH Chapter - 12 95
Network Essentials
DHCP
Phase V: IP Lease Renewal
• If the server is unavailable at the 50% time interval, the client continues
to attempt to renew the lease while continuing to use the IP address
until 87.5% of the lease time has expired.
• The new DHCP Server may be able to renew the lease or send a
message indicating that the lease should be terminated which causes
the client to initiate the leasing of a new IP address.
TMH Chapter - 12 96
Network Essentials
Routing
• IP Routing is the process of choosing a path through the routers of an
inter-network to enable IP datagrams to be delivered to a destination
host on a remote network.
• A “router” is the computer that makes the choices of where the packets
will be sent. Routers behave like a post-office.
TMH Chapter - 12 97
Network Essentials
Routing
• Although routers are specialized computers dedicated to perform
routing, it is possible to configure a Windows NT computer to be a router
by installing multiple network cards, each attached to a different
network.
• When the sending host and receiving hosts lie on the same network, no
separate router is required.
• Here IP uses ARP to get the hardware address of the destination host.
TMH Chapter - 12 98
Network Essentials
Routing
• When the TCP/IP software on the sending host has determined that the
destination lies on another network (by its IP address), the datagram is
sent to a default gateway.
• Delivery of the datagram to the remote host is left up to the router, which
makes routing decisions on how best to deliver the datagram.
• The IP address, subnet mask and default gateway address are all used
to build the initial entries in the routing table.
TMH Chapter - 12 99
Network Essentials
Routing
• A routing table will include the following fields :
Network Address : IP address of the destination network.
Gateway Address : Specifies where the packet needs to be sent if a
match is found in the routing table. This address must be associated
with a router interface on the local network.
Metric : Specifies the preference level for the route. If a given
destination has multiples routes, the router will prefer those entries
having the lowest metric number. Typically it reflects the hop count of
the route.
• Routing protocols use metrics to evaluate what path will be the best for
a packet to travel.
• In most cases the router determines that it must send the packet to
another host.
Design Goals
• For example one routing algorithm may use both number of hops and
delay as metrics, but it may give more weightage to delay factor.
• Path length is the most common metric. Some algorithms allow network
administrators to assign arbitrary costs to each network link. In this case
path length is the sum of costs associated with each path.
• This is one of the most simple and popular static routing algorithms. The
idea is to build a graph of the network, with each node representing a
router and each line representing a link between associated routers.
• One way of measuring path length is the number of hops. Using this
metric ABC and ABE are of equal lengths.
• Each node is labeled with its distance from the source node.Initially no
paths are known so all nodes are labeled with infinity.
• As the algorithm proceeds better paths are found and their labels
changed to reflect this
• Out of all the relabeled nodes we make the one with the smallest label
permanent.This becomes the new working node.
• We now start at B and examine all nodes adjacent to it. If the sum of the
label on B and the distance from B to the node being considered is less
than the label on the node, we have a shorter path, and the path is
relabeled.
• After all adjacent nodes have been labeled tentatively, we find the node
with the smallest label value and make it permanent. This becomes the
next working node.
• Each router maintains a table, called a vector, giving the best known
distance to each destination and which line to use to get there. These
tables are updated by exchanging information with its neighbours.
• Let us assume that delay is chosen as the metric, and each router
knows the delay to each of its neighbours.
• Once every T seconds each router sends to each neighbour a list of its
estimated delays to each destination.
• Let us suppose that one of the tables has just come in from neighbour X
with m seconds being X’s estimate how long it takes to get to router Y.
• If the current router knows that the delay to reach X is n seconds, then it
concludes that it can reach Y in m+n seconds via AXY.
• Similarly based on the table from neighbour Z, A can estimate that it can
also reach Y in p+q second via path AZY.
• By performing this calculation for each neighbour, a router can find out
which estimate seems the best, and update that value in its routing
table. In this case whichever is smaller m+n or p+q will be entered.
• Similarly the delay between A and Z may change to p’ and that between
Z and Y may change to q’. The router A will then again compute the
values of m’+n’ and p’+q’ and update its table with the smaller value.
• Two things are to be noted here. First that each routing table contains
entries for all routers, not only the neighbours.
• However the tables are transmitted only to the neighbours, not all
routers e.g. A’s table is transmitted only to X and Z.
• Consider a five-node bus network where the delay metric is the number
of hops. Suppose A is down initially and all routers know this.
• When A comes up the other routers learn about it via vector exchanges.
At the time of the first exchange, B learns that A is up and one hop away
to the left. All other routers think A is still down.
• Thus the good news is spreading at the rate of 1 hop per exchange .
• Now let us consider a situation that A is initially up and all routers know
about it. Suddenly A goes down. In the first exchange, B does not hear
from A. But C says, “Don’t worry I have a path of length 2 to A”.
• B does not know C’s path runs through B itself. As a result B thinks that
it can reach A via C, and updates its routing table with a path length of 3
for A.
• In the third exchange, both B and D notices that C has a path length of 4
to A. Both B and D update their tables with a path length of 5 for A.
• When a router is switched on, its first task is to learn who its neighbours
are. It accomplishes this by sending ICMP packets to each of its
neighbours and getting a reply from them.
• Once the information needed for the exchange has been collected the
next step is for each router to build a packet containing all the data.
• The packet starts with the identity of the sender followed by a sequence
number and age, followed by delay to each of the neighbours.
• The packets are then distributed and installed on each of the routers.
The basic distribution mechanism involves flooding.
• When a new link state packet comes in, it is checked against the list of
packets already seen. If it is new, it is forwarded on all lines except the
one it arrived on
• Once a router has accumulated a full state of link state packets it can
construct the entire network graph because every link is represented.
• Now the shortest path algorithm can be used to compute shortest path
to all possible destinations, and the result can be installed in the routing
table.
• Some problems can occur with this algorithm. First if the sequence
numbers wrap around there would be confusion.
• The solution is to use a 32-bit sequence number, which will take a long
time to wrap around (137 years with one packet sent per second).
• Here routers are divided into regions, with routers knowing the details of
all routers in the same region but not about routers of all regions.
• When routing is done hierarchically there are entries for all local routers
but each external region has entry for a single router. Traffic for region 2
goes via 1B-2A line and so the number of entries is reduced from 7 to 4.
• The highest level of the hierarchy is the root domain. All other domains
fall below it.
• The next level in the hierarchy is divided into a series of nodes called
the top-level domains.
• These are assigned by the type of organization and by the country.
• The top level domain space is divided into two primary areas :
organizational domains and geographical domains.
• Each top-level domain is identified by a three-character code to indicate
the primary function of an organization that has obtained it
• The request is first sent from the client to the local DNS server that the
client has been configured to use. This is a recursive query
• The local DNS server sends an iterative query to a root name server,
which responds with the IP address of a machine containing information
about the .com domain
• The request is then sent from the local DNS server to the .com name
server which responds with the IP address of a machine containing
information about the quicklearn.com domain
• The request is then sent from the local DNS server to the name server
for the quicklearn.com domain. It responds with the IP address of
the actual machine www.quicklearn.com
• If DNS does not respond after several attempts then the resolution
process terminates with an error
• It takes the packet from the network layer, adds its own header and
trailer to create a frame and hands it over to the physical layer to be
transmitted.
• The header portion includes the 48-bit hardware address of the source
and destination nodes. The trailer includes a checksum for error
detection.