# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
auto eno1
iface eno1 inet static
address 192.168.2.102
gateway 192.168.2.1
netmask 255.255.255.0
dns-nameservers 114.114.114.114 223.5.5.5
auto enp3s0
iface enp3s0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameserver 119.29.29.29
本局域网有两台机器,系统均为ubuntu 16.04 server版本,通过/etc/network/interfaces 文件来配置上网方式,但是有一台机器经常无法连上网。故挖个坑,以后再来解决。
原因找到,缘由是本地路由器禁止了通过静态ip来上网,换用路由器问题搞定,以上配置没问题