How to configure static IP address on CentOS

 

1. DHCP Configuration

Check file at /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes

 

2. Static Configuration
Check file at /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0
BOOTPROTO=static
HWADDR=00:19:D1:2A:BA:A8
IPADDR=192.168.1.33
NETMASK=255.255.255.0
ONBOOT=yes

 

3. Gateway IP
Check file at /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=lab.wirethink.com
GATEWAY=192.168.1.1

 

4. Reset Interface

#service network restart or

#/etc/init.d/networking restart

 

5. Verifying

# route

 

Leave a Reply