网站首页 > 教程文章 正文
您真的知道怎么初始化一台交换机吗?
初始化交换(其他华三的交换机(比如S5554、S6520等)初始化也是类似的): 配置除了业务配置之外的其他配置,如下所示:
- 设备命名
sysname xxxx //交换机命名(一般命名位置+设备型号)
- telnet服务开启
telnet server enable //开启telnet服务
- 启用3A远程服务器认证
【3A表示认证、授权、审计】
//启用TACACS认证模式:
hwtacacs scheme hzcnc
primary authentication x.x.x.x //3A服务器(主用)
primary authorization x.x.x.x //3A服务器(主用)
primary accounting x.x.x.x //3A服务器(主用)
secondary authentication x.x.x.x //3A服务器(备用)
secondary authorization x.x.x.x //3A服务器(备用)
secondary accounting x.x.x.x //3A服务器(备用)
key authentication simple xxx //xxx表示认证秘钥
key authorization simple xxx //xxx表示认证秘钥
key accounting simple xxx //xxx表示认证秘钥
user-name-format without-domain
nas-ip (本机IP)
domain hzcnc //域设置
authentication login hwtacacs-scheme hzcnc local //优先3A认证,在3A认证失效的情况下进行本地认证
authorization login hwtacacs-scheme hzcnc local
accounting login hwtacacs-scheme hzcnc local
authentication super hwtacacs-scheme hzcnc
authorization command hwtacacs-scheme hzcnc local
accounting command hwtacacs-scheme hzcnc
domain default enable hzcnc //域关联使用hzcnc域
//启用RADIUS认证模式:
domain system //设置domain域
authentication login radius-scheme system //使用radius认证登录
authorization login none
access-limit disable
state active
idle-cut disable
self-service-url disable
radius scheme system //设置radius认证模板 system
primary authentication x.x.x.x 1645 //3A 服务器IP
primary accounting 127.0.0.1 1646 //无效
secondary authentication x.x.x.x 1645 //备用的3A服务器IP
key authentication sim chinahcn
user-name-format without-domain
nas-ip 本机IP
authentication-mode scheme //启用AAA
domain default enable system //设置默认域system
- VTY及本地账号配置
local-user admin class manage
password hash xxxx //设置本地账号密码
service-type telnet
authorization-attribute user-role network-admin
authorization-attribute user-role network-operator
#
super password role network-admin hash xxxx //设置super密码
#
line vty 0 63
authentication-mode scheme //一定要关联scheme,若设置为password表示需要本地账号登录,设置为None表示免账号登录。
user-role network-operator
#
- 管理地址配置及默认路由配置
vlan 3 //配置管理VLAN
name MANAGER_VLAN3
//配置管理地址
interface Vlan-interface3
description manager_vlan for access switch
ip address xxxx
quit
//指默认路由 ,下一跳 网关IP
ip route-static 0.0.0.0 0 xxxx
- NTP配置
clock timezone beijing add 08:00:00 //设置clock时区(东八区)
clock protocol ntp
ntp-service enable
ntp-service unicast-server x.x.x.x source Vlan-interface3 //x.x.x.x表示ntp服务器的IP,也可设置上层交换机的管理IP
- SNMP配置
//SNMP配置:
snmp-agent
snmp-agent local-engineid xxxx
snmp-agent community read xxxxx //snmp认证的团体属性名秘钥,只读权限
snmp-agent community write yyyyy //snmp认证的团体属性名秘钥,可写权限
snmp-agent sys-info version all
snmp-agent target-host trap address udp-domain xxxx params securityname xxxx
- SYSLOG配置
info-center enable
info-center source default loghost log level warnings //日志设置默认源
info-center loghost x.x.x.x facility local2 //设置日志服务器为x.x.x.x 默认使用的端口号是UDP 514 可以跟进syslog-server修改端口号
info-center loghost x.x.x.x facility local2
- 业务配置
interface GigabitEthernet1/0/49
description xxxx
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 2 to 4094 #trunk模式,放行除了vlan1的所有vlan,一般上行链路做聚合,trunk模式放行需要通过的vlan。
speed 1000 //设置速率
duplex full //配置全双工,有些UPS还得半双工的
quit
interface GigabitEthernet1/0/49
description xxxx
port link-type access
port access vlan100 #业务口配置access模式,上行数据包打上tag标签100,下行数据包剥离vlan标签。
speed 1000 //设置速率
duplex full //配置全双工,有些UPS还得半双工的
quit
综上所述,一台交换机的初始化配置完毕,其中包含安全认证(3A)可以对接ISE系统或者思科的ASA、日志记录(syslog或者对接ELK系统)、SNMP对接Zabbix服务器进行设备电源、链路流量\广播包\错误包等进行监控。这些你们都理解了吗?有疑问可在下发处留言。
对网络工程或者Python开发感兴趣的可以加个关注,我会不定期发布相关技术分享。
猜你喜欢
- 2025-01-26 010 创建用于 SQL Server LocalDB 的身份验证数据库 | .NET 9 => Web
- 2025-01-26 深度技术员分享迅雷不能登录的详细解决方法
- 2025-01-26 Nginx配置性能优化(nginx优化建议有哪些)
- 2025-01-26 SIMULIA ABAQUS 2019安装教程(2018abaqus安装教程)
- 2025-01-26 Chrome 重大更新,将限制 localhost 访问?
- 2025-01-26 Vue3.0权限管理实现流程【实践】(vue权限控制思路)
- 2025-01-26 Linux实例之localhost和127.0.0.1的区别
- 2025-01-26 localhost 与 127.0.0.1 的区别(localhost和127.0.0.1和本机ip)
- 2025-01-26 127.0.0.1,0.0.0.0和localhost有什么区别
- 2025-01-26 一文弄懂localhost和127.0.0.1(localhost:10.0)
- 最近发表
- 标签列表
-
- location.href (44)
- document.ready (36)
- git checkout -b (34)
- 跃点数 (35)
- 阿里云镜像地址 (33)
- qt qmessagebox (36)
- md5 sha1 (32)
- mybatis plus page (35)
- semaphore 使用详解 (32)
- update from 语句 (32)
- vue @scroll (38)
- 堆栈区别 (33)
- 在线子域名爆破 (32)
- 什么是容器 (33)
- sha1 md5 (33)
- navicat导出数据 (34)
- 阿里云acp考试 (33)
- 阿里云 nacos (34)
- redhat官网下载镜像 (36)
- srs服务器 (33)
- pico开发者 (33)
- https的端口号 (34)
- vscode更改主题 (35)
- 阿里云资源池 (34)
- os.path.join (33)