|

[ACSA Education #32] Layer 3 Fundamentals

⏱️ Estimated reading time: Approx. 7 minutes (7 min read)

I have been posting about 30 ACSA-related training posts, focusing on Layer 2.
Now, let's go up a level from Layer 2 and talk about Layer 3.

Let's take a look at Layer 3 IP packets, routing, gateways, etc.
So, let's first take a look at what routing is.

Routing

We already know how devices communicate with each other on the same network (broadcast domain). Layer 2 switches use Layer 2 frame header information to forward frames to devices on the same LAN. Let's revisit Layer 3 communication, remembering that they create a MAC address table based on the source MAC address and forward frames based on the destination MAC address.

[ACSA 교육#32] Layer 3 기초 - image 8

Layer 3 routers move packets between different LANs or different broadcast domains based on IP addresses.

Old Explaining the OSI 7 layersWhile doing so, Layer 3 represents the network layer. Layer 3 devicesThey analyze the IP address and trace it from the origin to the destination. Routing that selects the most optimal path to transmit packets.

IP address

Basically, routing decisions are based on the analysis of addresses at Layer 3, where the Internet Protocol (IP) provides an identifier, or address, for each device within the network.

There are two versions of IP in common use today: IPv4 (version 4) and IPv6 (version 6). The main difference between these two versions is the address space. IPv4 can allocate approximately 4.29 billion IP addresses, while IPv6 can allocate only 340. undecillion (10 to the 36th power), which means it can be used almost without limit.

[ACSA 교육#32] Layer 3 기초 - image 11
Differences between IPv4 and IPv6

An IPv4 address consists of 32 bits, expressed in decimal notation. This notation is divided into four sections called octets. As the name suggests, each octet consists of 8 bits (1 byte). The figure below shows three hosts on the same LAN, each with a unique IP address.

[ACSA 교육#32] Layer 3 기초 - image 13

reference: Since an octet consists of 8 bits, one octet is a decimal number. From 0 to 255no see.

IPv4 address

An IP address consists of two parts: a network ID and a host ID. The network ID is the most important part, on the left side of the address, and identifies the network. The host ID is the right side of the address, and identifies the individual host.

The easiest way to understand network IDs and host IDs is to think of them as your home address.
You can think of the network ID as similar to a street name, and the host ID as similar to a building number.

[ACSA 교육#32] Layer 3 기초 - image 14

IPv4 addresses are always 32 bits. In some cases, 16 bits represent the network and the remaining 16 bits represent the host. In other cases, 24 bits represent the network and the remaining 8 bits represent the host. In almost all cases, there can be a combination of bits between the network and the host. The distinction between the network and the host is made by the subnet mask.

Network Mask

The network mask is an IP parameter that indicates the number of bits representing the network ID and host ID of an IP address. The 32-bit network mask is a required parameter for all IP network devices.

Network masks determine whether two devices (endpoints) are on the same network or different networks. This process is accomplished through a simple comparison.

If the source and destination network IDs are the same, the two devices are in the same broadcast domain (the same network). Communication between the two devices can be accomplished with Layer 2 switching. However, if the source and destination network IDs are different, the devices are on different networks. In this case, Layer 3 routing communication is required.

The network mask, like IPv4, is 32 bits long. The mask consists of binary blocks of consecutive 1s and 0s. 1s represent the portion of the IPv4 address assigned to the network ID, and 0s represent the portion of the IPv4 address assigned to the host ID.

[ACSA 교육#32] Layer 3 기초 - image 15

The image above will help you understand. The point where the number 1 in the mask ends and the number 0 begins is where the network ID and host ID are separated.

Network masks are expressed in several ways. Like IPv4, they can be expressed as four octets, each consisting of a decimal number and a period. Alternatively, they can be replaced with a prefix, which is written as a slash (/) and a number following the IP address.
In the example above, it is written as 10.1.10.100/24. Here, Prefix 24 refers to the number of 1s in the network mask.

IP routing

When a device needs to communicate with another device on a different network, it needs to know which network device within the broadcast domain can route the traffic to the destination network. This information is provided to computers using IP routing.

For endpoints, this information must be manually added as a "static route." However, routers and multilayer switches can automatically determine the optimal path for each destination using routing protocols, although they can also use manually added "static routes.".

Static routing

For static routing, you need to specify the following information from Router 1 to Router 2:.

  • Destination IP address: Places I want to go
  • Subnet Mask: How to distinguish between the network and host portions of a destination IP address
  • Next-hop IP address: The IP address of the router on the current network that can send the packet to its destination.
[ACSA 교육#32] Layer 3 기초 - image 16

The above diagram shows three networks connected by two routers (Core-1 / Core-2).
Core-1 connects Network A and Network B, and Core-2 connects Network B and Network C.
If Host A (Network B) needs to communicate with Server-1 (Network A), First route marked in greenYou must use .

The content of the first routing is “Destination 10.0.0.1 with mask 255.0.0.0(/8)To reach Next-hop router with IP address 172.16.0.1It means, ”You have to go to .”.

So what if we need to communicate with Server-2?
of course Second routing marked in redwill use: “To reach destination 192.168.0.1 with mask 255.255.255.0 (/24), it must go to the Core-2 router with IP address 172.16.0.2.”.

Default Gateway

A default gateway (DG) is a device that routes traffic from endpoint devices within a broadcast domain or network to all destinations within the network. Simply put, when a host is told, "If you want to go to any external network, go to the next hop address," it's the device that holds the IP address of that next hop.
A default gateway optimizes and simplifies routing decisions because only a single path is required between endpoints.

[ACSA 교육#32] Layer 3 기초 - image 18

If you look at the picture, you can see that the top router is positioned as the default gateway for Host A and Host B on the same network.

reference: Even if they are on the same subnet, if there are two or more routers on the network, each endpoint can have a different default gateway.


Today, we learned the basics required for Layer 3. As mentioned earlier, Layer 3 routing operates based on IP addresses, and we learned about IP addresses, subnet masks, and gateways.

In the next post, we will learn more about routing.

Similar Posts

  • [ACSA Training #37] OSPFv2

    ⏱️ Estimated read time: Approx. 13 minutes (13 min read) OSPF is the most widely used method for routing traffic within an organization. Among them, OSPFv2 is used to route IPv4 packets within an enterprise internetwork. Today, we will learn about OSPF areas, router IDs, various message types, and Neighbor State… .

  • [ACSA Training #8] TCP Header

    ⏱️ Estimated reading time: Approx. 7 minutes (7 min read) In the last post, we looked at the IPv4 header at Layer 3 (Network Layer). Today, we will explore TCP and UDP, which can be found at the Transport Layer, Layer 4. 3-Way Handshake First, before processing application data, TCP first ensures that data can be reliably delivered to the destination…

  • [APSC Training #5] Aruba Central Subscription Management

    ⏱️ Estimated reading time: Approx. 3 minutes (3 min read) In the previous post, we looked at adding Aruba devices to the cloud. Now, to actually operate them, we need to map subscription licenses to the devices. Let's take a look at subscription assignment and key management. HPE GreenLake Device Assignment HPE GreenLake is HPE's common…

  • [ACSA Education #34] VRRP

    ⏱️ Estimated reading time: Approx. 10 minutes (10 min read) In the previous post, we looked at the Default Gateway. An endpoint can have only one Default Gateway. And it can be a single point of failure. Looking at the figure below, if Core-1 fails, PC-1 and others using Core-1 as the Default Gateway…

  • [APSC Training #1] Introduction to Aruba Central

    ⏱️ Estimated reading time: Approx. 8 minutes (8 min read) Aruba Central is a cloud-based system that allows you to upload Aruba network devices to the cloud. You can monitor your network more effectively by managing, verifying, and adding all devices in Aruba Central. This training covers not only obtaining the Aruba Central certification (APSC) but also Aruba…

  • [APSC Training #7] Aruba Central Device Management Method (2) – Site / Label

    ⏱️ Estimated reading time: Approx. 5 minutes (5 min read) In the last post, we looked at the device management methods provided by Aruba Central. We examined the Group method among the three methods: Group, Site, and Label. This time, we will look at the remaining two methods: Site and Label. Site A Site refers to a campus, branch, or…