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:

ifconfig

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 192.168.63.27 netmask 255.255.255.0 route add defaultgw 192.168.63.1 up

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

Methods the 1: network configuration configuration file

Modify/etc/sysconfig/network-scripts/ifcfg-eth0

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

DEVICE=eth0#Physical device name

IPADDR=192.168.1.10#IP address

NETMASK=255.255.255.0#Maskvalue

NETWORK=192.168.1.0#Network address (can't)

BROADCAST=192.168.1.255#Broadcast address (can't)

GATEWAY=192.168.1.1#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 192.168.63.27 netmask 255.255.255.0 route adddefault GW 192.168.63.1 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