Ch 23 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan,...

download Ch 23 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Ameera Almasoud.

If you can't read please download the document

Transcript of Ch 23 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan,...

  • Slide 1
  • Ch 23 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007 Ameera Almasoud
  • Slide 2
  • TCP/IP and OSI model 2 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud
  • Slide 3
  • Types of data deliveries 3 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 3
  • Slide 4
  • USER DATAGRAM PROTOCOL (UDP) The User Datagram Protocol (UDP) is called a connectionless, unreliable transport protocol. connectionless : connectionless Best effort delivery: It does not add anything to the services of IP except to provide process-to-process communication instead of host-to-host communication. unreliable : unreliable : it performs very limited error checking. UDP is used to send small messages when reliability is not a matter of concern. 4 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud4
  • Slide 5
  • Well-known ports used with UDP 5 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 5
  • Slide 6
  • Example 23.1 In UNIX, the well-known ports are stored in a file called /etc/services. Each line in this file gives the name of the server and the well- known port number. We can use the grep utility to extract the line corresponding to the desired application. The following shows the port for FTP. Note that FTP can use port 21 with either UDP or TCP. 6 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 6
  • Slide 7
  • Example 23.1 (continued) SNMP uses two port numbers (161 and 162), each for a different purpose, as we will see in Chapter 28. 7 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 7
  • Slide 8
  • User datagram format 8 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 8
  • Slide 9
  • User datagram format Pseudoheader 9 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 9
  • Slide 10
  • User datagram format Header 10 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 10
  • Slide 11
  • User datagram format Header 11 Port number is 16 bits long port number can range from 0 to 65,535 UDP length< IP datagram length = 65,535 UDP length = IP length IP headers length Note Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 11
  • Slide 12
  • User datagram format Data This is the data submitted by the Application Layer. The pseudoheader as well as the padding will be dropped when the user datagram is delivered to the IP (Network Layer). 12 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 12
  • Slide 13
  • Pseudoheader for checksum calculation 13 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 13
  • Slide 14
  • Example 23.2 Figure 23.11 shows the checksum calculation for a very small user datagram with only 7 bytes of data. Because the number of bytes of data is odd, padding is added for checksum calculation. The pseudoheader as well as the padding will be dropped when the user datagram is delivered to IP. 14 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 14
  • Slide 15
  • Figure 23.11 Checksum calculation of a simple UDP user datagram 15 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 15
  • Slide 16
  • CIRCUIT-SWITCHED NETWORKS THREE PHASES Communication in circuit-switched networks requires 3 phases: Setup Phase. Data Transfer Phase. Teardown Phase. 16 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 16
  • Slide 17
  • A trivial circuit-switched network 17 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 17
  • Slide 18
  • Setup Phase Before the two parties can communicate, a dedicated circuit (combination of channels in links) needs to be established. The end systems are normally connected through dedicated lines to the switches. so connection setup means creating dedicated channels between the switches. Each switch is provided with a table. an entry is created when the setup phase is completed. 18 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 18
  • Slide 19
  • Setup Phase 1. when system A needs to connect to system M, it sends a setup request that includes the address of system M, to switch I. 2. Switch I finds a channel between itself and switch IV that can be dedicated for this purpose. 3. Switch I then sends the request to switch IV, which finds a dedicated channel between itself and switch III. 4. Switch III informs system M of system A's intention at this time. 5. To make a connection, an acknowledgment from system M needs to be sent in the opposite direction to system A. 6. Only after system A receives this acknowledgment, the connection established. 19 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 19
  • Slide 20
  • Data Transfer Phase After the establishment of the dedicated circuit (channels), the two parties can transfer data. 20 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 20
  • Slide 21
  • Teardown Phase When one of the parties needs to disconnect, a signal is sent to each switch to release the resources. These resources include: channels, switch buffers, switch input/output ports. When the teardown phase is over, the corresponding entry is deleted from the switching table. 21 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 21
  • Slide 22
  • DATAGRAM NETWORKS DATAGRAM NETWORKS Routing If the message is going to pass through a packet switched network, it needs to be divided into packets of fixed or variable size. Each packet is treated independently of all others. Packets of the same message may go through different paths to reach the same destination This is because links may be busy in carrying packets from other messages. datagrams of the same message may arrive at the destination with different delays and out of order. 22 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 22
  • Slide 23
  • A datagram network with four switches (routers) 23 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 23
  • Slide 24
  • DATAGRAM NETWORKS DATAGRAM NETWORKS DATAGRAMS Packets may also be lost or dropped because of lack of resources. It is the responsibility of an upper-layer protocol to reorder datagrams and to ask for losted datagrams 24 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 24
  • Slide 25
  • DATAGRAM NETWORKS NETWORKS DATAGRAM NETWORKS /CONNECTIONLESS NETWORKS The term connectionless means that the switch does not keep information about the connection state. Each packet is treated the same by a switch regardless of its source or destination. 25 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 25
  • Slide 26
  • UDP OPERATION Connectionless Services. Flow and Error Control. Encapsulation and Decapsulation. 26 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 26
  • Slide 27
  • UDP OPERATION Connectionless Services UDP is connectionless Datagrams are handled separately. Datagrams can travel on different paths. No path establishment between the source and destination. UDP user datagrams are NOT numbered UDP messages shouldnt be divided. UDP messages should fit in a SINGLE datagram. Only processes sending short messages should use UDP. 27 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 27
  • Slide 28
  • UDP OPERATION Flow and Error Control There is no flow control UDP is unreliable. The receiver may overflow with incoming messages. There is no error control except for the checksum The sender does not know if a message is lost When the receiver detects an error through the checksum, the message is simply discarded. 28 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 28
  • Slide 29
  • UDP OPERATION Encapsulation and Decapsulation. To send a message from one process to another, the UDP protocol encapsulates and decapsulates messages in an IP datagram. 29 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 29
  • Slide 30
  • Use ofUDP a process that requires simple request-response communication with little concern for flow and error control. Not used for processes that send a bulk of data such as FTP. a process with internal flow and error control mechanisms, ex: Trivial File Transfer Protocol (TFTP). Multicasting, multicasting capability is embedded in the UDP software but not in the TCP software. management processes, ex: SNMP. route updating protocols, ex: RIP. 30 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007Ameera Almasoud 30