ACL TELENT 实验报告
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://dongwei.blog.51cto.com/319848/61983 |
ACL Telent 实验报告
1.实验拓扑
![]() 1.2 完成标准
(1) 按照拓扑图要求连接路由器,在R1 R2和R3 间配置相应的接口 IP地址,在R1 R3 配置默认路由.
(2) 检查路由表,所有路由器间都能通信。
(3)设置ACL
2. R1 可以 telent 上R3, R3不可以 telent 上R1
1.3详细实验步骤:
Step 1
路由器R1配置如下:
r1(config)#int e0/0
r1(config-if)#ip add
r1(config-if)#no shut
r1(config-if)#end
//配置默认路由 下一跳 10.0.0.2
r1(config)#ip route 路由器R2配置如下:
router(config)#ho r2
r2(config)#int e0/0
r2(config-if)#ip add
r2(config-if)#no shut
r2(config-if)#int e0/1
r2(config-if)#ip add
r2(config-if)#no shut
r2(config-if)#exit
r2(config)#
路由器R3配置如下:
router(config)#ho r3
r3(config)#int e0/0
r3(config-if)#ip add
r3(config-if)#no shut
r3(config-if)#exit
// 配置默认路由 下一跳 20.0.0.1
r3(config)#ip route
验证:
r1#ping
Sending 5, 100-byte ICMP Echos to
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/89/152 ms
r1#ping
Sending 5, 100-byte ICMP Echos to
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 88/144/220 ms
r3#ping
Sending 5, 100-byte ICMP Echos to
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 48/132/192 ms
setp 2 设置Telent
路由器R1配置如下:
r1(config)#line vty 0 4
r1(config-line)#password bent
r1(config-line)#login
r1(config-line)#exit
路由器R3配置如下:
r3(config)#line vty 0 4
r3(config-line)#password cisco
r3(config-line)#login
r3(config-line)#end
r3#
验证
r1#
Trying
Password:
r3#show users
Line User Host(s) Idle Location
* 0 con 0 idle 00:00:00
130 vty 0 idle 00:00:32
Interface User Mode Idle Peer Addrd
r3#10.0.0.1
Trying
r1#show users
Line User Host(s) Idle Location
* 0 con 0 idle 00:00:00
130 vty 0 idle 00:09:55
Interface User Mode Idle Peer Address
r1#clear line 130
[confirm]
[OK]
Step 3: 配置ACL
(1) 配置R1的e0/0接口IN方向的ACL
Enter configuration commands, one per line. End with CNTL/Z.
r1(config)#ip access-list extended benet //扩展访问控制列表命名为benet
r1(config-ext-nacl)#deny icmp host
//拒绝从
r1(config-ext-nacl)#per
r1(config-ext-nacl)#permit ip any any //允许其余所有ip地址数据包转发
r1(config-ext-nacl)#exit
r1(config)#int e0/0
r1(config-if)#ip access-group benet in //将命名为benet的扩展访问控制列表应用到接口e0/
r1(config-if)#end
r1#show access-list //显示访问列表
Extended IP access list benet
10 deny icmp host
20 permit ip any any
(2) 检查网络连通性
r1#ping
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 88/154/264 ms
//r1仍然正常ping通r3
r3#ping
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to
U.U.U //r3无法正常ping通r1,显示U即为ACL生效
Success rate is 0 percent (0/5)
r1#
r1#conf t
r1(config)#access-list 102 deny tcp host
//拒绝从
r1(config)#access-list 102 permit ip any any //允许其余所有ip地址数据包转发
r1(config)#int e0/0
r1(config-if)#ip access-group
r1(config-if)#end
r1# //显示访问列表
*Mar 1 01:07:30.683: %SYS-5-CONFIG_I: Configured from console by console
r1#show access-list
Extended IP access list 102
10 deny tcp host
20 permit ip any any
Extended IP access list benet
10 deny icmp host
20 permit ip any any (69 matches)
3.检查telnet
r1#telnet
Trying
User Access Verification
password:
r3>enable
Password:
r3#
r3#
r3#
[Connection to
r3#show users
Line User Host(s) Idle Location
* 0 con 0 idle 00:00:00
130 vty 0 idle 00:00:32
Interface User Mode Idle Peer Address
//r1仍然正常telent上r3
r3#tel
Trying
% Destination unreachable; gateway or host down
r3#tel
Trying
% Destination unreachable; gateway or host down
//r3无法正常telent上r1,显示% Destination unreachable; gateway or host down
即为ACL生效
r1#
r1#show users
Line User Host(s) Idle Location
* 0 con 0 idle 00:00:00
Interface User Mode Idle Peer Address
3.实验总结
访问控制列表(Access Control List, ACL)基本原理是:使用包过滤技术,在路由器上读取OSI 7层模型的第3层及第4层包头中的信息,根据预先定义好的规则,对包进行过滤,从而达到访问控制的目的。其基本知识点有:
AC ACL的主要用途归纳为:提供网络访问的基本安全手段;可用于QoS(Quality of Server,服务质量)对数据流量进行控制;提供对通信流量的控制手段。
ACL是一组判断语句的集合,对入站接口进入和出站接口离开路由器的数据包进行检测并控制
标准访问控制列表根据数据包的源IP地址来允许或拒绝数据包,列表号范围1~99。
扩展访问控制列表通过启用基于源和目的地址、传输层协议和应用端口号的过滤来提供更高程度的控制。利用这些特性,可基于网络的应用类型来限制数据流。列表号范围101~199。
本文出自 “Dongwei→工作室” 博客,请务必保留此出处http://dongwei.blog.51cto.com/319848/61983 本文出自 51CTO.COM技术博客 |



Dongwei
博客统计信息
热门文章
最新评论
友情链接