一、VLAN配置
删除ip地址 undo ip address
sys
undo info-center enable //关闭提示词
//进入S2交换机
vlan 10
vlan 20
//或者使用 vlan batch 10 20
int e0/0/2
port link-type access
port default vlan 10
int e0/0/3
port link-type access
port default vlan 20
int e0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
//S3交换机同理
vlan batch 10 20
int e0/0/2
port link-type access
port default vlan 10
int e0/0/3
port link-type access
port default vlan 20
int e0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
//进入S1交换机
sysname S1
undo info-center enable
vlan batch 10 20
int g0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
int g0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
int g0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20
路由器的配置
sys
sysname R1
undo info-center enable
int g0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20
#############################################
int g 0/0/0.1
ip address 8.8.1.6 29
dot1q termination vid 10
arp broadcast enable
#############################################
int g 0/0/0.2
ip address 8.8.2.6 29
dot1q termination vid 20
arp broadcast enable
二、三层交换机
注意 不是配置交换机接口,而是配置vlanif
(注意上下两个都要配置trunk)
############################
//进入交换机S5
vlan batch 30 40 50
int e 0/0/5
port link-type trunk
port trunk allow-pass vlan 30 40 50
int e 0/0/1
port link-type access
port default vlan 30
int e 0/0/2
port link-type access
port default vlan 30
int e 0/0/3
port link-type access
port default vlan 40
int e 0/0/4
port link-type access
port default vlan 40
###################################
//进入交换机S4
sys
sysname S4
undo info-center enable
vlan batch 30 40 50
int vlanif 30
ip address 8.8.3.14 28
int vlanif 30
ip address 8.8.4.14 28
int g 0/0/1
port link-type trunk
port trunk allow-pass vlan 30 40 50
三、DHCP配置
dhcp enable
ip pool abc
network 8.8.5.192 mask 26
gateway-list 8.8.5.254
(进入路由器下面的接口)
int e0/0/0
ip address 8.8.5.254 26
dhcp select global
dis this
查看是否有
则成功
dis ip pool
不行的话重新输入
dhcp select global
四、OSPF协议
在路由器和三层交换机上输入即可
ospf 1
area 0
network 8.8.0.0 0.0.255.255
五、远程登录
server端
user-interface vty 0 1 (表示 0-1 个用户可以使用)
user privilege level 3
authentication-mode password 或者 au pass
set au pass simple 123
client
telnet 8.8.7.2
六、链路聚合
LSW6:
stp disable
int eth-trunk 1
mode manual load-balance
trunkport e 0/0/4 to 0/0/5
LSW7:
stp disable
int eth-trunk 1
mode manual load-balance
trunkport e 0/0/4 to 0/0/5
七、设置观察口和镜像口
observe-port int g 0/0/1
int g 0/0/2
mirror to observe-port both
acl 2023
rule deny source 8.8.1.3 0.0.0.0