国产凝思80系统网络配置

单网卡配置

以配置eth0为例

vim /etc/network/interfaces
# 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 eth0
    allow-hotplug eth0
    iface eth0 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        pre-up ip addr flush dev $IFACE

重启网络服务
/etc/init.d/networking restart
检查ip是否生效
ifconfig

bond配置

凝思80系统bonding功能ifenslave版本需要2.9及以上
dpkg -l | grep ifenslave //查看 ifenslave
配置bonding模块开机加载

vim /etc/modules
bonding

update-initramfs -u //更新内核
配置bonding模块

vim /etc/modprobe.d/bonding.conf
options bonding mode=1 max_bonds=2 miimon=100 downdelay=200 updelay=200 primary=eth0

修改配置文件,以bond0使用eth0和eth2网口为例

vim /etc/network/interfaces
    auto bond0
    allow-hotplug bond0
    iface bond0 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        pre-up ip addr flush dev $IFACE
        up ifenslave bond0 eth0 eth2
        down ifenslave -d bond0 eth0 eth2

重启网络服务使ip生效
/etc/init.d/networking restart
检查ip是否生效
ifconfig

你可能感兴趣的:(国产凝思80系统网络配置)