ubuntu16.04配置双网卡静动态ip命令

11 篇文章 0 订阅
4 篇文章 0 订阅
:~$ sudo systemctl restart NetworkManager
~$ cd /etc/network/interfaces.d/
:~$ cat /etc/network/interfaces
:~$ sudo systemctl stop NetworkManager
:~$ sudo vim /etc/network/interfaces
:~$ ifconfig
:~$ sudo reboot 
:~$ sudo su
:~$ ifconfig -a
:~$ ifconfig enps50 up
:~$ ifconfig enps50 1
:~$ sudo ifconfig enps50 1
:~$ ifconfig 


25  systemctl disable NetworkManager  #禁用网络管理器
   26  /etc/init.d/networking start    # 启动网络
   27  /etc/init.d/networking restart
   28  systemctl status networking
   29  reboot 
   30  vim /etc/network/interfaces
   31  systemctl status NetworkManager
   32  systemctl status networking
   33  vim /etc/network/interfaces
   34  systemctl status networking
   35  systemctl stop networking
   36  systemctl start networking
   37  systemctl status networking
   38  ifconfig 
   39  ping www.baidu.com
   40  cat /etc/resolv
   41  cat /etc/resolv.conf 
   42  vim /etc/network/interfaces
   43  reboot 
   44  vim /etc/network/interfaces
   45  systemctl restart networking
   46  ifconfig 
   47  vim /etc/network/interfaces
   48  systemctl restart networking
   49  ifconfig 
   50  reboot 
   51  history 

:/home/wuliang# vim /etc/network/interfaces
		*****# interfaces(5) file used by ifup(8) and ifdown(8)****
		auto lo
		iface lo inet loopback
		auto enp5s0
		iface enp5s0 inet dhcp  # 自动获取IP
		#iface enp5s0 inet static  # 设置静态ip
		#address 172.16.16.2
		#netmask 255.255.255.240
		#gateway 172.16.16.14
		auto enx00e04c680050
		iface enx00e04c680050 inet static
		address 192.168.1.205
		netmask 255.255.255.0*
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值