




已阅读5页,还剩50页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1 网络实用技术 路由技术 三 2 本堂课任务 1 不允许外部网络访问行政网络2 不允许pc0所在子网内pc访问行政网络ftp服务器 3 本堂课任务 如何配置路由器 只允许部分ip地址的数据包能通过本路由器 如何配置路由器 使内部网络的用户只能访问外部web服务器 解决方法配置访问控制列表 acl 学习并掌握标准acl 扩展acl以及命名acl的配置方法 4 访问控制列表acl概要 访问控制列表 acl 是一种包过滤技术 是应用在路由器接口的指令列表 acl告诉路由器哪些数据报可以允许 哪些需要拒绝 至于是允许还是拒绝 可以由类似源地址 目的地址 端口号等条件来作过滤决定 acl可以用来 限制网络流量 提高网络性能 同时acl也是网络访问控制的基本安全手段 5 访问控制列表的应用 允许或拒绝数据包通过路由器允许或拒绝vty访问进入或离开路由器如果没有访问控制列表 所有数据包都可以传输到你的网络 virtualterminallineaccess ip transmissionofpacketsonaninterface 6 访问控制列表 标准访问控制列表检查源地址通常允许或拒绝整个协议簇 outgoingpacket e0 s0 incomingpacket accesslistprocesses permit 7 访问控制列表 标准访问控制列表检查源地址通常允许或拒绝整个协议簇扩展访问控制列表检查源和目的地址允许或拒绝特定的协议 outgoingpacket e0 s0 incomingpacket accesslistprocesses permit protocol 8 访问控制列表 标准访问控制列表检查源地址通常允许或拒绝整个协议簇扩展访问控制列表检查源和目的地址允许或拒绝特定的协议入站或出站均可进行控制 outgoingpacket e0 s0 incomingpacket accesslistprocesses permit protocol 出站访问控制列表 inboundinterfacepackets n y packetdiscardbucket chooseinterface n accesslist routingtableentry y outboundinterfaces packet s0 出站访问控制列表 outboundinterfaces packet n y packetdiscardbucket chooseinterface routingtableentry n packet testaccessliststatements permit y accesslist y s0 e0 inboundinterfacepackets 出站访问控制列表 notifysender 如果没有访问控制列表相匹配则丢弃报文 n y packetdiscardbucket chooseinterface routingtableentry n y testaccessliststatements permit y accesslist discardpacket n outboundinterfaces packet packet s0 e0 inboundinterfacepackets 12 列表测试 拒绝或允许 packetstointerfacesintheaccessgroup packetdiscardbucket y interface s destination deny deny y matchfirsttest permit 13 列表测试 拒绝或允许 packetstointerface s intheaccessgroup packetdiscardbucket y interface s destination deny deny y matchfirsttest permit n deny permit matchnexttest s y y 14 列表测试 拒绝或允许 packetstointerface s intheaccessgroup packetdiscardbucket y interface s destination deny deny y matchfirsttest permit n deny permit matchnexttest s deny matchlasttest y y n y y permit 15 列表测试 拒绝或允许 packetstointerface s intheaccessgroup packetdiscardbucket y interface s destination deny y matchfirsttest permit n deny permit matchnexttest s deny matchlasttest y y n y y permit implicitdeny ifnomatchdenyall deny n 16 访问控制列表命令概要 步骤1 使用下列命令定义访问控制列表acl access listaccess list number permit deny testconditions router config 17 访问控制列表命令概要 步骤1 使用下列命令定义访问控制列表acl router config 步骤2 使用access group命令把该访问控制列表应用到某一接口上 protocol access groupaccess list number in out router config if ip访问控制列表的标号范围为1 99或100 199 access listaccess list number permit deny testconditions 18 为acl分配表号 numberrange identifier accesslisttype ip 1 99或1300 1999 standard 标准ip列表 1to99 测试ip报文中的源地址 19 为acl分配表号 numberrange identifier accesslisttype ip 1 99或1300 1999100 199或2000 2699 standardextended 标准ip列表 1to99 测试ip报文中的源地址扩展ip列表 100to199 能测试源和目的地址 特定的tcp ip协议 以及目的端口 20 为acl分配表号 numberrange identifier ip 1 99或1300 1999100 199或2000 2699name ciscoios11 2andlater 800 899900 999 standardextended standardextendednamed accesslisttype ipx 标准ip列表 1to99 测试ip报文中的源地址扩展ip列表 100to199 能测试源和目的地址 特定的tcp ip协议 以及目的端口其它访问控制列表表号范围测试其它网络协议 21 标准访问控制列表报文测试 sourceaddress segment forexample tcpheader data packet ipheader frameheader forexample hdlc deny permit useaccessliststatements1 99 22 扩展访问控制列表报文测试 destinationaddress sourceaddress protocol portnumber segment forexample tcpheader data packet ipheader frameheader forexample hdlc useaccessliststatements100 199totestthepacket deny permit tcp ip报文举例 23 如何使用通配符掩码位 0表示检查相应地址位的值1表示忽略相应地址位的值 不检查地址 忽略所有 0 0 0 0 0 0 0 0 忽略后6位地址位 检查所有地址位 匹配所有 忽略后4位地址位 检查后2位地址位 24 通配符掩码位匹配特定的ip主机地址 172 30 16 290 0 0 0检查所有地址位可以使用在地址前加缩写词host来表达上面的测试条件 host172 30 16 29 测试条件 检查所有的地址位 全部匹配 172 30 16 29 0 0 0 0 检查所有位 例如 一个ip主机地址 通配符掩码 25 通配符掩码位匹配任意ip地址 接受任意地址 0 0 0 0255 255 255 255可以使用缩写字any表达上面的测试条件 测试条件 忽略所有的地址位 0 0 0 0 255 255 255 255 全部忽略 anyipaddress 通配符掩码 26 通配符掩码位匹配ip子网 检查ip子网172 30 16 0 24to172 30 31 0 24 network host172 30 16 0 通配符掩码 00001111 00010000 1600010001 1700010010 18 00011111 31 地址和通配符掩码 172 30 16 00 0 15 255 27 标准acl配置 access listaccess list number permit deny source mask router config 为此列表条目设置参数setsparametersforthislistentryip标准访问列表使用1到99缺省通配符掩码 0 0 0 0 noaccess listaccess list number 删除整个访问列表 28 标准acl配置 access listaccess list number permit deny source mask router config 在一个接口上激活此列表设置入站或出站测试缺省 出站 noipaccess groupaccess list number 删除此接口的访问列表 router config if ipaccess groupaccess list number in out 为此列表条目设置参数setsparametersforthislistentryip标准访问列表使用1到99缺省通配符掩码 0 0 0 0 noaccess listaccess list number 删除整个访问列表 29 标准acl例一 172 16 3 0 172 16 4 0 172 16 4 13 e0 s0 e1 non 172 16 0 0 access list1permit172 16 0 00 0 255 255 implicitdenyall notvisibleinthelist access list1deny0 0 0 0255 255 255 255 30 标准acl例一 只允许我的网络 access list1permit172 16 0 00 0 255 255 implicitdenyall notvisibleinthelist access list1deny0 0 0 0255 255 255 255 interfaceethernet0ipaccess group1outinterfaceethernet1ipaccess group1out 172 16 3 0 172 16 4 0 172 16 4 13 e0 s0 e1 non 172 16 0 0 31 标准acl例二 拒绝一台特定主机 172 16 3 0 172 16 4 0 172 16 4 13 e0 s0 e1 non 172 16 0 0 access list1deny172 16 4 130 0 0 0 32 标准acl例二 172 16 3 0 172 16 4 0 172 16 4 13 e0 s0 e1 non 172 16 0 0 拒绝一台特定主机 access list1deny172 16 4 130 0 0 0access list1permit0 0 0 0255 255 255 255 implicitdenyall access list1deny0 0 0 0255 255 255 255 33 标准acl例二 access list1deny172 16 4 130 0 0 0access list1permit0 0 0 0255 255 255 255 implicitdenyall access list1deny0 0 0 0255 255 255 255 interfaceethernet0ipaccess group1out 172 16 3 0 172 16 4 0 172 16 4 13 e0 s0 e1 non 172 16 0 0 拒绝一台特定主机 34 标准acl例三 拒绝一个特定子网 172 16 3 0 172 16 4 0 172 16 4 13 e0 s0 e1 non 172 16 0 0 access list1deny172 16 4 00 0 0 255access list1permitany implicitdenyall access list1deny0 0 0 0255 255 255 255 35 标准acl例三 access list1deny172 16 4 00 0 0 255access list1permitany implicitdenyall access list1deny0 0 0 0255 255 255 255 interfaceethernet0ipaccess group1out 172 16 3 0 172 16 4 0 172 16 4 13 e0 s0 e1 non 172 16 0 0 拒绝一个特定子网 36 过滤虚拟终端 vty 访问路由器 五条虚拟终端线 0到4 过滤能访问到路由器vty端口的地址过滤离开路由器的vty访问 0 1 2 3 4 虚拟端口 vty0到4 物理端口e0 telnet 控制台端口 直连 console e0 37 如何控制vty访问 0 1 2 3 4 虚拟端口 vty0到4 物理端口 e0 telnet 用标准访问控制列表设置ip地址过滤使用line配置模式过滤访问 命令为access class对所有vty设置相同的限制 router e0 38 虚拟终端line命令 进入虚拟终端配置模式 限制在访问控制列表地址中的vty连接流入或流出 access classaccess list number in out linevty vty vty range router config router config line 39 虚拟终端访问举例 仅允许网络192 89 55 0中的主机连接到路由器的vty access list12permit192 89 55 00 0 0 255 linevty04access class12in 控制入站访问 40 标准与扩展访问控制列表比较 标准 扩展 基于源地址过滤 基于源和目的地址过滤 允许或拒绝整个tcp ip协议族 指定特定的协议和端口号 范围从100到199或2000到2699 范围从1到99或1300到1999 41 扩展acl配置 router config 为此列表列表条目设置参数 access listaccess list number permit deny protocolsourcesource wildcard operatorport destinationdestination wildcard operatorport established log 42 扩展acl配置 router config if ipaccess groupaccess list number in out 在一个接口上激活扩展列表 为此列表列表条目设置参数 router config access listaccess list number permit deny protocolsourcesource wildcard operatorport destinationdestination wildcard operatorport established log 43 扩展acl例一 拒绝ftp从子网172 16 4 0到子网172 16 3 0 从e0输出允许所有其它流量 172 16 3 0 172 16 4 0 172 16 4 13 e0 s0 e1 non 172 16 0 0 access list101denytcp172 16 4 00 0 0 255172 16 3 00 0 0 255eq21access list101denytcp172 16 4 00 0 0 255172 16 3 00 0 0 255eq20 44 扩展acl例一 172 16 3 0 172 16 4 0 172 16 4 13 e0 s0 e1 non 172 16 0 0 access list101denytcp172 16 4 00 0 0 255172 16 3 00 0 0 255eq21access list101denytcp172 16 4 00 0 0 255172 16 3 00 0 0 255eq20access list101permitipanyany implicitdenyall access list101denyip0 0 0 0255 255 255 2550 0 0 0255 255 255 255 拒绝ftp从子网172 16 4 0到子网172 16 3 0 从e0输出允许所有其它流量 45 扩展acl例一 access list101denytcp172 16 4 00 0 0 255172 16 3 00 0 0 255eq21access list101denytcp172 16 4 00 0 0 255172 16 3 00 0 0 255eq20access list101permitipanyany implicitdenyall access list101denyip0 0 0 0255 255 255 2550 0 0 0255 255 255 255 interfaceethernet0ipaccess group101out 172 16 3 0 172 16 4 0 172 16 4 13 e0 s0 e1 non 172 16 0 0 拒绝ftp从子网172 16 4 0到子网172 16 3 0 从e0输出允许所有其它流量 46 扩展acl例二 只拒绝来自子网172 16 4 0的telnet 从e0输出允许所有其它流量 172 16 3 0 172 16 4 0 172 16 4 13 e0 s0 e1 non 172 16 0 0 access list101denytcp172 16 4 00 0 0 255anyeq23 47 扩展acl例二 172 16 3 0 172 16 4 0 172 16 4 13 e0 s0 e1 non 172 16 0 0 access list101denytcp172 16 4 00 0 0 255anyeq23access list101permitipanyany implicitdenyall 只拒绝来自子网172 16 4 0的telnet 从e0输出允许所有其它流量 48 扩展acl例二 access list101denytcp172 16 4 00 0 0 255anyeq23access list101permitipanyany implicitdenyall interfaceethernet0ipaccess group101out 172 16 3 0 172 16 4 0 172 16 4 13 e0 s0 e1 non 172 16 0 0 只拒绝来自子网172 16 4 0的telnet 从e0输出允许所有其它流量 49 使用命名访问控制列表 router config ipaccess list standard extended name ciscoios11 2或更新版本 字母数字名字字符串必须是唯一的 50 使用命名访问控制列表 router config ipaccess list standard extended name permit deny ipaccesslisttestconditions permit deny ipaccesslisttestconditions no permit deny ipaccesslisttestconditions router config std ext nacl ciscoios11 2或更新版本 字母数字名字字符串必须是唯一的 允许或拒绝语句没有前缀号 no 从命名访问列表去掉特定的测试语句 51 使用命名访问控制列表 ciscoios11 2或更新版本 字母数字名字字符串必须是唯一的 允许或拒绝语句没有前缀号 no 从命名访问列表去掉特定的测试语句 在接口上激活ip命名访问列表 52 访问控制列表配置原则 访问控制列表语句的顺序至关重要推荐 使用文本编辑器进行剪切和粘贴至顶向下处理优先放置更重要的测试语句不能重排或取消语句使用noaccess listnumber命令取消整个访问控
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 人不吃饭的危害
- 电梯维保公司年终总结会
- 公司组织安全风险培训课件
- 青春社区运营工作总结
- 公司级安全教育培训课件
- 事故警示教育和安全培训课件
- 《蝶恋花答李淑一》课件
- 《蜘蛛开店》课件
- 事故安全培训建议课件
- 《艾滋病小斗士》课件
- 2025邮储银行校招笔试真题及答案
- 2025年甘肃省天水市甘谷县选聘大学生村文书55人考试参考题库及答案解析
- 2025年国家公务员考试法律基础知识复习讲义
- 农村产业融合发展示范园项目可行性研究报告
- d证科目一考试完整题库及答案
- 铝灰知识培训课件
- 旧窗户拆除安全合同7篇
- 学堂在线 运动与健康 章节测试答案
- 无人机作业安全知识培训课件
- 愿友谊地久天长课件
- 脾功能亢进诊疗规范内科学诊疗规范诊疗指南2023版
评论
0/150
提交评论