Presentation on theme: "IT -0305COMPUTER NETWORKS FIFTH SEMESTER UNIT Iv"— Presentation transcript:
1 IT -0305COMPUTER NETWORKS FIFTH SEMESTER UNIT Iv J.GODWIN PONSAM & S.MURUGANDAMASST.PROFESSORSRM University, KattankulathurSchool of Computing, Department of IT8/22/2011
2 Unit iv SERVICES PROVIDED TO TRANSPORT LAYER DISTANCE VECTOR ROUTING FLOODINGSHORTEST PATH ROUTINGIPV 4 CLASSFUL ADDRESSINGSUBNETTINGSchool of Computing, Department of IT8/22/2011
3 Services Provided to Transport Layer I.TComputer NetworksServices Provided to Transport LayerIt is the lowest layer that deals with end-to-end transmissionConcerned with getting packets from the source all the way to the destinationShould know about the topology of the communication subnet and choose appropriate paths through itIt should choose routes to avoid overloading some of the communication lines and routers while leaving others idleWhen source and destination are in different networks, new problems occur…it is up to this layer to deal with themJ. Godwin Ponsam
4 Services Provided to Transport Layer I.TComputer NetworksServices Provided to Transport LayerEnvironment of network layer protocolsStore and Forward Packet Switching mechanism is used for data deliveryJ. Godwin Ponsam
5 Services Provided to Transport Layer I.TComputer NetworksServices Provided to Transport LayerDesign Principles for Services:1. services should be independent of the router technologymust be able to communicate across all types of network2. transport layer should be shielded about the subnet structure, number, type and topology of the routers present3. The network address made available to the transport layer should use a uniform numbering plan, even across LANs and WANsTwo types of services:Connectionless ServicesConnection Oriented ServicesJ. Godwin Ponsam
6 Connectionless Service I.TComputer NetworksConnectionless ServicePackets (called datagrams) are injected into the subnet (datagram subnet) individually and routed independentlyNo advance setup is neededThe 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 layerJ. Godwin Ponsam
7 Connectionless Service I.TComputer NetworksConnectionless ServiceJ. Godwin Ponsam
8 Connection Oriented Service I.TComputer NetworksConnection Oriented ServiceA path from the source router to the destination router must be established before sending any dataThis 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
10 Virtual Circuit vs. Datagram subnets Computer NetworksVirtual Circuit vs. Datagram subnetsJ. 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 maintainthe routing tabledesired 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
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) RoutingThe routing table is not changed according to network conditions.adaptive routingcentralized routing: one node calculates the routing tableisolated routing: do not exchange information with other nodedistributed routing: node exchanges information and makesrouting decisions by itself
16 5. The Network Layer 5.2 Routing Algorithms 5.2.1 The Optimality PrincipleThe 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 PrincipleA sink tree for router B
18 5. The Network Layer 5.2 Routing Algorithms 5.2.1 The Optimality PrincipleA 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 RoutingTo 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 RoutingTo compute the shortest path from A to D
21 5. The Network Layer 5.2 Routing Algorithms 5.2.2 Shortest Path RoutingTo compute the shortest path from A to D
22 5. The Network Layer 5.2 Routing Algorithms 5.2.2 Shortest Path RoutingTo compute the shortest path from A to D
23 5. The Network Layer 5.2 Routing Algorithms 5.2.2 Shortest Path RoutingTo compute the shortest path from A to D
24 5. The Network Layer 5.2 Routing Algorithms 5.2.2 Shortest Path RoutingTo compute the shortest path from A to D
25 Dijkstra’s Shortest Path Algorithm Computer NetworksDijkstra’s Shortest Path AlgorithmInitially 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.J. Godwin Ponsam
26 5. The Network Layer 5.2 Routing Algorithms 5.2.3 Flooding P Transmit a copy of each packetit receives on every one of itstransmission linksfloodingPPPadvantages: robust, simple, broadcasting, discoverydisadvantages: use too much resource1. hop count2. time stampHow 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 RoutingIt 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.
29 5. The Network Layer 5.2 Routing Algorithms 5.2.5 Distance Vector RoutingThe count-to-infinity problemA is downThen 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 RoutingThe count-to-infinity problemA is up
31 5. The Network Layer5.2 Routing Algorithms5.2.5 Distance Vector RoutingThe count-to-infinity problemIt 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 RoutingThe Split Horizon HackMany 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).
34 5. The Network Layer 5.2 Routing Algorithms 5.2.5 Distance Vector RoutingThe Split Horizon HackWhen 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 CongestionWhen too much traffic is offered, congestion sets in and performance degrades sharplyFactors for congestion:Multiple input lines receive packets to be sent on the same output lineSlow processorsLow 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 subnetFlow 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 placeClosed 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 placeRouter sending a packet to the source announcing the problemBit or field reserved in every packet, so routers fill it in whenever congestion goes above certain thresholdSend probe packets out to explicitly ask about congestion and use the info to route traffic around the problem areaAdjust 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 repeatAcknowledgement 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 congestionNetwork layer:Virtual circuits versus datagram inside the subnet – many congestion control algorithms work only with virtual circuitsPackets 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 linePacket lifetime management – deals with how long a packet may live before being discarded;Transport layerSame as for data link layerIn 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 sourceImplicit feedback algorithmsThe source deduces the congestion by making local observations, such as the time needed for acknowledgement to come backThe presence of the congestion means that the load is temporarily greater than the resourcesIncrease 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 ControlAdmission Control- Once congestion has been signaled no more v.c are set up until the problem has gone awayNegotiating agreement between the host and the subnet when a v.c is set upThis agreement specifies volume and shape of the traffic, QOS requiredThis agreement reserves resources along the v.c pathDisadvantage : Resource wastage
44 Congestion Control Congestion Control in Datagram Subnets Each router monitor utilization of its output lines and other resourcesEx: 0.0 and 1.0 reflects the utilization of that lineWhenever the value exceeds the threshold the output lines enters a warning stateSoln: Warning Bit, Choke packets
45 Choke PacketsRouter sends a choke packet back to the source hostWhen source gets the choke packet it needs to reduce traffic send to the specified destinaitonAfter the period host listens for more choke packetsIf one arrives line is still congested so the host reduces flow still moreIf 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 slowEx: 155 mbps line, 30 msec , 4.6 mbps will be sentChoke 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 SheddingLoad Shedding is a fancy way of throwing packets when they cannot handleRouter can just pick a packet at random to drop but usually it can do better depend on the application runningTo implement an intelligent discard policy application must mark their packets in priority classes to indicate how important they are
49 REDRouters maintain a running average of their queue lengthsWhen the queue length exceeds a threshold the line is said to be congested and action is takenChoke packets puts more load on already congested networkSoln: Just discard selected packet and not report itSource will notice the lack of ack and take action
50 Jitter ControlFor applications such as audio and video streaming it does not matter much if the packets take 20 msec or 30 msec to be deliveredVariation in the packet arrival time is called jitterHigh Jitter- uneven quality to the soundAcceptabl -99 % of packets delivered with a delay in the range of 24.5 msec to 25.5 msec
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 schedulePackets that are ahead of schedule get slowed down and packets that are behind schedule speeded up, reduces te amount of jitterSome applns. Video on demand jitter can be eliminated by buffering at the receiverIn real time appln. Internet telephony buffering at receiver is not possible
53 IntroductionThe 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 andUniquely and universally identifies connection of a device to the Internet.IP address space in IP version 4 is:2N = 232 = 4,294,967,296Actual space is much smaller
55 IP Address Notation IP addresses can be written as 32 bit-long binary 4-value dotted decimal notation8-value hexadecimal notationExample:80 0B F
56 Notation ExamplesChange the following IP addresses from binary notation to dotted-decimal notation.a bChange the following IP addresses from dotted-decimal notation to binary notation.abFind the error, if any, in the following IP addresses:a bc dChange the following IP addresses from binary notation to hexadecimal notation.aba ba ba. 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 ClassesNetwork Id and Host IDMasks and CIDRSpecial IP AddressesSubnetting and SupernettingVariable length blocks and CIDRSubnetting and Address Allocation
58 IntroductionIP 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 AddressingIP address space is divided into five classes: A, B, C, D, and E.
60 Classful AddressingExamine 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, 2560Now to find the integer value of each number, we multiply each byte by its weight:Last address: 127 × × × × 2560 = 2,147,483,647First address: = 0If 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 networkHost 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.ZEach address block contains16,777,216 addressesx to XThe whole range of addresses istoMillions 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.ZEach address block contains65,536 addressesx.y.0.0 toX.YThe whole range of addresses istoMany 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 ZEach address block contains256 addressesx.y.z.0 toX.Y.Z.255The whole range of addresses istoThe 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 multicastContain only one block of addresses228 = 238,435,456 addressesClass E addressesReserved for future useUsually used, wasted.
68 ExamplesIn 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 addressExamples: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 toGiven the network address , find the class, the block, and the range of the addressesThis is class B network, with address block , and address range toGiven the network address , find the class, the block, and the range of the addressesThis is class C because the first byte is between 192 and 223. The block has a netid of The addresses range from to
69 MasksMasks are used to determine network part of the address for a given IP address.Mask is a 32-bit number that consists ofConsecutive 1s indicating bits that belong to the network part of address followed byConsecutive 0s indicating bits that do not belong to network part of the addressBit-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 partClassless 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 AddressesThere are several addresses within each class that are reserved for such special purposes as broadcast.
73 Direct BroadcastDirect 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 BroadcastLimited 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 networkUsed a host to send a message to another host on same network.This address can only be used as destinationUsually class A addresses
77 Loopback AddressIP address with first byte value of 127 is used for the loopback address.Packets with such destination address never leave the machineLoopback can be used only as destination addressLoopback is class A address which reduces the number of class A addresses by 1 blockLoopback address can be used forTesting 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 communicationsMulticast addresses are class D addresses and are used for one-to-many communication.Designate a group of receiversCan be used only as destination addressCan be used on local and global levelsBroadcast 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 SubnettingSubnetting is dividing a network into several smaller parts (subnets), each having its own sub-network address.Usually done for more efficient allocation of IP addressesTraditional Internet uses two-level address hierarchy: netids and hostidsSubnetting provides another, third, level of hierarchy.
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 siteDelivery to the subnetworkDelivery 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 ExampleIdentify subnet address for destination with subnet maskAddressSubnet MaskSubnetwork AddressSubnetwork Address
85 Subnet Masks ExampleIdentify the address block and host id for destination with subnet maskHow many subnet blocks are there in the class B network?How many hosts are in each block?AddressSubnet MaskNetwork block = 1Host id = 568Number of blocks = 8Number 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 SupernettingSupernetting is combining several small networks (e.g. of class C) into a big one to create a large range of addresses.
87 SupernettingIn 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:/21Shows that address belongs to supernet of class C networks with maskSince 248 = , 8 class A networks were combined together to create a supernet.
88 SupernettingThe idea of subnetting and supernetting of classful addresses is almost obsolete.
89 DisclaimerThe 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 IT8/22/2011
90 Review questionsList the difference between Static Routing and Dynamic Routing2. List the difference between Virtual Circuit subnet and datagram subnet3. Define Count to Infinity problem4. Define Network Address5.How many host addresses are available in Class A address6. List the range of private IP addresses7. Define Load Shedding8. List the Congestion Prevention policies in transport layer9. Find the network address ofSchool of Computing, Department of IT8/22/2011
91 bibliography1. Andrew S. Tanenbaum, Computer Networks, Fourth Edition, Prentice Hall of India, 20032. Cisco Network Fundamentals – CCNA Exploration Companion Guide, Pearson Education , 20083. William Stallings, Data and Computer Communications , Fourth Edition, Prentice Hall of India, 2004School of Computing, Department of IT8/22/2011
Your consent to our cookies if you continue to use this website.