Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Transport Layer a) What kind of address does the transport layer provide? Where

ID: 3689277 • Letter: T

Question

Transport Layer

a) What kind of address does the transport layer provide? Where does it

deliver the message from and to?

b) Both UDP and TCP provide ports to the application layer. What are

dynamic ports and static ports? In client-server architecture, is it the client or

server that uses dynamic ports?

c) In what kinds of situations would you use UDP for an application

rather than TCP? What will the application need to do if it requires some of the

TCP-like functionality?

d) In reasonable detail, describe the mechanism provided by TCP to

provide reliability over IP's unreliability.

e) TCP must work over disparate (very different) networks like LANs

and satellite. Describe the mechanism by which TCP is able to work over these

very different networks.

Explanation / Answer

1))

A typical host on a TCP/IP internetwork has many different software application processes running concurrently. Each generates data that it sends to either TCP or UDP, which in turn passes it to IP for transmission. This multiplexed stream of datagrams is sent out by the IP layer to various destinations. Simultaneously, each device's IP layer is receiving datagrams that originated in numerous application processes on other hosts. These need to be demultiplexed, so they end up at the correct process on the device that receives them.

Multiplexing and Demultiplexing Using Ports

The question is: how do we demultiplex a sequence of IP datagrams that need to go to many different application processes? Let's consider a particular host with a single network interface bearing the IP address 24.156.79.20. Normally, every datagram received by the IP layer will have this value in the IP Destination Addressfield. Consecutive datagrams received by IP may contains a piece of a file you are downloading with your Web browser, an e-mail sent to you by your brother, and a line of text a buddy wrote in an IRC chat channel. How does the IP layer know which datagrams go where, if they all have the same IP address?

The first part of the answer lies in the Protocol field included in the header of each IP datagram. This field carries a code that identifies the protocol that sent the data in the datagram to IP. Since most end-user applications use TCP or UDP at the transport layer, the Protocol field in a received datagram tells IP to pass data to either TCP or UDP as appropriate.

Of course, this just defers the problem to the transport layer: both TCP and UDP are used by many applications at once. This means TCP or UDP must figure out which process to send the data to. To make this possible, an additional addressing element is necessary. This address allows a more specific location—a software process—to be identified within a particular IP address. In TCP/IP, this transport layer address is called a port.

2,3)))

TCP and UDP

The two most common Transport layer protocols of TCP/IP protocol suite are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). Both protocols manage the communication of multiple applications. The differences between the two are the specific functions that each protocol implements.

User Datagram Protocol (UDP)

UDP is a simple, connectionless protocol, described in RFC 768. It has the advantage of providing for low overhead data delivery. The pieces of communication in UDP are called datagrams. These datagrams are sent as "best effort" by this Transport layer protocol.

Applications that use UDP include: Domain Name System (DNS), Video Streaming, Voice over IP (VoIP)

Transmission Control Protocol (TCP)

TCP is a connection-oriented protocol, described in RFC 793. TCP incurs additional overhead to gain functions. Additional functions specified by TCP are the same order delivery, reliable delivery, and flow control. Each TCP segment has 20 bytes of overhead in the header encapsulating the Application layer data, whereas each UDP segment only has 8 bytes of overhead. See the figure for a comparison.

Applications that use TCP are: Web Browsers, E-mail, File Transfers

Dynamic or Private Ports (Numbers 49152 to 65535) - Also known as Ephemeral Ports, these are usually assigned dynamically to client applications when initiating a connection. It is not very common for a client to connect to a service using a Dynamic or Private Port (although some peer-to-peer file sharing programs do).

Using both TCP and UDP

Some applications may use both TCP and UDP. For example, the low overhead of UDP enables DNS to serve many client requests very quickly. Sometimes, however, sending the requested information may require the reliability of TCP. In this case, the well known port number of 53 is used by both protocols with this service.

4)))

First, what do all these terms/acronyms mean?

Ethernet is a set of network related technologies (covering the physical layer, data frames, network topology, etc.) defined by the IEEE 802.3 standards.

TCP is an acronym which stands for Transmission Control Protocol. This protocol is responsible for managing the connection between a client and a server, making sure that the data which needs to be transfered is split into several packets which will all eventually reach their destination. If they don't, or if one of them is corrupt, TCP defines how the missing data will be retransmitted.

IP has two different meanings depending on how it is used: Industrial Protocol for Ethernet/IP and Internet Protocol for TCP/IP. Quite confusing! Let's take a closer look at these two protocols.

Ethernet/IP

Ethernet/IP uses the Ethernet infrastructure (who would have guessed?) to manage the connection between various automation devices such as robots, PLCs, sensors, CNCs and other industrial machines. It is managed by the Open DeviceNet Vendors Association (ODVA) and is based on the Common Industrial Protocol (CIP). It is very robust, but it is also complex and the learning curve is very steep (trust me on that one!).

TCP/IP

The real name of the industrial protocol which we support is Modbus TCP/IP. TCP/IP is responsible for the transmission of the packets, which are composed of Modbus frames containing commands to read/write into the shared memory of a device. It is quite easy to learn, as TCP/IP is standard in most programming langages (C/C++, Matlab, Python, etc.) and Modbus is very simple. Also, Modbus TCP/IP is standard with most PCs, which makes it an interesting communication protocol for research laboratories.

Which protocol do you need?

If you are asking yourself this question, chances are good that you need Modbus TCP/IP. I'm suggesting this, because the robot used in the targeted application generally determines if an Ethernet/IP protocol is needed, so if not, then Modbus TCP/IP can be used.

If you still hesitate, just send us an e-mail and we will help you to choose the protocol which is the best suited for your application. Do not forget, however, that many other protocols exist in robotics. At Robotiq, we also support DeviceNet, EtherCAT, Serial RS-232 and now also CANopen.

5)))

Network services can be categorized as best-effort, connectionlessservices or reliable connection- oriented services. In the Internet protocol suite, IP is a best-effort service and TCP is a reliable service. IP provides basic packet forwarding while TCP implements flow controls, acknowl- edgements, and retransmissions of lost or corrupted packets. This split in services "decentralizes" the network and moves the responsibility for reliable delivery to end systems. TCP is an end-to-end transport protocol, meaning that it runs in end systems, not the network. IP is a network protocol. This topic discusses flow control in terms of TCP, but flow controls are used by many other communication protocols, as mentioned later. The services offered by TCP include the following:

Congestion occurs on busy networks. When it occurs, end systems and the network must work together to minimize the congestion. In contrast, flow controls are used between end systems. A receiver uses flow controls to signal to the sender that it is overloaded. The sender then throttles back or stops its transmission.

Flow controls are necessary because senders and receivers are often unmatched in capacity and processing power. A receiver might not be able to process packets at the same speed as the sender. If buffers fill, packets are dropped. The goal of flow-control mechanisms is to prevent dropped packets that must be retransmitted.

Keep in mind that flow controls are used in the data link layer to control flow between devices that are directly connected. In contrast, TCP controls flow between devices that may be connected across a multihop routed network. Data link layer protocols include SDLC (Synchronous Data Link Control), HDLC (High-level Data Link Control), LAP-B (Link Access Procedure-Balanced), SLIP (Serial Line Internet Protocol), and PPP (Point-to-Point Protocol). Transport layer protocols include TCP (Transmission Control Protocol) and Novell SPX (Sequenced Packet Exchange).

When discussing data link layer protocols, the unit of transmission is theframe. In the transport layer, the unit of transmission for TCP is thesegment. A segment is encapsulated in an IP datagram, which in turn is encapsulated in frames at the data link layer.

There are a few Internet RFCs related to flow control, including the original TCP RFCs:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote