Switched Ethernet
V: The IP protocol version (6) Class: Enables QoS provision
Flow Label: Identifies traffic flows IPL: Payload length
Hop: Maximum hops before being discarded Next: Identifies next header
SRC: Source IPv6 address DST: Destination IPv6 address Data: Data, variable length ToS: Enables QoS provision
IPv4 Datagram IPv6 Datagram
Data
Each 32-bit address is divided into two fields:
1. Network field, assigned by the Internet Network Information Cen- ter (InterNIC) and is used to identify a network.
2. Host field, assigned by the Network Administrator and is used to identify a host on a network.
The size of each field varies depending on the type of address (see Figure 2.21), so it is necessary to use a mask to obtain Network and Host identifiers. The Mask must be supplied and stored in the routing tables because the routing tables are used for assessing each field, of every, IP address.
Figure 2.21 Relationship between the IP address, the network mask, the network address and conversion between the binary and the dotted decimal representations. The 32-bits mask has binary 1s in all bits specifying the network field and 0s in the host.
00111110000101100010000100000001 Mask 11111111111100000000000000000000 62.22.33.1 255.240.0.0 Bin. Dec. AND 00111110000100000000000000000000 62.16.0.0 Network Address 1 Network 32 IP addresses bits Host IP Address 1 Network 32 bits Host 1 Network 32 bits Host 8 16 24 Class A Class B Class C Network Host
IPv4 addresses are organized into five different classes: A, B,C, D, and E being high-order bits to indicate the class (see Table 2.1). Networks can also be divided into subnetworks to be managed by local administrators to make IP addressing more efficient and flexible.
IP Routing
The forwarding mechanism used by IP networks is known as
routing. IP routing is connectionless because IP datagrams do not
follow a preestablished path. Instead, IP routers compute the path for each individual datagram. The resulting path may or may not be the same for all them. Each IP router has one or several routing tables to indicate the next hop to jump. Router involvement in the routing process is limited to forwarding packets based on routing tables. These tables are built based on information provided by specialised counting protocols such as Intermediate System - Intermediate System (IS-IS) protocol, Open Shortest Path First (OSPF) and Routing Information Protocol (RIP), or Border Gateway Protocol (BGP).
Routing is very different in nature to the Ethernet bridging. Ethernet bridges are cheaper and faster than routers but on the other hand, routing is more scalable and technology agnostic. Global communications through the Internet would not be possible without the routing paradigm.
Address class First byte (binary) Address range (decimal) Number Class A 0xxxxxxx 0.0.0.0 ~ 127.255.255.255 2,147,483,648 Class B 10xxxxxx 128.0.0.0 ~ 191.255.555.555 1,073,741,824 Class C 110xxxxx 192.0.0.0 ~ 223.255.255.255 536,870,912 Class D 1110xxxx 224.0.0.0 ~ 239.255.255.255 268,435,456 Class E 1111xxxx 240.0.0.0 ~ 255.255.255.255 268,435,456 Table 2.1 Internet address classes
IP addressing in Ethernet Networks
Hosts within large Ethernet networks are commonly identified by their IP addresses, rather than their MAC addresses. This fact not only means that hosts are independent of their MAC addresses, it also means that a network host can be attached to different Layer 2 and Layer 1 technologies whenever they keep a common Layer 3 scheme.
Internet Control Message Protocol
IP networks not monitor whether the packets get to final destination, nor does IP provide for error reporting when routing anomalies occur. This task is executed by the ICMP protocol. The Internet Control Message Protocol (ICMP) is a network layer Internet protocol that provides mechanisms to report errors and other information regarding IP packet processing back to the source. It is used for error reporting and analysis, transferring messages from routers and stations, and for reporting network configuration and performance problems.
ICMP generates several kinds of useful messages, including
Destination Unreachable, Echo Request and Echo Reply, Redirect, Time Exceeded, and Router Advertisement and Router Solicitation.
The ICMP functionality includes: Report network errors, Congestion indication, Troubleshooting assistance, Announce packet time-outs when TTL field is set to zero.
Address Resolution Protocol
Imagine that a source host is willing to send a data packet to a destination host but only has its IP address. To get the destination MAC address the source has to broadcast an Address Resolution
Protocol (ARP) packet which contains the IP address of the
destination host and then wait for a response that contains the MAC address. RFC 826 describes the ARP.
ARP in a segment
First case (see Figure 2.22). Imagine a source and a destination host are attached to the same Ethernet network:
1. Host J wants to send information to host K but only knows its IP address.
2. Host J broadcasts an ARP packet.
3. Host K responds to the request, the rest of the hosts ignore it. 4. Host J receives the response and matches the MAC and IP
addresses of host K.
5. Data transmission from host J to K can now start.
ARP in different LAN segments
Second case (see Figure 2.23). Imagine source and destination hosts attached to different segments connected by a router in a LAN. The router is configured as ARP proxy:
J
10.0.0.2 (IP add)
00:51:04:D0:B7:FA (MAC add)
10.0.0.3 (IP add)
00:51:04:D0:B7:FB (MAC add)
Figure 2.22 ARP operation when source and destination hosts are both in the same Ethernet network.
1 4 5 K 2 M N 3 Source Destination
1. Host J wants to send information to host S but only knows its IP address.
2. Host J broadcasts an ARP packet containing the destination IP address.
3. The router receives the ARP and reads the network field of the destination IP address. The router finds out that the K host is in the other segment and immediately the router responds to the ARP with its own router MAC address.
4. Host J receives the response and matches the MAC address of the router to the IP address of host S.
5. Host J starts sending IP data to the destination using the router MAC address.
6. The router forwards IP data packets to host S through the outgoing interface indicated by its routing table.
10.0.0.2 (IP)
00:50:04:D0:B7:FA (MAC)
Figure 2.23 ARP operation when source and destination hosts are in different Ethernet networks and the information is forwarded between them by a router.
2