Lab Objective
Determine a Linux machine's current IP address, subnet mask, default gateway, and DNS servers using both the GUI network settings and command-line tools, then renew its DHCP lease.
Lab Purpose
Linux systems are common in server rooms, data centers, and among many engineers' own workstations, and the modern ip command family has largely replaced the older ifconfig utility on most current distributions — familiarity with both the current and legacy tools helps when working across systems of different ages.
Lab Topology
Linux Machine ---- connected to a switch port
configured for DHCP (client)Task 1: Check IP Configuration via the GUI
Open the desktop environment's network settings panel and view the active connection's IPv4 details.
Task 2: Check IP Configuration via the Command Line
Use the modern ip command to display the current address and interface state.
Task 3: Check the Default Gateway and DNS Configuration
Use appropriate commands to display the default route and the DNS servers currently configured.
Task 4: Renew the DHCP Lease
Use the appropriate DHCP client utility to release and renew the current lease.
Solution and Verification
GUI Method (GNOME example):
Settings > Network > click the gear icon next
to the active connection > IPv4 tab
Address: 192.168.1.72
Netmask: 255.255.255.0
Gateway: 192.168.1.1$ ip addr show
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP>
inet 192.168.1.72/24 brd 192.168.1.255 scope global eth0$ ip route show
default via 192.168.1.1 dev eth0
$ cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4$ sudo dhclient -r eth0
$ sudo dhclient eth0
$ ip addr show eth0 | grep inet
inet 192.168.1.79/24 brd 192.168.1.255 scope global eth0
-- Address changed slightly (.72 to .79),
-- the same normal DHCP behavior seen
-- earlier in the Windows labKey Takeaway
The ip addr, ip route, and /etc/resolv.conf combination on Linux provides the same three pieces of information — address/mask, gateway, and DNS — that a single ipconfig /all command provides on Windows, just split across a few dedicated commands rather than one consolidated view.