1, first stop the desktop version of the NetworkManager, this thing is very difficult to use, and some settings need to restart.
sudo systemctl Stop Networkmanager.service sudo systemctl disable Networkmanager.service
2, set the MAC address in the Help document should look for this keyword: hardware address, set up in two ways, temporary and permanent.
- Temporary, direct use of the command line, restart after the failure
sudo ifconfig eth0 Down sudo ifconfig eth0 hw ether xx:xx:xx:xx sudo ifconfig eth0 up
- Permanent, modify/etc/network/interfaces
xx:Networking:1b:2c:1f# Restart network services sudo service restart
3, Network Common settings/etc/network/interfaces (ip/dns/Gateway)
#Thisfiledescribes the network interfaces available on your system# and how to activate them. for Moreinformation, see Interfaces (5). # The Loopback network interface #环路auto loiface Lo inet Loopback # The primary network Interfaceauto eth0 #网卡iface Eth0 inet Static #设置IPV4为静态地址address1.1.1.2#设置IPnetmask255.255.255.0#设置子网掩码network1.1.1.255#设置网关gateway1.1.1.1#设置网关dns-nameservers1.1.1.1#设置DNS服务器, multiple DNS separated by spaces-search. com #限制. com queries go to the DNS server set above hwaddress etherxx: on:Geneva: 1b:2c:1f #设置MAC地址
Reference:
http://blog.csdn.net/zhangwu1241/article/details/53311534
http://www.youritronics.com/how-to-set-the-mac-address-from-etcnetworkinterfaces-in-debian/
Https://www.cnblogs.com/qiuxiangmuyu/p/6343841.html
Http://wiki.ubuntu.org.cn/Quick_HOWTO_:_Ch03_:_Linux_Networking/zh#.2Fetc.2Fnetwork.2Finterfaces.E6.96.87.E4.BB.B6
http://blog.csdn.net/u011077672/article/details/71123319
Https://wiki.debian.org/NetworkConfiguration
Ubuntu 16.04 Modify MAC address and network common settings (ip/dns/Gateway)