Cisco网络联盟 www.cisconet.cn提供
cisconet1(config-router)#network 1.1.1.0 将1.1.1.0/24网段加入路由进程
2.路由器cisconet2上的配置
cisconet2 (config)#interface serial 0 进入S0端口 Cisconet2(config-if)#ip address 1.1.1.2 255.255.255.0 配置IP地址
Cisconet2(config-if)#clock rate 64000 配置时钟频率 Cisconet2(config-if)#no shutdown 启用端口 Cisconet2(config-if)#exit
Cisconet2(config)#interface serial 1 进入S1端口
Cisconet2(config-if)#ip address 2.2.2.1 255.255.255.0 配置IP地址
Cisconet2(config-if)#clock rate 64000 配置时钟频率 Cisconet2(config-if)#no shutdown 启用端口 Cisconet2(config-if)#exit
Cisconet2(config)#router igrp 100 起用IGRP路由协议 Cisconet2(config-router)#network 1.1.1.0 将1.1.1.0/24网段加入路由进程
Cisconet2(config-router)#exit
Cisconet2(config)#router eigrp 100 起用EIGRP路由协议
Cisconet2(config-router)#network 2.2.2.0 将2.2.2.0/24网段加入路由进程
3.路由器cisconet3上的配置
cisconet3(config)#interface serial 0 进入S0端口 cisconet3(config-if)#ip address 2.2.2.2 255.255.255.0 配置IP地址
cisconet3(config-if)#no shutdown 启用端口 cisconet3(config-if)#exit cisconet3(config)#router eigrp 100 起用EIGRP路由协议 cisconet3(config-router)#network 2.2.2.0 将2.2.2.0/24网段加入路由进程 4.验证各路由器之间的连通性
在各路由器上使用show io route命令查看路由表可以看到路由器学习到了所有由,
在路由器cisconet1上PING 2.2.2.2成功,在路由器cisconet3上PING 1.1.1.1成功,三 台路由器可以相互访问。
ccna 实验13 EIGRP路由协议
实验小知识:
增强内部网关路由选择协议(EIGRP)是CISCO专有的IP路由选择协议它是基于
Cisco网络联盟 www.cisconet.cn提供
igrp的,拥有许多内建的特性。EIGRP 比IGRP具有更快的收敛(触发更新与保
存邻居路由表)。 实验要求:
1.完成路由器基本配置
2.用环回口代替交换机上pc机 实验拓扑:
S0 1.1.1.1 S0 1.1..1.2 L0 2.2.2.1 L0 2.2.2.2 L1 2.2.2.1 L1 2.2.2.2. 实验过程:
cisconetr1(config)#interface serial 0
cisconetr1(config-if)#ip address 1.1.1.1 255.255.255.0 配置IP地址
cisconetr1(config-if)#no shutdown
cisconetr1(config)#interface loopback 0 创建环回口
cisconetr1(config-if)#ip address 2.2.2.1255.255.255.0 cisconetr1(config)#interface loopback 0 创建环回口 cisconetr1(config-if)#ip address 2.2.3.1 255.255.255.0
cisconetr2(config)#interface serial 0 cisconetr2(config-line)#ip address 1.1.1.2 255.255.255.0 cisconetr2(config-line)#no shutdown cisconetr2(config)#interface loopback 0 创建环回口
cisconetr2(config-if)#ip address 2.2.2.2 255.255.255.0 cisconetr2(config)#interface loopback 0 创建环回口
cisconetr2(config-if)#ip address 2.2.2.2 255.255.255.0
ccna 实验二 EIGRP路由协议(下) 实验小知识: EIGRP协议是无类路由协议,默认是自动汇总,可以关闭自动汇总,手工汇总 实验要求: 1. 设置EIGRP路由协议
2.关闭自动汇总(解决路由非连续子网的路由可达性问题) 3.使用手动汇总减少路由表条目 实验过程:
cisconetr1(config)#router eigrp 100 启用eigrp协议 cisconetr1(config-router)#network 1.0.0.0 手工汇总 cisconetr1(config-router)#network 2.0.0.0
cisconetr1(config-router)#no auto-summary 关闭自动汇总 cisconetr2(config)#router eigrp 100
cisconetr2(config-router)#network 1.0.0.0
Cisco网络联盟 www.cisconet.cn提供
cisconetr2(config-router)#network 2.0.0.0 cisconetr2(config-router)#no auto-summary
ccna实验14交换机命令
ccna 实验一 交换机命令(上) 实验小知识:
交换机上没有IP地址,若想远程管理交换机,需要为其管理vlan ,指定IP寻址信息,用于交标识交换机;交换机动态学习直连设备MAC地址,出于安全目的,可以创建静态条目。 实验要求:
1. 主机名更改为cisconet
2. 完成交换机IP地址配置,IP地址为202.119.249.250 255.255.255.0, 网关为202.119.249.2 3. MAC地址绑定,mac地址为0010.7a60.1884 实验过程:(以2950交换机为例) Switch>enable
Switch#configure terminal
Switch(config)#hostname cisconet 更改主机名
cisconet(config)#interface vlan 1 给vlan 1配置IP地址
cisconet(config-if)#ip address 202.119.249. 250 255.255.255.0 cisconet(config-if)#exit
cisconet(config)#mac-address-table static 0010.7a61.1884 vlan 1 interface fastethernet 0/5 MAC地址绑定
ccna 实验二 交换机命令(下) 实验小知识:
通过配置交换机的安全设置,可以允许用户限制去往或源于某个特定MAC地址的访问。 实验要求:
1. 启用端口的安全措施
2. 限制fa0/23口最大允许访问量为3 3. 采取的安全措施为保护,限制或关闭 4. 常用的交换机命令 实验过程: cisconet(config)#interface fastethernet 0/23 cisconet(config-if)#switchport mode access 将此接口定义为主机端口
cisconet(config-if)#switchport port-security
cisconet(config-if)#switchport port-security maximum 3 设置只允许3个口访问
cisconet(config-if)#switchport port-security villation protect/restrict/shutdown
安全措施为保护/限制/关闭
Cisco网络联盟 www.cisconet.cn提供
cisconet(config-if)#exit
cisconet#show running-configure 查看配置文件
cisconet#show interface fastethernet 0/1 查看以太口0/1的信息 cisconet#show mac-address-table 查看MAC地址表 cisconet#show vlan 显示VLAN的情况
cisconet#show version 显示交换机版本信息
cisconet#erase startup-configure 檫除保存的配置文件
ccna实验15交换机的密码恢复
ccna 实验一 交换机的密码恢复 实验小知识: 有的时候,用户可能忘记自己给交换机所配的特权密码,当断电后,交换机重启,若此时需要更改交换机的配置,进入不了配置模式,可以使用如下步骤,恢复密码,并且不丢失配置。 实验要求:
1. 重新设置交换机的enable密码 2. 不丢失交换机原有的配置 实验过程:
关闭电源,重启交换机, 重启时按交换机上的mode按扭 >dir flash: 务必记得flash后有个冒号
>rename flash:config.text flash:config.old 改名,若直接删除config.text会丢失原有的配置 >flash_init 清除配置文件
>boot 重启
Continue with configuration dialog? [yes/no]:n 不进行初始配置
Switch>enable
Switch#rename flash:config.old flash:config.text 将配置文件改回原来的名字 Destination filename [running-config]? running-config cisconet#conf igure terminal cisconet(config)#enable password cisconet 重设密码 cisconet(config)#exit iance#copy running-config startup-config 保存
ccna实验16生成树协议的应用
实验小知识:
生成树协议(Spanning Tree Protocol)的主要功能是清除第2层环路。所有Cisco的交换机都使用IEEE的802.1d,默认是启用的,而其他设备正在运行DEC的STP的混合厂商的环境中,则可能遇到第2层环路的问题。 实验拓扑图: LAN网段B
Cisco网络联盟 www.cisconet.cn提供
A E
B F J G C I
H D 实验要求:
1. 选举根网桥 2. 选举根端口 3. 选举指定端口 实验过程:
1. 选举根网桥
原则: ⑴选择优先级最小的,缺省为32768 ⑵若优先级一样,比较MAC地址,选择最小的
步骤:交换机优先级一样,比较MAC地址,Switch 1 MAC地址最小,是根网桥。
2. 选举根端口
原则:从每一个非根网桥中选择一个到达根网桥最近的根端口 步骤:根网桥S1在其端口I和J上生成BPDU时,其最初路径成本设定为0,这些BPDU被其他交换机收到的时候,接收BPDU的交换机将增加此路径的成本,其值为收到此BPDU的端口的成本。 ⑴S2有两个端口E和F,路径成本分别是20和10,所以F是根端口 ⑵S3有两个端口C和D, 路径成本分别是10和70,所以C是根端口 ⑶S4有两个端口G和H,路径成本分别是50和30,所以H是根端口 ⑷S5有两个端口A和B,路径成本分别是10和40,所以A是根端口 3. 选举指定端口
原则:每个网段选举一个到达根网桥最近的指定端口
步骤:⑴网段A有两个端口D和H,路径成本分别为10和40,所以D是指定端口
⑵网段B有三个端口A,E,J,路径成本分别为10,20,0,所以J是指定端口 ⑶网段C有三个端口C,F,I,,路径成本分别为10,10,0,所以I是指定端口 ⑷网段D有两个端口B和G,路径成本分别为10和30,所以B是指定端口 4.根端口,指定端口处于转发状态,未被选举的其他端口E和G处于阻塞状态,这样消除了环路。
ccna实验17VLAN之间的路由
实验小知识:
如果你有5个VLAN,而路由器不支持中继,那么,为了在5个VLAN间路由,路由器上需要5个物理LAN接口,然而,用一台支持中继的单臂路由器,你可以在一个接口上进行所有5个VLAN间的路由,成本低和可扩展性大。 实验拓扑图: