• Debian-linux 网卡配置


    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
                        
  • 相关阅读:
    LINUX云计算40个相关问题
    sql
    补肾
    少吃食品
    抗癌食品
    爱情感言
    分布式事务的处理
    前端
    JAVA->Enum
    Sleuth+Zipkin+Log
  • 原文地址:https://www.cnblogs.com/chengkanghua/p/12524690.html
Copyright © 2020-2023  润新知