CCNA 学习笔记
一、交换机、路由器基础配置
1、修改交换机主机名
Switch(config)#hostname ccna
2、关闭域名解析功能
Switch(config)#no ip domain-lookup
3、配置consloe口配置
Switch(config)#line console 0 # 进入console口 Switch(config-line)#logging synchronous # 默认关闭状态,开启日志同步功能,必须要开启。 Switch(config-line)#exec-timeout 0 0 # 关闭console口配置超时功能,0 0 代表关闭;5 30 代表5分30秒没有操作关闭;
4、配置consloe口密码
Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#line console 0 Switch(config-line)#password ccna Switch(config-line)#login
5、配置特权模式密码
Switch>enable Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#enable password ccna # 配置明文密码 Switch(config)#enable secret ccnp # 配置密文密码 Switch(config)#no enable password # 取消明文密码
6、配置远程telnet vty密码
Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#line vty 0 8 Switch(config-line)#password ccna Switch(config-line)#login Switch(config-line)#loggin synchronous Switch(config-line)#exec-timeout 5 30
7、配置登录交换机显示信息
Switch(config)#banner motd # this is ccna #
8、保存配置文件命令
Switch#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK]
9、配置交换机端口描述信息
Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#interface fa0/3 Switch(config-if)#description pos,192.168.56.11,front
10、查看当前配置信息
Switch#show running-config Building configuration... Current configuration : 1402 bytes ! version 12.2 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname Switch ! enable secret 5 $1$mERr$V3AzF/pAhvRvjIsUimrC8. ! ! ! no ip domain-lookup ! ! spanning-tree mode pvst spanning-tree extend system-id ! interface FastEthernet0/1 ! interface FastEthernet0/2 description it,addny,qq,332761673
11、清除配置信息
Switch#erase startup-config Erasing the nvram filesystem will remove all configuration files! Continue? [confirm] [OK] Erase of nvram: complete %SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram
12、配置交换机管理IP地址
Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#inter vlan 1 Switch(config-if)#ip add 192.168.1.1 255.255.255.0 Switch(config-if)#no shutdown Switch(config-if)# %LINK-5-CHANGED: Interface Vlan1, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up %IP-4-DUPADDR: Duplicate address 192.168.1.1 on Vlan1, sourced by 0000.0C1A.A70E
13、配置交换机的默认网关
Switch(config)#ip default-gateway 192.168.1.254
14、路由器配置fa0/0端口
R1#conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#inter fa0/0 R1(config-if)#ip add 192.168.1.254 255.255.255.0 R1(config-if)#no shutdown R1(config-if)# %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
15、路由器、交换机相关查看命令
R1#show running-config R1#show version R1#show startup-config R1#show flash R1#show interfaces fa0/0 R1#show ip interface brief

浙公网安备 33010602011771号