Linux add IP

vi /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
#iface eth0 inet dhcp

iface eth0 inet static
address 192.168.2.61
netmask 255.255.255.0
gateway 192.168.2.1

# The primary network interface
auto eth1
#iface eth1 inet dhcp

iface eth1 inet static
address 192.168.2.49
netmask 255.255.255.0
gateway 192.168.2.1

 

 restart network

/etc/init.d/networking restart

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326991096&siteId=291194637