07-System Volume

15-Stack Management Commands

Chapters Download  (52.94 KB)

15-Stack Management Commands


Stack Management Configuration Commands

display stack

Syntax

display stack [ members ]

View

Any view

Default Level

1: Monitor level

Parameters

members: Displays stack information of the stack members, including the master device and the slave devices. This keyword is only available to the master device of a stack.

Description

Use the display stack command to display the stack information.

Examples

# Display stack information on the master device.

<stack_0.Sysname> display stack

Role: Master

Management VLAN: 1

IP pool: 1.1.1.1/24

Device total number: 3

# Display stack information on a slave device.

<stack_1.Sysname> display stack

Role: Slave

Management VLAN: 1

IP pool: 1.1.1.1/24

Master MAC address: 000f-e200-1000

Table 1-1 display stack command output description

Field

Description

Role

Role of the device in the stack.

l      Master indicates that the device is the master device of the stack.

l      Slave indicates that the device is a slave device of the stack.

Management VLAN

ID of the management VLAN, where interactive packets of the stack are transmitted to implement the internal communication between the master device and the slave devices.

IP pool

Range of the private IP addresses used by the stack

Device total number

Total number of the devices in the stack, which is displayed on the master device only.

Master MAC address

MAC address of the master device, which is displayed on a slave device only.

 

# Display stack information of all the stack members on the master.

<stack_0.Sysname> display stack members

Number: 0

Role: Master

Sysname: stack_0.Sysname

Device type: S5810-50S

MAC Address: 000f-e200-1000

 

Number: 1

Role: Slave

Sysname: stack_1.Sysname

Device type: S5810-50S

MAC Address: 000f-e200-2000

Table 1-2 display stack members command output description

Field

Description

Number

Sequence number of the device in the stack.

l      Value 0 indicates that the device is the master device of the stack.

l      A value other than 0 indicates that the device is a slave device and the value is the sequence number of the slave device in the stack.

Role

Role of the device in the stack.

l      Master indicates that the device is the master device of the stack.

l      Slave indicates that the device is a slave device of the stack.

Sysname

Host name of the device

MAC Address

MAC address of the device

 

stack ip-pool

Syntax

stack ip-pool ip-address { mask | mask-length }

undo stack ip-pool

View

System view

Default Level

2: System level

Parameters

ip-address: Start IP address of the stack IP address pool.

mask: IP address mask, in dotted decimal notation. The system ANDs the mask with the specified IP address to get a network segment address, which will be the private IP address pool providing IP addresses for the slave devices.

mask-length: IP address mask length, based on which a network segment address is calculated, which will be the private IP address pool providing IP addresses for the slave devices.

Description

Use the stack ip-pool command to configure a private IP address pool for a stack.

Use the undo stack ip-pool command to remove the configured private IP address pool.

By default, no private IP address pool is configured for a stack.

Before creating a stack, you need to configure a private IP address pool for the stack, so that when a slave device joins the stack, the master device can assign an available IP address to it automatically.

Examples

# Configure a private IP address pool containing IP addresses from 192.168.1.1 to 192.168.1.255 for a stack.

<Sysname> system-view

[Sysname] stack ip-pool 192.168.1.1 24

stack role master

Syntax

stack role master

undo stack role master

View

System view

Default Level

2: System level

Parameters

None

Description

Use the stack role master command to create a stack.

Use the undo stack role master command to remove a stack.

After you execute the stack role master command on a stack-supporting device, the device becomes the master device of a stack and automatically adds the devices connected with its stack ports to the stack.

Note that you can remove a stack only on the master device of the stack.

Examples

# Create a stack.

<Sysname> system-view

[Sysname] stack role master

[stack_0.Sysname]

stack stack-port

Syntax

stack stack-port stack-port-num port interface-list

undo stack stack-port stack-port-num port interface-list

View

System view

Default Level

2: System level

Parameters

stack-port-num: Number of stack ports to be configured, in the range 1 to 77.

interface-list: List of Ethernet ports to be configured as stack ports. You can specify multiple Ethernet ports by providing this argument in the format of interface-list = { interface-type interface-number }&<1-n>, where interface-type is the interface type, interface-number is the interface number, and &<1-n> indicates that you can specify up to n ports or port lists. The value of n equals that of stack-port-num.

Description

Use the stack stack-port command to configure the specified ports as stack ports.

Use the undo stack stack-port command to remove the configuration.

By default, a port is not a stack port.

Examples

# Configure GigabitEthernet 1/0/1 as a stack port.

<Sysname> system-view

[Sysname] stack stack-port 1 gigabitethernet 1/0/1

stack switch-to

Syntax

stack switch-to member-id

View

User view

Default Level

2: System level

Parameters

member-id: ID of the slave device which you want to switch to, in the range 1 to 8.

Description

Use the stack switch-to command to switch from the master device to a slave device to perform configurations.

This command is used to switch from the master device to a slave device with the user level unchanged. To switch back, use the quit command.

Examples

# Switch from the master device to slave device 1.

<stack_0.Sysname> stack switch-to 1

<stack_1.Sysname>

H3C reserves the right to modify its collaterals without any prior notice. For the latest information of the collaterals, please consult H3C sales or call 400 hotline.