mseSTA 版 (精华区)

发信人: wizard (Python), 信区: mseSTA       
标  题: software的情况
发信站: BBS 听涛站 (Sun Feb 29 19:12:07 2004), 站内

今天弄了一个下午,还是没有完全弄好,不过bond是可以用了
eth0--
     |__bond0---ethernet
     |
eth1--

eth2 invalid

首先确认装了ifenslave
并且要把ifenslave的路径加入PATH

modprobe bonding [ options ]

> modules
# /etc/modules

...
bonding
...

> modules.conf
# /etc/modules.conf

...
alias bond0 bonding
# some options /usr/src/linux-2.6.3/Documentation/networking/bonding.txt
options bond0 ...
...

> interfaces
# /etc/network/interfaces

...

auto bond0
ifac bond0 inet static
        address 166.111.162.59
        netmask 255.255.254.0
        broadcast 166.111.163.255
        network 166.111.162.0
        gateway 166.111.162.1
        up ifenslave bond0 eth0 eth1
        down ifenslave -d bond0 eth0 eth1
#       pre-up
#       post-down

# up 在配置bond0之后执行的命令,把eth0 eth1作slave绑定到bond0上
# down 在关闭 bond0之前执行的命令,把eth0 eth1从bond0上卸掉
# pre-up post-down 和up类似,只是执行时间不同,从字面上就可以知道了:)
# 参见
#       man interfaces(8) 
#       man ifup

/etc/init.d/networking restart

虽然很简单,但是今天却折腾了一个下午,主要是有点问题觉得ifenslave可能有些bug
我每次都能起来,但是却丢包很严重,后来发现起来以后依次执行下述命令就行了:
ifconfig eth0 down
ifconfig eht1 down
ifenslave bond0 eth0 eth1
ifenslave -d bond0 eth0 eth1
ifenslave bond0 eth0 eth1
这些命令我都不知道干嘛要这样,先down一下,然后卸掉eth0 eth1,然后再绑定-_-!
尤其是卸载前面的那一条,本来eth0 eth1都还绑在bond0上,还要强加一次,失败
然后才卸,都不知道为什么:(((((只好把这些都写到networking里了

还有一个问题就是eth2不能起来,即使起来了,你从外面去连eth2,实际上却是走的
eth1和eth0绑定的bond0,从网卡灯上就可以看到了

两个同时可以用,我就成功了一次,那次配置也没有变动啊,但是不知道为什么,以后
就用不了了;昨天我机器也是诡异的问题,估计那块硬盘上有坏道了:((((

--
(defun power-set (set)
  (if (null set) '(())
    (let ((pset-of-rest (power-set (cdr set))))
      (append
      (mapcar #'(lambda (subset) (cons (car set) subset))
              pset-of-rest) pset-of-rest))))


※ 来源:·BBS 听涛站 tingtao.net·[FROM: 219.224.175.139]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.077毫秒