前段时间我们分享了迈普交换机配置总结(XX),今天我们来看一下迪普交换机的配置。迪普的前身大家可能不清楚,这里给大家普及一下,迪普前身是老华三安全产品线分出去的成了迪普厂家,其他的宇视也是老华三监控产品线分出去的的,如今成了和海康、大华可以比拼的公司,存储产品线也分出去成立了红杉,国产化存储不错的企业,还有其他的语音、视频会议等,当年华三产品线还是比较齐全的,当然现在新华三也非常好,进入紫光系后各个产品线更加齐全了。
1.设备命名
hostname 1F-SW
2.进入配置模式
conf-mode
3.配置lldp,需同时全局和接口下配置
lldp enable
interface gige0_XX
switchport mode trunk
switchport trunk allowed vlan 24,1000
lldp enable
4.根据实际需求配置接口类型为trunk或者access
interface gige0_XX
switchport mode trunk
switchport trunk allowed vlan 24,1000
lldp enable
!
interface range gige0_1-XX
switchport access vlan 24
lldp enable
5.snmp配置
!
snmp-agent version 2c
snmp-agent community %@%@fGq$1Oj1$2$yF$j$HKf$tp$r ro
snmp-agent community %@%@kK$.$12Vg$LYg$FMv$$$Tg$r$I7Q rw
!
6.配置ssh和登录密码
!
cli ssh maxlinks 4
ssh enable
ssh port 10022
no http enable
!
local-user guanli
password encrypted-password Admin123456
service-type console web ssh
!
7.配置端口镜像
!
mirror 1 source interface gige0_1 gige0_2 gige0_3 gige0_4 gige0_5 gige0_6 gige0_7 gige0_8 gige0_9 gige0_10 gige0_12 gige0_14 gige0_16 gige0_18 gige0_19 gige0_20 gige0_21 gige0_22 gige0_23 gige0_24 gige0_26 gige0_28 both
mirror 1 destination interface gige0_17
mirror 2 source interface gige0_7 gige0_26 gige0_28 both
mirror 2 destination interface gige0_0
!
8.配置ipv4和ipv6地址与路由
ipv6 unicast-routing
!
vlan 1 to 3
!
vlan 6
!
vlan 20
!
vlan 24
!
interface vlan-if1
ip address X.X.1.1/24
ipv6 address 2411:8104:8:400::1:1/112
!
interface vlan-if2
ip address X.X.1.1/24
ipv6 address 2411:8104:8:400::2:1/112
!
interface vlan-if3
ip address X.X.1.254/24
ipv6 address 2411:8104:8:400::3:1/112
!
interface vlan-if6
ip address X.X.6.1/24
ipv6 address 2411:8204:8:400:ffff:ffff:ffff:6/126
!
interface vlan-if500
ip address X.X.10.1/24
ip address X.X.51.254/29 secondary
ipv6 address 2411:8104:8:400::500:1/112
!
ip route 0.0.0.0/0 X.X.1.253
ip route 10.0.0.0/8 X.X.6.2
ip route 10.2.1.0/24 X.X.1.253
!
ipv6 route ::/0 2411:8104:8:400::3:2 vlan-if3
ipv6 route 2411::/16 240b:8204:8:400:ffff:ffff:ffff:7 vlan-if6
ipv6 route 2411:8104:8:400::269:0/112 240b:8204:8:400:ffff:ffff:ffff:15
!
9.配置acl
acl mode ipv4 ingress //只是配置没有应用
rule 101 source any destination host 10.1.3.16 protocol tcp source-port 0 to 65535 destination-port 8080 to 8080 interface gige0_15,gige0_28-29 action permit
rule 1 source host 10.1.3.254 destination 10.1.5.0/24 interface gige0_15,gige0_28-29 action permit
rule 2 source 10.1.5.0/24 destination host 10.1.3.254 interface gige0_15,gige0_28-29 action permit
rule 3 source 10.1.2.0/24 destination host 10.1.3.0 interface gige0_15,gige0_28-29 action drop
rule 4 source 10.1.3.0/24 destination host 10.1.2.0 interface gige0_15,gige0_28-29 action drop
rule 5 source 10.1.2.0/24 destination host 10.1.4.0 interface gige0_15,gige0_28-29 action drop
rule 6 source 10.1.4.0/24 destination host 10.1.2.0 interface gige0_15,gige0_28-29 action drop
rule 7 source host 10.1.2.0 destination host 10.1.5.0 interface gige0_15,gige0_28-29 action drop
rule 8 source host 10.1.5.0 destination host 10.1.2.0 interface gige0_15,gige0_28-29 action drop
rule 9 source host 10.1.3.0 destination host 10.1.4.0 interface gige0_15,gige0_28-29 action drop
rule 10 source host 10.1.4.0 destination host 10.1.3.0 interface gige0_15,gige0_28-29 action drop
rule 11 source host 10.1.3.0 destination host 10.1.5.0 interface gige0_15,gige0_28-29 action drop
rule 12 source host 10.1.5.0 destination host 10.1.3.0 interface gige0_15,gige0_28-29 action drop
rule 13 source host 10.1.4.0 destination host 10.1.5.0 interface gige0_15,gige0_28-29 action drop
rule 14 source host 10.1.5.0 destination host 10.1.4.0 interface gige0_15,gige0_28-29 action drop
rule 15 source any destination any interface gige0_15,gige0_28-29 action permit
!
10.保存配置到本地flash
write file 保存配置到flash
11.常用查看命令
show run
show ip in b
show ip route
show int status
show lldp nei
show dev
show dev man
show version