交换与路由命总结.doc

上传人:工**** 文档编号:554801364 上传时间:2023-02-14 格式:DOC 页数:4 大小:41KB
返回 下载 相关 举报
交换与路由命总结.doc_第1页
第1页 / 共4页
交换与路由命总结.doc_第2页
第2页 / 共4页
交换与路由命总结.doc_第3页
第3页 / 共4页
交换与路由命总结.doc_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

《交换与路由命总结.doc》由会员分享,可在线阅读,更多相关《交换与路由命总结.doc(4页珍藏版)》请在金锄头文库上搜索。

1、帮你解决一切难题包括企业和个人一切的一切 http:/ 现在=免费注册=(用你的姓名抢注)享受会员功能极力推荐。补充一下信息实名认证要用到身份证相片用手机照下来然后上传上去就行了,实名认证是对用户资料的真实性进行验证审核。保障用户的合法权益。Cisco交换机的部分命令解析一、交换机五种模式Swith (用户模式)Swith# (特权模式)Swith(config)# (全局配置模式)Swith(config-if)# (接口模式)Swith(config-line)# (线模式)二、交换机模式切换Swithenable /切换到特权Swith#config t /切换到全局配置模式Swith(

2、config)# interface f0/1 /进入接口f0/0Swith(config)# interface vlan 1 /进入VLAN 1中Swith(config-if)#ip address 192.168.1.1 255.255.255.0 /对VLAN1设置IP地址和子网掩码Swith(config-if)#no shutdown /激活VLAN1三、设置交换机的密码1、用户到特权的密码Swith(config)#enable password 123 (优先级低)Swith(config)#enable secret 456 (优先级高) /如果两个都设置则456生效2、控

3、制台console密码设置Swith(config)# line con 0Swith(config-line)#loginSwith(config-line)#password console123 /设置console密码为telnet1233、启用telnet密码Swith(config)#line vty 0 15 /最多有015人可以telnet访问swith,合计16人Swith(config-line)#loginSwith(config-line)#password telnet123 /设置telnet密码为telnet123注:要想真正生效telnet还要设置特权密码交换机

4、命名hostname BENETSW01Swith(config)#hostname BENETSW01 /使用hostname命名交换机的名字四、show命令集Swith#show version/显示IOS版本信息Swith#show int vlan 1 brief/简单的显示VLAN1的信息Swith#show running-config/显示正在运行的配置文件Swith#show startup-config/显示己经保存的配置文件Swith#show mac-address-table/显示MAC地址表Swith#show mac-address-table/显示MAC地址表更新

5、的间隔,默认为5分钟Swith#show neighbor detail/显示邻居详细信息Swith#show traffic/显示CDP流量Swith#show 五、设置交换机的网关和DNS名称服务器的IP地址Swith(config)# ip default-gateway 192.168.10.8/交换机的网关设置为192.168.10.8Swith(config)#ip domain -name server 202.106.0.20 /设置DNS名称服务器地址Swith(config)# no ip domain-lookup /交换机名称服务器的域名查询六、创建、删除、查看VLAN

6、Switch#vlan database /进入vlan数据库配置模式Switch(vlan)#vlan 2 /创建VLAN2命名为vlan0002,也可以使用vlan2 name salesVLAN 2 added:Name: VLAN0002Switch(vlan)#exit /退出时应用生效Swith(vlan)#no vlan 2 /删除vlan2Switch(config)# interface f0/1Switch(config-if)# switchport access vlan 2 /将端口加入vlan 2中Switch(config-if)# no switchport a

7、ccess vlan 2 /将端口从vlan2中删除Switch(config)# interface range f0/1 10 / 进行F0/1到10端口范围Switch(config-if-range)# switchport access vlan 2 /将f0/1到f0/10之间的所有端口加入vlan 2Switch# show vlan brief /查看所有VLAN的摘要信息Switch# show vlan id vlan-id /查看指定VLAN的信息七、开启并查看trunk端Swith(config)#interface f0/24Swith(config-if)#swit

8、h mode trunk /将f0/24端口设置为trunkSwitch#show interfacef0/24 switchport /查看f0/24的接口状态八、从Trunk中添加、删除VlanSwitch (config-if )# switchport trunk allowed vlan remove 3 /从trunk端口删除v lan3通过Switch (config-if)# switchport trunk allowed vlan add 3 /从trunk端口添加vlan3通过Switch # show interface interface-id switchport

9、/检查中继端口允许VLAN的列表九、单臂路由配置Router(config)# interface f0/0.1Router(config-subif)# encapsolution dot1q 1 /子接口封装dot1q 针对的是VLAN1Router(config-subif)# ip address 192.168.1.1 255.255.255.0 /设置VLAN的网关地址Router(config)# interface f0/0.2Router(config-subif)# encapsolution dot1q 2/子接口封装dot1q针对的是vlan2Router(config

10、-subif)# ip address192.168.2.1 255.255.255.0/设置vlan2的网关的地址Cisco路由器的部分命令解析一、路由器的模式l 用户模式:Router /用户模式l 特权模式:Router# /特权模式l 全局配置模式:Router(config)# /配置模式l 接口配置模式:Router(config-if)# /接口模式l 子接口配置模式:Router(config)#interface fa0/0.1 /进入子接口 Router(config-subif)# /子接口状态l Line模式:Router(config-line)# /进行线模式l 路

11、由模式:Router(config-router)# /路由配置模式二、配置静态路由条目Router(config)#ip route 192.168.10.0 255.255.255.0 192.168.9.2 /到达192.168.10.0网段及掩码需要经过相邻路由器的接口的IP地址三、配置默认路由Router B(config)#ip route 0.0.0.0 0.0.0.0 192.168.2.2 /所以外出的数据包如果找不到路由表目均找192.168.2.2接口四、密码配置配置控制台密码teacher(config)#line console 0teacher(config_lin

12、e)#loginteacher(config_line)#password ciscoteacher(config)#enable password cisco/配置特权模式密码teacher(config)#enable secret 1234/配置加密保存的密码teacher(config)#service password-encryption/对所有密码加密五、配置路由器的banner信息teacher(config)#banner motd $This is Aptech companys Router! Please dont change the configuration wi

13、thout permission! $六、配置路由器接口的描述信息teacher(config)#interface fastethernet 0/0teacher(config_if)#description connecting the companys intranet! 七、配置控制台配置控制台会话时间teacher(config)#line console 0teacher(config_line)#exec-timeout 0 0配置控制台输出日志同步teacher(config)#line console 0teacher(config_line)#logging synchro

14、nous八、动态路由相关命令Router(config)# router rip/启动RIP进程Router(config-router#version 2 /指定启动rip v2版本Router(config-router)# network network-number /宣告主网络号Router# show ip route/查看路由表Router#show ip route static/仅显示静态路由信息 Router# show ip protocols /查看路由协议配置Rouetr# debug ip rip/打开RIP协议调试命令九、动态路由配置RouterA(config)#interf

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 生活休闲 > 科普知识

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