关于linux:国产凝思80系统网络配置

3次阅读

共计 745 个字符,预计需要花费 2 分钟才能阅读完成。

单网卡配置

以配置 eth0 为例

vim /etc/network/interfaces    // 增加如下内容
    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 模块开机加载
echo "bonding" >> /etc/modules
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

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

正文完
 0