Basic Network Configuration
Configure network interfaces, assign static or dynamic IP addresses, and set up DNS resolvers for server connectivity.
Basic Network Configuration is a free Linux Server Deployment & SSH Mastery lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Linux Server Deployment & SSH Mastery learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Intro to Network Configuration
Welcome to configuring your server's network! This is how your server communicates with the internet and other devices.
It's a foundational skill for any server administrator, ensuring your applications are reachable and your server can access external resources.
IP Addresses: Server's ID
An IP address (Internet Protocol address) is a unique numerical label assigned to each device on a network.
Think of it as your server's street address on the internet, allowing data to be sent to and from the correct machine.
Common versions are IPv4 (e.g., 192.168.1.100) and IPv6 (e.g., 2001:0db8::1).
Dynamic IPs with DHCP
DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses to devices.
Most home devices and newly provisioned cloud servers start with a dynamic IP. It's convenient because you don't have to set it manually.
However, dynamic IPs can change, which is not ideal for servers that need a consistent, fixed address.
Checking Your Current IP
The ip a command is your primary tool for viewing network interfaces and their assigned IP addresses on Linux.
It shows details like the interface name (e.g., eth0, ens33) and the inet (IPv4) or inet6 (IPv6) address.
Run: View Network Interfaces
Try running ip a to see your server's network interfaces and IP addresses. Look for an interface like eth0 or ens33 and its inet address.
ip aWhy Static IPs Matter
A static IP address is an IP that doesn't change over time. It remains constant until you manually modify it.
This is crucial for servers that need to be consistently reachable, such as:
- Web servers hosting websites
- Database servers
- DNS servers
Static IPs ensure predictability and reliable access.
Key Static IP Components
To manually set a static IP, you generally need to provide these details:
- IP Address: The specific, non-changing address for your server (e.g.,
192.168.1.10). - Netmask: Defines the network portion of the IP address, separating the network ID from the host ID (e.g.,
255.255.255.0or/24). - Gateway: The IP address of the router that connects your local network to the internet (e.g.,
192.168.1.1).
DNS Resolvers: Naming the Web
The DNS (Domain Name System) translates human-readable domain names (like google.com) into numerical IP addresses.
Your server needs to know which DNS servers to query for these translations. Without them, your server can't find websites by name!
These are often configured within your network interface settings or in the /etc/resolv.conf file.
Netplan Static IP Example
On modern Ubuntu systems, network configuration is managed via Netplan. You edit YAML files in /etc/netplan/.
Here's a simplified example for setting a static IP. After editing, you'd apply changes with sudo netplan apply.
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: no
addresses: [192.168.1.10/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]Quick Check: Network Basics
You've learned about IP addresses, dynamic vs. static configurations, and DNS. Let's test your understanding!
Recap: Network Configuration
In this lesson, you've learned the essentials of basic network configuration:
- IP addresses are unique identifiers for your server.
- DHCP provides dynamic IPs, while static IPs are fixed and crucial for servers.
- You can view current network settings with
ip a. - Key components for static IPs include the IP address, netmask, and gateway.
- DNS resolvers are vital for translating domain names to IP addresses.
Next, we'll dive into securing your server with firewalls!
Frequently asked questions
Is the “Basic Network Configuration” lesson free?
Yes — the full text of “Basic Network Configuration” is free to read here on the web, and the Linux Server Deployment & SSH Mastery course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Linux Server Deployment & SSH Mastery course, upgrade to CoddyKit PRO.
What will I learn in “Basic Network Configuration”?
Configure network interfaces, assign static or dynamic IP addresses, and set up DNS resolvers for server connectivity. You practise Linux Server Deployment & SSH Mastery with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Linux Server Deployment & SSH Mastery?
No prior experience is required. Linux Server Deployment & SSH Mastery on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Basic Network Configuration” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Linux Server Deployment & SSH Mastery lesson?
Yes. Every Linux Server Deployment & SSH Mastery lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Basic Network Configuration
- Understanding Firewalls (UFW/firewalld)
- Port Management & Security
- DNS Configuration and Troubleshooting