Presentation is loading. Please wait.

Presentation is loading. Please wait.

IT -0305COMPUTER NETWORKS FIFTH SEMESTER UNIT Iv

Similar presentations


Presentation on theme: "IT -0305COMPUTER NETWORKS FIFTH SEMESTER UNIT Iv"— Presentation transcript:

1 IT -0305COMPUTER NETWORKS FIFTH SEMESTER UNIT Iv
J.GODWIN PONSAM & S.MURUGANDAM ASST.PROFESSOR SRM University, Kattankulathur School of Computing, Department of IT 8/22/2011

2 Unit iv SERVICES PROVIDED TO TRANSPORT LAYER DISTANCE VECTOR ROUTING
FLOODING SHORTEST PATH ROUTING IPV 4 CLASSFUL ADDRESSING SUBNETTING School of Computing, Department of IT 8/22/2011

3 Services Provided to Transport Layer
I.T Computer Networks Services Provided to Transport Layer 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 J. Godwin Ponsam

4 Services Provided to Transport Layer
I.T Computer Networks Services Provided to Transport Layer Environment of network layer protocols Store and Forward Packet Switching mechanism is used for data delivery J. Godwin Ponsam

5 Services Provided to Transport Layer
I.T Computer Networks Services Provided to Transport Layer 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 J. Godwin Ponsam

6 Connectionless Service
I.T Computer Networks Connectionless Service 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 J. Godwin Ponsam

7 Connectionless Service
I.T Computer Networks Connectionless Service J. Godwin Ponsam

8 Connection Oriented Service
I.T Computer Networks Connection Oriented Service 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. J. Godwin Ponsam

9 Connection Oriented

10 Virtual Circuit vs. Datagram subnets
Computer Networks Virtual Circuit vs. Datagram subnets J. Godwin Ponsam

11 5. The Network Layer 5.1 Network Layer Design Issues
5.1.2 Internal Organization of the Network Layer

12 5. The Network Layer 5.2 Routing Algorithms
routing algorithm: determine the route and maintain the routing table desired properties for a routing algorithm: 1. correctness 2. simplicity 1. robustness with respect to failures and changing conditions 2. stability of the routing decisions 3. fairness of the resource allocation 4. optimality of the packet travel times

13 5. The Network Layer 5.2 Routing Algorithms
Fairness and optimality are often contradictory goals.

14 5. The Network Layer 5.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.

15 5. The Network Layer 5.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 table isolated routing: do not exchange information with other node distributed routing: node exchanges information and makes routing decisions by itself

16 5. The Network Layer 5.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.

17 5. The Network Layer 5.2 Routing Algorithms
5.2.1 The Optimality Principle A sink tree for router B

18 5. The Network Layer 5.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.

19 5. The Network Layer 5.2 Routing Algorithms
5.2.2 Shortest Path Routing To compute the shortest path from A to D: Dijkstra’s algorithm

20 5. The Network Layer 5.2 Routing Algorithms
5.2.2 Shortest Path Routing To compute the shortest path from A to D

21 5. The Network Layer 5.2 Routing Algorithms
5.2.2 Shortest Path Routing To compute the shortest path from A to D

22 5. The Network Layer 5.2 Routing Algorithms
5.2.2 Shortest Path Routing To compute the shortest path from A to D

23 5. The Network Layer 5.2 Routing Algorithms
5.2.2 Shortest Path Routing To compute the shortest path from A to D

24 5. The Network Layer 5.2 Routing Algorithms
5.2.2 Shortest Path Routing To compute the shortest path from A to D

25 Dijkstra’s Shortest Path Algorithm
Computer Networks Dijkstra’s Shortest Path Algorithm Initially mark all nodes (except source) with infinite distance. working node = source node Sink node = destination node While 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. J. Godwin Ponsam

26 5. The Network Layer 5.2 Routing Algorithms 5.2.3 Flooding P
Transmit a copy of each packet it receives on every one of its transmission links flooding P P P advantages: robust, simple, broadcasting, discovery disadvantages: use too much resource 1. hop count 2. time stamp How to curb the flooding: 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.

27 5. The Network Layer 5.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.

28 5. The Network Layer 5.2 Routing Algorithms
5.2.5 Distance Vector Routing

29 5. The Network Layer 5.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.

30 5. The Network Layer 5.2 Routing Algorithms
Then A comes down. The bad news travels slowly. 5.2.5 Distance Vector Routing The count-to-infinity problem A is up

31 5. The Network Layer 5.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.

32 5. The Network Layer 5.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).

33 5. The Network Layer 5.2 Routing Algorithms
5.2.5 Distance Vector Routing The Split Horizon Hack inf inf inf inf inf inf 4 inf inf inf inf inf=infinity

34 5. The Network Layer 5.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.

35 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..

36 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. Congestion control has to do with making sure the subnet is able to carry the offered traffic. It is a global issue, having to do with all the hosts in the subnet, all the routers, all the lines, etc. Flow control, in contrast, relates to point to point traffic, between a given sender and a given receiver. Its job is to make sure that a fast sender can’t transmit data faster than a receiver is able to absorb it. Flow control involves direct feedback from the receiver.

37 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

38 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

39 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 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

40 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.

41 Congestion Prevention Policies
Policies that affect congestion. 5-26

42 Congestion Control in Virtual-Circuit Subnets
(a) A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B.

43 Admission Control 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

44 Congestion Control 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

45 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

46 Hop by Hop choke packets
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

47 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.

48 Load Shedding 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

49 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

50 Jitter Control 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

51 Jitter Control (a) High jitter (b) Low jitter.

52 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

53 Introduction The identifier used in the IP layer of the TCP/IP protocol suite to identify each device connected to the Internet is called the Internet address or IP address. An IP address is a 32-bit address that uniquely and universally defines the connection of a host or a router to the Internet. IP addresses are unique. They are unique in the sense that each address defines one, and only one, connection to the Internet. Two devices on the Internet can never have the same address

54 IP Address Space IP addresses are IP address space in IP version 4 is:
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

55 IP Address Notation IP addresses can be written as 32 bit-long binary
4-value dotted decimal notation 8-value hexadecimal notation Example: 80 0B F

56 Notation Examples Change the following IP addresses from binary notation to dotted-decimal notation. a b Change the following IP addresses from dotted-decimal notation to binary notation. a b Find the error, if any, in the following IP addresses: a b c d Change the following IP addresses from binary notation to hexadecimal notation. a b a b a b a. There are no leading zeroes in dotted-decimal notation (045). b. We may not have more than four numbers in an IP address. c. In dotted-decimal notation, each number is less than or equal to 255; 301 is outside this range. d. A mixture of binary notation and dotted-decimal notation is not allowed. a. 0X810B0BEF or 810B0BEF16 b. 0XC1831BFF or C1831BFF16

57 Outline Internet Addresses Classful Addressing Special IP Addresses
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

58 Introduction IP addresses, when started a few decades ago, used the concept of classes. This architecture is called classful addressing. 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.

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

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

61 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 b c d

62 Classful Addressing. Examples
Show that class A has 231 (2,147,483,648) addresses using decimal notation. 2563, 2562, 2561, 2560 Now to find the integer value of each number, we multiply each byte by its weight: Last address: 127 × × × × 2560 = 2,147,483,647 First address: = 0 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 b c d e

63 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

64 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 to X The whole range of addresses is to Millions of class A addresses are wasted because it is seldom that a company requires 16 million host addresses

65 Class B Networks There are 16,384 class B address blocks
128.0.y.z to Y.Z Each address block contains 65,536 addresses x.y.0.0 to X.Y The whole range of addresses is to Many of class B addresses are wasted because it is seldom that a company requires 65 thousand host addresses

66 Class C Networks There are 2,097,152 class C address blocks
z to Z Each address block contains 256 addresses x.y.z.0 to X.Y.Z.255 The whole range of addresses is to The number of addresses in class C is smaller than the needs of most organizations

67 Class D and E Networks Class D addresses Class E addresses
Reserved for multicast Contain only one block of addresses 228 = 238,435,456 addresses Class E addresses Reserved for future use Usually used, wasted.

68 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 , find the class, the block, and the range of the addresses. This class A network, with address block # 17, and address range to Given the network address , find the class, the block, and the range of the addresses This is class B network, with address block , and address range to Given the network address , 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 The addresses range from to

69 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

70 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

71 Examples and CIDR notation
Given the IP address find the network part 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. /8 /16 /24

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

73 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.

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

75 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.

76 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

77 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

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

79 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.

80 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.

81 Subnetting

82 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

83 Subnet Masks Subnet masks operate the same way as default masks.
Unlike default classful masks, subnet masks are required to identifying the subnetwork.

84 Subnet Masks Example Identify subnet address for destination with subnet mask Address Subnet Mask Subnetwork Address Subnetwork Address

85 Subnet Masks Example Identify the address block and host id for destination with subnet mask How many subnet blocks are there in the class B network? How many hosts are in each block? Address Subnet Mask Network block = 1 Host id = 568 Number of blocks = 8 Number of addresses – 2 = 8190 (subnetwork and limited broadcast addresses reserved) CIDR notation is also applicable with Subnet masks. For example, address with mask can be written as /18

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

87 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: /21 Shows that address belongs to supernet of class C networks with mask Since 248 = , 8 class A networks were combined together to create a supernet.

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

89 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. School of Computing, Department of IT 8/22/2011

90 Review questions 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 School of Computing, Department of IT 8/22/2011

91 bibliography 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 School of Computing, Department of IT 8/22/2011


Download ppt "IT -0305COMPUTER NETWORKS FIFTH SEMESTER UNIT Iv"

Similar presentations


Ads by Google