![]() $ cat /etc/sysconfig/network-scripts/ifcfg-enps03Īnd this concludes this guide on configuring network connection using ‘ nmcli’ command-line tool on Linux. To confirm the IP, once again run the command: $ ip addr enps03Īdditionally, you can view the /etc/sysconfig/network-scripts/ifcfg-enps03 file using cat command. The changes will be written to /etc/sysconfig/network-scripts/ifcfg-enps03 file. To save the changes, run the command $ nmcli con up enps03 Next, change the addressing from DHCP to static. Then set up the DNS server: $ nmcli con mod enps03 ipv4.dns “8.8.8.8” ![]() Next, configure the default gateway as shown: $ nmcli con mod enps03 ipv4.gateway 192.168.2.1 We are going to configure a static IP with the following values: IP address: 192.168.2.20/24įirst, run the command below to set up the IP address. The current IP address is 192.168.2.104 with a CIDR of /24. ![]() In this example, we will modify the network interface enps03 to use a static IP.īut first, let’s check the IP address using IP command. ![]() In this method, you can use the Network Manager package to simplify the network configuration tasks. Configure Static IP on CentOS 7 Using Network Manager. That is all You can now use the newly configured static IP address on your system. Using nmcli tool, you can modify a network interface to use a static IP address. To verify your configuration, you can use the following command.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |