Top Banner
J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1
91

J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

Mar 26, 2015

Download

Documents

Devin Chandler
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

J.GODWIN PONSAM & S.MURUGANDAM

ASST.PROFESSOR

SRM University, Kattankulathur

8/22/2011School of Computing, Department of IT 1

Page 2: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

SERVICES PROVIDED TO TRANSPORT LAYER

DISTANCE VECTOR ROUTING FLOODING SHORTEST PATH ROUTING IPV 4 CLASSFUL ADDRESSING SUBNETTING

8/22/2011School of Computing, Department of IT 2

Page 3: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

I.TComputer Networks

J. Godwin Ponsam

It is the lowest layer that deals with end-to-end transmission

Concerned with getting packets from the source all the way to the destination

Should know about the topology of the communication subnet and choose appropriate paths through it

It should choose routes to avoid overloading some of the communication lines and routers while leaving others idle

When source and destination are in different networks, new problems occur…it is up to this layer to deal with them

Services Provided to Transport Layer

Page 4: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

I.TComputer Networks

J. Godwin Ponsam

Environment of network layer protocolsStore and Forward Packet Switching mechanism is

used for data delivery

Services Provided to Transport Layer

Page 5: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

I.TComputer Networks

J. Godwin Ponsam

Packets (called datagrams) are injected into the subnet (datagram subnet) individually and routed independently

No advance setup is needed The algorithm that manages the tables and

makes the routing decisions is called “routing algorithm”. Routing is one of the main design decisions at

the network layer

Connectionless Service

Page 7: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

I.TComputer Networks

J. Godwin Ponsam

Connectionless Service

Page 8: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

I.TComputer Networks

J. Godwin Ponsam

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

This connection is called VC (virtual circuit) and the subnet is 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 in the tables inside the routers;

when the connection is released, the virtual circuit is also terminated;

each packet has an ID telling which VC belongs to.

Connection Oriented Service

Page 9: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.
Page 10: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

I.TComputer Networks

J. Godwin Ponsam

Virtual Circuit vs. Datagram subnets

Page 11: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

5. The Network Layer5.1 Network Layer Design Issues

5.1.2 Internal Organization of the Network Layer

Page 12: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

5. The Network Layer5.2 Routing Algorithms

Fairness and optimality are often contradictory goals.

Page 14: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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 K are 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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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 sink 1. Mark the working node as permanent. 2. Examine all adjacent nodes in turn

If 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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

5. The Network Layer5.2 Routing Algorithms

5.2.5 Distance Vector Routing

Page 29: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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 have been proposed in the literature, each one more complicated and less useful than the one before it. We will describe just one 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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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 lineSlow processorsLow bandwidth lines, etc..

Page 36: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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 send more traffic over an already congested line

Packet lifetime management – deals with how long a packet may live before 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 the transit over a wire between two routers; if it is too short, extra packets will be sent unnecessarily; if is too long, congestion will be reduced, but response time will suffer whenever a packet is lost

Page 40: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

Policies that affect congestion.

5-26

Page 42: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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

Page 43: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

Admission Control- Once congestion has been signaled no more v.c are set up until the problem has gone away

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

This agreement specifies volume and shape of the traffic, QOS required

This agreement reserves resources along the v.c path

Disadvantage : Resource wastage

Page 44: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

Congestion Control in Datagram Subnets

Each router monitor utilization of its output lines and other resources

Ex: 0.0 and 1.0 reflects the utilization of that line

Whenever the value exceeds the threshold the output lines enters a warning state

Soln: Warning Bit, Choke packets

Page 45: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

Choke Packets Router sends a choke packet back to the

source host When source gets the choke packet it

needs to reduce traffic send to the specified destinaiton

After the period host listens for more choke packets

If one arrives line is still congested so the host reduces flow still more

If no choke arrives host increases the flow again

Page 46: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

At high speeds sending a choke packet to the source hosts does not work well because reaction is so slow

Ex: 155 mbps line, 30 msec , 4.6 mbps will be sent

Choke packet take effect at every hop it passes through

Page 47: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

(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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

Load Shedding is a fancy way of throwing packets when they cannot handle

Router can just pick a packet at random to drop but usually it can do better depend on the application running

To implement an intelligent discard policy application must mark their packets in priority classes to indicate how important they are

Page 49: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

RED Routers maintain a running average of

their queue lengths When the queue length exceeds a

threshold the line is said to be congested and action is taken

Choke packets puts more load on already congested network

Soln: Just discard selected packet and not report it

Source will notice the lack of ack and take action

Page 50: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

For applications such as audio and video streaming it does not matter much if the packets take 20 msec or 30 msec to be delivered

Variation in the packet arrival time is called jitter

High Jitter- uneven quality to the sound

Acceptabl -99 % of packets delivered with a delay in the range of 24.5 msec to 25.5 msec

Page 51: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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

Page 52: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

Jitter can be bounded by computing expected transit time for each hop along the path

When a packet arrives at a router checks to see how much the packet is behind or ahead of its schedule

Packets that are ahead of schedule get slowed down and packets that are behind schedule speeded up, reduces te amount of jitter

Some applns. Video on demand jitter can be eliminated by buffering at the receiver

In real time appln. Internet telephony buffering at receiver is not possible

Page 53: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

The identifier used in the IP layer of the The identifier used in the IP layer of the TCP/IP protocol suite to identify each TCP/IP protocol suite to identify each device connected to the Internet is device connected to the Internet is called the Internet address or IP address. called the Internet address or IP address.

An IP address is a An IP address is a 32-bit address32-bit address that that uniquely and universally defines the uniquely and universally defines the connection of a host or a router to the connection of a host or a router to the Internet. Internet.

IP addresses are unique. They are IP addresses are unique. They are unique in the sense that each address unique in the sense that each address defines one, and only one, connection to defines one, and only one, connection to the Internet. the Internet.

Two devices on the Internet can never Two devices on the Internet can never have the same addresshave the same address

Page 54: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

Example:

80 0B 03 1F

1000 0000 0000 1011 0000 0011 0001 1111

128.11.3.31

IP addresses can be written as32 bit-long binary 4-value dotted decimal notation8-value hexadecimal notation

Page 56: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

1. 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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

Internet Addresses Classful Addressing

Address ClassesNetwork Id and Host IDMasks and CIDR

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

Page 58: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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

This architecture is called This architecture is called classful classful addressingaddressing. .

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

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

Page 59: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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

Page 60: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

Examine the first few bits of the first byte in IP addresses to Examine the first few bits of the first byte in IP addresses to determine the address class.determine the address class.

Page 61: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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 always add 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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.255Millions of class A addresses are wasted because it is seldom that a company requires 16 million host addresses

Page 65: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.255Many of class B addresses are wasted because it is seldom that a company requires 65 thousand host addresses

Page 66: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.255The number of addresses in class C is smaller than the needs of most organizations

Page 67: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

Class D addresses Reserved for multicastContain only one block of addresses228 = 238,435,456 addresses

Class E addressesReserved for future useContain only one block of addresses228 = 238,435,456 addressesUsually used, wasted.

Page 68: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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

Page 73: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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

techniques

Page 79: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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 addressCan 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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.
Page 82: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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 00111000

Subnet Mask 11111111 11111111 11100000 00000000

Network block 001 = 1

Host id 00010 00111000 = 568

Number of blocks 23 = 8

Number 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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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/21

Shows that address belongs to

supernet of class C networks with

mask

255.255.248.0

Since 248 = 11111000, 8 class A

networks were combined together

to create a supernet.

Page 88: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

The idea of subnetting

and supernetting of

classful addresses is

almost obsolete.

Page 89: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

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 of IT 89

Page 90: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

List the difference between Static Routing and Dynamic Routing

2. List the difference between Virtual Circuit subnet and datagram subnet

3. Define Count to Infinity problem 4. Define Network Address 5.How many host addresses are available in

Class A address 6. List the range of private IP addresses 7. Define Load Shedding 8. List the Congestion Prevention policies in

transport layer 9. Find the network address of 23.56.7.91

8/22/2011School of Computing, Department of IT 90

Page 91: J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur 8/22/2011 School of Computing, Department of IT 1.

1. Andrew S. Tanenbaum, Computer Networks, Fourth Edition, Prentice Hall of India, 2003

2. Cisco Network Fundamentals – CCNA Exploration Companion Guide, Pearson Education , 2008

3. William Stallings, Data and Computer Communications , Fourth Edition, Prentice Hall of India, 2004

8/22/2011School of Computing, Department of IT 91