The RedHat view and modify IP

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

The first is to check the current card of the IP

1 shows the current boot command network interface:


2 all current network interface command:

ifconfig -a

3 see specified network interface command:

ifconfig eth0

In LINUX modified IP is divided into two types,

1 debugging to modify the IP, only in the current effective, restart after the restoration of the original IP

ifconfig eth0 netmask route add defaultgw up

2 Permanent (i.e. can restart after the entry into force)

Methods the 1: network configuration configuration file


vi/etc/sysconfig/network-scripts/ifcfg-eth0 #Second pieces of card: vi/etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth0#Physical device name

IPADDR= address


NETWORK= address (can't)

BROADCAST= address (can't)

GATEWAY= address

ONBOOT=yes #[yes|no](activated whether the device boot)

USERCTL=no#[yes|no](if non root users can control the equipment)

BOOTPROTO=static#[none|static|bootp|dhcp](guide is not used | static allocation protocol |BOOTP protocol |DHCP protocol)

Then restart the service service network restart effect, or /etc/init.d/networkrestart effect

Methods 2:

The ifconfig eth0 netmask route adddefault GW stored in the /etc/init.d/rc.local file

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Emmanuel at December 26, 2013 - 5:49 PM