* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Flow control and TCP/IP
Survey
Document related concepts
Multiprotocol Label Switching wikipedia , lookup
Asynchronous Transfer Mode wikipedia , lookup
Network tap wikipedia , lookup
Distributed firewall wikipedia , lookup
Airborne Networking wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Computer network wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Deep packet inspection wikipedia , lookup
TCP congestion control wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
UniPro protocol stack wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Transcript
Flow control and TCP/IP Based on Computer Networks and Internets, Comer CSIT 220 (Blum) 1 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. CSIT 220 (Blum) 2 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. CSIT 220 (Blum) 3 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. CSIT 220 (Blum) 4 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. CSIT 220 (Blum) 5 ASCII XON and XOFF Dec Oct CSIT 220 (Blum) Hex 6 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. CSIT 220 (Blum) 7 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. CSIT 220 (Blum) 8 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. CSIT 220 (Blum) 9 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. CSIT 220 (Blum) 10 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. CSIT 220 (Blum) 11 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. CSIT 220 (Blum) 12 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 An CSIT 220 (Blum) ack of 0, means there is no error. ack of 1 means the packet contained an error. 13 Fig. 16.7 Stop and go CSIT 220 (Blum) Sliding windows 14 Sliding Window Protocols Compromise between Unrestricted and Stopand-go. The source can send a number of packets without 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 CSIT 220 (Blum) 15 Windowing CSIT 220 (Blum) 16 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. CSIT 220 (Blum) 17 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. CSIT 220 (Blum) 18 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.” CSIT 220 (Blum) 19 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. CSIT 220 (Blum) 20 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. CSIT 220 (Blum) 21 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 CSIT 220 (Blum) 22 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. CSIT 220 (Blum) 23 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. CSIT 220 (Blum) 24 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). CSIT 220 (Blum) 25 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. CSIT 220 (Blum) 26 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. CSIT 220 (Blum) 27 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. CSIT 220 (Blum) 28 CSIT 220 (Blum) 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. CSIT 220 (Blum) 30 TCP/IP Transmission Control Protocol Internet Protocol CSIT 220 (Blum) 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. CSIT 220 (Blum) 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. CSIT 220 (Blum) 33 IP Standards (RFC 791) CSIT 220 (Blum) 34 TCP Standards (RFC 793) CSIT 220 (Blum) 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 CSIT 220 (Blum) 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. CSIT 220 (Blum) 37 Correspondence OSI Model TCP/IP Model Application Presentation Application Session Transport Transport Network Internet Data Link Network Interface Physical (Hardware) CSIT 220 (Blum) 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) CSIT 220 (Blum) 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-topoint, meaning each communication is from one point (or host computer) in the network to another point or host computer. CSIT 220 (Blum) 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 CSIT 220 (Blum) 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. CSIT 220 (Blum) 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. CSIT 220 (Blum) 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. CSIT 220 (Blum) 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). CSIT 220 (Blum) 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). CSIT 220 (Blum) 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. CSIT 220 (Blum) 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. CSIT 220 (Blum) 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. CSIT 220 (Blum) 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." CSIT 220 (Blum) 50 UDP User Datagram Protocol Like TCP sits on top of IP in the TCP/IP model. Unlike TCP it is connectionless. UDP/IP provides very few error recovery services, offering instead a direct (faster) way to send and receive datagrams over an IP network. It's used primarily for broadcasting messages over a network. CSIT 220 (Blum) 51 Some other protocols Other protocols are used by network host computers for exchanging router information. These include Internet Control Message Protocol (ICMP) Interior Gateway Protocol (IGP) Exterior Gateway Protocol (EGP) Border Gateway Protocol (BGP). (We’ll talk about these another time.) CSIT 220 (Blum) 52 Intranet Businesses liked the services (HTTP, FTP, SMTP, telnet, etc.) offered by the TCP/IP model but they did not necessarily want to be connected to the Internet, so they started setting up intranets. An intranet is a set-up like the Internet (having browsers, email, etc.) but not connected to the outside world. CSIT 220 (Blum) 53 Intranet (cont.) With “tunneling”, companies can send private messages through the public network, using the public network with special encryption/decryption and other security safeguards to connect one part of their intranet to another. Allows a public transmission line to be used as part of a private network. If a public line is used as part of a private network, that network is called a Virtual Private Network CSIT 220 (Blum) 54 Intranet (Cont.) Typically, larger enterprises allow users within their intranet to access the public Internet through firewall servers that have the ability to screen messages in both directions so that company security is maintained. When part of an intranet is made accessible to customers, partners, suppliers, or others outside the company, that part becomes part of an extranet. CSIT 220 (Blum) 55 Extranet A private network that uses TCP/IP and the public telecommunication system to securely share part of a business's information with suppliers, vendors, customers, etc. The required security and privacy are gained by using firewall server management, the issuance and use of digital certificates or other means of user authentication, encryption of messages, and the use of virtual private networks (VPN) that tunnel through the public network. CSIT 220 (Blum) 56 Tunneling Tunneling works by adding another protocol, such as Microsoft’s Point-to-Point Tunneling Protocol (PPTP) or Cisco’s or Layer Two Forwarding (L2F). This new protocol is embedded in the TCP/IP packets. This allows organizations to use the Internet to transmit data across a virtual private network (VPN). CSIT 220 (Blum) 57 Other References http://www.whatis.com http://www.webopedia.com TCP/IP Networking (James Martin and Joe Leben) MCSE TCP/IP for Dummies, Cameron Brandon CSIT 220 (Blum) 58