ARQ Protocols Lectures3 - 4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

159.

334 Computer Networks

Internet Applications – Browsers, Ping,


Traceroute, ARP

Professor Richard Harris


School of Engineering and Advanced
Technology (SEAT)
Presentation Outline
159.334 Computer Networks

Computer Networks - 1/2


1/2
Learning Objectives
159.334 Computer Networks

You will be able to:


To gain an understanding of Internet applications such
as Web browsers, traceroute and ping utilities.
To understand the reason for the existence of the
Address Resolution Protocol (ARP).

Computer Networks - 1/3


1/3
References
159.334 Computer Networks

Forouzan, “Data Communications and Networking”, 4th


Edition
Tanenbaum, “Computer Networks”, 4th Edition
Cisco CCNA1 Module 10 - part 1
Stallings, William 2000 ‘Data and Computer
Communications’, Prentice Hall, Sixth Edition
Russell, Travis 1997 ‘Telecommunications Protocols’,
McGraw Hill

Computer Networks - 1/4


1/4
Internet Applications in Context
159.334 Computer Networks

MIME

BGP FTP HTTP SMTP TELNET SNMP

TCP UDP

ICMP IGMP OSPF RSVP

IP

Computer Networks - 1/5


1/5
Internet Applications in Context
159.334 Computer Networks

Layer 7: Application

Layer 6: Presentation Application Network Applications

Layer 5: Session

Layer 4: Transport Transport TCP UDP

Layer 3: Network Internet ICMP IGMP


IP ARP

Layer 2: Logical Link LAN WAN


Network Technologies Technologies
Layer 1: Physical

Computer Networks - 1/6


1/6
Browsers
159.334 Computer Networks

More commonly known as the Web browser, it is a


software application used to locate and display Web
pages.
A web browser is an example of the client part of a
distributed client / server application. It uses the
Hypertext Transfer Protocol (HTTP) to make requests
from a web server.
There are two broad categories of browsers:
Graphical (e.g., Internet Explorer, Netscape, Opera)
Text-based (e.g., Lynx)

Computer Networks - 1/7


1/7
Browsers
159.334 Computer Networks

Nowadays, the Web is no longer a static environment for


displaying graphics and text, but also presents
multimedia information that gives the user a more
fulfilling and richer experience.
This is facilitated through the use of plug-ins. Plug-ins
are hardware or software components that add a
specific feature or service to a larger system. Examples
include RealPlayer, Macromedia Flash, Adobe Acrobat.

Computer Networks - 1/8


1/8
Browsers
159.334 Computer Networks

Very importantly, the Web browser and its associated


technologies are envisaged as the standard interface or
front end for current and future applications.
You may have come across terms such as intranets and
extranets being implemented in many enterprises.
Essentially, these organizations are establishing
‘private’ versions of the Internet that uses standard
Internet protocols such as TCP/IP and HTTP. They use it
for facilitation of daily business activities such as
delivery and presentation of information, transaction
processing, e-mail, etc.

Computer Networks - 1/9


1/9
Mozilla Browser
159.334 Computer Networks

Computer Networks - 1/10


1/10
Packet InterNet Groper (Ping)
159.334 Computer Networks

Ping is a network debugging tool used to determine


whether a specific IP address is accessible.
It is implemented using the ICMP Echo and and ICMP
Echo Reply messages. This is documented in RFC 792.
In an IP network, ‘ping’ sends an ICMP Echo message (in
a single packet) to the destination IP address and listens
for a single packet in reply (the ICMP Echo Reply).

Computer Networks - 1/11


1/11
Ping
159.334 Computer Networks

Example for Windows XP:


At the command prompt, type:
‘ping rmit.edu.au’ or ‘ping 131.170.40.30’

Computer Networks - 1/12


1/12
Ping
159.334 Computer Networks

What ping can tell you:


Determine if packets have been dropped, duplicated or
reordered. Recall that an ICMP Echo/Echo Reply messages can
support ‘sequence numbers’. Ping uses these sequence
numbers to facilitate this.
Detect some forms of damaged packets by using the ‘checksum’
field in the ICMP Echo/Echo Reply messages.
Compute the Round Trip Time (RTT) by placing a timestamp in
each packet, which is echoed back.
Can report other ICMP messages, such as if a router is declaring
the target host unreachable.

Computer Networks - 1/13


1/13
Ping
159.334 Computer Networks

What ping can’t tell you:


May not always be able to tell the reason for unanswered
packets. The reason could be due to routers silently discarding
undeliverable packets or a destination host chooses not to reply
as in the case of Microsoft at www.microsoft.com)
Can’t tell the reason for a damaged, delayed or duplicated packet
nor where it occurred although a logical deduction can usually
be made with respect to this.
Can’t provide a detailed description of every host/router that
handled the packet and everything that happened every step of
the way.

Computer Networks - 1/14


1/14
Traceroute
159.334 Computer Networks

Traceroute is a network debugging tool that is used to


trace a packet from the source host to a destination
host. It attempts to trace the route the packet takes, i.e.,
it shows how many hops the packet requires in order to
reach the destination host, and how long each hop
takes.
Traceroute works because it DEPENDS on the common
router practice of sending an ICMP Time Exceeded
message (defined in RFC 792).
Recall the TTL (Time to Live) IP header field in an IP
packet. The TTL is designed to prevent packets from
running in loops in an internet.

Computer Networks - 1/15


1/15
Traceroute
159.334 Computer Networks

When a TTL reaches a value of zero, the packet has


expired and is discarded by the router. In doing so, the
router sends an ICMP Time Exceeded Message back to
the sender, and thus identifying itself to the sender.
A TTL value of one should produce a message from the
first router, a TTL value of two should produce a
message from the second router, and so forth.
Hence, by sending a series of packets and incrementing
the TTL value with each successive packet, traceroute
finds out who all the intermediate hosts are.

Computer Networks - 1/16


1/16
Traceroute
159.334 Computer Networks

Example for Windows XP:


At the command prompt, type:
‘tracert rmit.edu.au’ or ‘tracert 131.170.40.30’
Computer Networks - 1/17
1/17
Address Resolution Protocol (ARP)
159.334 Computer Networks

In a broadcast-based network such as Ethernet, hosts


must know the hardware address (machine address) of
other hosts to communicate on a network.
The Address Resolution Protocol (ARP), which is part of
the TCP/IP Internet layer, obtains hardware addresses of
hosts on the same physical network. ARP is formally
defined in RFC 826.
ARP uses a local broadcast of the destination IP address
to acquire the hardware address of the destination host
or gateway.

Computer Networks - 1/18


1/18
ARP
159.334 Computer Networks

After the ARP obtains the hardware address, both the IP


address and hardware address are stored as an entry in
the ARP cache. The ARP cache is consulted before
initiating another ARP request broadcast.
Reverse Address Resolution Protocol (RARP) obtains IP
addresses given a host’s hardware address.

Computer Networks - 1/19


1/19
ARP – Resolving a Local IP Address
159.334 Computer Networks

Prior to any communication between hosts, the IP


address of each host must be resolved to the host’s
hardware address. The process includes an ARP
request and an ARP reply.

Computer Networks - 1/20


1/20
ARP – Resolving a Local IP Address
159.334 Computer Networks

Example: Ping a local host at 131.170.185.32


ping
ping131.170.185.32
131.170.185.32

1 ARP Cache ARP Cache

√ 131.170.185.31 08004… + 131.170.185.31 08004…

2
ARP
Broadcast
3

IP Address = 131.170.185.31 4 IP Address = 131.170.185.32


Hardware Address = 08004… Hardware Address = 08007…

Computer Networks - 1/21


1/21
ARP – Resolving a Local IP Address
159.334 Computer Networks

1. In this case, IP confirms that the IP address is for the local network.
The source host then check its own ARP cache for the IP
address/hardware address mapping of the destination host.
2. Finding no mapping, the source host broadcasts an ARP request.
The source host’s IP address and hardware address are included in
the request.
3. Each host on the local network receives the broadcast and checks
for a match to its own IP address. If there is no match, the request
is ignored.
4. The destination host determines that the IP address matches its
own IP address and sends an ARP reply containing its hardware
address directly to the source host. It then updates its ARP cache
with the IP address/hardware address mapping of the source host.
Communication is established when the source host receives the
reply.

Computer Networks - 1/22


1/22
ARP – Resolving a Remote IP Address
159.334 Computer Networks

In this situation, the ARP broadcast is for the IP address


of the gateway/router rather than the IP address of the
destination host.

Computer Networks - 1/23


1/23
ARP – Resolving a Remote IP Address
159.334 Computer Networks

Example: Ping a remote host at 131.170.100.55


ping
ping131.170.100.55
131.170.100.55

4
1 ARP Cache ARP Cache

√ 131.170.185.31 08004… 3 + 131.170.100.1 08006…

ARP Cache
131.170.185.1 131.170.100.1
08005… Router 08006…
ARP A B
Broadcast

2
5 ARP for
IP Address = 131.170.185.31 Router B IP Address = 131.170.100.55
Hardware Address = 08004… Hardware Address = 08009…

Computer Networks - 1/24


1/24
ARP – Resolving a Remote IP Address
159.334 Computer Networks

1. In this case, IP confirms that the IP address is for a remote network.


Next, the source host checks the local routing table for a route to
the destination host or network. If no mapping is found, the source
host determines the IP address of the gateway/router. The source
host then check its own ARP cache for the IP address/hardware
mapping of the specified gateway.
2. Finding no mapping, the source host broadcasts an ARP request to
the gateway’s address. The router responds to the source host’s
ARP request with its hardware address. The source host then
sends the data packet to the router to deliver to the destination
host’s network, and ultimately the destination host.

Computer Networks - 1/25


1/25
ARP – Resolving a Remote IP Address
159.334 Computer Networks

3. At the router, IP determines whether the destination is local or


remote. If it is local, the router uses ARP (either cache or
broadcast) to obtain its hardware address. If it is remote, the
router checks its routing table for a specified gateway, and then
uses ARP (either cache or broadcast) to obtain the gateway’s
hardware address. The packet is sent directly to the next
destination host.
4. After the destination host receives the request, it formulates an
ICMP echo reply. The local routing table is checked for a specified
gateway to the source host’s network. When it finds the gateway,
ARP obtains its hardware address.
5. If the specified gateway’s address is not in the ARP cache, an ARP
request which is broadcasted is sent. Once it obtains the hardware
address, the ICMP reply is sent to the router to be routed to the
source host.
Computer Networks - 1/26
1/26
ARP Packet Structure
159.334 Computer Networks

Bit: 0 8 16 31
Hardware Type Protocol Type
HLEN PLEN Operation
28 Sender HA (octets 0-3)
octets Sender’s HA (octets 4-5) Sender’s PA (octets 0-1)
Sender’s PA (octets 2-3) Target’s HA (octets 0-1)
Target’s HA (octets 2-5)
Target’s PA (octets 0-3)

Hardware Type: the type of hardware (Network Access


Layer) being used.
Protocol Type: the protocol being used for the resolution
process using the EtherType value. Hence the Protocol
Type for IP is 0x08-00.
Computer Networks - 1/27
1/27
ARP Packet Structure
159.334 Computer Networks

HLEN: Hardware Address Length. Length in bytes of the hardware


address. For Ethernet and Token Ring, the length is 6 bytes.
PLEN: Protocol Address Length. Length in bytes of the protocol
address. For IP, the length is 4 bytes.
Operation (Opcode): the operation field specifies the operation
being performed.
Sender’s HA: the hardware address of the sender (the ARP
requester).
Sender’s PA: the protocol address of the sender (the ARP
requester).
Target’s HA: the hardware address of the target (the ARP
responder).
Target’s PA: the protocol address of the target (the ARP responder).

Computer Networks - 1/28


1/28

You might also like