《网络互联技术》实践教学

上传人:泽*** 文档编号:75535318 上传时间:2022-04-15 格式:DOC 页数:32 大小:232.50KB
返回 下载 相关 举报
《网络互联技术》实践教学_第1页
第1页 / 共32页
《网络互联技术》实践教学_第2页
第2页 / 共32页
《网络互联技术》实践教学_第3页
第3页 / 共32页
点击查看更多>>
资源描述
网络互联技术实践教学实验一交换机的基本配置一基本配置:网络拓扑二. 实验配置1 配置交换机主机名Red-Giantenable(注:从用户模式进入特权模式)Red-Giant#configure terminal(注:从特权模式进入全局配置模式)Red-Giant(config)#hostname SW1(注:将主机名配置为SW1”)SW1(config)# 2配置交换机远程登陆密码SW1(config)#enable secret level 1 0 star (注:将交换机远程登陆 密码配置为“star” ) 3配置交换机特权模式口SW1(config)#enable令 secret level15 0 star(注:将交换机特权模式口令配置为“star”)4 为交换机分配管理IP 地址 SW1(config)#interface vlan 1 SW1(config-if)#ip address注:为 VLAN 1的管理接口分配IP 地址(表示通过VLAN 1来管理交换机),设置交换机的IP 地址为,对应的子网掩码为5 显示交换机MAC地址表的记录SW1#show mac-address-table注:在 PC 上开一命令行窗口,运行命令:能 ping通则在交换机上执行show mac-address-table可查看到 PC 的 MAC地址注:PC 的 MAC地址可以在命令行下输入: ipconfig /all查看6 修改交换机MAC地址的老化时间SW1(config)#mac-address-table aging-time注:将交换机MAC地址老化时间设置为10 秒SW1(config)#end注:从交换机全局配置模式返回至特权模式SW1#show mac-address-table注:显示交换机 MAC地址表的记录三. 实验验证命令SW1#show int f0/1 SW1#show ip int SW1#show run SW1ping PC的 ip 地址 从 PC 机 telnet 到交换机PC2 实验要求1 、为交换机命名PC12 、为交换机配置登陆密码和特权密码3 、为交换机分配管理IP4 、在 PC1 上 pingPC2实验二VLAN配置(同一交换机)一、网络拓扑实验项目VLAN/802.1Q本交换机隔离测试VLAN10 f0/5 f0/15VLAN20二、实验配置1 、创建 VLAN10 、把 F0/5 加入到 VLAN10中 S2126G#configure terminal注:进入交换机全局配置模式S2126G(config)# vlan 10注:创建vlan 10S2126G(config-vlan)# name test10注:将 Vlan 10命名为 test10S2126G(config)# interface fastethernet 0/5注:进入 fastethernet 0/5的接口配置模式S2126G(config-if)# switch access vlan 10注:将 fastethernet 0/5端口加入vlan 10中二、实验配置2 、创建 VLAN20 、把 F0/15加入到 VLAN20中 S2126G#configure terminal注:进入交换机全局配置模式S2126G(config)# vlan 10注:创建vlan 10S2126G(config-vlan)# name test10注:将 Vlan 10命名为 test10S2126G(config)# interface fastethernet 0/5注:进入 fastethernet 0/5的接口配置模式S2126G(config-if)# switch access vlan 10注:将 fastethernet 0/5端口加入vlan 10中三、扩展实验PC3PC4 VLAN20VLAN10思考:上述拓扑结构那些PC 机之间可以相互通信?实验三VLAN配置(跨交换机)一、实验项目VLAN/802.1Q跨交换机VLAN测试网络拓扑两台交换机的fast0/24互联,其中交换机SW1 的 fast0/5和 fast0/15连接 PC1 和 PC2 ,另一台交换机SW2 的fast0/4和 fast0/8接 PC3 和 PC4 SWI SW2PC4 VLAN201 、交换机 SW1的配置 注:进入交换机全局配置模式SWITCH1(config)# vlan 10注:创建 vlan 10 SWITCH1(config-if)# interface fastethernet 0/5注:进入 fastethernet0/5的接口配置模式SWITCH1(config-if)# switch access vlan 10注:将 fastethernet0/5端口加入 vlan 10中 SWITCH1(config)# vlan 20注:创建 vlan 20SWITCH1(config)# interface fastethernet 0/15注:进入 fastethernet 0/15的接口配置模式 SWITCH1(config-if)# switch access vlan 20注:将 fastethernet 0/15端口加入 vlan 20 中 SWITCH1(config)# interface fastethernet 0/24注:进入 fastethernet0/24的接口配置模式SWITCH1(config-if)# switchport mode trunk注:将fastethernet 0/24设为 tag vlan 模式2 、交换机SW2 的配置注:进入交换机全局配置模式SWITCH2(config)# vlan 10注:创建 vlan 10 SWITCH2(config-if)# interface fastethernet 0/4注:进入fastethernet0/4的接口配置模式SWITCH2(config-if)# switch access vlan 10注:将 fastethernet0/4端口加入vlan 10中 SWITCH2(config)# vlan 20注:创建vlan 20SWITCH2(config)# interface fastethernet 0/8注:进入fastethernet 0/8的接口配置模式SWITCH2(config-if)# switch access vlan 20注:将 fastethernet 0/8端口加入vlan 20中 SWITCH2(config)# interface fastethernet 0/24注:进入 fastethernet 0/24的接口配置模式SWITCH2(config-if)# switchport mode trunk注:将 fastethernet0/24设为 tag vlan模式三、验证命令:show vlan show int f0/24 switchport四、实验结果PC1 与 PC3 地址都设成的地址 PC2 和 PC4 地址都设成的地址 当PC1 与 PC3 虽然分别接在两台交换机上,即在同一Vlan中,可互相ping通,当 PC2 (或 PC4 ) 与 PC1 ,PC3不在同一vlan中则不通。实验四生成树协议一、网络拓扑SWA SWBPCAPCB二、实验配置 1、 SWA 的配置 (root)( 1)SWA#configure terminal注:进入全局配置模式 ( 2 ) SWA (config)#spanning-tree注:启用交换机生成树协议( 3)SWA(config)#spanning-tree mode stp/rstp注:将交换机生成树模式设置为802.1d(4 )SWA(config)#spanning-tree priority 注:配置交换机优先级,“0 ”或“ 4096 ”的倍数 ( 5) SWA(config)# int vlan 1 SWA(config)#ip address192.168.10.1 255.255.255.0 SWA(config)# no shutdown注:配置交换机A 的管理 ip二、实验配置2、 SWB 的配置 (root)( 1) SWB#configure terminal注:进入全局配置模式( 2 ) SWB (config)#spanning-tree注:启用交换机生成树协议( 3)SWA(config)#spanning-tree mode stp/rstp注:将交换机生成树模式设置为802.1d( 4 )注:配置交换机B 的管理 ip三、实验验证 1、在 PCA 或 PCB 上开设命令行窗口执行ping t 命令验证 STP 协议。2 、在 PCA 或 PCB 上开设命令行窗口执行ping t 命令验证 RSTP 协议。注意他们的不同实验五交换机综合实验一、网络拓扑SWA F0/4 PC1 F0/8 PC3 F0/12 F0/12 PC6 F0/8 PC4 SWB F0/4 PC2VLAN1VLAN10VLAN20PC5二、实验配置 ( 简写命令 ) (一 )SWA 的配置1 、创建 VLAN10 、把 F0/8 加入到 VLAN10中S2126G#configure terminal注:进入交换机全局配置模式S2126G(config)# vlan 10注:创建vlan 10S2126G(config)# interface fastethernet 0/8注:进入 fastethernet 0/8的接口配置模式S2126G(config-if)# switch access vlan 10注:将 fastethernet 0/8端口加入vlan 10中二、实验配置 ( 简写命令 ) ( 一 )SWA 的配置2 、创建 VLAN20 、把 F0/12加入到 VLAN20中S2126G#configure terminal注:进入交换机全局配置模式S2126G(config)# vlan 20注:创建vlan 20S2126G(config)# interface fastethernet 0/12注:进入fastethernet 0/12的接口配置模式S2126G(config-if)# switch access vlan 20注:将 fastethernet 0/12端口加入vlan 20中二、实验配置(一 )SWA 的配置3、 SWA 的 tag vlan配置 SWITCH2(config)# interfacefastethernet 0/2注:进入fastethernet 0/2的接口配置模式(主链路)SWITCH2(config-if)# switchport mode trunk注:将 fastethernet 0/2设为 tag vlan模式SWITCH2(config)# interface fastethernet 0/20注:进入 fastethernet 0/20的接口配置模式(备份链路)SWITCH2(config-if)# switchport mode trunk注:将fastethernet 0/20设为 tag vlan模式二、实验配置(一 )SWA 的配置4、 SWA 的生成树协议配置(root)( 1 )SWA#configureterminal注:进入全局配置模式( 2 )SWA (config)#spanning-tree注:启用交换机生成树协议( 3) SWA(config)#spanning-tree mode stp/rstp注:将交换机生成树模式设置为 802.1d/ w( 4 ) SWA(config)#spanning-tree priority 注:配置交换机优先级,“0 ”或“4096 ”的倍数二、实验配置 ( 简写命令 ) ( 二)SWB 的配置1 、创建 VLAN10 、把 F0/8 加入到 VLAN10中S2126G#configure terminal注:进入交换机全局配置模式S2126G(config)# vlan 10注:创建vlan 10S2126G(config)# interface fastethernet 0/8注:进入 fastethernet 0/8的接口配置模式S2126G(config-if)# switch access vlan 10注:将 fastethernet 0/8端口加入vlan 10中二、实验配置 ( 简写命令 ) ( 二 )SWB 的配置2 、创建 VLAN20 、把 F0/12 加入到 VLAN20中S2126G#configure terminal注:进入交换机全局配置模式S2126G(config)# vlan 20注:创建vlan 20S2126G(config)# interface fastethernet 0/12注:进入fastethernet 0/12的接口配置模式S2126G(config-if)# switch access vlan 20注:将 fastethernet 0/12端口加入vlan 20中二、实验配置(二 )SWB 的配置3 、SWA 的 tag vlan配置 SWITCH2(config)# interfacefastethernet 0/2注:进入fastethernet 0/2的接口配置模式(备份链路)SWITCH2(config-if)# switchport mode trunk注:将 fastethernet 0/2设为 tag vlan模式SWITCH2(config)# interface fastethernet 0/20注:进入 fastethernet 0/20的接口配置模式(主链路) SWITCH2(config-if)# switchport mode trunk注:将 fastethernet0/20设为 tag vlan模式二、实验配置( 二)SWB 的配置4 、SWB 的生成树协议配置( 1)SWA#configure terminal注:进入全局配置模式( 2 )SWA (config)#spanning-tree注:启用交换机生成树协议( 3 )SWA(config)#spanning-tree mode stp/rstp注:将交换机生成树模式设置为802.1d/ w实验六路由器的基本配置一、网络拓扑f1f1二、实验配置(一) A 路由器的配置:1 配置路由器主机名Red-Giantenable(注:从用户模式进入特权模式) Red-Giant#configure terminal(注:从特权模式进入全局配置模式) Red-Giant(config)#hostname A(注:将主机名配置为“A”A(config)#) 2配置路由器远程登陆密码A(config)# line vty 0 4 (注:进入路由器vty0至 vty4虚拟终端线路模式 ) A(config-line)#login A(config-line)#password star(注:将路由器远程登陆口令设置为“star”3)配置路由器特权模式口令A(config)#enable password star4 为路由器f1 接口分配IP 地址A(config)#interface fastethernet 1注:进入路由器f 1的接口配置模式注:设置路由器f1 的 IP 地址为, 对应的子网掩码为6 为路由器f0 接口分配IP 地址A(config)#interface fastethernet 0注:进入路由器f 0的接口配置模式注:设置路由器f 0的 IP 地址为, 对应的子网掩码为二、实验配置(二) B 路由器的配置:1 配置路由器主机名Red-Giantenable(注:从用户模式进入特权模式) Red-Giant#configure terminal(注:从特权模式进入全局配置模式)Red-Giant(config)#hostname B(注:将主机名配置为“B”A(config)#) 2配置路由器远程登陆密码B(config)# line vty 0 4 (注:进入路由器vty0至 vty4虚拟终端线路模式 ) B(config-line)#login B(config-line)#password star(注:将路由器远程登陆口令设置为“star”3)配置路由器特权模式口令B(config)#enable password star4 为路由器f1 接口分配IP 地址 B(config)#interface fastethernet 1注:进入路由器f 1的接口配置模式注:设置路由器f1 的IP地址为, 对应的子网掩码为6 为路由器f0接口分配IP地址B(config)#interface fastethernet 0注:进入路由器f 0的接口配置模式注:设置路由器f 0的IP地址为, 对应的子网掩码为三、验证命令:show run show int show ip int brief ping四、测试结果1. 查看路由器端口为up, up 2.两台路由器互相 ping Serial 口的地址,应该为通3.两台主机分别 ping与其直连的路由器的 Fastethernet口,应为通4. 从与路由器相连的主机可以 telnet到,与路由器相连的主机可以 telnet到五、问题两台主机互相ping是否能通实验七创新实验一、网络拓扑f0 f0/5VLAN10f1 f0/10VLAN20f2 f0/15VLAN30f0/2f0/8f0/6PC1PC3 PC2二、实验配置 ( 简写命令 )(一 ) 交换机的配置1 、创建 VLAN10 、把 f0/2 、f0/5加入到 VLAN10中 S2126G(config)#vlan 10注:创建vlan 10 S2126G(config)# interface fastethernet 0/2注:进入fastethernet 0/2的接口配置模式S2126G(config-if)# switch access vlan 10注:将 fastethernet 0/2端口加入vlan 10中 S2126G(config)# interface fastethernet0/5注:进入fastethernet 0/5的接口配置模式S2126G(config-if)# switch access vlan10 注:将 fastethernet 0/5端口加入vlan 10中二、实验配置 ( 简写命令 )(一 ) 交换机的配置2 、创建 VLAN10 、把 f0/6 、f0/10加入到 VLAN20中 S2126G(config)#vlan 20注:创建vlan 10 S2126G(config)# interface fastethernet 0/6注:进入fastethernet 0/6的接口配置模式S2126G(config-if)# switch access vlan 20注:将 fastethernet 0/6端口加入vlan 20中 S2126G(config)# interface fastethernet0/10注:进入fastethernet 0/10的接口配置模式S2126G(config-if)# switch accessvlan 20注:将 fastethernet 0/10端口加入 vlan 20中二、实验配置 ( 简写命令 )(一 ) 交换机的配置3 、创建 VLAN10 、把 f0/8 、f0/15加入到 VLAN30中 S2126G(config)#vlan 30注:创建vlan 30 S2126G(config)# interface fastethernet 0/8注:进入fastethernet 0/8的接口配置模式S2126G(config-if)# switch access vlan 30注:将 fastethernet 0/6端口加入vlan 30中 S2126G(config)# interface fastethernet0/15注:进入fastethernet 0/15的接口配置模式S2126G(config-if)# switch accessvlan 30注:将 fastethernet 0/15端口加入 vlan 30中(二) 路由器的配置1 为路由器f0 接口分配 IP 地址B(config)#interface fastethernet0 注:进入路由器f 0的接口配置模式注:设置路由器f0的 IP 地址为 , 对应的子网掩码为为路由器f1 接口分配IP 地址B(config)#interface fastethernet 1注:进入路由器f 1的接口配置模式注:设置路由器f 1的 IP 地址为 , 对应的子网掩码为5 为路由器f2 接口分配IP 地址 B(config)#interface fastethernet 2注:进入路由器f 2的接口配置模式注:设置路由器f2的 IP 地址为 , 对应的子网掩码为注意将所有接口启用B(config-if)#no shutdown实验八静态路由一、网络拓扑二、实验目的通过配置静态路由,使路由器A ,B 具有非直连子网的路由信息,两台 PC 机实现通信。二、实验配置(一) A 路由器的配置:1 配置路由器主机名Red-Giantenable(注:从用户模式进入特权模式) Red-Giant#configure terminal(注:从特权模式进入全局配置模式) Red-Giant(config)#hostname A(注:将主机名配置为“A”A(config)#)2 配置路由器远程登陆密码A(config)# line vty 0 4 (注:进入路由器vty0 至 vty4 虚拟终端线路模式 ) A(config-line)#login A(config-line)#password star(注:将路由器远程登陆口令设置为“star”3)配置路由器特权模式口令A(config)#enable password star4 为路由器f1 接口分配IP 地址A(config)#interface fastethernet 1注:进入路由器f 1的接口配置模式注:设置路由器f1 的 IP 地址为, 对应的子网掩码为6 为路由器f0 接口分配IP 地址A(config)#interface fastethernet 0注:进入路由器f 0的接口配置模式注:设置路由器f 0的 IP 地址为, 对应的子网掩码为8 配置静态路由:或:二、实验配置(二) B 路由器的配置:1 配置路由器主机名Red-Giantenable(注:从用户模式进入特权模式) Red-Giant#configure terminal(注:从特权模式进入全局配置模式)Red-Giant(config)#hostname B(注:将主机名配置为“B”A(config)#) 2配置路由器远程登陆密码B(config)# line vty 0 4 (注:进入路由器vty0至 vty4虚拟终端线路模式 ) B(config-line)#login B(config-line)#password star(注:将路由器远程登陆口令设置为“star”3)配置路由器特权模式口令B(config)#enable password star4 为路由器f1 接口分配IP 地址 B(config)#interface fastethernet 1注:进入路由器f 1的接口配置模式注:设置路由器f1 的 IP 地址为, 对应的子网掩码为6 为路由器f0 接口分配IP 地址 B(config)#interface fastethernet 0注:进入路由器f 0的接口配置模式注:设置路由器f 0的 IP 地址为, 对应的子网掩码为8 配置静态路由:或:三、验证命令:show run show int show ip int brief ping四、问题PCA 与 PCB 是否可以相互通信?实验九创新实验一、网络拓扑PCA f0A f1 f1B f2 f2C f0PCB二、实验要求对路由器进行正确的配置,使PCA 与 PCB 之间能够通信实验十动态路由一、网络拓扑二、实验目的通过配置动态路由,使路由器A , B 具有非直连子网的路由信息,两台 PC 机实现通信。二、实验配置(一) A 路由器的配置:1 配置路由器主机名Red-Giantenable(注:从用户模式进入特权模式) Red-Giant#configure terminal(注:从特权模式进入全局配置模式) Red-Giant(config)#hostname A(注:将主机名配置为“A”A(config)#)2 配置路由器远程登陆密码A(config)# line vty 0 4 (注:进入路由器vty0 至 vty4 虚拟终端线路模式 ) A(config-line)#login A(config-line)#password star(注:将路由器远程登陆口令设置为“star”3)配置路由器特权模式口令A(config)#enable password star4 为路由器f1 接口分配IP 地址A(config)#interface fastethernet 1注:进入路由器f 1的接口配置模式注:设置路由器f1 的 IP 地址为, 对应的子网掩码为6 为路由器f0 接口分配IP 地址A(config)#interface fastethernet 0注:进入路由器f 0的接口配置模式注:设置路由器f 0的 IP 地址为, 对应的子网掩码为8 配置动态路由:二、实验配置(二) B 路由器的配置:1 配置路由器主机名Red-Giantenable(注:从用户模式进入特权模式) Red-Giant#configure terminal(注:从特权模式进入全局配置模式)Red-Giant(config)#hostname B(注:将主机名配置为“B”A(config)#) 2配置路由器远程登陆密码B(config)# line vty 0 4 (注:进入路由器vty0至 vty4虚拟终端线路模式 ) B(config-line)#login B(config-line)#password star(注:将路由器远程登陆口令设置为“star”3)配置路由器特权模式口令B(config)#enable password star4 为路由器f1 接口分配IP 地址 B(config)#interface fastethernet 1注:进入路由器f 1的接口配置模式注:设置路由器f1 的 IP 地址为, 对应的子网掩码为6 为路由器f0 接口分配IP 地址 B(config)#interface fastethernet 0注:进入路由器f 0的接口配置模式注:设置路由器f 0的 IP 地址为, 对应的子网掩码为8 配置动态路由:三、验证命令:show run show int show ip int brief router#show ip protocolsrouter#show ip route四、问题PCA 与 PCB 是否可以相互通信?实验十一创新实验一、网络拓扑PCA f0A f1 f1B f2 f2C f0PCB二、实验要求对路由器进行正确的动态路由配置,使PCA 与 PCB 之间能够通信实验十二一、网络拓扑IP 标准访问列表二、实验内容标准访问列表只对数据包的源地址进行规则匹配。种规则定义和规则排列。标准访问列表应该支持各三、实验配置 (一)A 路由器的基本配置:1 配置路由器主机名Red-Giantenable(注:从用户模式进入特权模式) Red-Giant#configure terminal(注:从特权模式进入全局配置模式) Red-Giant(config)#hostname A(注:将主机名配置为“A”A(config)#) 2配置路由器远程登陆密码A(config)# line vty 0 4 (注:进入路由器vty0至 vty4虚拟终端线路模式 ) A(config-line)#login A(config-line)#password star(注:将路由器远程登陆口令设置为“star”3)配置路由器特权模式口令A(config)#enable password star4 为路由器f0 接口分配IP 地址A(config)#interface fastethernet 0注:进入路由器f 0的接口配置模式注:设置路由器f0 的 IP 地址为, 对应的子网掩码为为路由器f1 接口分配IP 地址A(config)#interface fastethernet 1注:进入路由器f 1的接口配置模式注:设置路由器f 1的 IP 地址为, 对应的子网掩码为8 为路由器f2 接口分配IP 地址A(config)#interface fastethernet 2注:进入路由器f 0的接口配置模式注:设置路由器f 2的 IP 地址为, 对应的子网掩码为(二) A 路有器的标准访问列表的配置:注:定义IP 标准 ACL 1 ,允许类网段A(config)#interface注:进入路由器fastethernet 2的接口配置模式A(config-if)#ip access-group 1 out注:将 ACL 1应用在 fastethernet 2的出口A(config)#interface fastethernet 1注:进入路由器fastethernet 1的接口配置模式A(config-if)#ip access-group 1 out注:将 ACL 1应用在 fastethernet 1的出口四、实验结果1、 172 16 00内的子网可以相互访问,2、172 16 00以外的子网不可以访问172 16 00实验十三一、网络拓扑IP 扩展访问列表二、实验内容标准访问列表只对数据包的源地址进行规则匹配。标准访问列表应该支持各种规则定义和规则排列。三、实验配置(一)A路由器的基本配置:1 配置路由器主机名Red-Giantenable(注:从用户模式进入特权模式) Red-Giant#configure terminal(注:从特权模式进入全局配置模式) Red-Giant(config)#hostname A(注:将主机名配置为“A”A(config)#)2配置路由器远程登陆密码A(config)# line vty 0 4 (注:进入路由器vty0 至 vty4 虚拟终端线路模式 ) A(config-line)#login A(config-line)#password star(注:将路由器远程登陆口令设置为“star”3)配置路由器特权模式口令A(config)#enable password star4 为路由器f0 接口分配IP 地址A(config)#interface fastethernet 0注:进入路由器f 0的接口配置模式注:设置路由器f0 的 IP 地址为, 对应的子网掩码为为路由器f1 接口分配IP 地址A(config)#interface fastethernet 1注:进入路由器f 1的接口配置模式注:设置路由器f 1的 IP 地址为, 对应的子网掩码为8 为路由器f2 接口分配IP 地址A(config)#interface fastethernet 2注:进入路由器f 0的接口配置模式注:设置路由器f 2的 IP 地址为, 对应的子网掩码为(二) A 路由器扩展访问列表的配置注:定义IP扩展ACL 101,拒绝网段对网段做telnet访问A(config)#access-list 101 permit ip any any注:允许其它IP流量通过A(config)#interface fastethernet 2注:进入路由器fastethe
展开阅读全文
相关资源
相关搜索

最新文档


当前位置:首页 > 办公文档 > 解决方案


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


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