 in the DNS. Other servers, such as the Rlogin server not only require that the client's IP address have a pointer record, but then ask the DNS for the IP addresses corresponding to the name returned in the PTR response, and require that one of the returned addresses match the source IP address in the received datagram.
There are about 20 types of RRs. for example:
- CNAME: canonical name and refers to an alias.
- MX: mail exchange record.
- NS: name server record
All name servers use a cache to reduce traffic on the internet. The unix implementation, the cache is maintained in the server not the resolver. If the
host command states a non-authoratitive answer, it has been obtained from the cache.
Generally UDP is used by DNS, however TCP may be used if the size of response exceeds 512 bytes.
Chapter 15: Trivial File Transfer Protocol (TFTP)
TFTP is intended to be used when bootstrapping diskless systems. unlike the file transfer protocol (ftp) which uses TCP, TFTP was designed to use UDP, to make it simple and small. implementations of TFTP (and its required UDP, IP, and a device driver) can fit in read-only memory.
TFTP is an example of a stop-and-wait protocol. Each data packet contains a block number that is later used in an acknowledgment packet.
Chapter 16: Bootstrap Protocol (BOOTP)
BOOTP uses UDP and normally works in conjunction with TFTP. There are two well-known ports for BOOTP: 67 for the server and 68 for the client.
Chapter 17: Transmission Control Protocol (TCP)
Even though TCP and UDP use the same network layer (IP), TCP provides a totally different service to the application layer than UDP does. TCP provides a connection-oriented, reliable, byte stream service.
Connection-oriented: the two applications using TCP (normally considered a client and a server) must establish a TCP connection with each other before they can exchange data.
TCP provides reliability by the following:
- application data is broken into what TCP considers the best sized chunks to send. This is totally different from UDP, where each write by the application generates a UDP datagram of that size. The unit of information passed by TCP to IP is called a segment.
- When TCP sends a segment it maintains a timer, waiting for the other end to acknowledge reception of the segment. If an acknowledgment isn't received in time, the segment is retransmitted.
- When TCP receives data from the other end of the connection, it sends an acknowledgment.
- TCP maintains a checksum on its header and data. This is an end-to-end checksum whose purpose is to detect any modification of the data in transit. If a segment arrives with an invalid checksum, TCP discards it and doesn't acknowledge receiving it.
- Since TCP segments are transmitted as IP datagrams, and since IP datagrams can arrive out of order, TCP segments can arrive out of order. A receiving TCP resequences the data if necessary, passing the received data in the correct order to the application.
- Since IP datagrams can get duplicated, a receiving TCP must discard duplicate data.
- TCP also provides flow control. Each end of a TCP connection has a finite amount of buffer space. A receiving TCP only allows the other end to send as much data as the receiver has buffers for. This prevents a fast host from taking all the buffers on a slower host.
A stream of 8-bit bytes is exchanged across the TCP connection between the two applications. There are no record markers automatically inserted by TCP. This is what we called a byte stream service. If the application on one end writes 10 bytes, followed by a write of 20 bytes, followed by a write of 50 bytes, the application at the other end of the connection cannot tell what size the individual writes were. The other end may read the 80 bytes in four reads of 20 bytes at a time. One end puts a stream of bytes into TCP and the same, identical stream of bytes appears at the other end.
Also, TCP does not interpret the contents of the bytes at all. TCP has no idea if the data bytes being exchanged are binary data, ASCII characters, EBCDIC characters, or whatev