栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

Kylin操作系统双网卡bonding配置

Kylin操作系统双网卡bonding配置

绑定步骤:
1、安装ifenslave;
dpkg -i ifenslave_2.7kord1_all.deb

2、在/etc/modules文件末行加入bonding,设置bonding模块开机自动加载

3、创建/etc/modprobe.d/bonding.conf, 命令vim /etc/modprobe.d/bonding.conf,内容如下:
options bonding mode=1 miimon=100
其中mode=1,表示主-备策略

4、加载bonding模块;
命令:sudo modprobe bonding
查看下是否加载成功
lsmod|grep bonding
配置bond0使用的网络接口
ifenslave bond0 enp1s0f0 enp1s0f1
5、写入配置文件,可以直接替换interfaces文件,修改IP地址即可
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 enp1s0f0
iface enp1s0f0 inet manual
bond-master bond0

auto enp1s0f1
iface enp1s0f1 inet manual
bond-master bond0

auto bond0
iface bond0 inet static
address 192.168.1.22
netmask 255.255.255.0
gateway 192.168.1.1
bond-slaves enp1s0f0 enp1s0f1
bond-mode 1
bond-miimon 100

auto enp1s0f2
iface enp1s0f2 inet static
address 192.168.1.111
netmask 255.255.255.128
gateway 192.168.1.1
# The primary network interface
8、禁用图形化界面网卡
systemctl stop NetworkManager.service
systemctl disable NetworkManager.service

7、重启
命令reboot

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/342638.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号