www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / CompTIA / Network+ / Section I: Networking Concepts / Chapter 2: Matching Network Components with OSI Layers / Layer 3 Network Components

Layer 3 Network Components

As described in Chapter 1, the Network Layer-specific PDU is a packet. As data comes down from the Transport Layer, the Network Layer places its Layer 3 header in front of the segment received and this group becomes a packet (or a datagram). The Layer 3 header contains very important fields, including the logical address (IP address) of both the source device and the destination device.

As the frame is passed down to the Physical Layer, the information is converted into 0 and 1 bits that are sent over physical media using, for example, electrical signals (for copper links). The data is sent over the wire using a wide variety of methods, such as Ethernet, Token Ring, or other technologies.

 

Network Layer Addresses

Although each network interface has a unique MAC address, this does not indicate the location of a specific device or what network it is attached to. This means that a router can’t determine the best path to that device. In order to solve this problem, Layer 3 addressing is used. Network Layer addresses are logical addresses assigned when a device is placed in the network and changed when the device is moved.

Network Layer addresses have a hierarchical structure made of two parts: the network address and the host address. Logical addresses can be assigned manually by the administrator or dynamically via a dedicated protocol, like Dynamic Host Configuration Protocol (DHCP). All the devices in a network have the same network portion of the address and different host identifiers. This addressing structure can be observed in Figure 2.10 below, both for IPv4 and for IPv6. IPv4 and IPv6 address structures will be covered in detail in subsequent sections of this chapter.

  2.10

Figure 2.10 – Network Layer Addressing Structure

 

Routers analyze the network portion of IP addresses and compare them with entries from its routing table. If a match is found, the packet is sent out of the appropriate interface. In the case of directly connected devices, routers also examine the host portion of the address to ensure that the packet will be sent to the appropriate device. The router uses the Address Resolution Protocol (ARP) to determine the MAC address of the device with a specific IP address and encapsulates the packet with a header that contains that specific MAC address before sending it on the wire.

 

IPv4 Addresses

IPv4 addresses are 32-bit numbers represented as strings of zeros and ones. As mentioned before, the Layer 3 header contains a Source IP Address field and a Destination IP Address field. Each field is 32 bits in length.

To create a more intuitive representation of IPv4 addresses, the 32 bits can be divided into 4 octets (1 octet (or byte) = 8 bits) separated by dots. This representation is called dotted-decimal notation. The octets can be converted into decimal numbers using standard base-2 to base-10 translation.

For example, consider the following 32-bit string:

11000000101010001000000010101001

After dividing it into 4 octets, you have the following binary representation:

11000000.10101000.10000000.10101001

This translates into an easy to read decimal representation:

192.168.128.169

An IPv4 packet contains the following fields, as depicted in Figure 2.11 and Table 2.2 below:

 2.11

Figure 2.11 – IPv4 Packet Fields

 

Table 2.2 – Size and Description of IPv4 Packet Fields

Field

Size

Description

Version

4 bits

Identifies the IP version (IPv4 in this case)
Header Length

4 bits

Size of the header
Type of Service (ToS)

8 bits

QoS marking, specifies how the packet should be handled within the network
Total Length

16 bits

The size (in octets) of the header and data
Identification

16 bits

Used when the packet is fragmented
Flags

3 bits

Used when the packet is fragmented
Fragment Offset

13 bits

Used when the packet is fragmented
Time To Live (TTL)

8 bits

Protection against endless loops, decremented by 1 on every router the packet passes through
Protocol

8 bits

Identifies the Layer 4 protocol (TCP, UDP)
Header Checksum

16 bits

The checksum of the header, used to verify its integrity
Source IP Address

32 bits

Source logical IP address
Destination IP Address

32 bits

Destination logical IP address
IP Options

Variable

Used for debugging
Padding

Variable

Used for debugging
Data

Variable

Transport Layer data

 

IPv6 Addresses

The limited number of IPv4 addresses and the permanent increase in the number of addressable network devices all over the world has accelerated the implementation of IP version 6. IPv6 addresses have a different structure compared with IPv4 addresses. IPv6 addresses are 128 bits long, which means that a larger pool of IPv6 addresses is available. The notation of IPv6 addresses is also different: while an IPv4 address can be written in decimal format, an IPv6 address is notated in hexadecimal format (16 bits separated by colons), for example, 2001:43aa:0000:0000:11b4:0031:0000:c110.

An IPv6 packet contains the following fields, as depicted in Figure 2.12 and Table 2.3 below:

 2.12

Figure 2.12 – IPv6 Packet Fields

 

Table 2.3 – Size and Description of IPv6 Packet Fields

Field

Size

Description

Version

4 bits

Identifies the IP version (IPv6 in this case)
Traffic Class

8 bits

Similar to the ToS byte in the IPv4 header, QoS marking functionality
Flow Label

20 bits

Used to identify and classify packet flows
Payload Length

16 bits

The size of the packet payload
Next Header

8 bits

Similar to the Protocol field in the IPv4 header, defines the type of traffic contained within the payload and which header to expect
Hop Limit

8 bits

Similar to the TTL field in the IPv4 header, prevents against endless loops
Source IP Address

128 bits

Source logical IPv6 address
Destination IP Address

128 bits

Destination logical IPv6 address
Data

Variable

Transport Layer data

 

IPv6 addresses are four times the size of IPv4 addresses. This size disparity will be covered in detail in Chapter 3.

 

Note:    Using the IEEE’s 64-bit Extended Unique Identifier (EUI-64) format, a network device can automatically assign itself an IPv6 address. This is done by referencing the unique 48-bit MAC address and reformatting the value so that it matches the EUI-64 specification.

 

 

Routers

From the Network+ standpoint, the most intelligent devices in a network are routers. Routers are Layer 3 devices that use Layer 3 addresses and allow devices in different LANs to communicate with each other. By default, they do not forward any information between devices connected to different ports.

  2.13

Figure 2.13 – Router Operations

 

Figure 2.13 above illustrates how a router operates, and this can be described as follows: the router reads the source and destination IP addresses in the packets and keeps track of which devices connect to which ports and which devices need to communicate with devices on other ports. A router separates broadcast domains, so devices connected to different ports are located in different broadcast domains. The process of moving a packet across different broadcast domains is called routing and it works by implementing different routing protocols on the router. Routing behavior is discussed further in Chapter 4.

Some important concepts to keep in mind regarding routers are as follows:

  • Routers block Multicast and Broadcast packets by default. This is a significant difference between a router and a switch, and it helps control bandwidth utilization on a network.
  • Devices connected to the same router port are in the same collision and broadcast domains, but devices connected to different router ports are in different collision and broadcast domains.
  • Routers are considered Layer 3 devices because they make forwarding decisions based on Layer 3 (IP) addresses.

 

Routing Logic

Routers are devices that operate at OSI Layer 3 and their responsibility is to determine the best path a packet can take to a specific destination. After the best path has been chosen, the packet is encapsulated with a new frame and the router places the packet on the interface that has a link to the next hop in that path.

The process of choosing the best path is called routing, and the process of sending the packet on the correct interface is called switching. Although routers are the most popular devices that make routing decisions, other network devices can have routing functionality, such as Layer 3 switches and security appliances.

A router is responsible for sending the packet the correct way and it doesn’t care about what is happening above the Network Layer. However, a router is concerned with what is happening at the Physical and Data Link Layers because it might need to receive data on certain media and send over a different media type. This is performed by decapsulating the packet received up to the Network Layer and encapsulating it with the header specific to the other media type.

An example that illustrates this behavior is depicted in Figure 2.14 below. Router A receives the packet over an Ethernet connection, re-encapsulates it with a Frame Relay header, and sends it to Router B, which manages the packet in the opposite way: it strips the Frame Relay header and encapsulates it in the Ethernet format before sending the packet to the receiver’s endpoint. Notice that the routers only care about the first three OSI layers.

 2.14

Figure 2.14 – Routing across Different Physical Media

 

Routers look at the packet’s destination address to determine where the packet is going so they can select the best path to get the packet there. To calculate the best path, routers must know what interface should be used to reach the packet’s destination network. Routers learn about networks either by being physically connected to them or by learning information from other routers or from a network administrator.

 

Encryption Devices

Even though data encryption is usually a function of Layer 6 (Presentation Layer) of the OSI reference model, or the Application Layer of the TCP/IP protocol suite, this technology does not always happen at these layers. Certain devices can implement Layer 2, Layer 3, or Layer 4 encryption. For example, special network equipment can be used to encrypt data between routers at a specific end of a WAN link and decrypt traffic at the other end using a Layer 3 approach.

Prev

Next

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.