12 Network Layer 2
12 Network Layer 2
Address Mapping
The delivery of a packet to a host or a router requires two
levels of addressing: logical and physical.
We need to be able to map a logical address to its
corresponding physical address and vice versa.
This can be done by using either static or dynamic mapping.
Static mapping: creating of a table that associates a logical
address with a physical address.
Dynamic mapping: uses a protocol.
Cache Memory: ARP reply can be cached (kept in cache memory for a
while) to improve efficiency.
ARP packet
An ICMP message has an 8-byte header and a variable size data section.
First 4 bytes are common for all ICMP messages.
The code field specifies the reason for the particular message type.
ICMP always reports error messages to the original source because
the only information available in the datagram about the route is the
source and destination IP addresses.
All error messages contain a data section that include the IP header of
the original datagram plus the first 8 bytes of data in that datagram.
The header of the original datagram provides information to the source
about the datagram itself.
The 8 byte of the data are included because it provides information
about the port numbers (UDP & TCP) and the sequence number (TCP).
Codes
0 Time to Live exceeded in Transit
1 Fragment Reassembly Time
Exceeded
0 invalid IP header
ICMP Query
ICMP Query
0 No code
ICMP Query
Ping
IGMP Messages
IGMP has three types of messages: the query, the
membership report, and the leave report.
There are two types of query messages, general and special.
1/10 sec
The value is non-zero
for query messages
and zero for other two
IGMP Operation
A multicast router connected to a
network has a list of multicast
addresses of the group with at
least one loyal member in the
network.
For each group there is one
router with duty of distributing
multicast packets for that group.
Lists of groups for each router
are mutually exclusive (i.e. only
one multicast router is
responsible for each group). A
router can also be a member of a
group.
Routers R1 and R2 can be distributors for one or several groups from the
list of router R, but for other networks, not for the network above.
Membership report
Leave Report
When a host sees that no process is interested in a specific group G, it sends a
leave report.
If router receives a leave report it wont purge the list if there are still other
hosts interested in that group.
For that purpose the router sends a special query message with a specified
response time for the group in question to see if there is anyone interested in
that group.
If there is no response a membership report, it purges the list.
No group specified
Delayed response
In order to keep the traffic low the response to general query message
must be done by only one host for a given group. This is achieved with
delayed response:
When a host receives general query message it delays the response: it
sets a timer for each group to a different random value between 0 and
10 seconds, then broadcasts the response(s) according to the timers.
If the host receives a response from another host, whose timer for
that group has expired earlier, the host cancels the corresponding
timer and doesnt send the duplicate response for the group.
Only one router on the LAN is designated for sending the query
messages the query router. This further reduces the traffic.
Solution
Four messages are sent
instead of 7 messages