IP交换与路由技术实验讲义.docx

上传人:叶*** 文档编号:34914808 上传时间:2022-08-19 格式:DOCX 页数:39 大小:60.13KB
返回 下载 相关 举报
IP交换与路由技术实验讲义.docx_第1页
第1页 / 共39页
IP交换与路由技术实验讲义.docx_第2页
第2页 / 共39页
点击查看更多>>
资源描述

《IP交换与路由技术实验讲义.docx》由会员分享,可在线阅读,更多相关《IP交换与路由技术实验讲义.docx(39页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、IP交换与路由技术试验讲义目 录试验一口令和主机名设置1试验二利用交换机实现不同VLAN通信4试验三不同VLAN跨交换机通信7试验四不同VLAN跨交换机通信和VTP协议12试验五RIPv2的配置和其对变长子网的支持19试验六将直连路由和静态路由引入到动态路由24试验七 RIPV2程度分割和定时器配置26试验八 RIP的被动接口与单播更新30试验九 路由器广域网PPP协议的封装33试验十 配置和校验PAP身份验证和CHAP身份验证35第 37 页试验一口令与主机名设置试验目的通过本试验,读者可驾驭以下技能:1. 配置交换机的口令与主机名;2. 配置远程登录交换机。设备需求1. 思科C3640交换

2、机一台;2. 一根直通网线;3. 一台带有超级终端程序的PC机一台。试验拓扑试验步骤1. 登陆交换机,进展如下设置:switchenpassword:;初始密码为空,干脆回车switch#conf t;进入全局配置形式switch(config)#hostname swa;设置交换机名swa(config)#enable secret aaa;设置特权加密口令为 aaaswa(config)#enable password aax;设置特权非密口令为 aaxswa(config)#line console 0;进入限制台口(Rs232)状态swa(config-line)#login;允许登录

3、swa(config-line)#password aa;设置登录口令aaswa(config-line)#line vty 0 4;进入虚拟终端virtual ttyswa(config-line)#login;允许登录swa(config-line)#password a;设置登录口令aswa(config-line)#exit;返回上一层swa(config)#exit;返回上一层2. 查看配置信息Building configuration.Current configuration : 957 bytes!version 12.4service timestamps debug da

4、tetime msecservice timestamps log datetime msecno service password-encryption!hostname swa!boot-start-markerboot-end-marker!enable secret 5 $1$j3r1$PSHfI1hhF2Xms7tiU64Qq1;这里可以查看我们所做的配置enable password aaa!no aaa new-modelmemory-size iomem 5!ip cef!interface FastEthernet1/0.interface FastEthernet1/15!

5、interface Vlan1 no ip address!ip server!control-plane!line con 0 ;这里可以查看到我们所作的配置 password aa loginline aux 0line vty 0 4 password a login!endswa#show running-config ;查看配置信息 swa#exit;返回嘱咐3. 验证重新登陆交换机,看看哪一个口令可以登陆交换机?swaenpassword: ;输入口令4. 配置交换机与PC机IP地址。1)配置交换机IP地址。swa(config)#int vlan 1 ;进入管理vlan1的配置形

6、式swa(config-if)#ip address 192.168.0.1 255.255.255.0 ;配置vlan1的IP地址swa(config-if)#no shutdown ;启用端口2)配置PC机的IP地址RouterenRouter#conf tRouter(config)#no ip routing ;关闭路由功能Router(config)#int f 0/0 ;进入接口配置形式Router(config-if)#ip address 192.168.0.10 255.255.255.0 ;配置IP地址Router(config-if)#no shutdown ;开启端口R

7、outer(config-if)#end5. 验证远程登陆交换机。Router#telnet 192.168.0.1 ;远程登录交换机Trying 192.168.0.1 . OpenUser Access VerificationPassword: ;提示输入密码aswa ;登陆到交换机试验要点1.保证PC机与交换机的IP地址在同一网段。2.通常交换机的vlan1为管理vlan,为交换机支配管理IP即为vlan1支配管理IP。3.路由器端口默认是关闭状态,端口配置完成后要用no shutdown手动启用。试验二利用交换机实现不同VLAN通信试验目的通过本试验,读者可以驾驭以下技能:1. 驾驭

8、交换机虚接口的配置方法;2. 配置利用交换机虚接口实现不同VLAN的通信。试验拓扑试验步骤1. 配置交换机Router#Router#conf tRouter(config)#hostname sw1 ;交换机命名SW1sw1(config)#exitsw1#vlan database ;进入VLAN配置形式sw1(vlan)#vlan 10 ;创立VLAN10sw1(vlan)#vlan 20 ;创立VLAN20sw1(vlan)#exitsw1#conf tsw1(config)#int vlan 10 ;进入VLAN10虚接口sw1(config-if)#ip address 192.1

9、68.10.254 255.255.255.0 ;配置VLAN10的IPsw1(config-if)#exitsw1(config)#int vlan 20 ;进入VLAN10虚接口sw1(config-if)#ip address 192.168.20.254 255.255.255.0 ;配置VLAN10的IPsw1(config-if)#exitsw1(config)#int f 1/11sw1(config-if)#switchport access vlan 10 ;将端口参加VLAN10sw1(config-if)#exitsw1(config)#int f 1/12sw1(con

10、fig-if)#switchport access vlan 20 ;将端口参加VLAN20sw1(config-if)#exitsw1(config)#exitsw1#show vlan-s VLAN Name Status Ports- - - -1 default active Fa1/0, Fa1/1, Fa1/2, Fa1/3 Fa1/4, Fa1/5, Fa1/6, Fa1/7 Fa1/8, Fa1/9, Fa1/10, Fa1/13 Fa1/14, Fa1/1510 VLAN0010 active Fa1/1120 VLAN0020 active Fa1/121002 fddi-

11、default active1003 token-ring-default active1004 fddinet-default active1005 trnet-default activeVLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2- - - - - - - - - - -1 enet 100001 1500 - - - - - 1002 100310 enet 100010 1500 - - - - - 0 020 enet 100020 1500 - - - - - 0 01002 fddi 1

12、01002 1500 - - - - - 1 10031003 tr 101003 1500 1005 0 - - srb 1 10021004 fdnet 101004 1500 - - 1 ibm - 0 01005 trnet 101005 1500 - - 1 ibm - 0 02. 配置PC机PC1(config)#int f 0/0PC1(config-if)#ip address 192.168.2.20 255.255.255.0 ;配置IPPC1(config-if)#no shut ;开启接口PC1(config-if)#endPC1(config)#ip default-

13、gateway 192.168.2.1 ;配置默认网关PC1(config)#no ip routing ;关闭路由功能PC2(config)#int f 0/0PC2(config-if)#ip address 192.168.2.20 255.255.255.0 ;配置IPPC2(config-if)#no shut ;开启接口PC2(config-if)#endPC2(config)#ip default-gateway 192.168.2.1 ;配置默认网关PC2(config)#no ip routing ;关闭路由功能3. 验证PC1#ping 192.168.2.1Type es

14、cape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 16/232/1040 msPC2#ping 192.168.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:!Success rate is

15、 100 percent (5/5), round-trip min/avg/max = 4/223/1012 ms试验要点1. 本试验是通过交换机虚接口实现不同vlan通信,因此,在配置ip时,是为vlan配置,而不是为物理端口支配ip。2. 假设没有验证胜利,可尝试逐段验证,或者承受showo vlan-switch,show ip route等嘱咐查看相应信息,以确定问题出如今何处。试验三不同VLAN跨交换机通信试验目的通过本试验,读者可以驾驭以下技能:1. 驾驭vlan的配置方法;2. 驾驭vlan间路由配置方法以与子接口的配置。试验拓扑试验步骤1. 配置交换机SW1#vlan dat

16、abaseSW1(config-vlan)#vlan 10 ;创立vlan10SW1(config-vlan)#vlan 20 ;创立vlan20SW1(config)#int f1/11SW1(config-if)#switchport access vlan 10 ;将f1/11端口参加vlan10SW1(config-if)#no shut ;启用端口SW1(config-if)#endSW1(config)#int f1/12SW1(config-if)#switchport access vlan 20 ;将f1/11端口参加vlan10SW1(config-if)#no shut

17、;启用端口SW1(config-if)#endSW1(config)#int f1/3SW1(config-if)#switchport mode trunk ;配置端口为trunk形式SW1(config-if)#switchport trunk enc dot1q ;端口封装802.1q协议SW1(config-if)#no shutSW1(config-if)#endSW1(config)#int f1/5SW1(config-if)#switchport mode trunk ;配置端口为trunk形式SW1(config-if)#switchport trunk enc dot1q

18、;端口封装802.1q协议SW1(config-if)#no shutSW1(config-if)#endSW1#show vlan-s brief ;查看vlan配置摘要信息VLAN Name Status Ports- - - -1 default active Fa1/0, Fa1/1, Fa1/2, Fa1/4, Fa1/6, Fa1/7, Fa1/8, Fa1/9, Fa1/10,Fa1/13,Fa1/14,Fa1/1510 VLAN0010 active Fa1/11 ;端口已经被参加相应的vlan20 VLAN0020 active Fa1/121002 fddi-default

19、 active1003 token-ring-default active1004 fddinet-default active1005 trnet-default activeSW1#show int trunk ;查看trunk端口信息Port Mode Encapsulation Status Native vlanFa1/3 on 802.1q trunking 1 ;端口已经被配置成trunk,并封装802.1q协议Fa1/5 on 802.1q trunking 1Port Vlans allowed on trunkFa1/3 1-1005Fa1/5 1-1005Port Vla

20、ns allowed and active in management domainFa1/3 1Fa1/5 1Port Vlans in spanning tree forwarding state and not prunedFa1/3 1Fa1/5 1SW3#vlan databaseSW3(config-vlan)#vlan 20 ;创立vlan20SW3(config)#int f1/1SW3(config-if)#switchport mode trunk ;配置端口为trunk形式SW3(config-if)#switchport trunk enc dot1q ;端口封装802

21、.1q协议SW3(config-if)#no shutSW3(config-if)#endSW3(config)#int f1/11SW3(config-if)#switchport access vlan 20 ;将端口参加vlan20SW3(config-if)#no shutSW3(config-if)#endSW3#show vlan-s ;查看vlan配置信息SW3#show int trunk ;查看trunk端口信息2. 配置路由器R1(config)#int f 0/0.10 ;进入子接口配置形式R1(config-subif)#encapsulation dot1q 10 ;

22、为子接口封装802.1q协议R1(config-subif)#ip address 192.168.1.1 255.255.255.0 ;配置子接口的IPR1(config-subif)#exitR1(config)#int f 0/0.20 ;进入子接口配置形式R1(config-subif)#encapsulation dot1q 20 ;为子接口封装802.1q协议R1(config-subif)#ip address 192.168.2.1 255.255.255.0 ;配置子接口的IPR1(config-subif)#exitR1(config)#endR1(config)#int

23、f 0/0R1(config-if)#no ip add ;去物理接口IPR1(config-if)#no shut ;开启接口R1(config-if)#endR1#show ip route ;查看路由表信息Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 -

24、OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resort is not setC 192.168.1.0/24 is directly con

25、nected, FastEthernet0/0.10 ;直连网段的信息C 192.168.2.0/24 is directly connected, FastEthernet0/0.20 ;直连网段的信息3. 配置PC机PC1(config)#int f 0/0PC1(config-if)#no ip route ;关闭路由功能PC1(config-if)#exitPC1(config)#int f 0/0PC1(config-if)#ip address 192.168.1.10 255.255.255.0 ;配置IPPC1(config-if)#no shut ;开启接口PC1(confi

26、g-if)#endPC1(config)#ip default-gateway 192.168.1.1 ;配置默认网关PC2(config)#int f 0/0PC2(config-if)#no ip route ;关闭路由功能PC1(config-if)#exitPC1(config)#int f 0/0PC2(config-if)#ip address 192.168.2.10 255.255.255.0 ;配置IPPC2(config-if)#no shut ;开启接口PC2(config-if)#endPC2(config)#ip default-gateway 192.168.2.1

27、 ;配置默认网关PC2(config)#int f 0/0PC2(config-if)#no ip route ;关闭路由功能PC1(config-if)#exitPC1(config)#int f 0/0PC2(config-if)#ip address 192.168.2.20 255.255.255.0 ;配置IPPC2(config-if)#no shut ;开启接口PC2(config-if)#endPC2(config)#ip default-gateway 192.168.2.1 ;配置默认网关4. 验证在PC1上利用ping嘱咐分别测试与vlan10、vlan20网关与PC2、

28、PC4的连通性。PC1#ping 192.168.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 16/232/1040 msPC1#ping 192.168.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.1, ti

29、meout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 4/223/1012 msPC1#ping 192.168.2.10Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.10, timeout is 2 seconds:.!Success rate is 60 percent (3/5), round-trip min/avg/max = 12/48/92 msPC1#ping 192.16

30、8.2.20Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.20, timeout is 2 seconds:.!Success rate is 60 percent (3/5), round-trip min/avg/max = 20/52/96 ms试验要点1. 配置路由器子接口,要去除其对应物理接口的IP地址。2. PC机上配置IP地址,要关闭其路由功能。试验四不同VLAN跨交换机通信与VTP协议试验目的通过本试验,读者可以驾驭以下技能:1. 驾驭vlan的配置方法;2. 驾驭vlan间路

31、由配置方法以与子接口的配置;3. 驾驭vtp配置方法。试验拓扑试验步骤:1. 配置交换机SW1#vlan database SW1(vlan)#vtp domain ccna ;配置vtp域名为ccnaSW1(vlan)#vtp server ;配置该交换机为vtp serverSW1(vlan)#vtp password cisco ;配置vtp密码为ciscoSW1(vlan)#vlan 10 ;创立vlan10SW1(vlan)#vlan 20 ;创立vlan20SW1(vlan)#vtp pruning ;开启vtp修剪SW1(vlan)#exitVTP Version : 2Conf

32、iguration Revision : 1Maximum VLANs supported locally : 256Number of existing VLANs : 7VTP Operating Mode : Server ;该交换机为VTP效劳器VTP Domain Name : ccna ;VTP域名为ccnaVTP Pruning Mode : Enabled ;VTP修剪功能已开启VTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0xA6 0x99 0x07 0x92 0xB8 0x1E 0x65

33、0xF1Configuration last modified by 0.0.0.0 at 3-1-02 00:05:01Local updater ID is 0.0.0.0 (no valid interface found)SW1#show vtp status ;查看vtp 状态信息SW1#show vlan-switch brief ;查看vlan摘要信息VLAN Name Status Ports- - - -1 default active Fa1/0, Fa1/1, Fa1/2, Fa1/3 Fa1/4, Fa1/5, Fa1/6, Fa1/7 Fa1/8, Fa1/9, Fa

34、1/10, Fa1/11 Fa1/12, Fa1/13, Fa1/14, Fa1/1510 VLAN0010 active20 VLAN0020 active1002 fddi-default active1003 token-ring-default active1004 fddinet-default active1005 trnet-default activeSW1(config)#int f 1/3SW1(config-if)#switchport mode trunkSW1(config-if)#endSW1(config)#int f 1/5SW1(config-if)#swit

35、chport mode trunkSW1(config-if)#endSW1#show interface trunk ;查看trunk接口信息Port Mode Encapsulation Status Native vlanFa1/3 on 802.1q trunking 1Fa1/5 on 802.1q trunking 1Port Vlans allowed on trunkFa1/3 1-1005Fa1/5 1-1005Port Vlans allowed and active in management domainFa1/3 1,10,20Fa1/5 1,10,20Port Vl

36、ans in spanning tree forwarding state and not prunedFa1/3 noneFa1/5 noneSW1(config)#int f1/11SW1(config-if)#switchport access vlan 20 ;将端口参加vlan20SW1(config-if)#no shutSW1(config-if)#endSW1(config)#int f1/12SW1(config-if)#switchport access vlan 10 ;将端口参加vlan20SW1(config-if)#no shutSW1(config-if)#endSW1#show vlan-sVLAN Name Status Ports- - - -1 default active Fa1/0, Fa1/1, Fa1/2, Fa1/4, Fa1/6, Fa1/7, Fa1/8, Fa1/9,

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

当前位置:首页 > 教育专区 > 初中资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁