H3C交换机配置堆叠

# 堆叠配置
因为这两台交换机要进行堆叠,并且有些操作只有在堆叠之后才能做,所以第一步就是要对交换机进行堆叠操作。
机房里面两台5130S-EI各有48个电口+4个SFP接口。48个电口均为千兆接口,用于连接桌面云终端和一台教师机。4个SFP接口,其中49和50分别由于堆叠,51和52用于链路聚合。下面有开始堆叠配置。

## 两台设备堆叠

### 物理连线
```
sw01   port-49 ----  sw02  port-50
sw01   port-50 ---- sw02 port-49
```
## reset 重置一台交换机

拿到一台新设备,习惯性的恢复出厂设置,执行下面的命令
reset saved-configuration,清除保存的配置信息
reboot,选择N,不保存当前配置。然后选择Y,重启交换机。

## 先在交换机2上面操作
```
system-view
irf member 1 renumber 2
save
reboot
```

重启之后,可以看到端口编号都变成2开头的了。
## 在交换机2上配置如下
```
system-view
irf domain 1
interface range Ten-GigabitEthernet 2/0/49 to Ten-GigabitEthernet 2/0/50
shutdown
quit
irf-port 2/2
port group interface Ten-GigabitEthernet2/0/49
port group interface Ten-GigabitEthernet2/0/50
quit
interface range Ten-GigabitEthernet 2/0/49 to Ten-GigabitEthernet 2/0/50
undo shutdown
quit
irf-port-configuration active
quit
save
```
## 交换机1上面的配置:
```
system-view
irf member 1 priority 32
irf domain 1
interface range Ten-GigabitEthernet 1/0/49 to Ten-GigabitEthernet 1/0/50
shutdown
quit
irf-port 1/1
port group interface Ten-GigabitEthernet1/0/49
port group interface Ten-GigabitEthernet1/0/50
quit
interface range Ten-GigabitEthernet 1/0/49 to Ten-GigabitEthernet 1/0/50
undo shutdown
quit
irf-port-configuration active
quit
save
```
如果以上配置没有问题,交换机重启之后堆叠成功。现在物理上的两台交换机成为逻辑上的一台交换机。查看关于堆叠配置信息如下:

```
dis irf
```


# telnet与ssh登陆配置
```
system-view
telnet server enable
ssh server enable
local-user test class manage
password simple 123456
service-type telnet ssh terminal
authorization-attribute user-role network-admin
quit
line console 0 1
authentication-mode scheme
quit
user-interface vty 0 4
authentication-mode scheme
user-role network-admin
protocol inbound all
quit
ssh user testservice-type stelnet authentication-type password
```

## 设置vlan 信息和默认路由
```
interface Vlan-interface 1
ip address 192.168.88.28 24
quit
ip route-static 0.0.0.0 0 192.168.88.254
```


## 端口聚合
```
interface Bridge-Aggregation 1
quit
interface range GigabitEthernet 1/0/51 to g 1/0/52 GigabitEthernet 2/0/51 to GigabitEthernet 2/0/52
port link-aggregation group 1
dhcp snooping trust
quit
interface Bridge-Aggregation 1
port link-type trunk
port trunk permit vlan all
dhcp snooping trust
quit
```
## 其他配置
```
dhcp enable
dhcp snooping enable
ntp-service unicast-server 114.114.114.114
ntp-service unicast-server 192.168.4.2
clock timezone CST add 08:00:00
```

你可能感兴趣的:(Switch,网络)