Você está na página 1de 27

Advanced Networks CC531

Week 06 Internet Protocol (IP)

Internet Protocol (IP) Internet Control Message Protocol (ICMP) Address Resolution Protocol(ARP) Internet Group Management Protocol(IGMP)

Internet Protocol (IP)


IP is a protocol that enables the connection of individual (often local) networks into a worldwide Internet In the IP protocol, each network interface has at least one IP address
For IP version 4 is 4 bytes For IP version 6 is 16 bytes

In the IP the basic unit of transferred data is called an IP datagram


3

Internet Protocol (IP) cont


The IP consists of several individual protocols
The actual IP.
Internet Control Message Protocol(ICMP): serves specifically to signal abnormal states. Address Resolution Protocol(ARP) is often seen as an independent protocol because its packets are not encapsulated in IP datagrams.

Internet Group Management Protocol(IGMP): serves for local transportation of multicasts.

Internet Protocol (IP) cont


Why are two protocols needed? Why is one link protocol not enough? A link protocol only serves for transporting data within a LAN
for transporting to the nearest router, which unpacks the data from the link framework and repacks the data into a different link frame

A different link protocol may be used at each interface of a router


5

Internet Protocol (IP) cont


the link protocol only transports data frames to the next router IP transports data between two remote computers Each router throws away the envelope in which the data is wrapped on a link layer and creates a new one IP datagram (IP packet) is not changed by the router
6

Internet Protocol (IP) cont


An exception is the Time To Live(TTL) entry in the IP datagram header When the TTL entry reaches 0, the IP datagram is thrown away

Internet Protocol (IP) cont


A sender from the local Ethernet 1 network sends an IP datagram to a recipient on the Ethernet 2 network

It creates an IP datagram and insert it into a link frame (in our case, Ethernet) The data can only travel through the link protocol to router 1 The router unpacks the IP datagram from the Ethernet frame and looks at the recipient's IP address
8

Internet Protocol (IP) cont


Based on its routing table, the router decides to which of its neighboring routers the IP datagram should be sent

Internet Protocol (IP) cont


The router lowers the value of TTL entry by 1 Inserts the IP datagram into a different link protocol

IP datagram is transported via the HDLC protocol to the next router

The second router does the following


unpacks the IP datagram from the HDLC envelope lowers the value of the TTL entry Wraps the IP datagram in an Ethernet envelope, inserts it into the destination LAN.
10

Internet Protocol (IP) cont


Although the same link protocol is used in network 2 (i.e. Ethernet) , but the link frames are different
the senders Ethernet frame has the sender's HW1 address and the recipient's HW2 address the recipient's LAN, an Ethernet frame is also used, but the sender's address is HW4 and the recipient's address is HW5

11

Internet Control Message Protocol (ICMP)


ICMP is a service protocol that is part of IP Is used to signal abnormal events in networks built on the IP protocol It wraps its packets into an IP datagram
ICMP packet header is always 8-bytes long The first four bytes of the header always contain
the message type message code 16-bit checksum
12

13

Internet Control Message Protocol (ICMP)


cont

14

Internet Control Message Protocol (ICMP)


cont

Echo
can be used to test the accessibility of particular nodes in the Internet The applicant sends an 'Echo request' ICMP packet and the destination node is obliged to reply with an ICMP 'Echo' packet. ping program can be used to send an echo request to the destination junction

15

Internet Control Message Protocol (ICMP)


cont

Destination Unreachable
If the IP datagram cannot be transmitted further to the recipient, then it is thrown away, and the sender is informed with the ICMP 'Destination Unreachable' message

16

Internet Control Message Protocol (ICMP)


cont

Redirect
Router 1 receives an IP datagram that needs to be forwarded to another address thorough the same network interface through which the IP datagram came
It forwards the IP datagram, but uses an ICMP redirect packet to instruct the sender to change its own routing table and not to ask for such strange services anymore This situation occurs mostly when we have several routers on the local network, but individual PCs on a LAN only have one default entry pointing to one of the routers after startup 17

Internet Control Message Protocol (ICMP)


cont

ICMP Router Discovery


It gives the service not to manually configure any default entries in the routing table of LAN computers
After startup, the computer sends an ICMP 'Router Solicitation' message The routers on the LAN reply with an ICMP 'Router Advertisement' message packet The packet contains the address of the router, the length of the address The computer can automatically generate the default entry from the reply.
18

Internet Control Message Protocol (ICMP)


cont

Time Synchronization
Using this ICMP packet, a destination computer is asked for the time The source computer enters the time of the request that was sent into the ICMP 'Timestamp request' packet. The destination computer enters 'Timestamp reply' two times into its reply:
The time when the request was received The time when the reply was sent
19

Internet Control Message Protocol (ICMP)


cont

By subtracting the time the request was sent from the time the reply was received, the traveling time from the source computer to the destination computer and back (Round Trip Time(RTT)) is deduced.

20

ARP Protocol
ARP can get the link address of an opposite station when you know its IP address
ARP sends a link broadcast to the LAN (link address FF:FF:FF:FF:FF:FF). Asking for the station of IP2 The IP2 station hears the message and replies. Itstates its link address (HW2) in its reply
21

ARP Protocol cont


ARP packets are wrapped directly into the Ethernet, i.e., they are not preceded by an IP header. The ARP protocol is in fact independent of the IP protocol.

22

ARP Protocol cont


Proxy ARP
The ARP protocol only works within a LAN.
There cannot be a router between the requesting and replying computers. The reason is simple: the destination address in the request is a broadcast, which is not forwarded by routers. But what to do when you have two or more parts of a LAN separated by a router? The solution is a proxy ARP. Proxy ARP runs on a router.
23

ARP Protocol cont


The computer wants to use an ARP request to find out the link address for an IP address A that belongs to the second part of the LAN behind the router. The router cannot let this request go through, but if it is configured with proxy ARP, it will reply that its own link address corresponds to IP address A. If the computer wants to send a link frame to A, it addresses the router, which then forwards the IP datagram to destination computer A.
24

Internet Group Management Protocol (IGMP)


Like ICMP, IGMP is a service protocol for IP IGMP packets are wrapped into IP datagrams

It is used for forwarding multicast packets


If the multicasts were forwarded as avalanches without any control, the data could be gradually duplicated (flooding) The IGMP protocol solves multicast forwarding within a LAN
25

Internet Group Management Protocol (IGMP) cont


How it works
For each IP address of a multicast on the LAN, a group of the multicast's members is defined

The routers keep a list of these groups


If any computer on the LAN is a member of a particular group, the routers will begin to forward the individual multicasts to the LAN When the last member leaves the group, the multicast forwarding on the LAN is terminated
26

References
Libor Dostalek, Alena Kabelova,Understanding TCP/IP a clear and comprehensive guide to TCP/IP protocols, Packet publishing 2006

27

Você também pode gostar