L5 - The Application Layer
L5 - The Application Layer
1. Ping
3. Telnet
Ping
1.1.1.2 1.1.1.1
ICMP Echo
20 Bytes
ICMP
0 78 15 16 31
• Tracert is used to check the path from the source node to the destination
node.
• It deducts 1 from the TTL value of the packet every time the packet traverses
a router.
• When the TTL value becomes 0, the router reports TTL timeout.
• Tracert sends a packet of which the TTL value is 1, so the first hop returns an
ICMP error message to notify that the packet cannot be forwarded because
the TTL times out.
• Then, Tracert sends a packet of which the TTL is 2, and the second hop
returns the same message.
Tracert
• Tracert continuously sends such packets until one packet can be sent to the
destination.
• The packet uses an invalid port number (33434 by default), so the destination
host returns an ICMP unreachable message to notify that the Tracert
operation completes.
• Tracert records the source address that sends the ICMP error message.
• Thus it can provide the IP addresses of the gateways through which the user
packets pass.
• Tracert can also provide a function to test the connectivity.
• When a fault occurs on the network, it can be located according to the path
displayed by Tracert.
Tracert
• Tracert is used to observe the route of the IP data message that is transmitted from one host
to another.
• It makes use of the ICMP message and TTL field in the IP header.
ICMP port
Unreachable message
ICMP time exceeded message n
1
Source site IP Network
1 Destination site
UDP data message TTL = 1
2
UDP data message TTL = 2
…
n
UDP data message TTL = n
Telnet
• Telnet is a terminal emulation program (for windows) used for the remote service
• The transport layer protocol used by Telnet is TCP and the port number is 23.
• Security is an issue with Telnet as usernames and passwords are not encrypted.
• Telnet command:
Telnet IP address of the router or server.
e.g. telnet 192.168.1.22 23 – This command would allow a user to open a remote session with
the server/router of IP address 192.168.1.22 via the port number 23.
Telnet
• Telnet provides a method to log into remote servers via a connective
terminal.
• Telnet uses TCP as its transport layer protocol, the port number is 23.
Summary questions
1. Explain any three functions of the application layer.
2. Explain the working principle of any three application layer protocols.
3. List any application layer protocols that use TCP at the transport layer.
4. What is the function of a terminal emulation program in computer
networking?
5. File transfer protocol (ftp) uses two different ports at the transport layer.
a. Which port is used for sending commands?
b. Which port is used for data transfer?