How to Activate Network Interface in CentOS 8 running in a VirtualBox

Posted on

Introduction

The following article content will present an information about how to activate a network interface. The activation process of the network interface is in the CentOS 8. More over, it is the continuation of the article with the title of ‘How to Install CentOS 8 in VirtualBox running in Microsoft Windows 10’ where it exist in the following link. So, after successfully logging in to the operating system, apparently the network interface available is not active. The following is the image of the state of the network interface soon after successfully logging in :

How to Activate Network Interface in CentOS 8 running in a VirtualBox
How to Activate Network Interface in CentOS 8 running in a VirtualBox

Just perform the following command in order to activate the network interface :

ifup network_interface_identifier

The following is the exact command execution according to the above output image :

ifup enp0s3

The image of executing the above command exist as follows :

How to Activate Network Interface in CentOS 8 running in a VirtualBox
How to Activate Network Interface in CentOS 8 running in a VirtualBox

The above output actually displaying the process of activating the network interface. Soon after, the execution of ‘ifconfig’ will also display the IP Address assigned to the network interface. There is an IP Address of 10.0.2.15 in the enp0s3 network interface.

 

Description and Explanation

This part will describe and explain about the IP Address of the above case. After activating the network interface using its identifier with a certain command, there is an IP Address available. Why does the enp0s3 network interface can have the IP Address of 10.0.2.15 ?. The following is the actual explanation of it :

1. The first explanation is because of the adapter setting. Actually, there is an adapter setting for the network interface. The setting is available in the VirtualBox Manager. There is a specific setting for that network interface. It is because that network interface is attached to NAT as in the following image :

How to Activate Network Interface in CentOS 8 running in a VirtualBox
How to Activate Network Interface in CentOS 8 running in a VirtualBox

It exist in the VirtualBox Manager. Right click at the associated Virtual Server and then access Settings. Access the Network Menu.

2. Next, the second explanation is about the IP Address. Why does the network interface has an IP of 10.0.2.15 ?. Where is the network segment come from ?. Actually, it is located in the Preferences Menu of the VirtualBox. Just access, File > Preferences. Select the Network menu, there will be an active NAT Networks configuration with the name of NatNetwork.

How to Activate Network Interface in CentOS 8 running in a VirtualBox
How to Activate Network Interface in CentOS 8 running in a VirtualBox

So, the network interface is attached to a NAT where the configuration enable to distribute DHCP IP Address. More over, the segment of the DHCP IP Address is in the range of 10.0.2.0/24. So, it is obvious to get an IP Address of 10.0.2.15 for the network interface.

Leave a Reply