Http://www.aliyun.com/zixun/aggregation/13835.html ">ubuntu system under the network settings, including a variety of: Set dual network card, single card binding multiple IP, which we want to achieve is the most basic network settings.
sudo su
Gedit/etc/network/interfaces
File contents:
Auto Lo
Iface Lo inet Loopback
Auto Eth0 # #这个应该是决定是否启用这个端口
Iface eth0 inet Static # #静态设置IP
hwaddress ether 52:54:xx:51:xx:xx # #加入MAC地址, remember to put it before the IP address
Address 202.198.151.17
Netmask 255.255.255.0
#broadcast 202.198.151.255
Gateway 202.198.151.254
# #通过dhcp动态设置
Iface eth1 inet DHCP
Setting the mapping relationship for MAC addresses
Gedit/etc/iftab
Join a line
Eth1 mac 52:54:xx:51:xx:xx
Setting up a DNS server
sudo vi/etc/resolv.conf
Content
NameServer 202.198.125.255
Reset the network to enable the new settings
sudo/etc/init.d/networking restart