and data. All Internet hosts have to accept UDP datagrams of length 512 bytes or less [5]. Checksum is calculated over both the header and data field. In the event of an error, the checksums derived by the receiving party do not match and the datagram is discarded. No further actions are taken. 12345678 12345678 12345678 12345678 Source port Destination port header Length Checksum Figure 6.53 UDP header. Data Communications As shown in Figure 6.36, UDP is used by the Domain Name System and SNMP. It is also used by real-time applications that do not use retrans- missions. They tolerate better lost datagrams than datagrams that arrive much delayed because of retransmissions. 6.6.10 Application Layer Protocols The transport layer of TCP/IP provides reliable data transfer (TCP) or unre- liable datagram transfer (UDP) over the Internet. All tasks for data transmis- sion end to end are actually done at the transport layer and below. The application protocols use end-to-end communications provided by either TCP or UDP and provide specific services for software applications running in hosts. The most important application layer protocols are introduced next. 6.6.10.1 SMTP E-mail is one of the most widely used applications on the Internet. Each e-mail user has his or her own mailbox in a computer and e-mail address. For example, the address tarmo.anttalainen@evitech.fi refers to computer evitech.f where my mailbox is stored and which acts as my mail server. The letter to be sent is first written in an e-mail application program. When it is sent SMTP in the sender's computer sets up a TCP connection to her mail server to port 25 defined for SMTP. SMTP defines message formats transmitted through an established TCP connection, that is, for example, how destination mail address, actual text, and possible file attachments are distinguished from each other. The TCP connection is terminated when the local mail server receives whole mail. The local mail server then repeats the same procedure with the recipi- ent's mail server or 