Configuring network interface with Static IP address on RHEL 7
I am new to RHEL7 and I am running it in Virtualbox.. Right now its using DCHP but I want it to have the same IP address all the time,
I been using this
https://linuxconfig.org/configuring-network-interface-with-static-ip-address-on-rhel-7
but how do I find out the values for the following:
NETMASK="255.0.0.0"
GATEWAY="10.1.1.1"
Can someone please help.. I am new to this
Responses
I hope the lines end with double quotes instead of the a with accent circumflex. How do you manage the network service on your virtual machine?
systemctl restart network or systemctl restart NetworkManager
In the latter case you may need to add the following line to /etc/sysconfig/network-scrips/ifcfg-enp0s3
NM_CONTROLLED=yes
Regards,
Jan Gerrit
How did you test your network? When you say "still no network", do you mean the system is not accessible from another system on the same network ? Please explain....
From this output I can say that this is dynamic configuration not static:
inet 192.168.0.12/24 brd 192.168.0.255 scope global dynamic enp0s3
Please send the output of the below commands:
#cat /etc/sysconfig/network-scripts/ifcfg-enp0s3
#route -n
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
