0% found this document useful (0 votes)
153 views87 pages

Computer Networks: Anil Kumar K.M Computer Science & Engg. Department S.J.C.E Mysore-6

The document discusses various topics related to computer networks including traffic shaping, leaky bucket traffic shaping, token bucket traffic shaping, closed loop control, traffic management at flow-aggregate level, constraint shortest path routing, network layer design issues, routing algorithms, optimality principle, shortest path routing, flooding, distance vector routing, and the count to infinity problem in distance vector routing.

Uploaded by

bandishti
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views87 pages

Computer Networks: Anil Kumar K.M Computer Science & Engg. Department S.J.C.E Mysore-6

The document discusses various topics related to computer networks including traffic shaping, leaky bucket traffic shaping, token bucket traffic shaping, closed loop control, traffic management at flow-aggregate level, constraint shortest path routing, network layer design issues, routing algorithms, optimality principle, shortest path routing, flooding, distance vector routing, and the count to infinity problem in distance vector routing.

Uploaded by

bandishti
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 87

Computer Networks

Anil Kumar K.M


Computer Science & Engg.
Department
S.J.C.E
Mysore-6

Anil Kumar K.M , S.J.C.E 1


Traffic shaping
 When a source wants to send packets, it may not
know exactly how the traffic looks?
The source may want to ensure conformance to
parameters in specified in QOS
Traffic shaping ensures conformance

policing Traffic shaping


Traffic shaping
Anil Kumar K.M , S.J.C.E 2
Traffic shaping can be realized in several ways
I. Leaky bucket traffic shaper
 Incoming packets are first stored in a buffer
 Severed periodically so that output stream is smooth
 Packets are discarded when buffer is full
Policing device checks and passes each packet
Traffic shaping needs to introduce delays for packets arriving
early
This delay may add to other delays (if any) introduced by
applications.
This is ok as long as within acceptable limit

Anil Kumar K.M , S.J.C.E 3


II. Token Bucket Traffic shaper
 It regulates traffic that are not conforming
 Here, tokens are generated periodically at a constant rate and are made
available in token bucket
 If token bucket is full, arriving tokens are discarded
 A packet from the buffer can be taken out only if a token in token bucket
is withdrawn
 If the token bucket is empty, arriving packets have to wait in packet
buffer otherwise, arriving packets are transmitted as they arrive
 Token is used for giving transmission opportunities

Anil Kumar K.M , S.J.C.E 4


Closed loop control
The main objective of controlling is
 To use link efficiently
 To prevent buffer overflows
 Congestion in closed loop is addressed by having feed back (network
state) information
 Recipient of feedback is the source ( transport layers)
 There are two approaches
 HOP by Hop
 End to End
 Feedback can be
 Explicit
 Implicit ; Example lost ack

Anil Kumar K.M , S.J.C.E 5


Traffic Management at Flow –Aggregate Level
 It deals with Multiplicity of flows
 It is also known as traffic engineering
 The objective is to map aggregated (combined) flows onto
Network – resources is used efficiently.
 Traffic engineering relies on knowledge of traffic demand
(claim) information
 We discuss an technique that does not need traffic claim
information called constraint shortest path routing

Anil Kumar K.M , S.J.C.E 6


Constraint shortest path routing
It is an extension of shortest path algorithm
This finds the shortest path satisfying some constraints (B.W)
pruning other links that violate.

50 100
1 2 3

60
100
100

5 6
4
100 100

What path is selected for x = 50, 255 and 399 ?


Anil Kumar K.M , S.J.C.E 7
Network Layer
 Goal
 Routing
 Logical addressing

 To achieve
 Network layer should know about the topology
 Choose the path that are appropriate

 Network layer Design issues

Anil Kumar K.M , S.J.C.E 9


I. Store-and Forward Packet Switching

Anil Kumar K.M , S.J.C.E 10


II. Implementation of Connectionless service

Anil Kumar K.M , S.J.C.E 11


III. Implementation of Connection oriented service

Anil Kumar K.M , S.J.C.E 12


IV. Comparison of Virtual Circuit and Datagram

Anil Kumar K.M , S.J.C.E 13


Routing Algorithms
 The Main function of the network layer is to route packets
 Packets may require Multiple Hops to make Journey
 Routing algorithm is responsible for deciding which output
line to be used for incoming packet
 If subnet uses datagram – Decision have to be taken for
every new arriving datagram
 If subnet uses virtual circuit – Decision have to be taken for
first arriving packet, all other simply follow the first
 VCI routing is also known as Session routing
 Routing and Forwarding are
Anil Kumar K.Messential
, S.J.C.E functions of router14
Routing algorithms should have desirable properties
 Correctness
 Simplicity
 Robustness
router failure, line failure , topological changes
etc.
 Stability
 Fairness Conflicts – Less Delay
 Optimality Max Throughput

Anil Kumar K.M , S.J.C.E 15


Routing

I. Adaptive routing

 route computed ahead and downloaded to router

 static routing

II. Non Adaptive routing

 dynamically computes route (adjacent routers)

 dynamic routing

Anil Kumar K.M , S.J.C.E 16


Optimality Principle

Statement: It states that if the router j is on the optimal path


from router i to router k. Then optimal path from j to k also falls
on the same route.

We call part of route from i to j as r1 and rest of route as r2. if a


route better than r2 exist from j to k. it could be concatenated
with r1 to improve the route

 As a result of optimality principle we get set of optimal routes


from all sources to a given destination – forms a tree with
destination as root. Such tree is called Sink Tree.

The metric used can be number of hops, distance, time delay


Anil Kumar K.M , S.J.C.E 17
etc...
Anil Kumar K.M , S.J.C.E 18
Sink tree is not unique, other tree with same path length may
exists.

The goal of all routing algorithm is to discover and use the


sink tree for all routers.

Sink tree does not contain any loop – packets will be


delivered within finite number of hops.

Anil Kumar K.M , S.J.C.E 19


Shortest Path Routing (Non adaptive)
 The idea is build a graph where a node represents router and lines
represents communication lines.

 Shortest path can be distance, communication cost, delay etc..

 There are many algorithms used for the purpose

Steps

1. We start marking a node as permanent Example Node A from following


figure

2. We examine each node adjacent to A relabeling each with distance to A

3. After examining all nodes adjacent to A, we examine all labels of nodes in


the whole graph and make one with smallest label permanent. This becomes
new working node.

4. This process repeats and nodes with shortest values to destination is


obtained Anil Kumar K.M , S.J.C.E 20
Anil Kumar K.M , S.J.C.E 21
Flooding ( non adaptive)
 An algorithm Packet is sent to every outgoing line except the one it
arrived
 Gives rises to lot of duplicate packets
 Number of Mechanism used to control Flooding
1. TTL (Time to Live)
2. Node adds an identifier, other node discards packet if
packet with that identifier already visited
3. Similar to second one. Each packet is given a unique
sequence number, when a node receives a packet it
records source address and sequence number of
packet.
A packet is rejected based on source address and
sequence number.

Anil Kumar K.M , S.J.C.E 22


Potential Applications
 Military Applications
 Distributed databases
 Wireless network
 Populate routing tables

Anil Kumar K.M , S.J.C.E 23


Distance Vector Routing
Modern computer network use dynamic routing rather static

Static routing do not take decision based on current network load

(dynamic) into account.

Two dynamic algorithm

 distance vector routing

 link state routing

In distance routing, each router maintains a table containing an

entry for each router in the network

The entry records cost from router 1 to router 2 …..

The entry are updated periodically

Anil Kumar K.M , S.J.C.E 24


Anil Kumar K.M , S.J.C.E 25
 Let us assume that router J has measured new delay of its neighbors

(A,I,K and H) as 8,10,12 and 6 m sec


 J can compute its new route to G
 To reach G it can try several options
J–A–B–G
J–H–G
J–A–B–C–E–F–G
 It selects one whose cost is less by consulting other routers

Anil Kumar K.M , S.J.C.E 26


Count to infinity problem
 “It reacts to good news rapidly but leisurely to bad news”
 Consider a router ( α ) whose best route to destination X is large.

If, on the next exchange neighbor A reports a shorter delay to X.

Then α will use neighbor A to reach X.

 Good news propagates in few exchanges.

Anil Kumar K.M , S.J.C.E 27


Good News case

Anil Kumar K.M , S.J.C.E 28


Bad News case

Anil Kumar K.M , S.J.C.E 29


This process continuous and values in tables become to large. It continuous

to grow towards infinity. This is called count to infinity problem.

In Networks, infinity is assigned a Max Threshold value. Beyond this value,

algorithm is terminated with an assumption that it might result in count to infinity

problem

Anil Kumar K.M , S.J.C.E 30


Link state routing
Distance vector routing was popular with APRNET
- count to infinity was a problem
Link state came into picture
The idea of link (implemented by all router) is better described

by
 Discover its neighbors
 Measure the cost to each neighbor
 Construct the packet with information it learnt
 Send this packet to all other router
 Compute the shortest path

Anil Kumar K.M , S.J.C.E 31


1. Learning about the neighbor
 When a router is booted, its first task is to learn about the neighbor
 It is done by sending a special hello packet to each point to point
link
 Other are expected to reply to the request

2. Measuring Line Cost


 The Link state algorithm require each router to know or have at
least reasonable estimate of delay of its neighbors
 This is done by sending a test packet and receiving an
acknowledge
- Round trip time
- Average of such tries
 An interesting issue is to take load into account ?
 There are arguments for and against load consideration in finding
path.

Anil Kumar K.M , S.J.C.E 32


3. Building link state packets
 Once information needed is collected

 Next is to build a packet containing all data such as identity of the sender,
sequence number, age, list of neighbors and cost

 Building the link state packet is easy. The hard part is determining when
to build them, periodically or when some significant event occurs

4. Distributing link state packets


 Flooding is used to distribute the link packets
 To check flooding , adequate measures are used. Example sequence etc.
 It discards
- duplicate packets
- lower sequence packet when it is seeing higher sequence packets
Anil Kumar K.M , S.J.C.E 33
 Some issues
 To see no wrapping of sequence numbers
 If router is damaged, sequencing will start from 0, other sequences will
be rejected
 Sequence number (bit changes) is corrupted. It treats arriving packets
as obsolete.

5. Computing new routes


 Dijkstras algorithm is used to find the shortest path
 Link state routing is used widely in networks
- ospf , Is-Is (intermediate system- intermediate system) are few
protocols based on link state.

Anil Kumar K.M , S.J.C.E 34


Hierarchical Routing
As the network grows in size, the router routing table entries grows
proportionally
This is not only consumes memory space but also precious cpu cycle in
preparing status report as well Bandwidth to send these reports
As the network grows, it is not feasible for every router to maintain
information about others A
A solution is Hierarchical routing
1A 3A
A B

C D
Anil Kumar K.M , S.J.C.E 2A 4A 35
 Two Level Hierarchy is shown in the figure.
 Example A.1a
 For huge networks, two level hierarchy may be
insufficient. It may require higher hierarchy
Regions – Cluster
Cluster – Zone
Zones to Groups
North

West East

South
Anil Kumar K.M , S.J.C.E 36
The gain in space comes at cost of a price –
increased path length.
Broadcasting Routing
Applications to send messages to many
Example : Weather Report
There are Various Methods
Method 1
Send distinct packets to all destinations
It needs (source) to have complete list of destinations

Anil Kumar K.M , S.J.C.E 37


Method 2 Flooding
Not suitable for point to point network but suitable for
broadcasting
Drawback – bandwidth wastage
Method 3 Multi Destination routing
Each packet contains a list of destination.
When a packet arrives at a router, it checks all destinations
to determine set of output lines
The router generates a new copy for each output line
After a set of number of Hops, each packet will carry one
destination and will be treated as normal packet
Anil Kumar K.M , S.J.C.E 38
Method 4 Reverse path forwarding
When a broadcast packet arrives at a router, the router
checks to see, if the packet arrived on the line, that is
normally used for sending packets to source of broadcast
If so, there is an excellent chance that broadcast packet
follow best route
Otherwise, packet arriving on other route is treated as
duplicate and discarded.

Multicast routing

Anil Kumar K.M , S.J.C.E 39


Routing for Mobile Hosts
 People today use portable computers
 This introduces new challenges to routing
 Hosts can be
 Stationary host
-Fixed host
 Migratory host
- Host that can move but can use the network only when
they are physically connected.
 Roaming host
- They move from one location to another yet maintain
connections
 Host is referred as Mobile Host
Anil Kumar K.M , S.J.C.E 40
All Host are assumed to have permanent address

Let us divide the network into small areas. Each area has one or more

Foreign Agent (FA) and a Home Agent (HA)

Foreign Agent- Keeps registration details of outside host visiting the area

Home Agent – Keeps registration details of host of an area visiting

outside area.

When a new host enters the area either by wire or wireless, it must

register itself with FA.

The registration process is as follows

Anil Kumar K.M , S.J.C.E 41


Each Foreign Agent(FA) will broadcast a packet announcing the
existence of such agent. If new mobile host does not receive such a
packet, it can broadcast a packet to find foreign agents

Mobile host register with FA giving its address (Network and MAC) and
security information.

The foreign host contacts mobile host agent and request/authenticates


such host.

The Home Agent (HA) after verifying authenticity of FA (Mobilehost)


informs the FA to proceed.

When foreign agent receives an acknowledgement from HA. It makes


registration (details) in its details.
When a host leaves an area, entries are deleted (de-registered)
Anil Kumar K.M , S.J.C.E 42
MA
authentication registered
HA
FA
acknowledge

AREA 1 AREA 2

Anil Kumar K.M , S.J.C.E 43


 Packet sent to Host will be first sent Home agent. HA will forward it to
foreign agent and FA will forward it to Mobile host

 Home agent does 2 things

 It encapsulates packet with an outer packet with address of FA.


This is also known as tunneling.

 It informs the sender of the packet (via packet with address of FA to


communicate further with FA for further communication with Mobile
host.

 Various schemes and issues are proposed

1. How much of protocol to be carried by routers and host

2. Each visitor is given an temporary ID and in few other schemes


temporary address refers to agent that handles traffic of visitors

Anil Kumar K.M , S.J.C.E 44


3. When they learn about relocation
 Change only destination address and re-transmit only modified
packet
 Encapsulate the old packet with new packet and send it to
destination
4. Step3 of registration is vulnerable to security attack
Example; Foreign agent X may claim that Mobile host A is in it area and
may request all information pertaining to A may be sent X

Anil Kumar K.M , S.J.C.E 45


Routing in Ad-Hoc Networks
Initially routing took place with host being mobile and router being fixed.
An extreme situation is by having router themselves as mobile
This may be due to
Military vehicles on battle fields
Ship at sea
Natural calamities
Each node consist of a router and a host on the same computer
A collection of node near to each other is called Ad-Hoc network
Ad-hoc network differs from wired network by defining no fixed
topologies, fixed neighbors, fixed relationships between IP address and
locations
With wired network, the path recorded will be by far fixed, but path
changes dynamically in Ad-hoc network.
Anil Kumar K.M , S.J.C.E 46
There are variety of algorithms proposed and one interesting is called
AODV( Ad-hoc On demand Distance Vector) routing algorithm
This algorithm determines route to destination only when somebody
wants to send a packet to that destination
Route Discovery
An Ad-hoc network can be described by a graph of nodes (router +
host)
Two Node are connected, if they can communicate via radio
Radio
signal
A
B
A B
C

C
Anil Kumar K.M , S.J.C.E 47
Anil Kumar K.M , S.J.C.E 48
Algorithm
A wants to send information to I the following steps take place
1. A will send a special route request packet via broadcasting to find
path to I
2. B and D will receive the packet. These node will check the
address and sequence number of the packet to prevent duplicate
packets being processed.
3. If it is a duplicate packet, it is discarded.
4. Otherwise path to destination along with version or freshness is
checked in routing table
5. If the version of the destination path is newer than the path known
by A. An acknowledgement is sent to update its entry.
6. If the version of the destination path is older than the path known
by A. B will create a reverse routing table to reach A in future.

Anil Kumar K.M , S.J.C.E 49


7. It will re-broadcast route request packet. Other node will reject
duplicate based on network address and request-ID
8. The process is repeated till I is reached.
9. Once I is reached, it will reply by sending route reply packet to
adjacent node that sent last route request packet. This is via
unicasting

Anil Kumar K.M , S.J.C.E 50


Internetworking
There are different types of Network such as LAN,MAN,WAN etc., so
does protocols
Different network exist for variety of reasons
 Most of PC’s run on TCP/IP
 Large Business use IBM SNA
 Telephone Companies use ATM
 LAN use Netware
 Wireless …………
 As computer prices are becoming cheaper, decision are made
downward in the organization
 Different Network have different technology, any new
development in hardware will lead to development of rules
(software) Anil Kumar K.M , S.J.C.E 51

Example : Home Network Today and Tomorrow


How Network Differs
The following provides some issues of
Service offered : connection oriented, connectionless networks
Protocols: IP,IPX,SNA,ATM etc.,
Multicasting: present/ absent
Addressing: flat / hierarchical
Packet Size : fixed/variable
QOS: present/absent
Error handling : reliable/ non reliable
Flow control: sliding window, none
Congestion control: leaky bucket, token bucket etc.,
Security: Privacy rules, encryption
Parameters, Accounting: Timeouts, connection time, release time, log
Anil Kumar K.M , S.J.C.E 52
account
How network can be connected
At Physical layer which device?
At Data link layer which device?
At Network layer which device ?
A router that can handle Multiple protocols are called Multi
protocol router

Case 1 Switch

D
S1 Sn

LAN 1 LAN 2
Anil Kumar K.M , S.J.C.E 53
Case 2

Router

S D

LAN 1 Line LAN 2

Anil Kumar K.M , S.J.C.E 54


Concatenated Virtual circuits
Is virtual circuit things of the past?
It is a collection of one/more virtual circuits
Multiprotocol router maintains a table providing information of virtual
circuits.
This scheme works better if all of them guarantee reliable network
delivery otherwise they would be unreliable
It has the same advantages and disadvantages as of virtual circuits

Connectionless Internetworking
Packets are independently routed
Multiprotocol router try translating from one format to another, they are
successful if protocols are relatives, otherwise complex.
Address problem: IP address versus SNA address, which calls for
Mapping system using directory
Anil Kumar K.M , S.J.C.E 55
Tunneling
A situation in which Host of one network wants to communicate with
host of another network. The networks are interconnected via WAN. The
protocols employed by both network are same, but for WAN.
Communication is possible using Tunneling
Example: Traveling in a car from Paris to London via English Channel.

Internetworking
Autonomous system
Interior Gateways
Exterior Gateways

Anil Kumar K.M , S.J.C.E 56


Fragmentation
What ?
How ?
There are two methods
As used by ATM
Fragmentation takes place beginning of every network
Reassembly takes place at exit of network
As used by IP
Fragmentation takes place at source
Reassembly takes place at destination

Anil Kumar K.M , S.J.C.E 57


Top ten design principles
1. Make sure it works
2. Keep it simple
3. Make clear choice
4. Exploit Modularity ; protocol stacks
5. Expect heterogeneity; hence design simple, flexible and general
6. Avoid fixed options and parameter; let sender and receiver negotiate
this value
7. Look for good design; may not work for strange requirements
8. Be strict when sending and tolerant when receiving
9. Think about scalability
10.Consider performance and cost

Anil Kumar K.M , S.J.C.E 58


The IP Protocol
IP Datagram consist of Header part and Text part

Header Information

The header has 20 Byte fixed part and variable length optional part.
The different field of header are as follows
Version Field
 Signifies protocol version
 IPV4 or IPV6
IHL
 Since header length is not constant
 It informs occupancy of header
Anil Kumar K.M , S.J.C.E field or length of header 59
Type of Service Field
It is 6 bit field
3 bit for precedence ( priority 0 ; Normal packet to priority 7; Control
packet)
3 bit for flags ( Delay, Throughput, Reliability)
Total Length – including header and data
Identification field
 DF ( Don’t Fragment) it conveys to sender datagram is sent as one
fragment or to receiver not to fragment subsequent datagram
 MF ( More Fragment) by marking this bit, call for data gram to undergo
fragmentation

Anil Kumar K.M , S.J.C.E 60


Fragment offset
It helps to find position of fragments in a datagram
Time to Live
It indicates life time of datagram
Max life time is 255sec
Time counter is decremented as it hops or decremented randomly
when datagram is queued.
Protocol
TCP or UDP (which higher protocol this datagram is to be passed)
Header Checksum
Link encryption, End to End encryption

Anil Kumar K.M , S.J.C.E 61


Source address and Destination address
-Network address
Options
have some of the following fields over period of time

 Security option: it helps router to move to right router and to skip


router that are considered vulnerable
 Strict source routing option: complete route (IP addresses are
specified)
 Loose source routing option( necessary routers to be used along

with other router


 Record route option
Anil Kumar K.M , S.J.C.E 62
 Timestamp option
IP addressing
32 bits ; arranged as 4- 8bit block
Represented as a dotted decimal notation
Example: 191.23.34.12
There are five address formats
Class A

 it is identified with first bit being 0


 It allows 2 7 network addresses

 it allows 2 24 Host address


Class B

Class C

Class D

Class E 1111 Reserved for future use


Organizations
IANA( Internet Assigned Number Authority)
initially looked into allocation of addresses and later it was taken care by
ICANN (Internet corporation for Assigned Names and Numbers)
There are few Exceptions to IP address
 A host ID with all 1’s mean to broadcast the packet to all host specified in
network ID
 A Network ID with all 1’s , packet is to be broadcast on local network
 A Host ID with all 0’s transfer packet to Network (specified with Network
address). This happens when a host when booted does not know it Network
address. It will have 0’s in Host ID and will transmit packet to Network which
will identify host based on MAC address. They are usually referred as This
Host. Network ID can also be 0’s.
 Address starting with 127.x.y.z is used for loopback. When host sends
packet with this address, IP protocol will return it to the host without putting
it on the network. They are used for inter process communication.
Summary
Lowest IP address 0.0.0.0
Highest IP address 255.255.255.255
Loop Back address 127.0.0.1
 Class A : 1 to 127
 Class B : 128 to 191
 Class C : 192 to 223
 Class D : 224 to 239
 Class E : 240 to 255
Subnet Addressing
The original IP addressing have some drawbacks
Consider a typical university that has about 64000 host connected
to internet.
It would be difficult task for administrator to manage all 64000 hosts
More over typical campuses have more than one network –
requiring multiple network addresses
To solve these problem, subnetting was introduced ( another
reason
was pc’s replaced workstation as sources for communication)
Subnetting adds another hierarchical
1 0 level Net Id Host Id
Original Address

Subnet Address 10 Net Id Subnet Id Host Id


The positive point of subnet is that, a host outside does not know about
subnetting.
Administrator is free to choose any length for subnet and host Id field.
Example: An organization has been assigned class B IP address with
Network ID 150.100. Suppose organization has many LANS each
consisting no more than 100 hosts.
In such a case number of bits needed to identify each host is (2 ^ 7 =
128) 7 bits.
In class B we have 16 bit for network Id and 16 bit for Host Id.

16 bit 9 bit 7 bit

Network Id Subnet Id Host Id


How does a packet from outside get routed?
To find subnet number
routers need to store additional quantity called subnet mask
It contains all 1’s for every bit position except host address part.
Router determines subnet address by performing binary AND between
IP address and Subnet Mask
The network at subnet will deliver the packet to the correct destination

Classless Inter domain Routing (CIDR)


Dividing IP addresses into classes turned out to be inflexible.
Classfull space restriction was eliminated
205.100.0.0/ 22 convention was used to indicate network mask bit of
22
bits
The entries in a CIDR routing table contain 32 bit IP address and 32
bit mask
CIDR allows a technique called supernetting
Supernet?

Network Address Translation (NAT)


There is significant rise in home users and small business to use
internet
Initially dialup form of communication were only for shorter period of
time.
ISP can assign dynamically IP address
As time progressed demand outplayed supply of network address
A solution to this problem is NAT.
NAT allowed users to have large number of address to be used
internally but only one or set of addresses externally

172.18.3.1 172.18.3.20

NAT Internet

172.18.3.30 200.24.5.8

To separate address that can be used inside the house/business.

The following addresses were set aside for private users


10.0.0.0 to 10.255.255.255
172.16.0.0 to 172.31.255.255
192.168.0.0 to 192.168.255.255
 No router will forward packet that has these addresses
 Address Translation
 All outgoing packet go through NAT router that will replace source
address with NAT address.
 All incoming packet will replace destination address (Originally Nat
address) with appropriate private address

Translation (methods)
1. Using one IP address
Private External
172.18.3.1 25.8.2.10

25.8.2.10
172.18.3.1

172.18.3.30 200.24.5.8

172.18.3.1 25.8.2.10 200.24.5.8 25.8.2.10

25.8.2.10 172.18.3.1 25.8.2.10 200.24.5.8


2. Using a pool of IP address
 NAT router has only one global address only one private
network host can access the same external Host.
 To remove this restriction, NAT uses a pool of global
addresses.
3. Using both IP address and Port numbers
 to allow many to many relationship between host and external
server.
 two host with address 172.18.3.1 and 172.18.3.2 wants to
access a service.
 Translation table with following five columns helps to resolve
ambiguity
Private address Private port External address External port protocol
172.18.3.1 1400 25.8.3.2 80 tcp
172.18.3.2 1401 25.8.3.2 80 tcp

When the response comes from HTTP (say) server , a combination


of
source address and port address will be used to get private address
Most of ISP will use NAT as the number of external IP address is
limited, but there is no limitation to customers.
ARP (Address Resolution Protocol)
It is used to find the physical address of the host
There are cases where IP address is known but not physical
address
 Broadcast is used for knowing address
 There are cases where ARP request need to travel outside a
network, in such a case proxy ARP is used to obtain the required
address

Anil Kumar K.M , S.J.C.E 76


RARP
we are dealing with communication on an IP internet work, we are
always going to know the IP address of the destination of the
datagram we need to send—it's right there in the datagram itself. We
also know our own IP address as well. Or do we?
Motivation
In a traditional TCP/IP network, every normal host on a network
knows its IP address because it is stored somewhere on the
machine. When you turn on your PC, the TCP/IP protocol software
reads the IP address from a file, which allows your PC to “learn” and
start using its IP address. However, there are some devices, such as
diskless workstations, that don't have any means of storing an IP
address where it can be easily retrieved. When these units are
powered up they know their physical address only (because it's wired
into the hardware) but not their IP address
RARP Communication
1. Source Device Generates RARP Request Message: The source
device generates an RARP Request message. Thus, it uses the value
3 for the Opcode in the message. It puts its own data link layer address
as both the Sender Hardware Address and also the Target Hardware
Address. It leaves both the Sender Protocol Address and the Target
Protocol Address blank, since it doesn't know either.

2.Source Device Broadcasts RARP Request Message: The source


broadcasts the ARP Request message on the local network.

3.Local Devices Process RARP Request Message: The message is


received by each device on the local network and processed. Devices
that are not configured to act as RARP servers ignore the message
4. RARP Server Generates RARP Reply Message: Any device on the
network that is set up to act as an RARP server responds to the
broadcast from the source device.
5. RARP Server Sends RARP Reply Message: The RARP server sends
the RARP Reply message unicast to the device looking to be
configured.
6. Source Device Processes RARP Reply Message: The source
device processes the reply from the RARP server. It then configures
itself using the IP address in the Target Protocol Address supplied by
the RARP server.

It is possible that more than one RARP server may respond to any
request, if two or more are configured on any local network. The
source device will typically use the first reply and discard the others.

Limitations of RARP
1. Low-Level Hardware Orientation:
RARP works using hardware broadcasts. This means that if you
have a large internetwork with many physical networks. you need an
RARP server on every network segment. Worse, if you need
reliability to make sure RARP keeps running even if one RARP
server goes down, you need two on each physical network. This
makes centralized management of IP addresses difficult.
o2.Manual Assignment: RARP allows hosts to configure themselves
automatically, but the RARP server must still be set up with a manual
table of bindings between hardware and IP addresses. These must be
maintained for each server, which is again a lot of work on an
administrator.

3.Limited Information: RARP only provides a host with its IP address. It


cannot provide other needed information such as, for example, a subnet
mask or default gateway.
BOOTP (Bootstrap protocol)
Before a device on a TCP/IP network can effectively communicate, it
needs to know its IP address. While a conventional network host can
read this information from its internal disk, some devices have no
storage, and so do not have this luxury. They need help from another
device on the network to provide them with an IP address and other
information and/or software they need to become active IP hosts. This
problem of getting a new machine up and running is commonly called
bootstrapping, and to provide this capability to IP hosts, the TCP/IP
Bootstrap Protocol (BOOTP) was created.

BOOTP Clients and Servers


The operation of the protocol consists of a single exchange of
messages between a BOOTP client and a BOOTP server
BOOTP client: any device
BOOTP server: a network device that has been specially set up
to respond to BOOTP client requests, and has been programmed
with addressing and other information it can provide to clients when
required.
Messaging and Transport
BOOTP messaging uses the User Datagram Protocol (UDP)
 First. UDP is a lot less complex than the TCP and is ideal for simple
“request/reply” protocols like BOOTP.
 Second. since the client obviously doesn't know the address of a
BOOTP server, the request is broadcast on its local network; UDP
supports broadcasts while TCP does not.
UDP uses a special well-known (reserved) port number for BOOTP
servers: UDP port 67. BOOTP servers “listen” on port 67 for these
broadcast BOOTP requests sent by clients. After processing the request,
the server sends a reply back to the client (broadcast or unicast)
Use of Broadcasts and Ports

The fact that BOOTP servers may need to broadcast back to the client
necessitates a bit of a change from the way most TCP/IP protocols use
client ports.

Recall that normally, the client in a client/server transaction using UDP or


TCP generates a temporary, or ephemeral port number that it uses as the
source port in its request. The server sends the reply back to the client's IP
address using that ephemeral port number. Ephemeral port numbers must
be unique for a particular IP address, but may not necessarily be unique
across all the devices on a network. For example, device A may be using
ephemeral port number 1,248 for an HTTP request to a Web server, while
device B may be using port number 1,248 on its TCP/IP stack to send a
DNS request.
Since the server in BOOTP is broadcasting, it is not targeting a
particular device with a unicast transmission. This means it cannot safely
send to an ephemeral port number: some other device on the network
may have selected the same ephemeral port number for some other
transaction and may mistake the BOOTP server's response as being
intended for itself.
To avoid this problem, another well-known port number is used just for
BOOTP clients: UDP port 68. Clients listen on this port for broadcast or
unicast transmissions, while of course devices that have not sent a
BOOTP request will ignore it.

Retransmission of Lost Messages


The drawback of the simplicity of using UDP for BOOTP messaging is
that we get no transport quality features. UDP is unreliable, which
means a BOOTP request might be lost before it gets to the server

The server's response may similarly not get back to the client. Like
many other protocols using UDP, BOOTP clients take care of this by
using a retransmission timer. If after a certain period of time the client
has not received a response, it re-sends its request.
Steps involved in communication

1. Client Creates Request


2. Client Sends Request
3. Server Receives Request and Processes It
4. Server Creates Reply
5. Server Sends Reply
6. Client Processes Reply
7. Client Completes Boot Process
Dynamic Host Configuration Protocol
1. dynamic allocation
The request-and-grant process uses a lease concept with a controllable
time period, allowing the DHCP server to reclaim (and then reallocate) IP
addresses that are not renewed (dynamic re-use of IP addresses).

2. automatic allocation: The DHCP server permanently assigns a


free IP address to a requesting client from the range defined by the
administrator. This is like dynamic allocation, but the DHCP server keeps
a table of past IP address assignments, so that it can preferentially assign
to a client the same IP address that the client previously had.

3. static allocation: The DHCP server allocates an IP address based


on a table with MAC address/IP address pairs, which are manually filled
in (perhaps by a network administrator). Only requesting clients with a
MAC address listed in this table will be allocated an IP address.

You might also like