复习CCNA实验(逐渐添加中)

好久没有玩cisco,很多东西都有点生疏了.今天开始一点点复习,以此文做个复习笔记.实验平台packet tracer 5.1
1.设置主机名
router(config)#hostname r1
r1(config)#
2.设置登陆信息
r1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r1(config)#banner motd #
Enter TEXT message.  End with the character '#'.
Welcome #
3.设置密码
明文 r1(config)#enable password ccna1
密文 r1(config)#enable secret ccna2
两者同时设定时,密文优先.
console配置密码
r1(config)#line con 0
r1(config-line)#login
r1(config-line)#password ccna3
4.发现协议CDP
查看相关命令
r1#sh cdp ?
  entry      Information for specific neighbor entry
  interface  CDP interface status and configuration
  neighbors  CDP neighbor entries
image 
开始CDP协议
RTA(config)#cdp run
5.路由器的配置文件保存,删除,备份
image
6.建立vlan和vtp
先解释一下交换机的3种端口模式
以太网端口有三种链路类型:Access、Hybrid和Trunk。
Access类型的端口只能属于1个VLAN,一般用于连接计算机的端口;
Trunk类型的端口可以允许多个VLAN通过,可以接收和发送多个VLAN的报文,一般用于交换机之间连接的端口;
Hybrid类型的端口可以允许多个VLAN通过,可以接收和发送多个VLAN的报文,可以用于交换机之间连接,也可以用于连接用户的计算机。
Hybrid端口和Trunk端口在接收数据时,处理方法是一样的,唯一不同之处在于发送数据时:Hybrid端口可以允许多个VLAN的报文发送时不打标签,而Trunk端口只允许缺省VLAN的报文发送时不打标签。
SW-1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
SW-1(config)#vtp domain cisco
Changing VTP domain name from NULL to cisco
SW-1(config)#vtp mode server
Device mode already VTP SERVER.
SW-1(config)#int f0/24
SW-1(config-if)#switchport mode
SW-1(config-if)#switchport mode trunk
SW-1#vlan data
% Warning: It is recommended to configure VLAN from config mode,
  as VLAN database mode is being deprecated. Please consult user
  documentation for configuring VTP/VLAN in config mode.
SW-1(vlan)#vlan 10 name vlan10
VLAN 10 added:
    Name: vlan10
SW-1(vlan)#exit
SW-1(config)#int f0/1
SW-1(config-if)#switchport access vlan 10
SW-1(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console
SW-1#sh vlan
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/2, Fa0/3, Fa0/4, Fa0/5
                                                Fa0/6, Fa0/7, Fa0/8, Fa0/9
                                                Fa0/10, Fa0/11, Fa0/12, Fa0/13
                                                Fa0/14, Fa0/15, Fa0/16, Fa0/17
                                                Fa0/18, Fa0/19, Fa0/20, Fa0/21
                                                Fa0/22, Fa0/23
10   vlan10                           active    Fa0/1
1002 fddi-default                     active   
1003 token-ring-default               active   
1004 fddinet-default                  active   
1005 trnet-default                    active   
//vtp client模式
SW-2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
SW-2(config)#vtp mode cli
SW-2(config)#vtp mode client
Setting device to VTP CLIENT mode.
SW-2(config)#end
%SYS-5-CONFIG_I: Configured from console by console
SW-2#sh vlan
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                Fa0/21, Fa0/22, Fa0/23
10   vlan10                           active   
1002 fddi-default                     active   
1003 token-ring-default               active   
1004 fddinet-default                  active   
1005 trnet-default                    active   

你可能感兴趣的:(职场,休闲,复习,实验,CCNA)