回复nApoleon 的帖子4网卡 肯定也要做 主备。 做个TEAMING....
linux下 做TEAMING...
附上文档.
Configuring Teaming
1. Copy one of the sample scripts from the /etc/basp/samples directory to /etc/basp directory and give it a meaningful name.
the name of the configuration script must begin with team-.
2. Modify the configuration script to:
o change the team type
o add/delete physical network interfaces
o add/delete virtual network interfaces
The syntax of the configuration script can be found below.
3. Manually start the team for the first time
/etc/rc.d/init.d/basp start
4. Run netcfg to configure the IP addresses of the virtual network interfaces.
Starting the team is only required for the first time. Teams are started automatically in subsequent reboots.
Form multiple teams by copying the sample files into /etc/basp/ and modifying this file as described in the sample file. The files must have unique filenames. Name the files team-***, where *** is a unique identifier for the team.
BASPCFG Command Line Tool
The baspcfg command line tool is used to configure the BASP teams, add and remove NICs, and add and remove a virtual devices. The following is an example of the usage of this tool.
baspcfg v1.1.6 - Broadcom Advanced Server Program Configuration Utility
Copyright (c) 2000 Broadcom Corporation. All rights reserved.
usage: baspcfg
commands
Commands Description
addteam <tid> <type> <tname> create a team
delteam <tid> delete a team
addva <tid> <vlan_id> <vname> [macaddr] add a virtual adapter to a team
delva <tid> <vlan_id> del a virtual adapter from a team bind
bind <tid> <role> <device> bind a physical adapter to a team unbind
unbind <tid> <device> unbind a physical adapter from a team
show <tid> display team configurations
where
Commands Description
tid A unique ID for each team, starting from 0
type Team type: 0=SLB, 1=FEC/GEC
tname ASCII string of the team
vlan_id VLAN ID: from 1 to 4094, 0=untagged or no VLAN
vname ASCII string of the virtual device
macaddr MAC address (optional), e.g. 00:10:18:00:11:44
role Role of the physical device: 0=primary, 1=hot-standby
Startup Scripts
Script Name Description
basp This script is intended to be installed in /etc/rc.d/init.d directory. After copying the script, run "chkconfig --add basp". This script is executed at runlevel 2, 3, 4, and 5. When basp runs, it searches the /etc/basp directory to list all the files with "team-" prefix, and then it invokes the "baspteam" script to add or delete the teams. It is normal, for each "team-*" file in /etc/basp to represent one team.
baspteam This script is called by basp to add or delete a team. To install, create a "/etc/basp" directory and copy this script over.
?To manually add a team: baspteam team-sample add
?To delete a team: baspteam team-sample del
team-sample is the config script.
team-sample This script contains an SLB team configuration with three NICs: eth0, eth1 and eth2. The team name is "TeamSample". All three NICs are primary. One virtual interface is also created for this team and the name of the virtual interface is "sw0". "sw0" is the device that ifconfig should be run against to set up the IP address. No VLAN is enabled in the script.
This script and team-gec are intended to be customized. This script should be copied to /etc/basp directory and should retain the team- prefix.
team-gec This configuration script creates a GEC team with 3 network interfaces: eth0, eth1, and eth2. The team name is "TeamGEC". All three NICs are primary. One virtual interface is added to the team with the name "sw0" and no VLAN is enabled.
This script and the team-sample script are intended to be customized. This script should be copied to /etc/basp directory and retain the team- prefix.
Starting the team is only required for the first time. Teams are started automatically in subsequent reboots.
Form multiple teams by copying the sample files into /etc/basp/ and modifying this file as described in the sample file. The files must have unique filenames. Name the files team-*** where *** is a unique identifier for the team.
Configuration Scripts
Both team-sample and team-gec are configuration scripts that follow the same syntax, as follows:
?TEAM_ID: this number uniquely identifies a team.
?TEAM_TYPE: 0 = SLB, 1 = Generic Trunking/GEC/FEC
?TEAM_NAME: ASCII name of the team
?TEAM_PAx_NAME: ASCII name of the physical interface x, where x can be 0 to 7.
?TEAM_PAx_ROLE: role of the physical interface x 0 = Primary, 1 = Hot-standby. This field must be 0 for Generic Trunking/GEC/FEC team.
?TEAM_VAx_NAME: ASCII name of the virtual interface x, where x can be 0 to 63
?TEAM_VAX_VLAN: 802.1p VLAN ID of the virtual interface x. For untagged virtual interface (i.e., without VLAN enable), set it to 0. The valid VLAN ID can be 0 to 4094.
device ASCII string of the physical device, e.g. eth0