途胜HEL6互连网铺排,PAJEROHEL6配置双网卡bonding及桥接网赌十大信誉的平台

今天被Fedora
11的system-config-network搞伤了,竟然不支持static IP的配置,汗一个!

一.非桥接模式:

实验环境:VMware Workstation8

由于我的AS5的服务器版本的Linux系统很多软件安装及其不方便,在安装了一下午linux版电驴amule未果后一怒之下重装成了Fedora
11,话说这个Fedora
11还真是好用,使用yum基本上可以安装所有想要到软件包,amule轻松搞定!但是今天,原本在as5上轻松搞定的一个事情搞了一下午最终我还是选择了“忍耐”!

配置:/etc/sysconfig/network-scripts/ifcfg-eth0,如下:

RHEL6.2

Fedora 11的system-config-network不支持static IP的配置,现象如下:

DEVICE=”eth0″
HWADDR=”11:11:11:11:11:11″
NM_CONTROLLED=”yes”
ONBOOT=”yes”

双网卡(虚机做bonding实验只支持mode=1热备模式)

我欲配置我的无线网卡eth0为静态IP地址192.168.1.2

BOOTPROTO=static
IPADDR=192.168.77.103
NETMASK=255.255.255.0
GATEWAY=192.168.77.1

# cd /etc/sysconfig/network-scripts/
 
# cat ifcfg-eth0
DEVICE=”eth0″
HWADDR=”00:0C:29:E4:DC:43″   (建议不指定MAC地址)
#NM_CONTROLLED=”yes”
ONBOOT=”yes”
BOOTPROTO=none
MASTER=bond1
SLAVE=yes
USERCTL=no
 
# cat ifcfg-eth1
DEVICE=”eth1″
HWADDR=”00:0C:29:E4:DC:4D”    (建议不指定MAC地址)
#NM_CONTROLLED=”yes”
ONBOOT=”yes”
BOOTPROTO=none
MASTER=bond1
SLAVE=yes
USERCTL=no
 
# cat ifcfg-bond1
DEVICE=bond1
#TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
#IPADDR=192.168.10.88
#NETMASK=255.255.255.0
#GATEWAY=192.168.10.2
USERCTL=no
BRIDGE=br0
BONDING_OPTS=”miimon=100 mode=1″ 
#由于RHEL6与以前不一样,所以指定模式参数放在此bonding文件中
 
# cat ifcfg-br0
DEVICE=”br0″
#HWADDR=”00:0C:29:E4:DC:43″
#NM_CONTROLLED=”yes”
ONBOOT=”yes”
TYPE=Bridge
BOOTPROTO=static
#MASTER=bond1
#SLAVE=yes
#USERCTL=no
IPADDR=192.168.10.88
NETMASK=255.255.255.0
GATEWAY=192.168.10.2
 
# cat /etc/modprobe.d/modprobe.conf
alias netdev-bond1 bonding
 
重启系统查看
# ifconfig
bond1     Link encap:Ethernet  HWaddr 00:0C:29:E4:DC:43
          inet6 addr: fe80::20c:29ff:fee4:dc43/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:1947 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2774 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:185500 (181.1 KiB)  TX bytes:279330 (272.7 KiB)
 
br0       Link encap:Ethernet  HWaddr 00:0C:29:E4:DC:43
          inet addr:192.168.10.88  Bcast:192.168.10.255 
Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fee4:dc43/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:925 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2708 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:78625 (76.7 KiB)  TX bytes:274754 (268.3 KiB)
 
eth0      Link encap:Ethernet  HWaddr 00:0C:29:E4:DC:43
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:1039 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2775 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:100299 (97.9 KiB)  TX bytes:280072 (273.5 KiB)
 
eth1      Link encap:Ethernet  HWaddr 00:0C:29:E4:DC:43
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:909 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:85267 (83.2 KiB)  TX bytes:0 (0.0 b)
 
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

system->administration->network上选择eth0后点击Edit编辑,Staticly
set IP
addresses编辑IP和掩码和网关信息,然后保存退出reboot,ifconfig发现eth0的静态IP地址不生效:

二.桥接模式:

网赌十大信誉的平台 1

eth0      Link encap:Ethernet  HWaddr 00:0E:9B:BD:02:37       
          inet6 addr: fe80::20e:9bff:febd:237/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:46422 errors:905 dropped:0 overruns:0 frame:905
          TX packets:12903 errors:32 dropped:0 overruns:0 carrier:0
          collisions:222 txqueuelen:1000
          RX bytes:9526927 (9.0 MiB)  TX bytes:1729163 (1.6 MiB)
          Interrupt:11 Base address:0x8000

1.配置/etc/sysconfig/network-scripts/ifcfg-eth0,如下:

原因:

DEVICE=”eth0″
TYPE=ethernet
HWADDR=”11:11:11:11:11:11″
NM_CONTROLLED=”no”
ONBOOT=”yes”

每次从system-config-network配置后,/etc/sysconfig/network-scripts/ifcfig-eth0中:

#BOOTPROTO=static
#IPADDR=192.168.77.103
#NETMASK=255.255.255.0
#GATEWAY=192.168.77.1
BRIDGE=br0

BOOTPROTO=none

2.配置/etc/sysconfig/network-scripts/ifcfg-br0,如下:

正常情况应为:

DEVICE=”br0″
TYPE=Bridge

BOOTPROTO=static

BOOTPROTO=static
IPADDR=192.168.77.103
NETMASK=255.255.255.0
#NETWORK=192.168.1.0
GATEWAY=192.168.77.1

在BOOTPROTO=none的情况下无论手工ifup还是由Controlled by NetworkManager
eth0网卡都不能正常工作;

#HWADDR=”11:11:11:11:11:11″
#NM_CONTROLLED=”yes”
ONBOOT=”yes”
NM_CONTROLLED=no

另外,

3.[可略]配置/etc/sysconfig/network-scripts/ifcfg-eth1,如下:
DEVICE=”eth1″
HWADDR=”78:2B:CB:65:25:EC”
NM_CONTROLLED=”yes”
ONBOOT=”yes”

每次从system-config-network配置如果勾选Controlled by
NetworkManager后,/etc/sysconfig/network-scripts/ifcfig-eth0中:

BOOTPROTO=static
IPADDR=10.10.10.103
#netmask=255.255.255.0
#GATEWAY=10.10.10.1

NM_CONTROLLED=yes

4.修改/etc/sysctl.conf 文件,并增加如下:

在此种下reboot后eth0仍然不生效:

net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
net.bridge.bridge-nf-filter-vlan-tagged=0
保存退出。

eth0      Link encap:Ethernet  HWaddr 00:0E:9B:BD:02:37       
          inet6 addr: fe80::20e:9bff:febd:237/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:46422 errors:905 dropped:0 overruns:0 frame:905
          TX packets:12903 errors:32 dropped:0 overruns:0 carrier:0
          collisions:222 txqueuelen:1000
          RX bytes:9526927 (9.0 MiB)  TX bytes:1729163 (1.6 MiB)
          Interrupt:11 Base address:0x8000

5.重启网络: /etc/init.d/network restart

但是如果手工修改/etc/sysconfig/network-scripts/ifcfig-eth0设置NM_网赌十大信誉的平台,CONTROLLED=no,reboot后eth不被激活,但是手工执行ifup
eth0后eth0正常工作,ifcfig-eth0的配置如下:

三.查询验证:

DEVICE=eth0
TYPE=Wireless
ONBOOT=yes
BOOTPROTO=static
HWADDR=00:0E:9B:BD:02:37
IPADDR=192.168.1.2
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
NM_CONTROLLED=no
MODE=Managed
DNS1=202.101.103.55
MTU=1500

1.brctl show:

此时可以手工启动eth0并正常工作,但是不能开机自启动,可见是system-config-network的一个bug,

bridge name     bridge id               STP enabled     interfaces
br0             8000.782bcb6525eb       no              eth0
                                                        vnet0
virbr0          8000.000000000000       yes

 

2.ifconfig查询结果类似,则表明br0桥接配置成功:

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/maomaovv/archive/2009/08/16/4453740.aspx

[root@compute3RHEL6 network-scripts]# ifconfig
br0       Link encap:Ethernet  HWaddr 11:11:11:11:11:11
          inet addr:192.168.77.103  Bcast:192.168.77.255 
Mask:255.255.255.0
          inet6 addr: fe80::1111:1111:1111:1111/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14328578 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4650570 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4459176095 (4.1 GiB)  TX bytes:320844851 (305.9
MiB)

网赌十大信誉的平台 2

eth0      Link encap:Ethernet  HWaddr 11:11:11:11:11:11
          inet6 addr: fe80::7a2b:cbff:fe65:25eb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14338630 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4651391 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4718080971 (4.3 GiB)  TX bytes:362095405 (345.3
MiB)
          Interrupt:36 Memory:da000000-da012800

eth1      Link encap:Ethernet  HWaddr 78:2B:CB:65:25:EC
          inet6 addr: 1111::1111:1111:1111:25ec/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:32644 errors:0 dropped:0 overruns:0 frame:0
          TX packets:445 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2548629 (2.4 MiB)  TX bytes:41490 (40.5 KiB)
          Interrupt:48 Memory:dc000000-dc012800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1028 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1028 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1180221 (1.1 MiB)  TX bytes:1180221 (1.1 MiB)

virbr0    Link encap:Ethernet  HWaddr 11:11:11:11:11:11
          inet addr:192.168.122.1  Bcast:192.168.122.255 
Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:4276 (4.1 KiB)

vnet0     Link encap:Ethernet  HWaddr 11:11:11:11:11:11
          inet6 addr: 1111::1111:11:1111:1111/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:70 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2062 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:12016 (11.7 KiB)  TX bytes:178631 (174.4 KiB)

相关文章

Post Author: admin

发表评论

电子邮件地址不会被公开。 必填项已用*标注