CSS50 Module 14: Transport Layer

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

DNS

(Domain Name System) The Internet's system for converting alphabetic names into numeric IP addresses. (PORT 53)

SMTP

(Simple Mail Transfer Protocol) The main protocol used to send electronic mail from server to server on the Internet. (Email - PORT 25)

UDP Features

- Data is reconstructed in the order that it is received. - Any segments that are lost are not resent. - There is no session establishment. - The sending is not informed about resource availability.

UDP Header

-8 bytes (64 bits) long, divided into four sections/fields: 1) source port 2) destination port 3) message length 4) checksum

What is the complete range of TCP and UDP well-known ports? 256 -1023 1024 - 49131 0 to 1023 0 to 255

0 to 1023

Port numbers used by TCP/UDP

0-255 : Used for public applications 255-1023 : Assigned to companies Above 1023 : Used by upper layers to set up sessions with other hosts and by TCP to use as source and destination addresses.

TCP three-way handshake

1. It sends a message called a SYN to the target host. 2. The target host opens a connection for the request and sends back an acknowledgment message called an ACK (or SYN ACK). 3. The host that originated the request sends back another acknowledgment, saying that it has received the ACK message and that the session is ready to be used to transfer data.

Assume a host with IP address 10.1.1.10 wants to request web services from a server at 10.1.1.254. Which of the following would display the correct socket pair? 1099:10.1.1.10, 80:10.1.1.254 10.1.1.10:80, 10.1.1.254:1099 10.1.1.10:1099, 10.1.1.254:80 80:10.1.1.10, 1099:10.1.1.254

10.1.1.10:1099, 10.1.1.254:80

Which number or set of numbers represents a socket? 01-23-45-67-89-AB 10.1.1.15 192.168.1.1:80 21

192.168.1.1:80

TCP Header

20 bytes in 10 fields : Source Port, Destination Port, Sequence Number, Acknowledgment Number, Header Number, Reserved, Control Bits, Window size, Checksum, Urgent. Then Options, Data

Private and/or Dynamic Ports

49,152 to 65,535 These ports are also known as ephemeral ports. The client's OS usually assign port numbers dynamically when a connection to a service is initiated. The dynamic port is then used to identify the client application during communication.

datagrams

A datagram is a basic transfer unit associated with a packet-switched network. Datagrams are typically structured in header and payload sections. Datagrams provide a connectionless communication service across a packet-switched network.

TCP sliding windows

A destination sending acknowledgments as it processes bytes received, and the continual adjustment of the source send window

flow control

A method of gauging the appropriate rate of data transmission based on how fast the recipient can accept data.

Port number

A numeric value used as an identifier to applications and services on TCP/IP systems.

connection-oriented protocol

A type of Transport layer protocol that requires the establishment of a connection between communicating nodes before it will transmit data.

connectionless protocol

A type of Transport layer protocol that services a request without requiring a verified session and without guaranteeing delivery of data.

Three way handshake process

Client sends SYN data packet over IP network to a server Target server opens ports and sends confirmation receipt (ACK packet) Client receives ACK packet and responds with ACK packet

Which three are transport layer responsibilities? (Choose three.) Conversation multiplexing Identifying frames Identifying routing information Segmenting data and reassembling segments Tracking individual conversations

Conversation multiplexing Segmenting data and reassembling segments Tracking individual conversations

netstat command

Cross-platform command tool to show network information on a machine running TCP/IP, notably active connections, and the routing table.

Which two services or protocols use the preferred UDP protocol for fast transmission and low overhead? (Choose two) HTTP DNS VoIP POP3 FTP

DNS VoIP

Which two fields are the same in a TCP and UDP header? (Choose two.) Control bits Destination port number Sequence number Source port number Well-known port number

Destination port number Source port number

TCP services

Establishes a Session Ensures Reliable Delivery Provides Same-Order Delivery Supports Flow Control

Which two applications would use the TCP transport layer protocol? (Choose two.) FTP HTTP ICMP TFTP VoIP

FTP HTTP

FTP

File Transfer Protocol (PORT 20 and 21)

How many exchanges are needed to end both sessions between two hosts? One exchange Two exchanges Three exchanges Four exchanges Five exchanges

Four exchanges

Applications that use TCP

HTTP (web) FTP (file transfer) Telnet (remote login) SMTP (email)

HTTP

HyperText Transfer Protocol - the protocol used for transmitting web pages over the Internet (PORT 80)

Window size (16 bits)

Indicates the number of bytes that can be accepted at one time.

Which UDP header statement is true? It consists of 4 fields in a 8-byte header It consists of 8 fields in a 10-byte header It consists of 10 fields in a 20-byte header It consists of 20 fields in a 40-byte header

It consists of 4 fields in a 8-byte header

Why is UDP desirable for protocols that make a simple request and reply transactions? Flow control Low overhead Reliability Same-order delivery

Low overhead

Selective Acknowledgement (SACK)

Optional TCP feature that makes it possible for the destination to acknowledge bytes in discontinuous segments. With SACK, the source host would only need to retransmit the specific unacknowledged data rather than retransmitting all data since the last acknowledged data.

Well Known Ports

Ports 0 to 1023 are considered well-known and are assigned by the Internet Assigned Numbers Authority (IANA)

Reliable Transport Protocol (RTP)

Reliable Transport Protocol (RTP) is used by EIGRP to deliver packets to neighboring routers in a guaranteed, ordered manner. RTP: Enhanced Interior Gateway Routing Protocol (EIGRP) (CISCO)

Which control bit flags are used during the three-way handshake? ACK and FIN FIN and RESET RESET and SYN SYN and ACK

SYN and ACK

What field is used by the destination host to reassemble segments into the original order? Control bits Destination Port Sequence Number Source Port Window Size

Sequence Number

SNMP

Simple Network Management Protocol. Used to manage network devices such as routers or switches. SNMP agents report information via notifications known as SNMP traps, or SNMP device traps. (PORT 161)

What TCP mechanism is used to enhance performance by allowing a device to continuously send a steady stream of segments as long as the device is also receiving necessary acknowledgements? Two-way handshake Three-way handshake Sliding window Socket pair

Sliding window

Which of the following would be valid source and destination ports for a host connecting to a DNS server? Source 53, Destination: 49152 Source 1812, Destination: 49152 Source 49152, Destination: 53 Source 49152, Destination: 1812

Source 49152, Destination: 53

Which of the following would be valid source and destination ports for a host connecting to an email server? Source: 25, Destination: 49152 Source: 80, Destination: 49152 Source: 49152, Destination: 25 Source: 49152, Destination: 80

Source: 49152, Destination: 25

Session Termination (Steps)

Step 1. Host A sends an FIN Step 2. Host B sends an ACK Step 3. Host B sends an FIN Step 4. Host A sends an ACK

Which transport layer protocol ensures reliable same-order delivery? ICMP IP TCP UDP

TCP

Which transport layer feature is used to establish a connection-oriented session? UDP ACK flag UDP sequence number TCP port number TCP 3-way handshake

TCP 3-way handshake

TCP Flow Control

TCP provides flow control by having the sender maintain a variable called the receive window.

TCP FIN

TCP; Indicates that the sender has no more data to send, end-of-transmission marker

TCP SYN

TCP; Indicates that the sequence numbers are to be synchronized, connection being established

Which two applications would use the UDP transport layer protocol? (Choose two.) FTP HTTP ICMP TFTP VoIP

TFTP VoIP

ISN

The Initial Sequence Number of a TCP connection is the random sequence number chosen by the client ( resp. server) that is placed in the SYN (resp. SYN+ACK) segment during the establishment of the TCP connection.

Which action is performed by a client when establishing communication with a server via the use of UDP at the transport layer? The client sends a synchronization segment to begin the session. The client sends a ISN to the server to start the 3-way handshake. The client sets the window size for the session. The client randomly selects a source port number.

The client randomly selects a source port number.

What is a socket? The combination of the source and destination sequence numbers and port numbers The combination of a source IP address and port number or destination IP address and destination port number The combination of the source and destination IP address and source and destination Ethernet address The combination of the source and destination sequence and acknowledgment numbers

The combination of a source IP address and port number or destination IP address and destination port number

Socket pair

The combination of the source IP address and source port number, or the destination IP address and destination port number 192.168.1.5:1099, 192.168.1.7:80

Socket Pairs (TCP)

The combination of the source IP address and source port number, or the destination IP address and destination port number is known as a socket. 192.168.1.7:80

Transport Layer

The fourth layer of the OSI model. In this layer protocols ensure that data are transferred from point A to point B reliably and without errors. this layer services include flow control, acknowledgment, error correction, segmentation, reassembly, and sequencing.

What happens if part of an FTP message is not delivered to the destination? The message is lost because the FTP does not use a reliable delivery method. The entire FTP message is re-sent The part of the FTP message that was lost is re-sent. The FTP source host sends a query to the destination host.

The part of the FTP message that was lost is re-sent.

What happens when a sending host senses there is congestion? The receiving host increases the number of bytes it sends before receiving an acknowledgment from the sending host. The receiving host reduces the number of bytes it sends before receiving an acknowledgment from the sending host The sending host increases the number of bytes it sends before receiving an acknowledgment from the destination host. The sending host reduces the number of bytes it sends before receiving an acknowledgment from the destination host.

The sending host reduces the number of bytes it sends before receiving an acknowledgment from the destination host.

Transport layer blocks

The transport layer divides the data into smaller blocks called segments or datagrams

What is the purpose of using a source port number in a TCP communication? To keep track of multiple conversations between devices To assemble the segments that arrived out of order To inquire for a non-received segment. To notify the remote device that the conversation is over

To keep track of multiple conversations between devices

Which transport layer protocol statement is true? TCP has few fields than UDP. TCP is faster than UDP. UDP is a best-effort delivery protocol UDP provides reliability

UDP is a best-effort delivery protocol

Which UDP datagram reassembly statement is true? UDP does not reassemble the data UPD reassembles the data in the order that it was received. UDP reassembles the data using control bits UDP reassembles the data using sequence numbers

UPD reassembles the data in the order that it was received.

TCP Control Bits

URG: Indicates that the Urgent pointer field is significant. ACK: Indicates that the Acknowledgment field is significant. All packets, after the initial SYN packet, that are sent by the client should have this flag set. PSH: Push function. Asks to push the buffered data to the receiving application. RST: Reset the connection. SYN: Initiates a connection. Only the first packet that is sent from each end should have this flag set. FIN: No more data from sender.

UDP

User Datagram Protocol. Used instead of TCP when guaranteed delivery of each packet is not necessary. UDP uses a best-effort delivery mechanism.

What field is used to provide flow control? Control bits Destination Port Sequence Number Source Port Window Size

Window Size

best effort delivery

a protocol that makes its best effort to deliver segments between communicating hosts but does not guarantee orderly delivery

sliding windows

continual adjustment of window size

TCP Window size

determines the length of the packet reported. 10,000 bytes

MSS

maximum segment size maximum size of a transport-layer payload A common MSS is 1,460 bytes

Stateful Protocol

protocol that keeps track of the state of the communication session

stateless protocol

protocol that maintains no information about its clients

Multiplexing

transmitting multiple channels from one network

Applications that use UDP

• streaming media • Teleconferencing • DNS (Domain Name Service) • Internet telephony

What type of applications are best suited for using UDP? Applications that need reliable delivery Applications that require retransmission of lost segments. Applications that are sensitive to delay Applications that are sensitive to packet loss

Applications that are sensitive to delay

Which two flags in the TCP header are used in a TCP three-way handshake to establish connectivity between two network devices? (Choose two.) RST FIN ACK PSH URG SYN

ACK SYN

TCP ACK

Any TCP packet that acknowledges receiving a message or series of packets

How does a networked server manage requests from multiple clients for different services? Each request is tracked through the physical address of the client. The server uses IP addresses to identify different services Each request has a combination of source and destination port numbers, coming from a unique IP address. The server sends all requests through a default gateway.

Each request has a combination of source and destination port numbers, coming from a unique IP address.

Control bits (6 bits)

Includes bit codes, or flags, that indicate the purpose and function of the TCP segment. • URG - Urgent pointer field significant • ACK - Acknowledgment flag used in connection establishment and session termination • PSH - Push function • RST - Reset the connection when an error or timeout occurs • SYN - Synchronize sequence numbers used in connection establishment • FIN - No more data from sender and used in session termination

Initial Sequence Number (ISN)

Randomly chosen number and is used to begin tracking the flow of data from the client to the server for this session. The ISN in the header of each segment is increased by one for each byte of data sent from the client to the server as the data conversation continues.

Network congestion has resulted in the source learning of the loss of TCP segments that were sent to the destination. What is one way that the TCP protocol addresses this? The destination decreases the window size. The source decreases the amount of data that it transmits before it receives an acknowledgement form the destination. The destination sends fewer acknowledgement messages in order to conserve bandwidth. The source decreases the window size to decrease the rate of transmission from the destination.

The source decreases the amount of data that it transmits before it receives an acknowledgement form the destination.

What is a responsibility of transport layer protocols? Translating private IP addresses to public IP addresses Tracking individual conversations Determining the best path to forward a packet Providing network access

Tracking individual conversations

TCP

Transmission Control Protocol - provides reliable, ordered, and error-checked delivery of a stream of packets on the internet. TCP is tightly linked with IP and usually seen as TCP/IP in writing. • Number and track data segments transmitted to a specific host from a specific application • Acknowledge received data • Retransmit any unacknowledged data after a certain amount of time • Sequence data that might arrive in wrong order • Send data at an efficient rate that is acceptable by the receiver

TCP/IP

Transmission Control Protocol/Internet Protocol. Protocol that connects computers to the Internet. Tells computers how to exchange information over the Internet.

Which layer is responsible for establishing a temporary communication session between the source and destination host applications? Application layer Data link layer Network layer Physical layer Transport layer

Transport layer

Which TCP header statement is true? It consists of 4 fields in a 8-byte header It consists of 8 fields in a 10-byte header It consists of 10 fields in a 20-byte header It consists of 20 fields in a 40-byte header

It consists of 10 fields in a 20-byte header

Which two operations are provided by TCP but not by UDP? (Choose two.) Re-transmitting any unacknowledged data Identifying individual conversations Identifying the applications. Acknowledging received data Reconstructing data in the order received

Re-transmitting any unacknowledged data Acknowledging received data

TFTP

Trivial File Transfer Protocol. Used to transfer small amounts of data with UDP port 69. In contrast, FTP is used to transfer larger files using TCP ports 20 and 21.

Which of the following is a stateless best-effort delivery transport layer protocol? ICMP IP TCP UDP

UDP

Registered Ports

Ports 1024 to 49,151 are considered registered and are usually assigned to proprietary protocols


Kaugnay na mga set ng pag-aaral

Chapter 1.3- Collecting Sample Data

View Set

section 8 unit 3: Contract Modifications and Electronic Signatures in South Carolina

View Set

306 Ricci Chapter 12: Nursing Management During Pregnancy

View Set

Exam 1: Mobility Practice 30 Questions

View Set

CS 1332 Final Exam Extension WS (Time Complexities) & Socrative Polls

View Set

AP English Language and Composition Rhetorical Devices Review

View Set