《网络互联技术》实验指导书(4)

2019-03-09 15:57

实验8 路由器命名的访问列表

【实验名称】命名的标准IP访问列表 【实验目的】:掌握命名的标准IP访问列表规则及配置

【背景描述】:你是学校的网络管理员,在3550 – 24交换机上连着学校的提供学习资料的服务器,另外还连接着学生宿舍楼和教工宿舍楼,学校规定学生只能访问学习资料存放的服务器,学生宿舍楼不能访问教工宿舍楼

【实现功能】:实现网段间互相访问的安全控制。 【实验拓扑】

【实验设备】S3550 – 24 (1台)。 【实验步骤】

步骤1基本配置。

3550 – 48 (config) # vlan 10

3550 – 48(config – vlan)# name server 3550 – 48(config)# vlan 20

3550 – 48(config – vlan)# name teachers 3550 – 48(config)# vlan 30

3550 – 48(config – vlan)# name students 3550 – 48(config)# interface f 0/10

3550 – 48(config – if)# switchport mode access 3550 – 48(config – if)#switchport access vlan 10 3550 – 48(config)# interface f 0/20

3550 – 48(config – if)# switchport mode access 3550 – 48(config – if)#switchport access vlan 20 3550 – 48(config)# interface f 0/30

3550 – 48(config – if)# switchport mode access 3550 – 48(config – if)#switchport access vlan 30 3550 – 48 (config) #int vlan10

3550 – 48 (config – if) # ip add 192.168.10.1 255.255.255.0 3550 – 48 (config – if) # no sh 3550 – 48 (config – if) #int vlan20

3550 – 48 (config – if) # ip add 192.168.20.1 255.255.255.0 3550 – 48 (config – if) # no sh 3550 – 48 (config – if) #int vlan30

3550 – 48 (config – if) # ip add 192.168.30.1 255.255.255.0 3550 – 48 (config – if) # no sh

步骤2配置命名标准IP访问控制列表。

3550 – 48(config)# ip access – list standard denystudent !定义命名访问控制列表 3550 – 48(config – std – nacl)#deny 192.168.30.0 0.0.0.255 !定义列表匹配的条件 3550 –48(config – std – nacl)#permit any !允许其他流量通过 验证命令

3550 – 48# sh ip access – lists denystudent

16

步骤3把访问控制列表在接口下应用。

3550 – 48(config)# int vlan 20

3550 – 48 (config – if) #ip access – group denystudent out !在接口出方向应用

【注意事项】访问控制列表要在接口下应用;要注意deny某个网段后要peimit其他网段。

实验9 路由器命名的扩展IP访问列表

【实验目的】掌握命名的扩展IP访问列表规则及配置。

【背景描述】你是学校的网络管理员,在世界上3550 – 24 交换机上边着学校的提供WWW和FTP的服务器,另外还连接着宿舍楼和教工宿舍楼,学校规定学生只能对服务器进行FTP访问,不能进行WWW访问,教工则没有此限制。 【实现功能】实现网段间互相访问的安全控制。 【实验步骤】

步骤1基本配置。

3550 – 48 (config) # vlan 10

3550 – 48(config – vlan)# name server 3550 – 48(config)# vlan 20

3550 – 48(config – vlan)# name teachers 3550 – 48(config)# vlan 30

3550 – 48(config – vlan)# name students 3550 – 48(config)# interface f 0/10

3550 – 48(config – if)# switchport mode access 3550 – 48(config – if)#switchport access vlan 10 3550 – 48(config)# interface f 0/20

3550 – 48(config – if)# switchport mode access 3550 – 48(config – if)#switchport access vlan 20 3550 – 48(config)# interface f 0/30

3550 – 48(config – if)# switchport mode access 3550 – 48(config – if)#switchport access vlan 30 3550 – 48 (config) #int vlan10

3550 – 48 (config – if) # ip add 192.168.10.1 255.255.255.0 3550 – 48 (config – if) # no sh

3550 – 48 (config – if) #int vlan20

3550 – 48 (config – if) # ip add 192.168.20.1 255.255.255.0 3550 – 48 (config – if) # no sh 3550 – 48 (config – if) #int vlan30

3550 – 48 (config – if) # ip add 192.168.30.1 255.255.255.0 3550 – 48 (config – if) # no sh

步骤2配置命名标准IP访问控制列表。

3550 – 48(config)# ip access – list standard denystudent !定义命名访问控制列表 3550 – 48(config – ext – nacl)#deny tcp 192.168..30.0 0.0.0.255 192.168.10.0 0.0.0.255 eq www !禁止WWW服务

3550 – 48 (config – ext – nacl) # permit ip any any !允许其他服务

17

验证命令

3550 – 48 # sh ip access – lists denystudentwww 步骤3把访问控制列表在接口下应用。 3550 – 48(config)# int vlan 30

3550 – 48 (config – if) # ip access – group denystudent www in

【注意事项】访问控制列表要在接口下应用;要注意deny某个网段后要peimit 其他网段。

实验10 网络地址转换NAT/NAPT

【实验名称】网络地址转换NAT

【实验目的】:掌握内网中的一台服务器连接到INTERNET网时的静态内部源地址转换 【背景描述】:你是某公司的网络管理员,内部网络有FTP服务器可以为外部用户提供的服务.服务器的IP地址必须采用静态地址转换,以便外部用户可以使用这些服务. 【实现功能】:一个企业不想让外部网络用户知道自己的网络内部结构,可以通过NAT将内部网络与外部INTERNET隔离开,则外部用户根本不知道通过NAT设置的IP地址. 【实验拓扑】

【实验设备】: R2620(2台) 【实验步骤】: 步骤1基本配置。

Red – Giant (config) #hostname R1

R1(config) # interface serial 0

R1(config – if) # ip address 192.1.1.1 255.255.255.0 R1(config – if) # clock rate 64000 R1(config – if) # no shu

R1(config – if) # no shutdown

R1(config – if) # end

R1(config) # interface fastEthernet 0

R1(config – if) # ip add 192.168.1.1 255.255.255.0 R1(config – if) # no sh

Red – Giant (config) #hostname R2 R1(config) # in serial 0

R2(config – if) # ip address 192.1.1.2 255.255.255.0 R2(config – if) # no sh R2(config – if) # end

验证测试:R2#ping 192.1.1.1 步骤2配置静态NAT映射。

18

R1(config) # ip nat inside source static 192.168.1.2 192.1.1.3 !定义静态映射一一匹配 R1(config) #int fastEthernet 0

R1(config – if) # ip nat inside !定义内部接口 R1(config) # int serial 0

R1(config – if) # ip nat outside !定义外部接口 R1(config) # ip route 0.0.0.0 0.0.0.0 serial 0 验证测试:R1# sh ip nat translations 【注意事项】

不要把inside 和 outside 应用的接口弄错;

要加上能使数据包向外转发的路由,比如默认路由;尽量不要用广域网接口地址作为映射的全局地址。

网络地址转换NAPT

【实验名称】复用内部全局地址转换NAPT

【实验目的】:掌握内网中所有主机连接到INTERNET网时,通过端口号区分的复用内部全局地址转换.

【背景描述】:你是某公司的网络管理员,公司只向ISP申请了一个公网IP地址,希望公司的主机都能访问外网,请你实现.

【实现功能】:允许内部所有主机在公网地址缺乏的情况下可以访问外部网络 【实验拓扑】

【实验设备】: R2620 【实验步骤】: 步骤1基本配置。

Red – giant (config) #hostname R1 R1(config) #interface serial 0

R1(config – if) # ip address 192.1.1.1 255.255.255.0 R1(config – if) # clock rate 64000 R1(config – if) # no shutdown R1(config – if) #exit

R1(config) #interface fastEthernet 0

R1(config – if) # ip add 192.168.1.1 255.255.255.0 R1(config – if) # no sh

Red – Giant (config) #hostname R2 R2(config) #int serial 0

R2(config – if) # ip add 192.1.1.2 255.255.255.0 R2(config – if) # end 验证测试:

19

R2 # ping 192.1.1.1

步骤2配置协态NAPT映射。

R1(config)# ip nat pool to – internet 192.1.1.1 192.1.1.1 netmask 255.255.255.0 overload !定义地址池

R1 (config) # access – list 1 permit 192.168.1.0 0.0.0.255 !定义允许转换的地址 R1(config)# ip nat inside source list 1 pool to – internet !为内部本地调用转换地址池 验证测试:R1#sh ip nat translations

【注意事项】不要把inside 和 outside应用的接口弄错;要加上能使数据包向外转发的路由,比如默认路由;尽量不要用广域网接口地址作为映射的全局地址,本例子中特定仅有一个公网地址,实际工作中不推荐。

实验11 综合实验(设计实现小型局域网)

实验任务:

假设现有某高校校园网,有S3500三层交换机一台,S2126二层交换机三台,存放有大量的学生学习资料和教师科研资料的服务器各一台,学生宿舍楼两栋PC机若干,教工宿舍楼两栋PC机若干。要求实现如下功能:学生只能访问存有学习资料的服务器,也可访问教工宿舍楼,但不能访问教师科研资料的服务器;教工可以访问两台服务器,也可以访问学生楼。

如果你是网络管理员,请你按下列步骤完成网络设计与配置: 1) 画出该网络拓扑图,规划IP地址; 2) 3) 4)

写出二层交换和三层交换机必需的基本配置步骤和相关语句(注意要使用VLAN); 配置命名的扩展的IP访问控制列表;

把上述访问控制列表应用在相应的接口下;

20


《网络互联技术》实验指导书(4).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:大学英语六级考试常考词组

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: