19.07.2013 Views

CCNA Complete Guide 2nd Edition.pdf - Cisco Learning Home

CCNA Complete Guide 2nd Edition.pdf - Cisco Learning Home

CCNA Complete Guide 2nd Edition.pdf - Cisco Learning Home

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

- Socket is a communication channel between 2 TCP processes. A client socket is created by<br />

specifying the IP address and the destination port to connect to the server; whereas a server<br />

socket binds to a specified port number and listens for incoming connections upon started a<br />

server application.<br />

- User Datagram Protocol (UDP) is a connectionless (does not contact the destination before<br />

data transmission) and unreliable data delivery service, which also known as best effort service.<br />

No sequencing. No reordering. No acknowledgment. No error recovery. No congestion control.<br />

- Applications uses UDP are either tolerant to data lost, or perform error recovery themselves<br />

(perform error recovery in application layer instead of transport layer).<br />

i) Tolerant to data lost: video streaming.<br />

ii) Handles its own reliability issues: NFS and TFTP (hence the use of TCP is unnecessary)<br />

- Figure 2-5 shows the UDP segment structure. It does not contain SEQ, ACK and other fields as in<br />

TCP header. Even there are many disadvantages as mentioned above, UDP advantages over TCP<br />

are it is faster (no ACK process) and uses less network bandwidth and processing resources.<br />

Source Port (16) Destination Port (16)<br />

Length (16)<br />

32 bits<br />

Application Layer Data<br />

Figure 2-5: UDP Segment Structure<br />

- In network programming, a socket would fail to bind to specified port if the port is already in use<br />

by another socket. However, a host is allowed to bind a TCP socket and a UDP socket to the<br />

same port number at the same time, and waiting for incoming connections, as they are treated<br />

as 2 different type of service – a host can provide TCP and UDP Echo services at the same time.<br />

- Do not make false assumption that connection-oriented = reliable!<br />

A connection-oriented protocol does not mean it also performs error recovery, and vice-versa.<br />

Connection Type Reliable Example Protocol<br />

Connection-oriented Yes TCP<br />

Connection-oriented No TP0 and TP2<br />

Connectionless Yes TFTP and NFS<br />

Connectionless No UDP<br />

Note: TPx isTransport Protocol Class x in ISO-TP (OSI Transport Layer Protocols).<br />

- Below shows the TCP and UDP comparison chart:<br />

Feature TCP UDP<br />

Connection-oriented Yes No<br />

Reliable data transfer Yes No<br />

Ordered data transfer Yes No<br />

Flow control Yes No<br />

Multiplexing Yes Yes<br />

10<br />

Checksum (16)<br />

8 Bytes<br />

Copyright © 2008 Yap Chin Hoong<br />

yapchinhoong@hotmail.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!