Local and Wide Area Networks: The Basics [CYBERSEC NOTE DUMP]

Christian Waggoner
6 min readJun 18, 2024

[MEMEX//CYBERSECURITY TRADECRAFT #8]

Here is quick girl dinner charcuterie of cybersecurity study notes. So get smart with me on some ‘sec.

How IP addresses are used to communicate over a network.

Photo by bert b on Unsplash
Photo by bert b on Unsplash

IP stands for internet protocol.

An internet protocol address, or IP address, is a unique string of characters that identifies a location of a device on the internet. Each device on the internet has a unique IP address, just like every house on a street has its own mailing address.

Operations at the Network Layer

Operations occurring at the network level organize the addressing and delivery of data packets across the network from the host device to the destination device.

Packets are directed from to their destination routers all over the internet. This process continues until the packet reaches the IP address of the destination network. Destination IP addresses are stored within the header of a data packet. A router uses the IP address to route packets from network to network based on information contained in the IP header of a data packet. Other information included in this header includes the source IP address, the size of the packet, and which protocol will be used for the data portion of the packet.

There are two types of IP addresses

IP version 4, or IPv4, and IP version 6, or IPv6.

In the early days of the internet, IP addresses were all IPV4. But as the use of the internet grew, all the IPv4 addresses started to get used up, so IPv6 was developed. IPv6 addresses are made up of 32 characters. The length of the IPv6 address will allow for more devices to be connected to the internet without running out of addresses as quickly as IPv4.

Format of an IPv4 Packet

(Coursera)

An IPv4 packet is made up of two sections, the header and the data.

The size of the header rangers from 20 to 60 bytes. The IPv4 header format is determined by the IPv4 protocol. This includes IP routing information so the packet can be correctly

The 13 Fields in a IPv4 Packet Header

(Coursera)

There are 13 fields within the header of an IPv4 packet. The IPv4 header is crucial for routing packets across the internet. Understanding these fields empowers you to analyze network traffic and identify potential security concerns.

Version (VER): Identifies the protocol version (4 in this case).

IP Header Length (HLEN or IHL): HLEN indicates the length of the header in 32-bit words. This indicates where the packet header ends and the packet data segment begins.

Type of Service (ToS): This field provides a router with information that help prioritize the delivery of packets to ensure quality of service on a network.

Total Length: Represents the total length of the packet, including header and data. The maximum size of an IPv4 packet is 65,53 bytes.

Identification: Provides a unique identifier for fragmented packets. IPv4 packets can be up to 65,545 bytes, but some networks have a lower limit, in which case the packets are divided into fragmentary IP packets. The identification field allows these fragments to be reassembled once they reach their destination.

Flags: These provide the router with information about whether the original packet has been fragmented. They also indicate if more fragments are in transit.

Fragmentation Offset: The fragment offset field tells routers where the in the original packet the fragment belongs.

Time to Live (TTL): TTL prevents packets from being circulated by routers indefinitely. It accomplishes this by decrementing a counter set by the source by one as the packet passes through each router along its path. When the TTL counter reaches zero, the router that holds that packet will discard it and return an ICMP Time Exceeded error message.

Protocol: Identifies the protocol used by the receiving device for the data portion of the packet.

Header Checksum: Detects errors in the header during transmission. Corrupted packets are discarded.

Source IP Address: Identifies the IPv4 address of the sender of the packet.

Destination IP Address: Identifies the IPv4 address of the intended recipient of the packet.

Options: Allows for security options to be applied to the packet if the HLEN value is greater than five.

DIfference between IPv4 and IPv6

To reiterate a point of history in IP addressing, as the internet grew, it became clear that all IPv4 addresses would eventually be depleted, a phenomenon called IPv4 address exhaustion. Nobody anticipated the sheer amount of computing devices that would need an IP address with the growth of the internet and computing. To mitigate this effect, IPv6 was developed.

A big key difference between the two is the addresses’ length and format.

IPv4 address are made up of four decimal numbers separated by periods, each number ranging from 0 to 255. Together the numbers span 4 bytes and allow for up to 4.3 billion possible addresses.

Example IPv4 Address

191.51.100.0

IPv6 addresses are made of eight hexadecimal numbers separated by colons, each number consisting of up to four hexadecimal digits. Together, all numbers span 16 bytes, and allow for up to 340 undecillion addresses (340 followed by 36 zeros).

Example IPv6 Address

2002:0db8:0000:0000:0000:ff21:0023:1234

NOTE: To represent one or more consecutive sets of all zeros, you can replace the zeros with a double colon “::”

The above IPv6 address would be-

2002:0db8::ff21:0023:1234

Another difference between the Internet Protocols is that the IPv6 header format is much simpler than the IPv4

My crappy diagram from my notebook

There are also distinctions in their security. IPv6 is capable of more efficient routing and eliminates private address collisions which occur when two IPv4 devices on a network attempt to use the same address.

IP addresses can be either public or private.

Just like all the roommates in one home share the same mailing address, all the devices on a network share the same public-facing IP address.

Private IP addresses are only seen by other devices on the same local network

Another kind of address used in network communications is called a MAC address.

A MAC address is a unique alphanumeric identifier that is assigned to each physical device on a network.

Key Takeaways

Insights about Local Area Networks

  • Limited geographical scope: Typically confined to a single building or campus.
  • High bandwidth: Offer faster data transfer speeds compared to WANs.
  • Lower cost: Less expensive to set up and maintain than WANs.
  • Shared resources: Devices on a LAN can easily share resources like printers and files.
  • Security: Easier to secure due to their limited scope.

Insights about Wide Area Networks

  • Wide geographical reach: Span across cities, countries, or even continents.
  • Lower bandwidth: Data transfer speeds are generally slower than LANs.
  • Higher cost: More expensive to set up and maintain than LANs.
  • Limited resource sharing: Sharing resources across a WAN can be more challenging.
  • Security: More complex to secure due to their wider reach.

Additional Insights on All Area Networks

  • Network topology: The physical or logical layout of the network, such as bus, star, or mesh.
  • Network protocols: The rules and standards that govern communication between devices.
  • Network security: Measures implemented to protect the network from unauthorized access and threats.

Insights on IPv4

  • Limited address space: Only allows for approximately 4.3 billion unique addresses.
  • Exhaustion of addresses: All IPv4 addresses have been allocated.
  • Security vulnerabilities: More susceptible to security threats like address spoofing.
  • Simpler header structure: Easier to process and manage.

Insights on IPv6

  • Vastly expanded address space: Supports an enormous number of unique addresses (340 undecillion).
  • Mitigates address exhaustion: Provides a long-term solution to the address shortage.
  • Enhanced security: Includes built-in security features like IPsec.
  • More complex header structure: Requires more processing power.

Transition from IPv4 to IPv6:

  • Gradual process: Both protocols are currently in use.
  • Challenges: Requires updating infrastructure and devices.
  • Benefits: Improved security, scalability, and efficiency.

Key Insights about IPv4 and IPv6:

  • IPv6 offers significant advantages over IPv4, including increased address space, enhanced security, and improved efficiency.
  • The transition from IPv4 to IPv6 is ongoing and requires careful planning and implementation.
  • Understanding the differences between these protocols is crucial for network administrators and security professionals.

You should learn tech and other critical skills with me. Click the link to get my notes sent directly into your inbox fresh off my notebook

papicreative.substack.com

--

--