Modify the IP address linux

1.2.3 modify the IP address

1 ) Modify IP address

[root@hadoop100 桌面]#vim /etc/sysconfig/network-scripts/ifcfg-eth0

 

The following items marked red must be modified, there is value in accordance with the modified values ​​below, be no such increase.

DEVICE = eth0 # interface name (device , network card)

HWADDR = 00: 0C: 2x: 6x: 0x: xx #MAC address

TYPE = Ethernet # network type (usually Ethemet )

UUID = 926a57ba-92c6-4231-bacb-f27e5e6a9f44 # random id

ONBOOT = yes # system starts when the network interface is valid ( yes / NO )

BOOTPROTO=static      

# IP configuration method [none | static | BOOTP | DHCP] (not in use boot protocol | statically assigned IP | BOOTP protocol | the DHCP protocol)

 

IPADDR = 192.168.1.101 #IP address

GATEWAY = 192.168.1.2 # Gateway

DNS1 = 192.168.1.2 # Name Resolver

Modified

 

: WQ   save and exit

2 ) perform service network restart

 

3 ) If the error, reboot , reboot the virtual machine

Guess you like

Origin www.cnblogs.com/bailonglong/p/11493769.html