查看: 103|回复: 0

[Debian] Debian-linux 网卡配置

[复制链接]

5

主题

0

回帖

0

积分

热心网友

金币
0
阅读权限
220
精华
0
威望
0
贡献
0
在线时间
0 小时
注册时间
2012-5-13
发表于 2020-3-19 15:41:00 | 显示全部楼层 |阅读模式

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
                    

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

圆梦公社,专注于为全球华人提供纯粹技术交流的地方,请勿发布任何政治及违法的言论。如有相关侵权、举报、投诉及建议等,请发 E-mail:dzh188@hotmail.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部