跳至主要内容

SUSE下绑定双网卡

2、cp /etc/sysconfig/network/ifcfg-eth-xx:xx:xx:xx:xx:xx /etc/sysconfig/network/ifcfg-bond0
3、编辑ifcfg-bond0文件:
加入如下几行:
BONDING_SLAVE_0='eth0'
BONDING_SLAVE_1='eth1'
BONDING_MASTER=yes
BONDING_MODULE_OPTS=
修改后的ifcfg-bond0文件如下:
BOOTPROTO='static'
BROADCAST='192.168.23.255'
IPADDR='192.168.23.6'
MTU=''
NETMASK='255.255.255.0'
NETWORK='192.168.23.0'
REMOTE_IPADDR=''
STARTMODE='onboot'
UNIQUE='WMHV.+EMLITqy0YF'
BONDING_MASTER=yes
BONDING_SLAVE_0='eth0'
BONDING_SLAVE_1='eth1'
BONDING_MODULE_OPTS='miimon=100 mode=1 use_carrier=0' --注:mode=1为网卡主备用,mode=0为负荷分担。
4、删除/etc/sysconfig/network下的已经绑定的网卡的配置文件(如:ifcfg-eth-xx:xx:xx:xx:xx:xx)
5、使用rcnetwork restart重起服务
6、使用ifconfig -a 命令查看bond0上是否已经有IP,而eth0和eth1上则没有IP地址。

------------

理论上来说还是Yast比较方便

查看全双工和半双工的命令 ethtool

评论

此博客中的热门博文

4 steps to delete account in Gerrit DB

4 steps to delete account in DB. Delete from accounts where preferred_email=’’; delete from account_ssh_keys where account_id=''; delete from account_external_ids where external_id='gerrit:*’; delete from account_external_ids where external_id='username:*’; whatever it was in H2 database and postgres db . H2: ssh -p 24198 localhost gerrit gsql Postgres: psql

mod

apache安装后,如果想再添加模块,往往不想重新安装一次,再者,我在安装中发现,并不是安装文件中所有的modules都会被默认安装,即使在安装中使用了 ./configure --prefix=/usr/local/apache --enable-so --enable-modules=all --enable-mods-shared=all也是如此。我使用上述方法安装的apache2.2.6就没有安装proxy相关模块。这时,需要手工生成so文件,但会自动的被复制到你的apache安装目录的modules中,然后修改apache的配置文件,加载相关模块,验证apache配置并重启服务即可。以上描述的具体操作步骤如下: 操作系统:linux redhat 4.5 ES apache版本:2.2.6 可自行下载tar包 1. 拷贝安装包到/usr/local,并在目标目录下进行解压。[root@localhost local]# cd /usr/local[root@localhost local]# tar -zxvf httpd-2.2.4.tar.gz2. 配置安装参数,安装的目标目录为/usr/local/apache,建议设置enable-mods-shared=all,不用的module注释掉就行了![root@localhost local]# cd httpd-2.2.4[root@localhost httpd-2.2.4]# ./configure --prefix=/usr/local/apache --enable-so --enable-mods-shared=all3. 编译并安装。[root@localhost httpd-2.2.4]# make[root@localhost httpd-2.2.4]# make install4. 启动Apache,并测试。[root@localhost httpd-2.2.4]# cd /usr/local/apache/bin[root@localhost bin]# ./apachectl start 打开浏览器,并在地址栏中输入主机的IP地址如 http://192.168.1.254/ 如果出现以下画面则说明安装成功。It works! 注意:安装完成后检查系统服务中的HTTPD服务是否已