1. Overview
Network configuration is the process of assigning network settings and controls. We can perform network configurations by using physical devices or by using software. It’s easier to use software because it removes the need for manual configurations.
In this tutorial, we’ll learn about the ipconfig and ifconfig network configuration commands. We’ll also look at the differences between the two commands.
2. ipconfig
Firstly, ipconfig stands for Internet Protocol Configuration. This command displays all the current TCP/IP network configuration values and refreshes Dynamic Host Configuration (DHCP) and Domain Name System (DNS) settings.
We mainly use the ipconfig command in Microsoft Windows operating system. Some latest versions of Linux OS also support the ipconfig command.
Moreover, using the ipconfig command without parameters displays the Internet Protocol version 4 (IPv4) and IPv6 addresses, subnet mask, and default gateway for all adapters. This includes both enabled and disabled adapters that are connected to the system:
$ ipconfig
Windows IP Configuration
Ethernet adapter Ethernet:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : must.ac.mw
Ethernet adapter VirtualBox Host-Only Network:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::25ad:71ab:e4ba:8a2d%7
IPv4 Address. . . . . . . . . . . : 192.168.56.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ethernet adapter VirtualBox Host-Only Network #2:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::9caf:8f0e:ba04:1484%5
IPv4 Address. . . . . . . . . . . : 192.168.84.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
In addition, here are some of the most common ipconfig commands:
- ipconfig /all: gives the full network configuration of the system
- ipconfig /displaydns: displays the contents of the DNS resolver cache
- ipconfig /registerdns: initiates manual dynamic registration of the DNS names and IP addresses that are configured on the system
3. ifconfig
ifconfig stands for Interface Configuration. This command displays all the TCP/IP network configurations of the computer.
We use ifconfig command mainly in Unix-based operating systems.
Initially, the ifconfig command only displays the network configurations of enabled network devices that are currently connected to the system:
$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.74.128 netmask 255.255.255.0 broadcast 192.168.74.255
inet6 fe80::20c:29ff:fe6f:572b prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:6f:57:2b txqueuelen 1000 (Ethernet)
RX packets 4178 bytes 265975 (259.7 KiB)
RX errors 4 dropped 0 overruns 0 frame 0
TX packets 162401 bytes 6826068 (6.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 19 base 0x2000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 504 bytes 36836 (35.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 504 bytes 36836 (35.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Specifically, the command displays the IP address, subnet mask, and default gateway for each adapter connected to the system.
Furthermore, let’s see some of the most common ifconfig commands:
- ifconfig [interface name]: displays the network configuration information of the specified interface only
- ifconfig -a: displays all the interfaces that are currently available even if they are down
4. ipconfig vs. ifconfig
Let’s look at the differences between ipconfig and ifconfig:
Comparison Factor
ipconfig
ifconfig
Full name
ipconfig stands for Internet Protocol Configuration
ifconfig stands for Interface Configuration
Supported platform
we use ipconfig in Windows operating systems
we use ifconfig in Unix-based operating systems
Functionality
ipconfig displays information about all the network interfaces, whether enabled or not
ifconfig displays only the information of enabled network interfaces connected to the system
Display interfaces
We use ipconfig /all to display all the network configurations of the system in Windows operating systems
we use ifconfig -a to display all the network configurations of the system in Unix-based operating systems
5. Conclusion
Finally, in this article, we learned about the ipconfig command and the ifconfig command. We also looked at the differences between the two commands.