1、了解和熟悉防火墙的包过滤功能。体现包过滤功能在网络安全的作用了解防火墙在网络安全中的重要性实验原理 利用路由器本身对分组的解析,以访问控制表方式实现对分组的过滤注意事项1、路由器使用window server 2012 进行配置实现2、实验需要用到虚拟机的帮助实验环境说明Window10 Window 7Vmware Workstation 11Window Server 2012实验步骤本次实验有三台PC机和两台路由器,网络拓扑图如下所示。PC1不能ping通router1,但PC0能ping通router1。通过密码远程登录Router1。三、 代码及截图:Router0的基本配置命令:R
2、outerenable 进入特权模式Router#config t 进入全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#interface fa1/0 进入端口配置模式Router(config-if)#ip address 192.168.1.1 255.255.255.0 配置fa1/0的ipRouter(config-if)#no shutdown 启用%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to u
3、p%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to upRouter(config-if)#exit 退出端口配置模式Router(config)#int fa0/0 进入端口配置模式Router(config-if)#ip address 192.168.2.1 255.255.255.0 配置fa0/0的ip Interface FastEthernet0/0, changed state to up Line protocol on Interface FastEtherne
4、t0/0, changed state to upRouter(config)#int s2/0 进入端口配置模式Router(config-if)#ip address 192.168.3.1% Incomplete command.Router(config-if)#ip address 192.168.3.1 255.255.255.0 配置ser2/0的ipRouter(config-if)#no shutdown 启用 Interface Serial2/0, changed state to upRouter(config-if)#exit 退出端口配置模式Router(confi
5、g)#router rip 配置动态路由Router(config-router)#verRouter(config-router)#version 2 版本号Router(config-router)#network 192.168.1.0 相连网段Router(config-router)#network 192.168.2.0 相连网段Router(config-router)#network 192.168.3.0 相连网段Router(config-router)#exit 退出路由配置模式Router(config)#int s2/0 进入端口配置模式Router(config-i
6、f)#clock rate 64000 时钟Router(config-if)#exitRouter(config)# Line protocol on Interface Serial2/0, changed state to up%SYS-5-CONFIG_I: Configured from console by consoleRouter#Router1的基本配置命令:enable 进入特权模式Router(config)#int fa0/0 进入端口配置模式Router(config-if)#ip address 192.168.4.1 255.255.255.0 配置fa0/0的i
7、pRouter(config-if)#exit 退出端口配置模式Router(config-if)#ip address 192.168.3.2 255.255.255.0 配置ser2/0的ipRouter(config-if)#no shutdown Interface Serial2/0, changed state to downRouter(config-if)#no shutdownRouter(config-if)#Router(config-router)#network 192.168.4.0 相连网段(1) 未设置ping的控制条件时,PC机之间能够相互ping通。截图如下
8、:PC0 ping PC2 能够ping通PC1 ping PC2 能够ping通PC2 ping PC0 能够ping通PC2 ping PC1 能够ping通(2) 在router1上配置ping控制条件,禁止PC1访问。Router(config)#access-list 1 deny host 192.168.2.2 拒绝192.168.2.2访问Router(config)#access-list 1 permit any 允许其他的都能访问Router(config)#int s2/0 进入端口配置模式Router(config-if)#ip access-group 1 in 将
9、规则1应用于过滤从串口接收上来的报文 PC0 ping PC2 能够ping通PC1 ping router0的s2/0 能够ping通PC1 ping router1的s2/0 超时PC2 ping PC0 能够ping通PC2 ping PC1 超时PC2 ping fa0/0 能够ping通PC2 ping fa1/0 能够ping通(3) 在Router1上远程登录的设置Router(config)#line vty 0 4 进入虚拟线程模式,在这个模式可对telnet功能进行配置Router(config-line)#password 123 设置密码123Router(config
10、-line)#login 启用口令检查 Router(config-line)#exit 退出虚拟线程模式PC0 telnet Router1: PC2 telnet Router1: PC1 telnet Router1:实验结果分析在本次实验中,路由器我采用的动态路由配置,使用的是rip协议。又由于router0有3个端口,所以所用的路由是Router-PT路由器,两个路由之间使用的接口是串口。在配置串口IP地址时,我发现第一个串口在配置好后,如果立即no shutdown,不但不能启用该串口,还会使串口的状态变为down。在配置好动态路由后,我用PC0 ping PC2,结果无法ping通,然后,我在其中的一个路由的串口上配置了一个时钟,再重新ping的时候,就能够ping通了。还有,在做这次实验的时候,我发现,路由的端口我们不能随便取名,要根据选用的路由给的端口名称来配置端口IP,这不知道是规定是这样的还是由于软件的版本不同。这次实验也让我学到了很多知识,如,对同一路由来说,如何使有的PC机能够ping通该路由,有的不能ping通。还有,对一些基本的配置,如IP的配置、动态路由的配置,也更加的熟练,理解也更加深刻。除此之外,对telnet也有所了解,但还不是很熟悉,不能很好的使用。我不知道,为什么在这次实验中PC0、PC2都能telnet Router1 ,PC1不能。