DHCP Network setup after minimal installation in Linux

Friends in this tutorial I am going to show you, how to configure DHCP network in Linux after minimal installation? So let’s start and see step by step DHCP network configuration.

After minimal installation of RHEL7 or CentOS 7, May be we are not able to connect our server with network, It’s because Ethernet interfaces are not enabled by default.
Now we will see how to enable Network interface and configure DHCP network in our server.

Setup DHCP network on CentOS 7  after minimal installation

First, of all we have to check our network interface card with this command “nmcli d” and you will see you network card status after run this command in you CLI console. Like below.

“nmcli d” command output, we can see here enp0s3 Ethernet interface card is discommoded. And we need to configure Network on this interface.

Then we type “nmtui” command in our terminal to open Network manager. Once our Network manager will be open then we have to select “Edit connection” and press Enter (Use TAB button for choosing options). Like below:-

You can see here CentOS_7 Network manager screen

Now we can choose network interfaces where we want to configure network and click “Edit” like below screen shot:-

We can edit our network interfaces

DHCP configuration

Here we are going to configure DHCP Network so we have to select “Automatic” in IPv4 configuration and check Automatically connect check box and press OK and quit from Network manager. Like below screen shot.

DHCP IP has been configured on enp0s3 network interface, now we need to restart network service so that we can access this server through IP. So let’s restart network service and check our network is properly working our not?

We can restart network service using below commands:-

[root@dns ~]# service network restart

After that our server has a DHCP IP we can check with “ip a” commands like below screen shot:-

You can see above screen shot network service has been successfully started and our DHCP IP assigned to enp0s3 Ethernet cards.

CentOS 7 check IP address

We can check network accessibility with ping commands. We can also check ssh with putty. Here I am going to checking gateway accessible or not with ping command, if our gateway is accessible then our server will be accessible from outside. So let’s check gateway accessibility:-

[root@dns ~]# ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=2.89 ms
64 bytes from icmp_seq=2 ttl=64 time=2.76 ms
64 bytes from icmp_seq=3 ttl=64 time=2.71 ms
64 bytes from icmp_seq=4 ttl=64 time=2.92 ms
64 bytes from icmp_seq=5 ttl=64 time=2.74 ms
64 bytes from icmp_seq=6 ttl=64 time=2.92 ms
--- ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5008ms
rtt min/avg/max/mdev = 2.718/2.828/2.927/0.108 ms
[root@dns ~]#

You can see our Gateway is successfully ping so now we can access our server through outside with putty.
HostGator Web Hosting

That’s all now we have completed DHCP IP setup on Minimal installation CentOS7 and RHEL7.

You can click on below link, if you want to configure static network in Linux.

Static network setup in Linux after minimal installation


1 thought on “DHCP Network setup after minimal installation in Linux

  1. Hi Christine Hazel,

    Thanks for your appreciation and lovely comments. It a freeware theme and I have customized some think to look better. Thanks again for you lovely comments.

    Thanks & Regards
    Zafar Imam

Leave a Reply

Your email address will not be published.