Monday, August 15, 2011

Network Settings in CentOs & Redhat


Set static IP Address to the Server

[root@dlp ~]# 
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:50:43:00:3B:AE
# change

ONBOOT=
yes

# add lines as follows

BOOTPROTO=none
# this server's IP address

IPADDR=10.0.0.30
# subnet mask

NETMASK=255.255.255.0
TYPE=Ethernet
# default gateway

GATEWAY=10.0.0.1
# DNS server's IP address

DNS1=10.0.0.10
IPV6INIT=no
USERCTL=no
[root@dlp ~]#service network restart

for restarting network service it is showing all ok 

[root@dlp ~]#ifconfig

it is showing your IP Address



No comments:

Post a Comment