Something you should know about Network

Ken Wang
NTUST-AIVC
Published in
8 min readJul 25, 2023

This article primarily introduces LAN and WAN, DHCP and Static IP, as well as the functions of Subnet Mask, Default Gateway, and DNS, and compares them. It allows readers to have a better understanding of the operation principles and processes of networks.

Local Area Network & Wide Area Network

What is LAN?

Local Area Network(LAN) is a network that connects computers and other network devices within a small area. It is commonly used in offices, schools, homes, or other limited spaces. LANs are typically managed by a router or switch and utilize technologies such as Ethernet or Wi-Fi for connectivity. Within a LAN, users can share resources (like printers and file servers, as well as exchange data (such as documents and images), communicate and collaborate with each other. LANs generally offer low latency and high bandwidth as they involve relatively small area coverage and are typically controlled, private networks.

What is WAN?

Wide Area Network(WAN) is a computer network that connects distant locations. Unlike a LAN, a WAN can span different spaces, such as cities, countries, or continents. WANs typically utilize public communication infrastructure, such as telephone lines, fiber optics, satellite links, or wireless connections, to interconnect multiple locations. It enables users in different locations to engage in cross-regional data transmission and communication. WANs are commonly used for connecting large enterprises, organizations, and service providers, as well as facilitating international or global network connectivity. WANs typically have higher latency and lower bandwidth due to the long-distance transmission involved and the potential routing of network traffic through multiple nodes or points of presence.

LAN vs WAN

The diagram depicts devices within a local area connected to the same router. It illustrates the relationship between LAN and WAN. Once there is a basic understanding of LAN and WAN, we will introduce the different types of IP addresses.

DHCP & Static IP

What is DHCP?

Dynamic Host Configuration Protocol (DHCP) is a network protocol used for automatically configuring the IP addresses and other relevant network settings of hosts in a TCP/IP network. These settings include subnet masks, default gateways, DNS servers, and more (We will introduce them later).

The primary function of DHCP is to enable a central server (DHCP server) to automatically assign IP addresses to hosts connecting to the network, referred to as DHCP clients. When a new host joins the network or an existing host reconnects to it, the DHCP client sends a request to the DHCP server, asking for an available IP address. The DHCP server responds by providing a unique IP address to the client based on the network configuration and the available IP address pool.

What is Static IP?

A Static IP (Static Internet Protocol) refers to a fixed, unchanging IP address assigned to a host (such as a computer, server, router, etc.) within a network. Since it requires manual configuration, assigning Static IPs in large networks can be cumbersome as administrators need to manually assign IP addresses to each host. However, it offers excellent stability compared to DHCP despite the configuration complexity.

DHCP vs Static IP

Here is the translated list of the advantages and disadvantages of DHCP and Static IP:

Advantages of DHCP:

  1. Dynamic Allocation: Automatically assigns IP addresses, saving time and effort in manual configuration for each host.
  2. Simplified Management: Reduces the burden on administrators in large networks by automating IP address assignment and updates.
  3. Avoids IP Conflicts: Ensures each host receives a unique IP address, minimizing the chance of IP address conflicts.
  4. Dynamic Updates: Allows for dynamic changes to host IP addresses, facilitating network configuration adjustments and changes.
  5. Suitable for Large Networks: Ideal for large networks with frequent IP address changes.

Disadvantages of DHCP:

  1. Lower Stability: IP addresses are dynamically allocated, and a host’s IP address may change over time, making it less reliable for certain applications and services.
  2. Complex Remote Access: Due to IP address changes, remote access to hosts requires frequent updates of IP addresses.
  3. Requires Additional Servers: Implementing DHCP necessitates setting up and maintaining DHCP servers.

Advantages of Static IP:

  1. Better Stability: IP addresses remain constant, making them suitable for applications and services that require stable IP addresses.
  2. Reliable Remote Access: Fixed IP addresses ensure more dependable remote access to hosts.
  3. Simple DNS Configuration: Static IP addresses are easier to set up for DNS records, providing stable DNS associations with hostnames.
  4. Suitable for Specific Requirements: Ideal for scenarios that demand fixed IP addresses, such as servers and network cameras.

Disadvantages of Static IP:

  1. Higher Management Cost: Manual assignment of IP addresses in large networks can be cumbersome and time-consuming.
  2. IP Conflict Risk: Manual configuration errors may result in IP address conflicts.
  3. Limited Applicability: Static IP addresses are suitable for specific scenarios that require stable IP addresses, but may not be well-suited for networks with frequent IP address changes.

In summary, the choice between DHCP and Static IP depends on specific requirements and network configurations. DHCP is suitable for large networks with dynamic IP requirements, while Static IP is appropriate for specific scenarios that demand stable IP addresses.

Subnet Mask, Default Gateway, and DNS

After providing a brief introduction to LAN, WAN, and types of IP addresses, let’s proceed to introduce the following commonly encountered basic terms.

What is Subnet Mask?

A subnet is the process of dividing a large IP network into smaller, more manageable networks. It is commonly used to partition a large network into multiple subnets, with each subnet having its independent IP address range and subnet mask.

A subnet mask is a 32-bit binary value used to distinguish the network and host portions of an IP address. When combined with an IP address, it helps identify which bits represent the network and which bits represent the host.

An IP address consists of four 8-bit octets (e.g., 192.168.1.1), with each octet being a “block”. The subnet mask’s role is to indicate which bits are used for the network address and which bits are used for the host address. Subnet masks use 1 to represent the network portion and 0 to represent the host portion.

For example, a common subnet mask is 255.255.255.0. In this case, the first three octets (24 bits) represent the network portion, and the last octet (8 bits) represents the host portion. This means the subnet can accommodate 256 hosts (2 to the power of 8), and there can be 256 subnets.

The use of subnet masks allows networks to be subdivided into smaller subnets, aiding in more efficient IP address management and network traffic control. In IP routing and communication, subnet masks play a crucial role in ensuring data packets are accurately delivered to their respective destinations.

What is Default Gateway?

A Default Gateway is a special gateway in a TCP/IP network. When a device (such as a computer, router, switch, etc.) needs to connect to another network or access resources on the Internet, but cannot find the destination address within its own subnet, the Default Gateway comes into play.

When a device needs to send data to a host on an external network or the Internet, it first checks if the target IP address belongs to its own subnet. If the target address is external to its subnet, the device sends the data packet to the Default Gateway. The role of the Default Gateway is to forward the data packet to other networks until it finds a path to reach the destination address.

During network configuration setup, it is usually necessary to specify a Default Gateway. This is typically the gateway address provided by the router in the network or by the Internet Service Provider (ISP). In most cases, devices automatically learn the address of the Default Gateway, but sometimes it needs to be manually configured.

In summary, the Default Gateway is a special gateway used in a TCP/IP network to forward data packets to external networks or the Internet. It allows devices to connect to other networks and guides data packets to their destination when the target address is not found locally.

What is DNS?

DNS (Domain Name System) is a network service used to translate human-readable domain names (e.g., www.example.com) into IP addresses on the internet (e.g., 192.168.1.1). It functions as an “address book” for the internet, allowing us to access websites and other network services using easy-to-remember domain names rather than numeric IP addresses.

The working principle of DNS is to map domain names to their corresponding IP addresses. When you enter a website’s domain name in your browser, the browser queries the DNS resolver on your computer for the IP address of that domain. If the DNS resolver knows the IP address for the domain, it returns the IP address, and the browser connects to the website’s server using that IP address to display the webpage. If the DNS resolver does not have the IP address for the domain, it sends a query to other DNS servers to find the corresponding IP address and then returns it to the browser.

Summary of this part

Above is the basic introduction and overview of Subnet Mask, Default Gateway, and DNS. Of course, there are many other aspects of networking, such as routers, switches, firewalls, NAT, and more, which are also essential knowledge in the field of networking operations.

Conclusion

The above diagram provides an overview summary of the terms introduced in this entire article, aiming to help readers gain a better understanding of various aspects related to networking operations and develop a clearer concept of networks.

--

--