0

I have some questions about configuring a redhat vm on virtualbox. The installation id done. When i used the command isee that i have no ip adress for eth0. So i want to set static ip adress to my vm. Tell me if i'm wrong, but i need to edit /etc/sysconfig/network-scripts/ifcf-eth0 ? After read some tutorials, i know i have to add some parameters to this file:

IPADDR = ?
BOOPROTO=STATIX
NETMASK
GATEWAY

My questions are : How can i know what value put in this parameter ? IPADDR, can i put everything i want ? NETMASK and GATEWAY, how can i know the value i need to put ?

I have no experience about network, so, could help me to understand this ?

Thx :)

0

Virtualbox has three modes, they are bridge mode, NAT mode and host-only mode.

The bridge mode is an address segment with the local network card, which directly uses the physical network card of the host.

The host-only mode depends on the settings in the virtualbox and can only communicate with the host and other VMs of host-only mode , and cannot communicate with the outside.

The NAT mode depends on the settings in the virtualbox. Its function is address translation. It is an address translation through the physical NIC of the host, and then it can be connected to the external network.

We can choose a mode according to our own needs.

If we need to automatically assign IP, then change booproto to DHCP, NAT mode and host mode will automatically get IP.

If we want to set it manually, the IP address of the bridge mode is set on the same network segment as the address of the host NIC. The netmask and gateway are the same as the host NIC settings.

Manually set the IP address of the NAT mode, first check the IP address of the NAT setting in the virtualbox, and then set it according to the corresponding address.

Manually set the IP of the host-only mode, first check the IP address of host-only mode setting in the virtualbox, and then set it according to the corresponding address.

Automatically:

BOOPROTO=DHCP (automatically)

Manually:

IPADDR = the IP of redhat vm

BOOPROTO= STATIX (manually)

NETMASK= the netmask of redhat vm

GATEWAY= the gateway of redhat vm

After the entire configuration is complete, save the configuration and restart the network service to take effect.

In addition, I search an instance that we can refer: Setup static IP in redhat 6

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.