In the world of Linux, this is done by setting a fixed IP to the host (using the root user):
1. View the network interface to be provisioned
Use Ifconfig to view the NIC interface in use, generally with the first such as: ETH0,EN1,EM1, etc.
2. Disable Network Autoconfiguration (if any)
Systemctl Stop Networkmanager.service
3. Disable Network Autoconfiguration (if any)
Systemctl Disable Networkmanager.service
4. Write the configuration file
Vi/etc/sysconfig/network-scripts/ifcfg-eth0 (choose the network interface in use, here with the first interface eth0)
Write content:
Nm_controlled= "yes" hwaddr= "d8:d3:85:ae:dd:4c" bootproto= "static" set to static onboot= "Yes" Set to Yes ipaddr=192.168.1.2 set the static IP address netmask=255.255.255.0 Set the subnet mask broadcast=192.168.1.255 Set the broadcast address (can not be set) network=192.168.1.0 (can not be set) gateway=192.168.1.1 Set the gateway
5. Restart the network
Systemctl Restart Network.service
6. Configure DNS
sudo vi/etc/resolv.conf
Write content:
NameServer 192.168.1.1 nameserver 8.8.8.8
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
fedora20 Configuring static IP