Ubuntu网卡配置

Ubuntu14网卡配置

网卡:/etc/network/interfaces

iface eth0 inet static 手动获取ip
address 静态IP地址
netmask 255.255.255.0 子网掩码
gateway 默认网关

dns-nameservers DNS1 DNS2

配置双网卡或者多网卡

auto eth0
iface eth0 inet static
        address 175.102.19.11
        netmask 255.255.255.0
        network 175.102.19.0
        broadcast 175.102.19.255
        gateway 175.102.19.254

auto eth1 第二张网卡
iface eth1 inet static
        address 192.168.1.100
        netmask 255.255.255.0

启动第二张网卡:ifup eth1

关闭第二张网卡:ifdown eth1

原文地址:https://www.cnblogs.com/yunweiweb/p/11268064.html