请教:双网卡LINUX服务器与交换机之间做BONDING,做完后却PING不通网关
(2012-06-05 00:34:45)
标签:
服务器交换机linux杂谈 |
请教:双网卡LINUX服务器与交换机之间做BONDING,做完后却PING不通网关双网卡LINUX服务器与交换机之间做TRUNK。做完后却PING不通网关。
下面是配置,在此想先问个问题,LINUX服务器与交换机配置TRUNK后,是不是可以通过BOND口访问任何机器,还是只能访问也设置了TRUNK的机器?
LINUX这边使用MODE4:
insmod /tmp/bonding.ko mode=4 miimon=100
ifconfig bond0 10.5.30.202 netmask 255.255.255.0 broadcast 10.5.30.255
ifenslave bond0 spi1
ifenslave bond0 spi4
状态如下:
root@localhost:/root> cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v2.6.5 (November 4, 2005)
Bonding Mode: IEEE 802.3ad Dynamic link aggregation
MII Status: down
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
802.3ad info
LACP rate: slow
Active Aggregator Info:
Aggregator ID: 1
Number of ports: 2
Actor Key: 17
Partner Key: 2
Partner Mac Address: 00:0a:8a:e4:fe:00
Slave Interface: spi1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:1b:da:50:25:4b
Aggregator ID: 1
Slave Interface: spi4
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:1b:da:50:25:4d
Aggregator ID: 1
思科的交换机上配置上802.3ad(LACP)的TRUNK
端口状态:
interface Port-channel2
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet5/9
switchport trunk encapsulation dot1q
switchport mode trunk
no cdp enable
channel-protocol lacp
channel-group 2 mode active
!
interface GigabitEthernet5/10
switchport trunk encapsulation dot1q
switchport mode trunk
channel-protocol lacp
channel-group 2 mode active
!
LACP状态,看DEVID已经获得了服务器的MAC地址了呀:
Samuel-4006#sh lacp nei
Flags:S - Device is requesting Slow LACPDUs
F - Device is requesting Fast LACPDUs
A - Device is in Active mode P - Device is in Passive mode
Channel group 2 neighbors
Partner's information:
LACP port Oper Port Port
Port Flags PriorityDev ID Age Key Number State
Gi5/9 SA 255 001b.da50.254b19s 0x11 0x2 0x3D
Gi5/10 SA 255 001b.da50.254b20s 0x11 0x1 0x3D
多谢帮助http://www.cqaixiu.com/http://www.tryingsms.com/!不要配置TRUNK。
另外最好手工做链路聚合,不要用LACP协议。BONGDING.txt里说了0和4都是需要在交换机一方做配置的呀?
另外,LACP配不配都不通呀。要配置成TURNK,
这个也是bond文档说的吗?是说了的呀。但模式6不用。
2. 两个端口进行active/active bonding:
Example 2 : ho st to switch at double speed
+----------+ +----------+
| |eth0 port1| |
| Host A +--------------------------+switch|
| +--------------------------+ |
| |eth1 port2| |
+----------+ +----------+
On host A : On the switch :
# modprobe bonding miimon=100 # set up a trunk on port1
# ifconfig bond0 addr and port2
# ifenslave bond0 eth0 eth1TURNK
你是否理解什么是TRUNK什么是ACCESS端口。
是说要捆绑,但是没说绑成TRUNK啊。
下面是配置,在此想先问个问题,LINUX服务器与交换机配置TRUNK后,是不是可以通过BOND口访问任何机器,还是只能访问也设置了TRUNK的机器?
LINUX这边使用MODE4:
insmod /tmp/bonding.ko mode=4 miimon=100
ifconfig bond0 10.5.30.202 netmask 255.255.255.0 broadcast 10.5.30.255
ifenslave bond0 spi1
ifenslave bond0 spi4
状态如下:
root@localhost:/root> cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v2.6.5 (November 4, 2005)
Bonding Mode: IEEE 802.3ad Dynamic link aggregation
MII Status: down
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
802.3ad info
LACP rate: slow
Active Aggregator Info:
Aggregator ID: 1
Number of ports: 2
Actor Key: 17
Partner Key: 2
Partner Mac Address: 00:0a:8a:e4:fe:00
Slave Interface: spi1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:1b:da:50:25:4b
Aggregator ID: 1
Slave Interface: spi4
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:1b:da:50:25:4d
Aggregator ID: 1
思科的交换机上配置上802.3ad(LACP)的TRUNK
端口状态:
interface Port-channel2
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet5/9
switchport trunk encapsulation dot1q
switchport mode trunk
no cdp enable
channel-protocol lacp
channel-group 2 mode active
!
interface GigabitEthernet5/10
switchport trunk encapsulation dot1q
switchport mode trunk
channel-protocol lacp
channel-group 2 mode active
!
LACP状态,看DEVID已经获得了服务器的MAC地址了呀:
Samuel-4006#sh lacp nei
Flags:S - Device is requesting Slow LACPDUs
F - Device is requesting Fast LACPDUs
A - Device is in Active mode P - Device is in Passive mode
Channel group 2 neighbors
Partner's information:
LACP port Oper Port Port
Port Flags PriorityDev ID Age Key Number State
Gi5/9 SA 255 001b.da50.254b19s 0x11 0x2 0x3D
Gi5/10 SA 255 001b.da50.254b20s 0x11 0x1 0x3D
多谢帮助http://www.cqaixiu.com/http://www.tryingsms.com/!不要配置TRUNK。
另外最好手工做链路聚合,不要用LACP协议。BONGDING.txt里说了0和4都是需要在交换机一方做配置的呀?
另外,LACP配不配都不通呀。要配置成TURNK,
这个也是bond文档说的吗?是说了的呀。但模式6不用。
2. 两个端口进行active/active bonding:
Example 2 : ho st to switch at double speed
+----------+ +----------+
| |eth0 port1| |
| Host A +--------------------------+switch|
| +--------------------------+ |
| |eth1 port2| |
+----------+ +----------+
On host A : On the switch :
# modprobe bonding miimon=100 # set up a trunk on port1
# ifconfig bond0 addr and port2
# ifenslave bond0 eth0 eth1TURNK
你是否理解什么是TRUNK什么是ACCESS端口。
是说要捆绑,但是没说绑成TRUNK啊。
前一篇:利用多核多线程进行程序优化