Monday, June 7, 2021
In the previous post we configured a DNS server, in this post we are going to assign a static IP to that server so that we don't get a new IP everytime we reboot the server.
First let's check our VirtualBox Adapter IP settings
1. Make sure your VM is set to the Bridge Network setting
Now turn on the VM machine and type ifconfig to the the adapter name
First let's get our network information with the command ifconfig
Here are the steps to assign a static IP to a server in CentOS:
1. If you have a /etc/sysconfig/nework file delete with the rm command
2. Now edit the adapter file by typing in vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 with the following information
And that's how you assign a static IP to CentOS in Linux. You will see that the DNS is broken currently because it's being configured to use dynamic IP. In the next post we are going to change the DNS server to use the static IP that we've just configured.
I’d really like to appreciate the efforts you get with writing this post. Thanks for sharing.
ReplyDeleteCCNA classes in Bangalore