当前位置:
文档之家› 服务器网卡多网卡绑定及vlan划分配置方法
服务器网卡多网卡绑定及vlan划分配置方法
snda-intel-lab-2960s-250#sh running-config int port-channel 1 Building configuration...
Current configuration : 55 bytes ! interface Port-channel1
switchport mode access end
vlan 支持,交换机接服务器端口做 truak 配置
interface GigabitEthernet0/15 switchport mode trunk
2. 软件安装 Windows 系统
1) intel 网卡在 intel 网站下载最新的网卡驱动安装就可以。
2) broadcom 网卡在 broadcom 网站下载最新驱动,并下载网卡管理工具,目前能下载到 的管理工具只支持 windows server 2008,如果需要支持 windows server 2003 请在 dell ibm 等厂家网站支持页面下载比较老的版本。
TYPE=Ethernet MASTER=bond0 SLAVE=yes [root@lab]# cat /etc/modprobe.d/bond0.conf alias bond0 bonding 4. 配置网卡对 vlan 的支持 Windows 系统 Intel 网卡 选择网络连接属性---网卡配置
[root@lab]# cat ifcfg-eth1.100 DEVICE=eth1.100 ONBOOT=yes BOOTPROTO=none TYPE=Ethernet VLAN=yes IPADDR=*.*.*.* NETMASK=255.255.255.0
附 1: Linux 系统中参数及其意义 mode=<value> Allows you to specify the bonding policy. The <value> can be one of:
Linux 系统 [root@lab]# cat /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 BOOTPROTO=none IPADDR=172.16.1.248 NETMASK=255.255.255.0 GATEWAY=172.16.1.1 TYPE=Ethernet BONDING_OPTS="mode=4 miimon=100"
balance-rr or 0 — Sets a round-robin policy for fault tolerance and load balancing. Transmissions are received and sent out sequentially on each bonded slave interface beginning with the first one available. active-backup or 1 — Sets an active-backup policy for fault tolerance. Transmissions are received and sent out via the first available bonded slave interface. Another bonded slave interface is only used if the active bonded slave interface fails. balance-xor or 2 — Sets an XOR (exclusive-or) policy for fault tolerance and load balancing. Using this method, the interface matches up the incoming request's MAC address with the MAC address for one of the slave NICs. Once this link is established, transmissions are sent out sequentially beginning with the first available interface. broadcast or 3 — Sets a broadcast policy for fault tolerance. All transmissions are sent on all slave interfaces. 802.3ad or 4 — Sets an IEEE 802.3ad dynamic link aggregation policy. Creates aggregation groups that share the same speed and duplex settings. Transmits and receives on all slaves in the active aggregator. Requires a switch that is 802.3ad compliant. balance-tlb or 5 — Sets a Transmit Load Balancing (TLB) policy for fault tolerance and load balancing. The outgoing traffic is distributed according to the current load on each slave interface. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed slave. balance-alb or 6 — Sets an Active Load Balancing (ALB) policy for fault tolerance and load balancing. Includes transmit and receive load balancing for IPV4 traffic. Receive load balancing is achieved through ARP negotiation.
snda-intel-lab-2960s-250#sh running-config int g0/4 Building configuration...
Current configuration : 137 bytes ! interface GigabitEthernet0/4
switchport mode access spanning-tree portfast channel-protocol lacp channel-group 1 mode passive end
3)
一定要确定交换机端口和服务器网卡的对应关系。 配置的时候,交换机端口关闭,待服务器和交换机全部完成配置后,再开 启端口,否则可能导致交换机端口自动阻塞。 配置的时候网卡 ip 信息会丢失,如果是远程操作,会造成连接丢失,请 做预案。
操作步骤:
1. 交换机配置
多网卡绑定支持
假设 3,4 端口做 port-channel,相关配置如下:
snda-intel-lab-2960s-250#sh running-config int g0/3 Building configuration...
Current configuration : 137 bytes ! interface GigabitEthernet0/3
switchport mode access spanning-tree portfast channel-protocol lacp channel-group 1 mode passive end
软件环境:
broadcom 网卡 windows 2003 windows 2008 Dotnet3.5 broadcom 管理软件 BACS
intel 网卡
windows 2003 windows 2008 最新驱动包
hp 服务器
最新驱动包,hp 网卡管理工具
linux
centos 6.2
注意事项: 1) 2)
3) hp 服务器安装最新的网卡驱动和管理工具,hp 的设置方法和 broadcom 设置类似,多 网卡绑定介绍 broadcom 管理工具使用,网卡 vlan 介绍 hp 网卡的使用。
Linux 系统不需要安装特殊软件 3. 配置网卡端口绑定 Windows 系统 broadcom 网卡 添加一个端口组
欢 访问
服务器网卡多网卡绑定及 vlan 支持
版本: 1.0 原理: 利用 802.3ad 协议,实现多网卡的绑定。
利用 802.31p 协议,实现服务器对多 vlan 的支持。 结果: 通过 netperf 测试,双网卡绑定流量可以达到 1.5G 以上。
通过对 vlan 的支持,服务器可以绑定多个 vlan 的 ip。
添加一个 vlan100
等待配置生效
完成后可以看到生成一个网卡,vlan100,如果需要生成多个 vlan,可以重复操作:
Linux 系统 配置对 vlan100 的支持 [root@lab]# cat ifcfg-eth1 DEVICE=eth1 HWADDR=E4:1F:13:B7:8F:56 ONBOOT=yes BOOTPROTO=none TYPE=Ethernet
[root@lab]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=none ONBOOT=yes TYPE=Ethernet MASTER=b /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 ONBOOT=yes BOOTPROTO=none