+ All Categories
Home > Documents > J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1....

J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1....

Date post: 22-Mar-2018
Category:
Upload: lamngoc
View: 215 times
Download: 2 times
Share this document with a friend
91
IT 0305COMPUTER NETWORKS FIFTH SEMESTER UNIT Iv J.GODWIN PONSAM & S.CHRISTOBEL DIANA ASST.PROFESSOR SRM University, Kattankulathur 1 8/22/2011 School of Computing,
Transcript
Page 1: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

IT ‐0305COMPUTER NETWORKS  FIFTH SEMESTERUNIT Iv

J.GODWIN PONSAM & S.CHRISTOBEL DIANAASST.PROFESSOR

SRM University, Kattankulathur

18/22/2011School of Computing,

Page 2: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Unit iv 

• SERVICES PROVIDED TO TRANSPORT LAYER

• DISTANCE VECTOR ROUTING

• FLOODING

• SHORTEST PATH ROUTING

• IPV 4 CLASSFUL ADDRESSING

• SUBNETTING

8/22/2011School of Computing, Department 2

Page 3: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

I.TComputer Networks

J. Godwin Ponsam

• It is the lowest layer that deals with end‐to‐endtransmission

• Concerned with getting packets from the source allthe way to the destination

• Should know about the topology of thecommunication subnet and choose appropriatepaths through it

• It should choose routes to avoid overloading someof the communication lines and routers whileleaving others idle

• When source and destination are in differentnetworks, new problems occur…it is up to this layerto deal with them

Services Provided to Transport Layer

Page 4: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

I.TComputer Networks

J. Godwin Ponsam

• Environment of network layer protocols– Store and Forward Packet Switching mechanism is used for data delivery

Services Provided to Transport Layer

Page 5: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

I.TComputer Networks

J. Godwin Ponsam

• Design Principles for Services:

– 1. services should be independent of the router technology

• must be able to communicate across all types of network

– 2. transport layer should be shielded about the subnet structure, 

number, type and topology of the routers present

– 3. The network address made available to the transport layer should 

use a uniform numbering plan, even across LANs and WANs

• Two types of services:

– Connectionless Services

– Connection Oriented Services

Services Provided to Transport Layer

Page 6: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

I.TComputer Networks

J. Godwin Ponsam

• Packets (called datagrams) are injected intothe subnet (datagram subnet) individuallyand routed independently

• No advance setup is needed• The algorithm that manages the tables andmakes the routing decisions is called“routing algorithm”.– Routing is one of the main design decisions atthe network layer

Connectionless Service

Page 7: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

I.TComputer Networks

J. Godwin Ponsam

Connectionless Service

Page 8: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

I.TComputer Networks

J. Godwin Ponsam

• A path from the source router to the destination routermust be established before sending any data

• This connection is called VC (virtual circuit) and the subnetis called virtual circuit subnet.

• Avoids having a new route for every packet sent;– when a connection is established, a route from the source to the

destination is chosen as part of the connection setup and stored inthe tables inside the routers;

– when the connection is released, the virtual circuit is alsoterminated;

– each packet has an ID telling which VC belongs to.

Connection Oriented Service

Page 9: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Connection Oriented

Page 10: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

I.TComputer Networks

J. Godwin Ponsam

Virtual Circuit vs. Datagram subnets

Page 11: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.1 Network Layer Design Issues

5.1.2 Internal Organization of the Network Layer

Page 12: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

routing algorithm: determine the route and maintain the routing table

desired properties for a routing algorithm:1. correctness2. simplicity1. robustness with respect to failures and changing conditions2. stability of the routing decisions3. fairness of the resource allocation4. optimality of the packet travel times

Page 13: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

Fairness and optimality are often contradictory goals.

Page 14: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

What is it that we seek to optimize?

Minimizing mean packet delay is an obvious candidate, but so is maximizing total network throughput. Furthermore, these two goals are also in conflict, since operating any queuing system near capacity implied a long queuing delay.

As a compromise, many networks attempt to minimize the number of hops a packet must make, because reducing the number of hops tends to improve the delay and also reduce the amount of bandwidth consumed, which tends to improve the throughput as well.

Page 15: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

Static (nonadaptive) Routing

The routing table is not changed according to network conditions.

adaptive routing

centralized routing: one node calculates the routing tableisolated routing: do not exchange information with other nodedistributed routing: node exchanges information and makes

routing decisions by itself

Page 16: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.1 The Optimality Principle

The optimality principle states that if router J is on the optimal path from router I to router K, then the routes from I to J and from J to Kare also optimal.

As a direct consequence of the optimality principle, we can see that the set of optimal routes from all sources to a given destination form a tree rooted at the destination. Such a tree is called a sink tree.

Page 17: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.1 The Optimality Principle

A sink tree for router B

Page 18: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.1 The Optimality Principle

A sink tree does not contain any loops, so each packet will be delivered within a finite and bounded number of hops. In practice, life is not quite this easy. Links and routers can go down and come back up during operation, so different routers may have different ideas about the current topology.

Also, we have quietly finessed the issue of whether each router has to individually acquire the information on which to base its sink tree computation, or whether this information is collected by some other means.

Page 19: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.2 Shortest Path Routing

To compute the shortest path from A to D: Dijkstra’s algorithm

Page 20: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.2 Shortest Path Routing

To compute the shortest path from A to D

Page 21: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.2 Shortest Path Routing

To compute the shortest path from A to D

Page 22: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.2 Shortest Path Routing

To compute the shortest path from A to D

Page 23: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.2 Shortest Path Routing

To compute the shortest path from A to D

Page 24: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.2 Shortest Path Routing

To compute the shortest path from A to D

Page 25: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

I.TComputer Networks

J. Godwin Ponsam

Initially mark all nodes (except source) with infinite distance.working node = source nodeSink node  = destination nodeWhile the working node is not equal to the sink1.  Mark the working node as permanent.2.  Examine all adjacent nodes in turnIf the sum of label on working node plus distance from working node to adjacent node is less than current labeled distance on the adjacent node, this implies a shorter path. Relabel the distance on the adjacent node and label it with the node from which the probe was made.

3.  Examine all tentative nodes (not just adjacent nodes) and mark the node with the smallest labeled value as permanent. This node becomes the new working node.

Reconstruct the path backwards from sink to source.

Dijkstra’s Shortest Path Algorithm

Page 26: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.3 Flooding

flooding

P

PP

P

Transmit a copy of each packetit receives on every one of itstransmission links

advantages: robust, simple, broadcasting, discovery

disadvantages: use too much resource

How to curb the flooding: 1. hop count2. time stamp

A variation of flooding that is slightly more practical is selective flooding. In this algorithm the routers do not send every incoming packet out on every line, only on those lines that are going approximately in the right direction.

Page 27: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.5 Distance Vector Routing

•It was the original ARPANET routing algorithm and was also used in the Internet under the name RIP (Routing Information Protocol) and in early versions of DECnet and Novell’s IPX. AppleTalk and Cisco routers use improved distance vector protocols.

•Once every T msec each router sends to each neighbor a list of its estimate delays to each destination. It also receives a similar list from each neighbor.

Page 28: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.5 Distance Vector Routing

Page 29: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.5 Distance Vector Routing

The count-to-infinity problem

A is down

Then A comes up. The good news spreads quickly.

Page 30: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.5 Distance Vector Routing

The count-to-infinity problem

A is up

Then A comes down. The bad news travels slowly.

Page 31: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.5 Distance Vector Routing

The count-to-infinity problem

•It should be clear why bad news travels slowly: no router ever has a value more than one higher than the minimum of all its neighbors. • Gradually, all the routers work their way up to infinity, but the number of exchanges required depends on the numerical value used for infinity. • For this reason, it is wise to set infinity to the longest path plus 1 (if using hop count as metric).•If the metric is time delay, there is no well-defined upper bound, so a high value is needed to prevent a path with a long delay from being treated as down.

Page 32: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.5 Distance Vector Routing

The Split Horizon Hack

Many ad hoc solutions to the count-to-infinity problem havebeen proposed in the literature, each one more complicatedand less useful than the one before it. We will describe justone of them and tell why it, too, fails.

The split horizon algorithm works the same way as distance vector routing, except that the distance to X is not reported on the line that packets for X are sent on (actually, it is reported as infinity).

Page 33: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.5 Distance Vector Routing

The Split Horizon Hack

1 2 3 4inf 2 3 4inf inf 3 4inf inf inf 4inf inf inf inf

inf=infinity

Page 34: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

5. The Network Layer5.2 Routing Algorithms

5.2.5 Distance Vector Routing

The Split Horizon Hack

When CD line goes down. A thinks it has a path to D through B and B thinks it has a path to D through A.A and B will count to infinity.

Page 35: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Congestion

• When too much traffic is offered, congestion sets in and performance degrades sharply

• Factors for congestion:– Multiple input lines receive packets to be sent on the same output line

– Slow processors– Low bandwidth lines, etc..

Page 36: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Congestion control vs Flow control

• Congestion control has to do with making sure the subnet is able to carry the offered traffic. – It is a global issue, involving the behavior of all the hosts, all the 

routers, the store‐and‐forwarding processes inside the routers, and all the other factors that tend to diminish the carrying capacity of the subnet

• Flow control relates to the point to point traffic between a given sender and a given receiver. Its job is to make sure that a fast sender will not continually transmit data faster than the receiver can handle. – It frequently involves direct feedback from the receiver to the sender 

to tell the sender how things are doing at the other end.

Page 37: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Principles of congestion control

• Open loop solutions – attempt to solve the problem by good design, to make sure it doesn’t occur in the first place

• Closed loop solutions – based on the concept of a feedback loop; has three steps:– Monitor the system to detect when and where congestion occurs 

(using different metrics: lack of buffer space, average queue length, no of packets that time‐out, etc..)

– Pass this information to the places where action can take place • Router sending a packet to the source announcing the problem

• Bit or field reserved in every packet, so routers fill it in whenever congestion goes above certain threshold

• Send probe packets out to explicitly ask about congestion and use the info to route traffic around the problem area

– Adjust system operation to correct the problem

Page 38: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Congestion prevention policies

• Data link:– Retransmission policy – how fast a sender times‐out and what it 

transmits upon time‐out; • a jumpy sender that times out quickly and retransmits all outstanding packets using go back n will put a heavier load on the system than will a leisurely sender using selective repeat

– Acknowledgement policy – if each packet is acknowledged immediately, the acknowledge packets will generate extra traffic. 

– Flow control – a tight flow control schema (i.e. using small windows) reduces the data rate, thus helps fight congestion

• Network layer:– Virtual circuits versus datagram inside the subnet – many congestion 

control algorithms work only with virtual circuits

– Packets queuing and service policy – relates to whether the routers have one buffer per input line, one buffer per output line or both

Page 39: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Congestion prevention policies

• Network layer:– Packet discard policy – is the rule telling which packet is dropped

when there is no space;– Routing algorithm – a good algorithm can help avoid congestion by

spreading the traffic over all the lines, whereas a bad one can sendmore traffic over an already congested line

– Packet lifetime management – deals with how long a packet may livebefore being discarded;

• Transport layer– Same as for data link layer– In addition, determining the timeout interval is more difficult, since

the transit time across the network is less predictable than thetransit over a wire between two routers; if it is too short, extrapackets will be sent unnecessarily; if is too long, congestion will bereduced, but response time will suffer whenever a packet is lost

Page 40: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Closed loop congestion control

• Explicit feedback algorithms:– Packets are sent back from the point of congestion to warn the 

source

• Implicit feedback algorithms– The source deduces the congestion by making local observations, 

such as the time needed for acknowledgement to come back

• The presence of the congestion means that the load is temporarily greater than the resources– Increase the resources – the subnet may start the use extra dial‐up 

telephone lines to increase the bandwidth between certain points, include extra routers, etc.. 

– Decrease the load – the only way to deal with congestion whenever you can’t increase the resources (deny of services, degrading of services, etc…)

• Some of those algorithms are present at the transport layer, so we will not deal with them just yet.

Page 41: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Congestion Prevention Policies

Policies that affect congestion.

5-26

Page 42: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Congestion Control in Virtual‐Circuit Subnets

(a) A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B.

Page 43: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Admission Control

• Admission Control‐ Once congestion has beensignaled no more v.c are set up until theproblem has gone away

• Negotiating agreement between the host andthe subnet when a v.c is set up

• This agreement specifies volume and shapeof the traffic, QOS required

• This agreement reserves resources along thev.c path

• Disadvantage : Resource wastage

Page 44: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Congestion Control

• Congestion Control in Datagram Subnets

• Each router monitor utilization of its outputlines and other resources

• Ex: 0.0 and 1.0 reflects the utilization of thatline

• Whenever the value exceeds the threshold theoutput lines enters a warning state

• Soln: Warning Bit, Choke packets

Page 45: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

• Choke Packets

• Router sends a choke packet back to thesource host

• When source gets the choke packet itneeds to reduce traffic send to thespecified destinaiton

• After the period host listens for morechoke packets

• If one arrives line is still congested so thehost reduces flow still more

• If no choke arrives host increases the flowagain

Page 46: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Hop by Hop choke packets

• At high speeds sending a choke packet to thesource hosts does not work well becausereaction is so slow

• Ex: 155 mbps line, 30 msec , 4.6 mbps will besent

• Choke packet take effect at every hop it passesthrough

Page 47: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Hop‐by‐Hop Choke Packets

(a) A choke packet that affects only the source.

(b) A choke packet that affects each hop it passes through.

Page 48: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Load Shedding

• Load Shedding is a fancy way of throwingpackets when they cannot handle

• Router can just pick a packet at random todrop but usually it can do better depend onthe application running

• To implement an intelligent discard policyapplication must mark their packets in priorityclasses to indicate how important they are

Page 49: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

RED

• Routers maintain a running average oftheir queue lengths

• When the queue length exceeds athreshold the line is said to be congestedand action is taken

• Choke packets puts more load on alreadycongested network

• Soln: Just discard selected packet and notreport it

• Source will notice the lack of ack and takeaction

Page 50: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Jitter Control

• For applications such as audio and videostreaming it does not matter much if thepackets take 20 msec or 30 msec to bedelivered

• Variation in the packet arrival time is calledjitter

• High Jitter‐ uneven quality to the sound

• Acceptabl ‐99 % of packets delivered with adelay in the range of 24.5 msec to 25.5 msec

Page 51: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Jitter Control

(a) High jitter.         (b) Low jitter.

Page 52: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

• Jitter can be bounded by computing expectedtransit time for each hop along the path

• When a packet arrives at a router checks to seehow much the packet is behind or ahead of

its schedule

• Packets that are ahead of schedule get sloweddown and packets that are behind schedulespeeded up, reduces te amount of jitter

• Some applns. Video on demand jitter can beeliminated by buffering at the receiver

• In real time appln. Internet telephony bufferingat receiver is not possible

Page 53: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Introduction

• The identifier used in the IP layer of the TCP/IPprotocol suite to identify each device connectedto the Internet is called the Internet address orIP address.

• An IP address is a 32‐bit address that uniquelyand universally defines the connection of a hostor a router to the Internet.

• IP addresses are unique. They are unique in thesense that each address defines one, and onlyone, connection to the Internet.

• Two devices on the Internet can never have thesame address

Page 54: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

IP Address Space• IP addresses are 

–32 bit‐long and 

–Uniquely and universally identifies connection of a device to the Internet.

• IP address space in IP version 4 is:–2N =  232 = 4,294,967,296 

–Actual space is much smaller

Page 55: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Example:80 0B 03 1F

1000 0000 0000 1011 0000 0011 0001 1111

128.11.3.31

IP Address Notation• IP addresses can be written as

– 32 bit‐long binary – 4‐value dotted decimal notation– 8‐value hexadecimal notation

Page 56: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Notation Examples1. Change the following IP addresses from binary notation to dotted‐

decimal notation.a. 10000001 00001011 00001011 11101111b. 11000001 10000011 00011011 11111111

2. Change the following IP addresses from dotted‐decimal notation to binary notation.

a. 111.56.45.78b. 221.34.7.82

3. Find the error, if any, in the following IP addresses:a. 111.56.045.78 b. 221.34.7.8.20c. 75.45.301.14 d. 11100010.23.14.67

4. Change the following IP addresses from binary notation to hexadecimal notation.

a. 10000001 00001011 00001011 11101111b. 11000001 10000011 00011011 11111111

Page 57: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Outline

• Internet Addresses• Classful Addressing

– Address Classes– Network Id and Host ID– Masks and CIDR

• Special IP Addresses• Subnetting and Supernetting• Variable length blocks and CIDR• Subnetting and Address Allocation

Page 58: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Introduction

• IP addresses, when started a few decades ago, used the concept of classes. 

• This architecture is called classfuladdressing. 

• In the mid‐1990s, a new architecture, called classless addressing, was introduced and will eventually supersede the original architecture. 

• However, part of the Internet is still using classful addressing, but the migration is very fast.

Page 59: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Classful Addressing

• IP address space is divided into five classes: A, B, C, D, and E.

Page 60: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Classful Addressing• Examine the first few bits of the first byte in IP addresses to determine the 

address class.

Page 61: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Classful Addressing. Examples

• In class A, only 1 bit defines the class. The remaining 31 bits are available for the address. With 31 bits, we can have 231 or 2,147,483,648 addresses.

• Find the class of each address:a. 00000001 00001011 00001011 11101111b.  11000001 10000011 00011011 11111111c.  10100111 11011011 10001011 01101111d.  11110011 10011011 11111011 00001111

Page 62: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Classful Addressing. Examples

• Show that class A has 231 (2,147,483,648) addresses using decimal notation.

2563, 2562, 2561, 2560

Last address:  127 × 2563 + 255 × 2562 + 255 × 2561 + 255 × 2560 = 2,147,483,647

First address:  = 0

Now to find the integer value of each number, we multiply each byte by its weight:

If we subtract the first address from the last and add 1 to the result (remember we alwaysadd 1 to get the range), we get 2,147,483,648 or 231.

Find the class of each address:a. 227.12.14.87 b. 193.14.56.22 c. 14.23.120.8d. 252.5.15.111 e. 134.11.78.56

Page 63: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Network and Host IDs

• Each IP address is divided into two parts– Network part, defined by netid – identifies a network

– Host part, defined by hostid – identifies a host within a network

Page 64: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Class A Networks

• There are 128 class A address blocks– 0.x.y.z to 127.X.Y.Z 

• Each address block contains– 16,777,216 addresses 

– x.0.0.0 to X.255.255.255

• The whole range of addresses is– 0.0.0.0 to 

– 127.255.255.255

Millions of class A addresses are wasted because it is seldom that a company requires 16 million host addresses

Page 65: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Class B Networks

• There are 16,384 class B address blocks– 128.0.y.z to 191.255.Y.Z 

• Each address block contains– 65,536 addresses 

– x.y.0.0 to

– X.Y.255.255

• The whole range of addresses is– 128.0.0.0 to 

– 191.255.255.255

Many of class B addresses are wasted because it is seldom that a company requires 65 thousand host addresses

Page 66: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Class C Networks

• There are 2,097,152 class C address blocks– 192.0.0.z to 223.255.255.Z 

• Each address block contains– 256 addresses – x.y.z.0 to– X.Y.Z.255

• The whole range of addresses is– 192.0.0.0 to – 223.255.255.255

The number of addresses in class C is smaller than the needs of most organizations

Page 67: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Class D and E Networks

• Class D addresses – Reserved for multicast

– Contain only one block of addresses

– 228 = 238,435,456 addresses

• Class E addresses– Reserved for future use

– Contain only one block of addresses

– 228 = 238,435,456 addresses

– Usually used, wasted.

Page 68: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Examples

• In classful addressing, the network address (the first address in the block) is the one that is assigned to the organization. The range of addresses can automatically be inferred from the network address

Examples:

• Given the network address 17.0.0.0, find the class, the block, and the range of the addresses.

– This class A network, with address block # 17, and address range 17.0.0.0 to 17.255.255.255

• Given the network address 132.21.0.0, find the class, the block, and the range of the addresses

– This is class B network, with address block 132.21, and address range 132.21.0.0 to 132.21.255.255

• Given the network address 220.34.76.0, find the class, the block, and the range of the addresses

– This is class C because the first byte is between 192 and 223. The block has a netid of 220.34.76. The addresses range from 220.34.76.0 to 220.34.76.255

Page 69: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Masks

• Masks are used to determine network part of the address for a given IP address.

• Mask is a 32‐bit number that consists of – Consecutive 1s indicating bits that belong to the network part of address followed 

by

– Consecutive 0s indicating bits that do not belong to network part of the address

Bit-wise AND operation between the IP address and mask results in the network part of the address

Page 70: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Default Classful Masks

• The network address is the beginning address of each block. • Network address can be found by applying the default mask to 

any of the addresses in the block (including itself).• Do not apply the default mask of one class to an address 

belonging to another class

Page 71: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Examples and CIDR notation

• Given the IP address find the network part– 23.56.7.91

– 248.123.23.117

– 132.6.17.85

– 201.180.56.5

• Classless Inter‐domain Routing (CIDR) allows explicitly indicating the mask together with the IP address my adding “/” followed by the number of 1s in the mask.– 23.56.7.91/8

– 132.6.17.88/16

– 195.67.56.123/24

Page 72: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Special Addresses

• There are several addresses within each class that are reserved for such special purposes as broadcast.

Page 73: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Direct Broadcast

• Direct broadcast sends a message to all the hosts within a specific network. 

• Direct broadcast address consists of network id followed by all 1s.

Page 74: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Limited Broadcast

• Limited broadcast sends a message to all the hosts within THIS network. • Limited broadcast address consists of all 1s.

Page 75: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

This Host on This network

• The network address that consists of all 0s indicates this host on this network.

– Used at the bootstrap time when host does not know its IP address.– This address is used as a source address in limited broadcast message to 

determine its IP address.– Can only be used as a source address.

Page 76: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Specific Host on This network

• The network address that consists of all 0s for netid and specific value for hostid is destined to a specific host on THIS network– Used a host to send a message to another host on same network.– This address can only be used as destination– Usually class A addresses

Page 77: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Loopback Address

• IP address with first byte value of 127 is used for the loopback address.– Packets with such destination address never leave the machine

• Loopback can be used only as destination  address• Loopback is class A address which reduces the number of class A 

addresses by 1 block

Loopback address can be used for Testing IP software, Sending a message between

client and server programs located on the same machine, etc

Page 78: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Private Addresses

• Private addresses are not recognized globally• Private address often used together with NAT techniques

Page 79: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Unicast, Multicast, and Broadcast

• Unicast addresses are of classes A, B, or C and are used for one‐to‐one communications

• Multicast addresses are class D addresses and are used for one‐to‐many communication.– Designate a group of receivers – Can be used only as destination address– Can be used on local and global levels

• Broadcast address are of classes A, B, or C and are used for one one‐to‐all communication.– Broadcast addresses are only allowed at a local level.

Page 80: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Subnetting

• Subnetting is dividing a network into several smaller parts (subnets), each having its own sub‐network address.– Usually done for more efficient allocation of IP addresses

• Traditional Internet uses two‐level address hierarchy: netids and hostids

• Subnetting provides another, third, level of hierarchy.

Page 81: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Subnetting

Page 82: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Subnetting

• Subnetting divides IP address into three parts: – netid (as before)– subnetid (part of original hostid)– hostid (part of original hostid)

• Routing in IP networks is divided into three parts, similarly to regular telephone numbers:– Delivery to the network site

– Delivery to the subnetwork

– Delivery to the host

Page 83: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Subnet Masks

• Subnet masks operate the same way as default masks.• Unlike default classful masks, subnet masks are required to 

identifying the subnetwork.

Page 84: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Subnet Masks Example

• Identify subnet address for destination 156.45.34.56 with subnet mask 255.255.224.0

Address 10011100 00101101 00100010 00111000

Subnet Mask 11111111 11111111 11100000 00000000

Subnetwork Address 10011100 00101101 00100000 00000000

Subnetwork Address 156 . 45 . 32 . 0

Page 85: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Subnet Masks Example

• Identify the address block and host id for destination 156.45.34.56 with subnet mask 255.255.224.0

• How many subnet blocks are there in the class B network?• How many hosts are in each block?

Address 10011100 00101101 00100010 00111000Subnet Mask 11111111 11111111 11100000 00000000Network block 001 = 1Host id 00010 00111000 = 568Number of blocks 23 = 8Number of addresses 213 – 2 = 8190 (subnetwork and limited broadcast addresses reserved)

CIDR notation is also applicable with Subnet masks. For example,• address 141.14.92.3 with mask 255.255.192.0 can be written as• 141.14.92.3/18

Page 86: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Supernetting

• Supernetting is combining several small networks (e.g. of class C) into a big one to create a large range of addresses.

Page 87: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Supernetting

• In supernetting, the first address of the supernet and the supernet mask define the range of addresses.

CIDR notation is applicable to suppernetting as well.For example:

201.12.192.3/21Shows that address belongs to supernet of class C networks with mask

255.255.248.0Since 248 = 11111000, 8 class A networks were combined together to create a supernet.

Page 88: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Supernetting

The idea of subnetting and supernetting of classful addresses is almost obsolete.

Page 89: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Disclaimer

The contents of the slides are solely for the purpose of teaching students at SRM University. All copyrights and Trademarks of organizations/persons apply even if not specified explicitly. 

8/22/2011School of Computing, Department 89

Page 90: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

Review questions

• List the difference between Static Routing andDynamic Routing

• 2. List the difference between Virtual Circuit subnetand datagram subnet

• 3. Define Count to Infinity problem

• 4. Define Network Address

• 5.How many host addresses are available in Class Aaddress

• 6. List the range of private IP addresses

• 7. Define Load Shedding

• 8. List the Congestion Prevention policies in transportlayer

9. Find the network address of 23.56.7.918/22/2011School of Computing, Department

90

Page 91: J.GODWIN PONSAM S.CHRISTOBEL DIANA …1).pdf · ASST.PROFESSOR. SRM University, Kattankulathur. 1. ... • IPV 4 CLASSFUL ADDRESSING ... – Monitor the system to detect when and

bibliography

• 1. Andrew S. Tanenbaum, ComputerNetworks, Fourth Edition, Prentice Hall ofIndia, 2003

• 2. Cisco Network Fundamentals – CCNAExploration Companion Guide, PearsonEducation , 2008

• 3. William Stallings, Data and ComputerCommunications , Fourth Edition, PrenticeHall of India, 2004

8/22/2011School of Computing, Department 91


Recommended