Download lecture04-arp

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Multiprotocol Label Switching wikipedia , lookup

SIP extensions for the IP Multimedia Subsystem wikipedia , lookup

Point-to-Point Protocol over Ethernet wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

CAN bus wikipedia , lookup

Internet protocol suite wikipedia , lookup

Wake-on-LAN wikipedia , lookup

I²C wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Transcript
Routing & Switching
Umar Kalim
Dept. of Communication Systems Engineering
[email protected]
http://www.niit.edu.pk/~umarkalim
03/04/2007
Spring 2007
1
Outline
ARP, RARP
ICMP
Spring 2007
2
A packet using one logical addressing
scheme may pass through networks with
different physical layer technologies
Thus we need to consider two different and
independent addressing schemes; logical and
physical
Spring 2007
4
Problem
Whenever a host needs to send a message to
another host, it has the IP address.
However the IP datagram must be encapsulated
in a frame (by the MAC layer) so that it may be
delivered over the physical layer
Hence the need for the physical address
The only way to get the physical address is to
have a mapping scheme
Spring 2007
5
Dynamic mapping
Each time the machine knows one of the
two addresses (physical or logical) it can
obtain the other
Spring 2007
10
ARP & RARP
Protocols defined for the dynamic mapping of
logical and physical addresses
Spring 2007
11
ARP & RARP
ARP: Address Resolution Protocol
RARP: Reverse Address Resolution Protocol
Use unicast and broadcast physical addresses
Position of ARP & RARP in the TCP/IP stack
Spring 2007
12
ARP
Instead of maintaining a static table, we can
obtain the physical address at runtime
– This is where ARP comes in
ARP associates an IP address with a physical
address
On a typical network, each interface is identified
by a physical address
Spring 2007
13
ARP
Spring 2007
16
ARP packet format
16-bits: type of
network e.g.
Ethernet 1
8-bits: length of
logical address
e.g. IPv4 4
Spring 2007
16-bits: protocol
e.g. IPv4 080016
8-bits: length of
physical
address e.g.
Ethernet 6
Variable length
field
17
Encapsulation
ARP packet is encapsulated into a data-link
frame
Ethernet frame
Spring 2007
18
Four cases
Spring 2007
21
Spring 2007
24
Proxy ARP
Proxy ARP is used to create subnetting effect
Proxy ARP: An ARP that acts on behalf of a set
of hosts
– Whenever a router receives an ARP request which
asks for the physical address of any one of the hosts
it is representing, the router responds with its own
physical address
Spring 2007
25
Proxy ARP
Spring 2007
26
ARP’s Hypothetical Implementation
The software package would include five
modules:
–
–
–
–
–
Cache table
Queues
The output module
The input module and a
Cache control module
Spring 2007
27
Spring 2007
28
Cache table
FREE,
PENDING and
RESOLVED
Hardware type, Protocol type, hardware length,
protocol length, interface number
Spring 2007
30
RARP
Reverse Address Resolution Protocol
Spring 2007
43
RARP
Spring 2007
46
Encapsulation
Spring 2007
47
Alternates to RARP
BOOTP
DHCP
Spring 2007
48
ICMP
Spring 2007
49
Why ICMP?
IP provides connectionless & unreliable (besteffort) datagram delivery
IP has deficiencies
– Lack of error control/correction
 What if something goes wrong?
– Router drops a packet, how to know?
– TTL is decremented by one at each hop, how will the
source know that TTL has reached 0
– Lack of host and management queries
 Host is alive or not? Misc information is required, how to
fetch?
Spring 2007
50
ICMP w.ref.t Network layer
Supporting protocol for IP
– As is ARP and RARP
– ICMP is shown above, since ICMP datagrams are
not sent to the data-link layer directly. They are
encapsulated in IP datagrams and then forwarded
Spring 2007
51
ICMP Encapsulation
IPheader.protocol = 1
Spring 2007
52
Types of ICMP Messages
Errors which a router or
a host (destination) may
encounter
Spring 2007
Query messages to get
specific information from
a router or a host.
Always occur in pairs
53
ICMP Messages
Spring 2007
54
Message Format
An ICMP message has an 8-byte header and a
variable-size data section
The general format of the header is different for
each message type yet the first 4 bytes are
common to all
Spring 2007
55
Error Messages
Spring 2007
56
Error Reporting vs Error Correction
ICMP does not
– Provide interaction between a router and the source
of trouble
– Maintain state information (each packet is handled
independently)
When a datagram causes an error, ICMP can
only report the error condition back to the
original source of the datagram
Spring 2007
57
Error Reporting
Note:
ICMP always reports error messages
to the original source.
Spring 2007
58
Note:
The following are important points about ICMP
error messages:
❏ No ICMP error message will be generated in response
to a datagram carrying an ICMP error message.
❏ No ICMP error message will be generated for a
fragmented datagram that is not the first fragment.
❏ No ICMP error message will be generated for a
datagram having a multicast address.
❏ No ICMP error message will be generated for a
datagram having a special address such as 127.0.0.0 or
0.0.0.0.
Spring 2007
59
Error Messages
Spring 2007
60
Destination unreachable ~ 3
Generated by the router to inform the client
that the destination host is unreachable
Reasons for this message may include the
– physical connection to the host does not exist
(distance is infinite),
– the indicated protocol or port is not active, or
– the data must be fragmented but the 'don't fragment'
flag is on
 http://en.wikipedia.org/wiki/ICMP_Destination_Unreachabl
e
Spring 2007
61
Destination unreachable ~ 3
Defined codes for each type of failure
– Refer to the book for the values
Spring 2007
62
Source Quench ~ 4
Message which requests the sender to decrease
the traffic rate of messages to a router or host
Generated if the router or host does not have
sufficient buffer space to process the request,
or may occur if the router or host's buffer is
approaching its limit
 http://en.wikipedia.org/wiki/ICMP_Source_Quench
Spring 2007
63
Source Quench ~ 4
No mechanism for Flow-control in IP
A source-quench message informs the source that a
datagram has been discarded due to congestion in a
router or the destination host
The source must slow down the sending of datagrams
until the congestion is relieved
One source-quench message is sent for each datagram
that is discarded due to congestion
Spring 2007
64
Time exceeded ~ 11
Generated by a gateway to inform the source of
a datagram that the datagram has been discarded
due to the time to live field reaching zero
message may also be sent by a host if it fails to
reassemble a fragmented datagram
 http://en.wikipedia.org/wiki/ICMP_Time_Exceeded
Spring 2007
65
Parameter Problem ~ 12
Sent to the source host for any problem not
specifically covered by another ICMP message
– 0 ~ ambiguous
– 1 ~ missing option field
Spring 2007
66
Redirection ~ 5
Spring
2007
 http://www.tcpipguide.com/free/t_ICMPv4RedirectMessages.htm
67
Redirection ~ 5
Spring 2007
68
Questions?
That’s all for today!
Spring 2007
69