1 / 56

TCP (Cont.)

TCP (Cont.). Based on Chapter 24 in Computer Networks and Internets, Comer. TCP Provides. Reliability : Data will be delivered exactly as sent. Full Duplex Communication : The conversation is two way without either side having to wait its turn.

workman
Télécharger la présentation

TCP (Cont.)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TCP (Cont.) Based on Chapter 24 in Computer Networks and Internets, Comer

  2. TCP Provides • Reliability: Data will be delivered exactly as sent. • Full Duplex Communication: The conversation is two way without either side having to wait its turn. • Stream Interface: until the session ends, all of the data is treated the same; it belongs to one stream. • Reliable Connection Startup: sessions are not confused with simultaneous or previous sessions. • Graceful Connection Shutdown: both participants are aware of the ending of a session.

  3. TCP • TCP is called an end-to-end service since it guarantees a connection between applications on different computers (the endpoints of the route). • TCP connections are called virtual since they are built entirely from software. • TCP messages are encapsulated in IP packets and sent across the network. TCP treats IP as a packet delivery system. IP treats TCP messages as data to be delivered. • Only the endpoints need TCP software.

  4. Routers don’t need to know TCP Delivery is taken care of IP and lower layers. A packet doesn’t have to pass through the TCP layer except at source and destination.

  5. Achieving Reliability • TCP must handle various problems, such as • Packets are dropped, delayed or duplicated by the unreliable underlying communication system (IP). • One computer in a session is rebooted. • TCP must guarantee that • If a computer establishes multiple sessions between 2 computers, each has its own uniquely defined connection. • Duplicate messages should be rejected. • In case of reboot, delayed messages from any previous session between two computers will not be accepted.

  6. Retransmission • The primary technique of ensuring reliability is retransmission • When data is sent, a timer is set. • When the destination receives the data, it sends an acknowledged to the source. • If the timer set by the source expires before an acknowledgment arrives, the sender retransmits the data.

  7. Retransmission

  8. How much time? • How much time should a computer wait before retransmitting a message? • That depends on whom you’re talking to. • The time to send a message and receive an acknowledgment will be short (a few milliseconds) if the two nodes are on the same LAN. • The time to send a message halfway across the world using a long-distance satellite connection will be longer.

  9. Setting delay time • If the delay time were set to a reasonable time for LANs, the long-distance communication would be retransmitted many times over before it could reach its destination let alone be acknowledged. • If the delay time were set to a reasonable time for long-distance communication, communication within the LAN would be delayed unnecessarily. • Unnecessary delay wastes the bandwidth. • Unnecessary retransmission clogs the system.

  10. Adaptive Retransmission • At the beginning of the session (the three-way handshake), TCP already has some data on the round trip time. • TCP maintains statistics (average and deviation) on each session and adjusts the retransmission times to a little over the average (how much over depends on the deviation).

  11. Adaptive Retransmission • Adaptive retransmission sets the retransmission delay on a session-by-session basis using the statistics on the session to set a delay time appropriate for it. • Local communication will have a short delay. • Long-distance communication will have a longer delay. • This method can adjust to changes in internet traffic.

  12. Adaptive Retransmission Long distance Local

  13. Flow Control • TCP uses windows to control data flow. • Each connection allocates the same buffer size to hold data. This is called the window size. • The window size is not negotiated, it is determined solely by the receiver. But the receiver must let the sender know how much room it has. • Receivers send window advertisements (size) with each acknowledgement. Based on the window advertisement size, the sender will increase, decrease or halt transmission of buffers.

  14. Window Advertisement

  15. Congestion Control • If a packet is dropped, necessitating retransmission, the sender slows down significantly. • Otherwise congestion would cause delays, which in turn lead to retransmission, which causes more congestion, and so on. This is called congestion collapse. • To avoid this, TCP uses packet loss as a measure of congestion.

  16. Congestion Control • If TCP losses a packet, it will reduce the rate at which it retransmits data. • If an ACK is received for a message TCP doubles its transmission rate. • If a second ACK is received, TCP double the rate again. (exponential increase) • It continues to double the rate until the number of sending packets is 1/2 the receiver’s window size. At this time TCP slows down the rate of increase.

  17. Closing a session • A session is closed in a manner similar to the three-way handshake that started the session. • Each party sends a closing segment and receives an acknowledgment of its closing segment before the session ends (gracefully).

  18. Socket Number • An application on a computer is identified by the “socket number” which is a combination of the computers IP address and the application’s port number. • A session is identified by a pair of socket numbers.

  19. Routing Again Based on Chapter 27 in Computer Networks and Internets by Comer

  20. So I lied • We said previously that routers do not need to know about the TCP layer; however, routers need to exchange information among themselves so that they can build efficient and accurate routing tables. And if they want reliability in this exchange of information, they will use TCP.

  21. Making a routing table • There are two basic approaches • Static: The network administrator enters and edits the routing table • Pro: simple, low overhead • Assuming a “simple” network • Con: not adaptable • Dynamic: routers exchange information and a program generates the table from that • Pro: can adapt to changes in the traffic pattern • scalable • Con: more expensive software, uses more CPU, etc.

  22. The edge of the cloud • Most routers sit at the edge of a cloud, e.g. connecting a LAN to the Internet cloud. • Such a router needs only distinguish between traffic destined for the LAN and traffic destined for beyond the LAN. • In this case, a static routing table is sufficient.

  23. Simple static routing scenario

  24. Scaling • As one enters the cloud, the complexity of generating an efficient routing table grows quickly and dynamic routing is used. • Routers broadcast messages which are responded to by other routers. • In this way the routers learn about their neighbors. • They pass this information to their neighbors and they pass it on to their neighbors and so on.

  25. Scaling again • Even automated routing tables cannot handle the problem of generating a routing table if all the routers connected to the Internet are to be considered in the calculation. • In order to handle this scaling problem, another level of hierarchy is introduced.

  26. Groups • A school of fish • A herd of elephants • A pride of lions • A flock of sheep • A gaggle of geese • An autonomous system of routers

  27. Autonomous Systems

  28. AS • An autonomous system (AS) is a group of routers adhering to a single router “policy.” • It may be a single network or a group of networks that is overseen by a one network administrator or group of administrators who agree on a single policy. • Typically the AS is operated by some entity such as a university or a business.

  29. AS (Cont.) • An autonomous system is sometimes called a “routing domain.” • An autonomous system is assigned a globally unique number, sometimes called an Autonomous System Number (ASN). • Networks within an autonomous system communicate routing information to each other using an Interior Gateway Protocol (IGP). • Some use the term IGP as a generic term, a category of protocols, others use the term as a specific protocol.

  30. IGP used within an AS IGP to communicate within an AS.

  31. AS (Cont.) • AS’s communicate using Border Gateway Protocol (BGP) or Exterior Gateway Protocol (EGP). • Eventually, the BGP is expected to be replaced by the OSI Inter-Domain Routing Protocol (IDRP). • Some use the term EGP as a generic term, a category of protocols, others use the term as a specific protocol • The Internet's protocol guideline defines an autonomous system as: • “… a connected group of one or more Internet Protocol prefixes run by one or more network operators which has a SINGLE and CLEARLY DEFINED routing policy.”

  32. EGP or BGP used among AS’s BGP or Communication between AS’s uses EGP or BGP

  33. IGP • An Interior Gateway Protocol is a set of rules for exchanging routing information between routers (gateways) within an autonomous system. • This information is then used by routers to generate routing tables. • There are two commonly used IGPs: • Routing Information Protocol (RIP) • Open Shortest Path First (OSPF) protocol.

  34. RIP • Routing Information Protocol is a set of rules defined by RFC (Request for Comments) 1058 that specifies how routers exchange information. • RIP uses a “distance vector algorithm” in which routers periodically exchange their entire routing tables. • A router compares the entries of the table it receives with its own and replaces any paths with ones found to be cheaper.

  35. RFC 1058

  36. RIP Packet

  37. RIP • RIP uses UDP (user datagram protocol) instead of TCP to exchange information, so it is fast but unreliable. • Because RIP is inefficient (exchanging entire tables), it is gradually being replaced by Open Shortest Path First (OSPF). • It remains fairly common.

  38. OSPF • Open Shortest Path First is set of rules for routers to exchange information and generate routing tables within an autonomous system. • It is based on the “shortest path first” or “link-state” algorithm. • Routers do not send tables, instead they send information about their nearest neighbors and the cost thereto. • The shortest path to each node is then calculated (e.g. using Dijkstra’s algorithm).

  39. OSPF • The advantage of OSPF is that it results in smaller more frequent updates throughout the AS. • It converges quickly yielding a stable network. • OSPF does require more CPU and memory. • But the advantages out weigh the disadvantages. • OSPF Version 2 is defined in RFC 1583.

  40. RFC 1583

  41. IS-IS • IS-IS: Intermediate System-to-Intermediate System protocol, • Intermediate system refers to a router as opposed to an end system (host). • IS-IS is the OSI version OSPF, that is, a set of rules for routers to exchange Link-State information.

  42. RFC 1142

  43. IGRP • Interior Gateway Routing Protocol (IGRP) is a proprietary network protocol, developed by Cisco Systems. • IGRP is a distance-vector routing protocol used for routers communicating within an AS. • Think of IGRP as a new and improved RIP. While RIP uses only one criteria (hops) to determine the best path. IGRP uses five factors: • the link's speed, delay, packet size, loading and reliability. • Network administrators weight these factors as they see fit.

  44. EIGRP • A new and improved, new and improved RIP. • Enhanced Interior Gateway Routing Protocol is a newer version of IGRP that addresses the demands of large-scale internets and the developments in network technology since IGRP was developed. • IGRP and EIGP can work together.

  45. EGP • Exterior Gateway Protocol is a set of rules for exchanging routing information between neighboring AS’s. • The routing table contains a list of known routers in other AS’s and the addresses they can reach. • Since different AS’s may use different measures of cost, the cost measure is based mainly on the number of hops.

  46. RFC 904

  47. EGP (Cont.) • Each router polls its neighbor at intervals between 120 to 480 seconds and the neighbor responds by sending its complete routing table. • EGP-2 is the latest version of EGP. A more recent exterior gateway protocol, the Border Gateway Protocol (BGP), provides additional capabilities.

  48. BGP • Border Gateway Protocol is a set of rules for AS’s to exchange routing information, so that efficient routes can be found between AS’s. • BGP is commonly used within and between Internet Service Providers (ISPs) and is defined in RFC 1771.

  49. RFC 1771

More Related