Chinaunix首页 | 论坛 | 博客
  • 博客访问: 40492
  • 博文数量: 16
  • 博客积分: 810
  • 博客等级: 准尉
  • 技术积分: 200
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-22 13:10
文章分类
文章存档

2008年(16)

我的朋友
最近访客

分类: LINUX

2008-10-16 15:43:01

双端口网卡 安装时会报Device eth0 has different MAC address than expected错误时 删除我们只要编辑这个文件:/etc/sysconfig/network-

scripts/ifcfg-eth0,把HWADDR=.... 这行删掉就行了


双网卡绑定
[root@YYZCSER network-scripts]# more ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
USERCTL=no
ONBOOT=yes
NETWORK=10.11.19.0
IPADDR=10.11.19.227
NETMASK=255.255.255.0
BROADCAST=10.11.19.255
TYPE=Ethernet

[root@YYZCSER network-scripts]# more ifcfg-eth2
DEVICE=eth2
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes

TYPE=Ethernet[root@YYZCSER network-scripts]# more ifcfg-eth3
DEVICE=eth3
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
TYPE=Ethernet

[root@YYZCSER network-scripts]# more /etc/modprobe.conf
alias scsi_hostadapter megaraid_sas
alias usb-controller ehci-hcd
alias usb-controller1 uhci-hcd
alias scsi_hostadapter0 mptsas
alias eth0 bnx2
alias eth1 bnx2
alias scsi_hostadapter1 ata_piix
alias eth3 e1000
alias eth2 e1000
install bond0 /sbin/modprobe bonding -o bond0 miimon=100 mode=1 这条要添加


[root@YYZCSER network-scripts]# more /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf &
echo 1 > /proc/sys/net/ipv4/ip_forward
mii-tool -F 100baseTx-FD eth0
mii-tool -F 100baseTx-FD eth1
/nasmount.sh &
route add -net 192.168.18.0/24 gw 192.168.11.254
ifenslave bond0 eth2 eth3   加这条和下面这条
route add -net 10.11.239.0 netmask 255.255.255.0 gw 10.11.19.254 bond0

reboot 或 service network restart
阅读(614) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~