1 / 58

Flow control and TCP/IP

Flow control and TCP/IP. Based on Computer Networks and Internets, Comer. Flow control. In networking, “flow control” refers to adjusting the rate at which data is transmitted from a source so that it does not overwhelm the destination.

sook
Télécharger la présentation

Flow control and TCP/IP

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. Flow control and TCP/IP Based on Computer Networks and Internets, Comer

  2. Flow control • In networking, “flow control” refers to adjusting the rate at which data is transmitted from a source so that it does not overwhelm the destination. • Flow control is especially important in cases when the source is faster than the destination.

  3. An example • Imagine sending a large file from a computer to a printer. • The computer can transmit much faster than the printer can print; furthermore, the printer may be shared and have other print jobs. • The printer has a buffer but that buffer has a finite size. • A common flow-control mechanism in a case like this is xon-xoff.

  4. Xon-xoff • In this case, the printer (destination) sends an xoff message to the computer (source) indicating that its buffer is full. • The computer (source) should then stop sending data. • When the printer’s buffer is free and it is ready to accept more data, the printer sends an xon signal. • Flow control can be implemented in hardware or software, or a combination of both.

  5. Xon-Xoff • The actual signal for X/on is the same bit configuration as the ASCII Ctrl-Q keyboard combination. The X/off signal is the Ctrl-S character. • When you define your modem to your computer's operating system, you may need to specify the use of flow control with X/on/Xoff or with CTS/RTS (Clear to Send/Ready to Send). When sending binary data, Xon/Xoff may not be recognized because it is character-encoded.

  6. ASCII XON and XOFF Dec Oct Hex

  7. Choke packet • A specialized packet that is used for flow control along a network. • A router detects congestion by measuring the percentage of buffers in use, line utilization and average queue lengths. • When it detects congestion, it sends choke packets across the network to all the data sources associated with the congestion. The sources respond by reducing the amount of data they are sending.

  8. Balancing speed and accuracy • Increasing various individual speeds might not increase the speed of the network , particularly if it overloads the destination or some routing device along the way. This results in packets being dropped, requiring retransmission. And the overall result can be a reduction in speed. • Network administration can be a very delicate balancing act.

  9. Congestion control and packet delivery • If you slow down your transmission too much, either the bandwidth is not being used or it is being used by others. • But if you send too many messages, you will cause congestion, and you are sending messages that will only have to be retransmitted anyway.

  10. Protocol Techniques • Flow Control • Recall that a destination must acknowledge the receipt of a packet (in particular its Transport Layer). • But acknowledgements add to the traffic. • There are flow-control techniques (sliding windows for example) specifying how one acknowledges and how often.

  11. Congestion avoidance • Some packets contain “traffic reports,” they have information about the status of the traffic. • Based on the status, the network may inform senders. • The network will either adjust the transmission size, change the route or change a window size used for transmission.

  12. Unrestricted Protocol • Assumes the receiver has an unlimited capacity to receive frames. • Sender and receiver use primitive calls to send and receive. • Sender sends a frame. The arrival causes the receiver to wake up and receive the frame. Receiver extracts the packet and passes it up the stack and then goes back into a wait state until the next frame arrives. • In the Unrestricted Protocol, the sender does not have to wait for acknowledgements to send more packets.

  13. Stop and Go Protocol • Different from the Unrestricted Protocol in that each time the destination receives a packet, it replies with an acknowledgement. • Sender waits for the acknowledgement before sending another frame. • The acknowledgement from the receiver contains an error field structure called an ack. • An ack of 0, means there is no error. • An ack of 1 means the packet contained an error.

  14. Fig. 16.7 Stop and go Sliding windows

  15. Sliding Window Protocols • Compromise between Unrestricted and Stop-and-go. • The source can send a number of packetswithout waiting for acknowledgments, but that number is limited. • The number of unacknowledged frames that is allowed is called the “window.” • The size of the window is an important network flow-control parameter. • Go back to Fig. 16-7

  16. Windowing

  17. Sliding Window Protocols • There are variations within a windowing protocol. • Go-back-n: packets must be received in the order they were transmitted. Receiver rejects any packet other than “the next one.” • Selective repeat: packets can arrive out of order, the receiver holds them and orders them before passing them to higher layer.

  18. Comparing Protocols • In Go-Back-N, if the timer set by sender expires without an acknowledgement, the protocol resends every outstanding frame in the window. • In Selective Repeat, if timer expires only one packet must be sent. Allows for out-of-order packets. But requires more work on receiver’s part.

  19. Window announcements • Like Xon/Xoff, Window "announcements" are messages sent by the receiving system to the transmitting system. • They acknowledge data receipt but also inform the transmitting system of the current buffer size. • “I got your message and I only have X amount of space if you’re sending me more.”

  20. Piggyback • If the computers are having a two-way conversation, then a computer can send an acknowledge that it received information along with information of its own. • This technique is called piggybacking.

  21. Bottleneck • A bottleneck is the slow part of a process – in this case where packets tend to accumulate. • Bottlenecks affect network performance by slowing down the flow of information transmitted across networks. • TCP/IP connections were originally designed to transmit only text files, and the proliferation of bandwidth-intensive transmissions such as high-resolution graphics has caused bottlenecks in the process; therefore, the data moves more slowly across networks.

  22. Various needs • No one network technology satisfies the needs of all the users. • Some connect nearby computers (LAN) • Some connect more distant computers (WAN) • Some exchange data files (best with large packets over connectionless) • Some convey real-time video (best with small packets over connection-oriented system) • Some users have millions of dollars to spend • Some users have a very limited budget

  23. Various Network Technologies • Technologies emerged to fill these network niches. • But as “connectivity” grew in importance, one needed the ability not only to connect computers into a network, but also to connect networks into an internet. • The networks can differ immensely (heterogeneity) at the lowest level, but there must be some overlying logic (software/protocol) providing the homogeneity required for communication – we all must follow the same set of rules.

  24. Universal Service • The goal of joining the various underlying networks and having them work together as if they were one uniform system is called “universal service.” • With Universal Service, a user at one computer in any part of the organization can exchange information with any other user without changing computers.

  25. Heterogeneous Connections • Since specific information about the transmission lines and other hardware are needed at the Physical Layer and specific information about the LAN protocol are need at the Data-Link Layer (Ethernet, FDDI, ATM, etc.), the homogenizing cannot occur until Layer 3 in the OSI model. • You cannot use bridges (Layer 2) to connect heterogeneous networks, but you can use routers (Layer 3).

  26. Routers • Routers forward packets from a source on one network to a destination on another. • A router can connect different types of networks: LAN-LAN, LAN-WAN, WAN-WAN. • A router can connect networks using different protocols: e.g. Ethernet LAN to FDDI LAN. • If the frame formats and addressing schemes differ on the networks connected by a router, then software is needed to make this transition possible.

  27. Virtual Network • A homogeneous high-level (Internet) software gives the illusion of a homogenous network, which at the lowest levels can be quite heterogeneous. The logically homogenous network is sometimes called a “virtual network.” • Here think of virtual as meaning software. • This is a version of information hiding: each layer hides the details of its implementation. Only the interface with adjacent layers is exposed. Thus, the details of physical network connections, physical address, and so on are hidden from higher layers.

  28. clouds • A similar notion is that of a “network cloud.” One loses sight of information as it enters the cloud. • Especially in a connectionless scheme, the message enters the network and takes an unknown path to its destination. Furthermore, packets from the same message may take different paths. • If the underlying network is heterogeneous, the packets may be translated into other protocol formats. • But when the message re-emerges from the cloud, it appears to be the same message that entered the cloud.

  29. Internet Protocols • TCP/IP is the most widely used internet communication protocol suite (stack). • Originally the TCP/IP protocol suite was designed to create a standard set of procedures allowing individual computer networks to connect to ARPANET. • Today it is used to connect computers to the Internet (with a capital I). • Small i: two or more networks connected, capital I: the global connection of networks.

  30. TCP/IP • Transmission • Control • Protocol • Internet • Protocol

  31. Layering again • The TCP/IP is a reference model for internet communication. • Like the OSI model, it comes in layers. • One difference is that it has fewer layers. • The biggest difference is that TCP/IP is widely implemented, whereas OSI has become a “taxonomy” for discussing a network but not a way of implementing one.

  32. TCP/IP History • The early work on TCP/IP was done in the 1970’s much of it for ARPA (Advanced Research Projects Agency). • The formal standards are laid out in IETF RFC 791 and RFC 793. • IETF Internet Engineering Task Force • RFC Request For Comments • TCP/IP gained its dominance in internet protocols when it was included with a version of the Unix operating system.

  33. IP Standards (RFC 791)

  34. TCP Standards (RFC 793)

  35. Layers • The Internet Layering Model (TCP/IP) has 4 or 5 layers depending on whom you ask, the layers are: • Application • Transport • Internet • Network Interface • (Physical) there must be a physical layer, but it was not part of the original model

  36. Correspondence • The lowest layers of the TCP/IP are pretty much equivalent to the lowest layers of the OSI model. • TCP/IP’s transport layer is somewhat “thicker” (has more functions) than that in the OSI model. • The most notable difference is in the upper layers, TCP/IP has one layer roughly corresponding to OSI’s top three layers.

  37. Correspondence TCP/IP’s transport layer is somewhat thicker – has more functions than OSI’s.

  38. TCP/IP Layers • (Physical) • corresponds to OSI Layer 1 • Network Layer • specifies how to organize data into frames and how to transmit the frames over a network. (Data Link Layer) • Internet • specifies the format of the packets sent across an internet as well as forwarding. (Network Layer) • Transport • ensures reliable transfer (Transport Layer, some Session) • Application • specifies how an application uses the internet (Rest of Session, Presentation and Application)

  39. TCP/IP • TCP/IP is named after two parts of the protocol stack: TCP (from the Transport Layer) and IP (from the Internet Layer). • TCP/IP (Transmission Control Protocol/Internet Protocol) is the basic communication language or protocol of the Internet. • TCP/IP communication is primarily point-to-point, meaning each communication is from one point (or host computer) in the network to another point or host computer.

  40. TCP • Transmission Control Protocol manages the fragmenting of a message or file into smaller packets that are transmitted over the Internet and received by a TCP layer that reassembles the packets into the original message. • TCP is responsible for the verification that files were sent and received. • It makes the connectionless scheme that lies underneath logically connection-oriented. • Session verification not constant data rate.

  41. TCP Example • When an HTML file is sent to you from a Web server, the TCP in that server breaks the file into one or more packets, numbers the packets, and then forwards each of them to the IP layer. • At the other end (the client program in your computer), TCP reassembles the packets and waits until they have arrived to forward them to you as a single file.

  42. IP • Internet Protocol handles the adding addresses (IP addresses) to the packets and routing them, that is, IP’s job is to get the packets where they’re going. • The IP layer is connectionless (sometimes also known as “stateless”), different packets may travel differ routes, and if a packet is dropped, it’s dropped.

  43. Delivering the packet • Each packet is sent first to a gateway computer (router) that understands a small portion of the Internet. • The router reads the destination IP address and forwards the packet to a neighboring router. • It repeats the process until one router recognizes the packet as belonging to a computer within its immediate neighborhood or domain. • That gateway then forwards the packet directly to the computer whose address is specified.

  44. Versions • The most commonly used version of IP today is Internet Protocol Version 4 (IPv4). • However, IP Version 6 (IPv6) is also beginning to be supported. IPv6 provides for much longer addresses (128 bits) and therefore for the possibility of many more Internet users. • IPv6 includes the capabilities of IPv4 and any server that can support IPv6 packets can also support IPv4 packets (backward compatibility).

  45. More on the model • TCP/IP uses the client/server model of communication • a computer user (a client) requests and is provided a service (such as sending a Web page) by another computer (a server) in the network. • The other standard relationships are master/slave (one program in charge of all other programs) and peer-to-peer (either of two programs is able to initiate a transaction).

  46. Client Server Example • To check your bank account from your computer, a client program in your computer forwards your request to a server program at the bank. • That program may in turn forward the request to its own client program that sends a request to a database server at another bank computer to retrieve your account balance. • The balance is returned back to the bank data client, which in turn serves it back to the client in your personal computer, which displays the information for you.

  47. Daemon • In the usual client/server model, a program on the server, sometimes called a daemon, is activated and awaits client requests. • A daemon (pronounced DEE-muhn) runs continuously and its job is to handle service requests. • The daemon’s job is to receive the request, not perform the service. It usually forwards the request to the appropriate program.

  48. Daemon Example • Each server of pages on the Web has an HTTPD or Hypertext Transfer Protocol daemon that continually waits for requests to come in from Web clients. • Your Web browser is a client program that requests services (the sending of Web pages or files) from a Web server (which technically is called a Hypertext Transport Protocol or HTTP server) in another computer somewhere on the Internet.

  49. Application services • The services users are familiar with are in the application layers. These include • Hypertext Transfer Protocol (HTTP) for transmitted web-page documents. • File Transfer Protocol (FTP) for transmitting other files. • Telnet which allows one to log on to a computer remotely. • Simple Mail Transfer Protocol (SMTP) for email. • These and other protocols are packaged together with TCP/IP as a "suite."

More Related