Ubuntu 16.04.3 LTS Dual NIC Configuration

Source: Internet
Author: User

Ubuntu 16.04.3 LTS dual NIC configuration requirements
  • A dual NIC implements a static IP assignment, and another DHCP implementation
  • Preparatory work:
    [email protected]:~$ sudo su - #需要跳到root用户[sudo] password for wanghui:[email protected]:~# apt-get install openssh-server vim -y #安装sshd服务和vim编辑器[email protected]:~# /etc/init.d/ssh start #启动ssh服务[email protected]:~# ifconfig | awk ‘{print $1}‘ | grep ‘en‘ #查看网卡ens33 #这个是要DHCP的ens34 #这个是要static的
  • Modifying the network card configuration file
    [email protected]:~# vim /etc/network/interfaces #修改网卡配置文件auto loiface lo inet loopbackauto ens33iface ens33 inet dhcpauto ens34iface ens34 inet staticaddress 192.168.56.31netmask 255.255.255.0
  • To modify the network management configuration file:
    [email protected]:~# vim /etc/NetworkManager/NetworkManager.conf #修改网管文件,可以使得不重启就让修改的ip配置生效managed=true #把这个默认的false参数改成true,就能在重启网卡的时候刷新配置到系统
  • Service restart
    [email protected]:~# /etc/init.d/network-manager restart #重启网管[email protected]:~# /etc/init.d/networking restart #重新加载ip配置
  • At this point, you can see the configured IP
    [email protected]:~# hostname -I192.168.85.152 192.168.56.31

Ubuntu 16.04.3 LTS Dual NIC Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.