|
Debian 网卡配置在 /etc/network/interfaces
Debian网卡配置
#网桥的配置
auto lo
iface lo inet loopback
iface enp5s0f0 inet manual
iface enp5s0f1 inet dhcp
auto vmbr0
iface vmbr0 inet static
address 10.40.64.142
netmask 255.255.255.0
gateway 10.40.64.254
bridge_ports enp5s0f0
bridge_stp off
bridge_fd 0
#单网卡的手动配置
auto eth0 #开机自动启动
iface eth0 inet static #静态IP设置
address 192.168.0.10 #本机IP
netmask 255.255.255.0 #子网掩码
gateway 192.168.0.1 #网关
#dhcp方式
iface eth0 inet dhcp
#设置dns
echo "nameserver 114.114.114.114" >> /etc/resolv.conf
#配置好后重启网卡
ifdown eth0 && ifup eth0
或者
service networking restart
博主QQ 343264992
QQ群交流:100411237
添加时候请备注博客园
来源:https://www.cnblogs.com/chengkanghua/p/12524690.html |