计算机网络实验-ACL-OSPF-RIP

路由器配置
1、设备:路由器3台,主机3台,服务器1台,交换机1台2、拓扑如图
要求:
3、给路由器命名
 wuhepengA ,wuhepengB,wuhepengC 
4、IP如图,共有6个局域。
 
5、设置动态路由(路由器A运行rip;路由器B运行rip和ospf;路由器C运行0SPF)
wuhepengB(config)#router rip
wuhepengB(config-router)#redistribute ospf 100 metric 1
wuhepengB(config)#router ospf 100
wuhepengB(config-router)#redistribute rip

6、左侧路由器RA做单臂路由配置
int f0/0.1
encapsulation dot1Q 10
ip address 192.168.1.1 255.255.255.0
int f0/0.2
encapsulation dot1Q 20
ip address 192.168.6.1 255.255.255.0
7、测试主机间的连通性(ping),查看路由表8、路由再发布
show ip route
R 192.168.1.0/24[120/1] via 192.168.2.1,00:00:02, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/1
C 192.168.4.0/24 is directly connected, Serial0/1/0
O 192.168.5.0/24[110/782] via 192.168.4.2,00:15:43, Serial0/1/0
R 192.168.6.0/24[120/1] via 192.168.2.1,00:00:02, FastEthernet0/0
9、查看路由表,测试连通性。
全部都通
10、配置访问控制列表
要求:
1)禁止主机1访问服务器的web操作,允许ping操作2)禁止主机3访问服务器的DNS操作,允许其他操作11、测试结果12、提交作业
wuhepengA(config)# access-list 100 deny tcp 192.168.1.0 0.0.0.255 192.168.5.00.0.0.255 eq www
wuhepengA(config)#access-list 100 permit ip any any
wuhepengA(config)#int f0/1
wuhepengA(config-if)#ip access-group 100 out

wuhepengB(config)# access-list 1 deny 192.168.3.10 0.0.0.0
wuhepengB(config)# access-list 1 permit any
wuhepengB(config)# int s0/1/0
wuhepengB(config-if)# ip access-group 1 out
wuhepengB(config-if)# end
原文地址:https://www.cnblogs.com/WLCYSYS/p/13192250.html