自制ACL+DHCP实验(初版)
来源:互联网 发布:手机淘宝6.5.1版本 编辑:程序博客网 时间:2024/06/06 17:44
(实验用gns模拟器)
ACL
实验拓扑:
实验要求:
1.1.1.1→3.3.3.3 不通
11.11.11.11→3.3.3.3 通
2.2.2.2→3.3.3.3 通
实验步骤:
步骤一:基本配置
R1:
R1#conf t
R1(config)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#int lo1
R1(config-if)#ip add 11.11.11.11 255.255.255.0
R1(config-if)#int e0/0
R1(config-if)#ip add 12.12.12.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#end
R2:
R2#CONF T
R2(config)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int e0/0
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#no shut
R2(config)#int e0/1
R2(config-if)#ip add 23.23.23.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#end
R3:
R3#conf t
R3(config)#int e0/1
R3(config-if)#ip add 23.23.23.3 255.255.255.0
R3(config-if)#no shut
R3(config-if)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#no shut
R3(config-if)#end
步骤二:静态路由设置
R1(config)#ip route 0.0.0.0 0.0.0.0 e0/0 12.12.12.2//目标ip不在路由表中时就走e0/0到R2
R2(config)#ip route 1.1.1.0 255.255.255.0 e0/0 12.12.12.1
R2(config)#ip route 11.11.11.0 255.255.255.0 e0/0 12.12.12.1
R2(config)#ip route 3.3.3.0 255.255.255.0 e0/1 23.23.23.3
R3(config)#ip route 0.0.0.0 0.0.0.0 e0/1 23.23.23.2
//直连网络本身就存在在路由表中,不用配静态
检验:
R1#ping 3.3.3.3
R3#ping 1.1.1.1
步骤三:
编写ACL语句:
R2#conf t
R2(config)#ip access-list extended IT //命名acl叫IT(扩展acl)
R2(config-ext-nacl)#deny ip 1.1.1.1 0.0.0.0 3.3.3.3 0.0.0.0
R2(config-ext-nacl)#permit ip host 2.2.2.2 host 3.3.3.3
R2(config-ext-nacl)#permit ip host 11.11.11.11 host 3.3.3.3
检验:
R2#show access-list
Extended IP access list IT
10 deny ip host 1.1.1.1 host 3.3.3.3
20 permit ip host 2.2.2.2 host 3.3.3.3
30 permit ip host 11.11.11.11 host 3.3.3.3
步骤四:
接口下引用ACL
R2#conf t
R2(config)#int e0/1
R2(config-if)#ip access-group IT out
R2(config-if)#end
检验:
R1#ping 3.3.3.3 so 1.1.1.1 不通//修改源就是该标签,同下
R1#ping 3.3.3.3 so 11.11.11.11 通
R2#ping 3.3.3.3 通
R2#ping 1.1.1.1 通
!!补充
自反ACL
实验拓扑:同上(R1——R2为内网,R3为外网)
实验要求:
内网到外网 OK
外网到内网 NO
实验步骤:
R2#conf t
R2(config)#ip access-list extended inside
R2(config-ext-nacl)#permit ip any any reflect CHINA
//抓取内网去向外网的流量产生临时条目 放入CHINA
R2(config)#ip access-list extended outside
R2(config-ext-nacl)#evaluate CHINA
//将所有源自外网流量做匹配
R2(config)#int e0/0
R2(config-if)#ip access-group inside in
R2(config-if)#int e0/1
R2(config-if)#ip access-group outside in
现象:
11.11.11.11à3.3.3.3可通
3.3.3.3à11.11.11.11不可通
2.2.2.2à3.3.3.3不通
3.3.3.3à2.2.2.2不通
DHCP
实验拓扑:
实验步骤:
步骤一:基本配置
R4#conf t
R4(config)#no ip routing
R4(config)#ip default-gateway 172.16.1.1
R4(config)#int e0/0
R4(config-if)#ip add dhcp
R5#conf t
R5(config)#no ip routing
R5(config)#ip default-gateway 172.16.1.1
R5(config)#int e0/0
R5(config-if)#ip add dhcp
R6#conf t
R6(config)#int e0/0
R6(config-if)#ip add 172.16.1.1 255.255.255.0
R6(config-if)#no shut
R6(config-if)#int e0/1
R6(config-if)#ip add 67.67.67.6 255.255.255.0
R6(config-if)#no shut
R7#conf t
R7(config)#int e0/1
R7(config-if)#ip add 67.67.67.7 255.255.255.0
R7(config-if)#no shut
R7(config-if)#int lo0
R7(config-if)#ip add 7.7.7.7 255.255.255.0
R7(config-if)#end
步骤二:R6,R7设置静态路由
R6(config)#ip route 7.7.7.0 255.255.255.0 e0/1 67.67.67.7
R7(config)#ip route 0.0.0.0 0.0.0.0 e0/1 67.67.67.6
步骤三:配置地址池
R6(config)#ip dhcp pool CHINA-Telecom
R6(dhcp-config)#network 172.16.1.0 /24
R6(dhcp-config)#default-router 172.16.1.1
R6(dhcp-config)#dns-server 172.16.1.1
R6(dhcp-config)#lease 7
R6(dhcp-config)#exit
R6(config)#ip dhcp excluded-address 172.16.1.1
R5#conf t
R5(config)#int e0/0
R5(config-if)#no shut
R4#conf t
R4(config)#int e0/0
R4(config-if)#no shut
检验:
R4#show ip int br
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 172.16.1.2 YES DHCP up up
Ethernet0/1 unassigned YES unset administratively down down
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
R5#show ip int br
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 172.16.1.3 YES DHCP up up
Ethernet0/1 unassigned YES unset administratively down down
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
R4:ping 7.7.7.7 通
R5:ping 7.7.7.7 通
R7:ping 172.16.1.2通
ping 172.16.1.3通
步骤四:
R6设置自反ACL 保证 172.16.1.0/24网段内部网络安全
R6#conf t
R6(config)#ip access-list extend inside
R6(config-ext-nacl)#permit ip any any reflect Greatwall
R6(config-ext-nacl)#exit
R6(config)#ip access-list extend outside
R6(config-ext-nacl)#evaluate Greatwall
R6(config-ext-nacl)#exit
R6(config)#int e0/0
R6(config-if)#ip access-group inside in
R6(config-if)#int e0/1
R6(config-if)#ip access-group outside in
R6(config-if)#exit
检验:
R4:ping 7.7.7.7 通
R5:ping 7.7.7.7 通
R7:ping 172.16.1.2不通
ping 172.16.1.3不通
- 自制ACL+DHCP实验(初版)
- VLAN+DHCP+ACL 配置
- DHCP实验
- DHCP实验
- c#——窗体实验-最初版
- CCNA实验—ACL
- 自反ACL实验
- dhcp,ip source guard,arp detection,acl
- DHCP server实验过程
- DHCP实验日志
- cisco DHCP实验
- DHCP配置实验
- DHCP+NAT路由实验
- cisco Dhcp 实验
- 路由器配置DHCP实验
- 网络DHCP基本实验
- 自制VTP实验总结
- 自制STP配置实验
- ★不容错过的PPT教程!
- idea2017激活方式
- 自制mpls ldp实验
- spring boot启动报错
- 交换机端口呈现err-disable的原因
- 自制ACL+DHCP实验(初版)
- nexus(私服)的搭建
- 【★】深入BGP原理和思想【第…
- 常见正则表达式汇总【一】
- 常用正则表达式(2)
- 微软为啥让免费升Win10?
- JDK和Tomcat配置
- CCIE-MPLS VPN-实验手册(中卷)
- ZOJ 3527 树形DP(章鱼图DP)