Sie sind auf Seite 1von 4

Internet Layer

Once TCP and UDP have segmented the data and have added their headers, they send the segment
down to the Network layer. The destination host may reside in a different network far from the host
divided by multiple routers. It is the task of the Internet Layer to ensure that the segment is moved across
the networks to the destination network.

The Internet layer of the TCP/IP model corresponds to the Network layer of the OSI reference model in
function. It provides logical addressing, path determination and forwarding.

The Internet Protocol (IP) is the most common protocol that provides these services. Also working at this
layer are routing protocols which help routers learn about different networks they can reach and
the Internet Control Message Protocol (ICMP) that is used to send error messages across at this layer.

Almost half of the book is dedicated IP and Routing protocols so they will be discussed in detail in later
chapters, but the following sections discuss these protocols in brief.

Internet Protocol (IP)


The Internet layer in the TCP/IP model is dominated by IP with other protocols supporting its purpose.
Each host in a network and all interfaces of a router have a logical address called the IP address. All
hosts in a network are grouped in a single IP address range similar to a street address with each host
having a unique address from that range similar to a house or mailbox address. Each network has a
different address range and routers that operate on layer 3 connect these different networks.

As IP receives segments from TCP or UDP, it adds a header with source IP address and destination IP
address amongst other information. This PDU is called a packet. When a router receives a packet, it
looks at the destination address in the header and forwards it towards the destination network. The
packet may need to go through multiple routers before it reaches the destination network. Each router it
has to go through is called a hop.

Figure 1-14 Packet flow in internetwork


Consider the Internetwork shown in Figure 1-14 to understand the routing process better. When Host1
needs to send data to Host2, it does not get routed because the hosts are in the same network range.
The Data Link layer takes care of this. Now consider Host1 sending data to Host3. Host1 will recognize
that it needs to reach a host in another network and will forward the packet to Router1. Router1 checks
the destination address and knows that the destination network is toward Router2 and hence forwards it
to Router2. Similarly Router 2 forwards the packet to Router3. Router3 is directly connected to the
destination network. Here the data link layer takes care of the delivery to the destination host. As you can
see, the IP address fields in the IP header play a very important role in this process. In fact IP addresses
are so important in a network that the next Chapter is entirely dedicated to it!

Figure 1-15 IPv4 Header


There are various versions of the Internet Protocol. Version 4 is the one used today and version 6 is
slowly starting to replace it which is why it’s presence has increased on the CCNA Routing & Switching
200-120 exam compared to previous CCNA exam versions. Figure 1-15 shows the header structure of
IPv4. The following fields make up the header:

Version – IP version number. For IPv4 this value is 4.

Header Length – This specifies the size of the header itself. The minimum size is 20 bytes. The figure
does not show the rarely used options field that is of a variable length. Most IPv4 headers are 20 bytes in
length.

DS Field – The differentiated Services field is used for marking packets. Different Quality-Of-Service
(QoS) levels can be applied on different markings. For example, data belonging to voice and video
protocols have no tolerance for delay. The DS field is used to mark packets carrying data belonging to
these protocols so that they get priority treatment through the network. On the other hand, peer-to-peer
traffic is considered a major problem and can be marked down to give in best effort treatment.

Total Length – This field specifies the size of the packet. This means the size of the header plus the size
of the data.

Identification – When IP receives a segment from TCP or UDP; it may need to break the segment into
chucks called fragments before sending it out to the network. Identification fields serves to identify the
fragments that make up the original segment. Each fragment of a segment will have the same
identification number.

Flags – Used for fragmentation process.

Fragment Offset – This field identifies the fragment number and is used by hosts to reassemble the
fragments in the correct order.

Time to Live – The Time to Live (TTL) value is set at the originating host. Each router that the packet
passes through reduces the TTL by one. If the TTL reaches 0 before reaching the destination, the packet
is dropped. This is done to prevent the packet from moving around the network endlessly.

Protocol – This field identifies the protocol to which the data it is carrying belongs. For example a value
of 6 implies that the data contains a TCP segment while a value of 17 signifies a UDP segment. Apart
from TCP and UDP there are many protocols whose data can be carried in an IP packet.

Header Checksum – This field is used to check for errors in the header. At each router and at the
destination, a cyclic redundancy check performed on the header and the result should match the value
stored in this field. If the value does not match, the packet is discarded.

Source IP address – This field stores the IP address of the source of the packet.

Destination IP address – This field stores the IP address of the destination of the packet.

Figure 1-16 Source and Destination IP address


Figure 1-16 shows how Source and Destination IP address is used in an IP packet. Notice how the
source and destination addresses changed during the exchange between HostA and HostB

Routing Protocols
In Figure 1-14, Router1 knew that it needed to send the packet destined to Host3 toward Router2.
Router2 in turn knew that the packet needed to go toward Router3. To make these decisions, the routers
need to build their routing table. This is a table of all networks known by it and all the routers in the
internetwork. The table also lists the next router towards the destination network. To build this table
dynamically, routers use routing protocols. There are many routing protocols and their sole purpose is to
ensure that routers know about all the networks and the best path to any network. Chapter 4 and Chapter
5 discuss the routing process and some routing protocols in detail.

Das könnte Ihnen auch gefallen