Fedora CentOS ifcfg change from dinamic static ip

From D3xt3r01.tk
Jump to navigationJump to search

WHY

Because on my new network, we decided to use static ips. Also, we decided to keep dhcp if someone new enters the network. But I run a local apache/mysql server so when the network tries to login, I want to use my static ip.

HOW

Edit /etc/sysconfig/network-scripts/ifcfg-eth0 ( If your eth card number is 0 )

It should look like this:

DEVICE=eth0
IPADDR=192.168.1.101 
HWADDR=00:19:66:32:64:68
BOOTPROTO=static 
ONBOOT=yes
BROADCAST=192.168.1.255
NETWORK=192.168.1.0
GATEWAY=192.168.1.1

Change with the appropiate values