1、实验五 网络互连实验五 、网络互连1).教学目的:构建交换网络的三级结构。.通过实验提高学生的操作实践能力.2).教学重点: 构建交换网络的三级结构3).教学难点: 构建交换网络的三级结构。4)教学方法:采用多媒体教学。5)实验课时:2课时一、实验目的:构建交换网络的三级结构。二、背景描述你是某系统集成公司的技术工程师,公司现在承接一个企业网的搭建项目,经过现场勘测及充分与客户沟通,你建议该网络采用经典的三级网络构架,现项目方案已经得到客户的认可,并且请你负责整个网络的实施。三、实现功能边通过合理的三层网络架构,实现用户接入网络的安全、快捷。四、实验设备RG-S2126G(两台)、RG-S35
2、50-24(两台)、RG-WALL50(1台)、RG-R2624(1台)【网络拓扑原型】图 1【实验拓扑】图 2【客户需求】整个网络采用核心汇聚接入三级结构,出口防火墙做相应的防止外网攻击关键端口的规则,通过出口路由器做NAT供内网用户访问外网,同时要求VLAN1内网用户不能访问VLAN24的FTP服务,VLAN2不作限制。接入层交换机要实现防冲击波的功能。【实验拓扑说明】整个实验用RG-S2126G1模拟VLAN1用户接入交换机,RG-S2126G2模拟VLAN2用户接入交换机,VLAN1与VLAN2的用户通过RG-S3760-48-1实现VLAN间路由。RG-S3760-48-1与RG-S
3、3760-48-2之间通过静态路由,实现内网用户的对外数据包转发及对内网服务器的访问。RG-S3760-48-2及R1通过防火墙连接,防火墙启用桥模式,并对容易被攻击的端口进行安全防护。在R1上启用NAT功能,保证内网用户可以访问外网,实验拓扑中以R2模拟Internet。【IP地址规划】设备名称VLAN端口名称IP地址端口连接状况RG-S3760-48-1VLAN1192.168.11.1/24F0/1-RG-S2126G1VLAN2192.168.12.1/24F0/2-RG-S2126G2VLAN10192.168.13.1/24F0/10-RG-S3760-48-2 F0/10VLAN
4、10192.168.13.2/24F0/10-RG-S3760-48-1 F0/10 (续表)设备名称VLAN端口名称IP地址端口连接状况RG-S3760-48-2VLAN11192.168.1.11/24F0/11-防火墙eth0VLAN24192.168.24.1/24F0/24-内网服务器R1Fastethernet1/0192.168.1.12/24F1/0-防火墙eth1Serial1/2 (DTE)202.202.1.1/24S1/2R2 S1/2R2Serial1/2 (DCE)202.202.1.2/24S1/2R1 S1/2【基本配置】步骤1.S2126G1基本配置。swit
5、ch(config)#host RG-2126G-1RG-2126G-1(config)# interface range fa 0/1-24 !该步骤可省略RG-2126G-1(config-if-range)#switchport access vlan 1 !该步骤可省略步骤2.S2126G2基本配置。switch(config)#host RG-2126G-2RG-2126G-2(config)#vlan 2RG-2126G-2(config-vlan)#exitRG-2126G-2(config)#interface range fa 0/1-24RG-2126G-2(config-
6、if-range)#switchport access vlan 2步骤3.RG-3760-48-1基本配置。switch(config)#host RG-3760-48-1RG-3760-48-1(config)# vlan 2RG-3760-48-1(config-vlan)#exitRG-3760-48-1(config)# vlan 10RG-3760-48-1(config-vlan)#exitRG-3760-48-1(config)#interface fa 0/1RG-3760-48-1(config-if)#switch access vlan 1RG-3760-48-1(co
7、nfig-if)#exitRG-3760-48-1(config)#interface fa 0/2RG-3760-48-1(config-if)#switch access vlan 2RG-3760-48-1(config-if)#exitRG-3760-48-1(config)#interface fa 0/10RG-3760-48-1(config-if)#switch acess vlan 10RG-3760-48-1(config-if)#exitRG-3760-48-1(config)#interface vlan 1RG-3760-48-1(config-if)#ip addr
8、ess 192.168.11.1 255.255.255.0RG-3760-48-1(config-if)#no shRG-3760-48-1(config-if)#exitRG-3760-48-1(config)#interface vlan 2RG-3760-48-1(config-if)#ip address 192.168.12.1 255.255.255.0RG-3760-48-1(config-if)#no shRG-3760-48-1(config-if)#exitRG-3760-48-1(config)#interface vlan 10RG-3760-48-1(config-
9、if)#ip address 192.168.13.1 255.255.255.0RG-3760-48-1(config-if)#no shRG-3760-48-1(config-if)#exit步骤4.RG-3760-48-2基本配置。switch(config)#host RG-3760-48-2RG-3760-48-2(config)# vlan 10RG-3760-48-2(config-vlan)#exitRG-3760-48-2(config)# vlan 11RG-3760-48-2(config-vlan)#exitRG-3760-48-2(config)# vlan 24RG
10、-3760-48-2(config-vlan)#exitRG-3760-48-2(config)#interface fa 0/10RG-3760-48-2(config-if)#switch access vlan 10RG-3760-48-2(config-if)#exitRG-3760-48-2(config)#interface fa 0/11RG-3760-48-2(config-if)#switch access vlan 11RG-3760-48-2(config-if)#exitRG-3760-48-2(config)#interface fa 0/24RG-3760-48-2
11、(config-if)#switch access vlan 24RG-3760-48-2(config-if)#exitRG-3760-48-2(config)#interface vlan 10RG-3760-48-2(config-if)#ip address 192.168.13.2 255.255.255.0RG-3760-48-2(config-if)#no shRG-3760-48-2(config-if)#exitRG-3760-48-2(config)#interface vlan 11RG-3760-48-2(config-if)#ip address 192.168.1.
12、11 255.255.255.0RG-3760-48-2(config-if)#no shRG-3760-48-2(config-if)#exitRG-3760-48-2(config)#interface vlan 24RG-3760-48-2(config-if)#ip address 192.168.24.1 255.255.255.0RG-3760-48-2(config-if)#no shRG-3760-48-2(config-if)#exit步骤5.R1基本配置。Red-GiantenRed-Giant#conf tRed-Giant(config)#host R1R1(confi
13、g)#interface fa 1/0R1(config-if)#ip add 192.168.1.12 255.255.255.0R1(config-if)#no shR1(config)#interface serial 1/2R1(config-if)#ip add 202.202.1.1 255.255.255.0R1(config-if)#no sh步骤6.R2基本配置。Red-GiantenRed-Giant#conf tRed-Giant(config)#host R2R2(config)#int serial 1/2R2(config-if)#ip add 202.202.1.
14、2 255.255.255.0R2(config-if)#clock rate 64000R2(config-if)#no sh步骤7.测试各个直连接口能够ping通(步骤略)。步骤8.防火墙配置。1、登录防火墙,打开管理IP地址功能。图 32、设置防火墙的管理地址为192.168.1.2/24和192.168.1.3/24。图 43、设置防火墙的工作模式为:网桥模式。图 5图 6图 7图 8【路由配置】步骤9.RG-S3760-48-1路由配置。RG-3760-48-1(config)#ip routingRG-3760-48-1(config)# ip route 0.0.0.0 0.0.
15、0.0 192.168.13.2RG-3760-48-1#show ip route!Type: C - connected, S - static, R - RIP, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2!Type Destination IP Next hop Interface Distance Metric Status-S 0.0.
16、0.0/0 192.168.13.2 VL10 1 0 ActiveC 192.168.11.0/24 0.0.0.0 VL1 0 0 ActiveC 192.168.12.0/24 0.0.0.0 VL2 0 0 ActiveC 192.168.13.0/24 0.0.0.0 VL10 0 0 Active步骤10.RG-S3760-48-2路由配置。RG-3760-48-2(config)# ip routingRG-3760-48-2(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.12RG-3760-48-2(config)# ip route
17、192.168.11.0 255.255.255.0 192.168.13.1RG-3760-48-2(config)# ip route 192.168.12.0 255.255.255.0 192.168.13.1!RG-3760-48-2#show ip route!Type: C - connected, S - static, R - RIP, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1,
18、E2 - OSPF external type 2!Type Destination IP Next hop Interface Distance Metric Status-S 0.0.0.0/0 192.168.1.12 VL11 1 0 ActiveC 192.168.1.0/24 0.0.0.0 VL11 0 0 ActiveS 192.168.11.0/24 192.168.13.1 VL10 1 0 ActiveS 192.168.12.0/24 192.168.13.1 VL10 1 0 ActiveC 192.168.13.0/24 0.0.0.0 VL10 0 0 Activ
19、eC 192.168.24.0/24 0.0.0.0 VL24 0 0 Active步骤11.R1路由配置。R1(config)#ip route 192.168.11.0 255.255.255.0 192.168.1.11R1(config)#ip route 192.168.12.0 255.255.255.0 192.168.1.11R1(config)#ip route 0.0.0.0 0.0.0.0 serial 1/2!R1# sh ip route!Codes: C - connected, S - static, R - RIP O - OSPF, IA - OSPF int
20、er area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 * - candidate default!Gateway of last resort is 0.0.0.0 to network 0.0.0.0!S* 0.0.0.0/0 is directly connected, serial 1/2C 192.168.1.0/24 is directly connected, FastEthernet 1/
21、0C 192.168.1.12/32 is local host.S 192.168.11.0/24 is directly connected, FastEthernet 1/0S 192.168.12.0/24 is directly connected, FastEthernet 1/0C 202.202.1.0/24 is directly connected, serial 1/2C 202.202.1.1/32 is local host.【安全配置】步骤12.RG-S2126G1与RG-S2126G2防病毒配置(以RG-S212G2为例)。RG-2126G-2(config)#
22、ip access-list extended deny_wormsRG-2126G-2(config-ext-nacl)# deny tcp any any eq 135RG-2126G-2(config-ext-nacl)# deny tcp any any eq 136RG-2126G-2(config-ext-nacl)# deny tcp any any eq 137RG-2126G-2(config-ext-nacl)# deny tcp any any eq 138!RG-2126G-2(config-ext-nacl)# deny tcp any any eq 139RG-21
23、26G-2(config-ext-nacl)# deny tcp any any eq 445RG-2126G-2(config-ext-nacl)# deny udp any any eq 135!RG-2126G-2(config-ext-nacl)# deny udp any any eq 136RG-2126G-2(config-ext-nacl)# deny udp any any eq netbios-nsRG-2126G-2(config-ext-nacl)# deny udp any any eq netbios-dgmRG-2126G-2(config-ext-nacl)#
24、deny udp any any eq netbios-ss!RG-2126G-2(config-ext-nacl)# deny udp any any eq 445RG-2126G-2(config-ext-nacl)# permit ip any anyRG-2126G-2(config-ext-nacl)#exi!RG-2126G-2(config)#inter range fa 0/1-24RG-2126G-2(config-if-range)#ip access-group deny_worms in说明:RG-2126G-1配置同上。步骤13.RG-S3760-48-1安全配置。R
25、G-3760-48-1(config)#RG-3760-48-1(config)#ip access-list extended deny_ftpRG-3760-48-1(config-ext-nacl)# deny tcp 192.168.11.0 0.0.0.255 192.168.24.0 0.0.0.255 eq ftp!RG-3760-48-1(config-ext-nacl)# deny tcp 192.168.11.0 0.0.0.255 192.168.24.0 0.0.0.255 eq ftp-data!RG-3760-48-1(config-ext-nacl)#permit
26、 ip any anyRG-3760-48-1(config-ext-nacl)#end步骤14.防火墙安全策略。1、登录防火墙。2、选择“策略”“服务”选项。图 9图 103、在服务中添加服务名称,并在服务名称中指定相关协议与接口。图 114、添加多个规则,并且加入到服务组中(服务组名称可在“服务组”选项中设定)。图 125、规则添加完毕。图 136、在“策略”“规则”选项中将服务与源地址及目标地址关联。图 14图 157、将访问规则中定义的接口的所有源到所有目的的动作指定为拒绝,可在允许、拒绝、拒绝(ICMP)拒绝(重设)这4个选项中,点选第二项(拒绝)。图 16【R1的NAT配置】R1(
27、config)#access-list 1 permit 192.168.11.0 0.0.0.255R1(config)#access-list 1 permit 192.168.12.0 0.0.0.255R1(config)#int fa1/0R1(config-if)#ip nat insideR1(config-if)#exitR1(config)#int s1/2R1(config-if)#ip nat outsideR1(config-if)#exitR1(config)#ip nat inside source list 1 interface serial 1/2 overl
28、oad【注意事项】1、防火墙设置为桥模式后,工作模式相当于1台二层交换机,路由器静态路由指向内网时要明确指明下一跳地址。2、在添加安全规则之前要保证全网路由正常。3、安全访问控制列表要添加允许所有的条目,并在交换机相关接口下运用。4、R2作为模拟外网的路由器,在本实验中无需添加路由条目。5、R2的S1/2接口为DCE接口,要设置时钟速率。6、各个接口地址及连线要保证正确。7、路由器接口与防火墙接口相连请用交叉线。【参考配置】RG-3760-48-1#show running-configSystem software version : 1.02 Build Oct 17 2005 Relea
29、seBuilding configuration.Current configuration : 625 bytes!version 1.0!hostname RG-3760-48-1vlan 1!vlan 2!vlan 10!interface FastEthernet 0/2 switchport access vlan 2!interface FastEthernet 0/10 switchport access vlan 10!interface Vlan 1 ip address 192.168.11.1 255.255.255.0!interface Vlan 2 ip addre
30、ss 192.168.12.1 255.255.255.0!interface Vlan 10 ip address 192.168.13.1 255.255.255.0!ip route 0.0.0.0 0.0.0.0 Vlan 10 192.168.13.2 1 enabledendRG-3760-48-2#show running-configSystem software version : 1.03(1) Build Dec 1 2005 ReleaseBuilding configuration.Current configuration : 786 bytes!version 1.0!hostname RG-3760-48-2vlan 1!vlan 10!vlan 11!vlan 24!interface FastEthernet 0/10 switchport acce
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1