神州数码配置命令总结-(已更新)

上传人:小** 文档编号:61645362 上传时间:2018-12-08 格式:DOCX 页数:16 大小:162.43KB
返回 下载 相关 举报
神州数码配置命令总结-(已更新)_第1页
第1页 / 共16页
神州数码配置命令总结-(已更新)_第2页
第2页 / 共16页
神州数码配置命令总结-(已更新)_第3页
第3页 / 共16页
神州数码配置命令总结-(已更新)_第4页
第4页 / 共16页
神州数码配置命令总结-(已更新)_第5页
第5页 / 共16页
点击查看更多>>
资源描述

《神州数码配置命令总结-(已更新)》由会员分享,可在线阅读,更多相关《神州数码配置命令总结-(已更新)(16页珍藏版)》请在金锄头文库上搜索。

1、 第一部分 交换机配置一、基础配置1、模式进入Switch Switchen Switch#configSwitch(Config)#interface ethernet 0/22、配置交换机主机名 命令:hostname 3、配置交换机IP地址Switch(Config)#interface vlan 1 Switch(Config-If-Vlan1)#ip address 10.1.128.251 255.255.255.0 Switch(Config-If-Vlan1)#no shut4、为交换机设置Telnet授权用户和口令:登录到Telnet的配置界面,需要输入正确的用户名和口令,否

2、则交换机将拒绝该Telnet用户的访问。该项措施是为了保护交换机免受非授权用户的非法操作。若交换机没有设置授权Telnet用户,则任何用户都无法进入交换机的Telnet配置界面。因此在允许Telnet方式配置管理交换机时,必须在Console的全局配置模式下使用命令username privilege password (0 | 7) 为交换机设置Telnet授权用户和口令并使用命令authentication line vty login local打开本地验证方式,其中privilege选项必须存在且为15。例:SwitchenableSwitch#configSwitch(config)

3、#username test privilege 15 password 0 testSwitch(config)#authentication line vty login localSwitch(Config)#telnet-user test password 0 testSwitch (Config)#telnet-server enable:/启动远程服务功能 5、配置允许Telnet管理交换机的地址限制(单独IP或IP地址段)(1)限制单个IP允许Telnet登录交换机switch(config)#authentication security ip 192.168.1.2(2)限

4、制允许IP地址段Telnet登录交换机switch(config)#access-list 1 permit 192.168.1.0 0.0.0.255 switch(config)#authentication ip access-class 1 in5、为交换机设置Web授权用户和口令:web-user password 0|7 例:Switch(Config)#web-user admin password 0 digital 6、设置系统日期和时钟:clock set 7、设置退出特权用户配置模式超时时间exec timeout /单位为分钟,取值范围为03008、保存配置:write

5、9、显示系统当前的时钟:Switch#show clock10、指定登录用户的身份是管理级还是访问级Enable level visitor|admin 11、指定登录配置模式的密码:Enable password level visitor|admin 12、配置交换机的用户名密码:username admin privilege 15 password 0 admin00013、配置enable密码为ddd:enable password 0 ddd level 1514、配置登录时认证:authentication line vty login local15、设置端口的速率和双工模式(

6、接口配置模式下)命令:speed-duplex auto | force10-half | force10-full | force100-half | force100-full | force1g-half | force1g-full nonegotiate master | slave no speed-duplex二、单交换机VLAN划分1、VLAN基本配置 (1)新建VLAN:vlan (2)命名VLAN:name (3)为VLAN 分配交换机端口Switch(Config-If-Vlan1)#switchport interface Ethernet 0/2(4)设置Trunk

7、端口允许通过VLAN:Switch(Config-ethernet0/0/5)#switchport trunk allowed vlan 1;3;5-202、划分VLAN: (1)进入相应端口:Switch(config)#interface Ethernet 0/2(2)修改模式:Switch(Config-ethernet0/0/5)switchport mode access(3)划分VLAN:Switch(Config-ethernet0/0/5)#switchport access vlan 4三、跨交换机VLAN划分(两台交换机作相同操作)1、新建VLAN2、划分VLAN3、修改

8、链路模式(1)进入相应端口:Switch(config)#interface Ethernet 0/1(2)修改模式:Switch(config-if)#switchport mode trunk四、VLAN间主机的通信1、新建VLAN2、划分VLAN3、修改链路模式(1)进入相应端口:Switch(config)#interface Ethernet 0/1(2)修改模式:Switch(config-if)#switchport mode trunk注意:如果是三层交换机,在修改模式先封装802.1协议:Switch(config-if)#switchport trunk encapsula

9、tion dot1q4、建立VLAN子接口 (1)、进入VLAN接口模式:Switch(config)#interface vlan 2 (2)、设置VLAN子接口地址:Switch(config-if)#ip address 192.168.0.1 255.255.255.0 (3)、打开端口:Switch(config-if)#no shutdown5、设置各主机IP地址、子网掩码、网关 注意:(1)各主机IP地址应与其所在的VLAN在同一网段。 (2)192.168.0.1/24中的“24”表示子网掩码为3个255。 (3)主机所在的VLAN的子接口地址就是主机的网关。五、端口安全配置1

10、、启用和禁用端口安全功能: 启用:Switch(config-if)# switchport port-security 禁用:Switch(config-if)# no switchport port-security2、设置接口上安全地址的最大个数(1128) Switch(config-if)#switchport port-security maximum 13、设置处理违例的方式Switch(config-if)#switchport port-security violation shutdown4、手工配置接口上的安全地址 Switch(config-if)#switchport

11、 port-security mac-address 00d0.d373.B0605、查看安全配置: Switch#show port-security六、设置广播风暴抑制功能Switch(Config)#broadcast-suppression 参数:代表每秒钟允许通过的广播数据报的个数,取值范围为1262143。七、端口聚合 1、创建port group:Switch(Config)#port-group 1 /数字范围1-16 2、把物理端口加入组:Switch(Config-Ethernet0/0/1)#port-group 1 mode on3、进入port-channel 配置模

12、式:Switch(Config)#interface port-channel 1 4、修改链路模式:switchport mode trunk第二部分 路由器配置一、路由器基本配置1、进入特权模式:Routeren2、进入全局配置模式:Router#config 3、定义路由器的名字为DCR :Router(Config)#hostname DCR 4、特权用户的口令:DCR (Config)#enable password 1234565、启动远程服务功能:DCR (Config)#telnet-server enable6、配置远程用户的口令:DCR (Config)#telnet ad

13、min password 7 admin7、配置时钟频率:Router(Config-Serial2/0)#physical-layer speed 640008、配置用户登录路由器时认证:aaa authentication login default local line enable9、配置进入特权模式时认证:aaa authentication enable default enable10、配置路由器的用户名密码:username admin password 0 admin00011、配置进入特权模式密码:enable password 0 admin000 level 15二、静

14、态路由配置1、命令:ip route | 为路由优先级,取值范围为1255,preference的值越小优先级越高。Router(config)#ip route 1.1.1.0 255.255.255.0 2.1.1.1 2、默认路由 ip route 0.0.0.0 0.0.0.0| 三、单臂路由1、打开端口:2、进入子接口配置IP地址,并封装dot1q协议到对应的VLAN。Router_config#interface f0/0.1Router(config_f0/0.1)#ip address 192.168.100.1 255.255.255.0Router(config_f0/0.1)#encapsulation dot1Q 100 /封装dot1Q到VLAN 100Route(config_f0/0.1)#exitRouter_config#interface f0/0.2Router(config_f0/0.2)#ip address 192.168.200.1 255.255.255.0Router(config_f0/0.2)#encapsulation dot1Q 200 /封装dot1Q到VLAN 200Rout

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 管理学资料

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号