首先声明,我是一个菜鸟。一下文章中出现技术误导情况盖不负责
上一部分辩明了将基础网络拓扑搭建胜利的做法,这一部分将说明各个特殊要求的配置方法
⑵ R2配置策略路由
int l0
ip add 100.0.0.1 255.255.255.0
int l1
ip add 200.0.0.1 255.255.255.0
exit
access-list 10 permit 192.168.10.0 0.0.0.255
access-list 10 permit 192.168.30.0 0.0.0.255
access-lsit 20 permit 192.168.20.0 0.0.0.255
access-list 20 permit 192.168.40.0 0.0.0.255
route-map ruijie permit 10
match ip address 10
set interface l0
match ip address 20
set interface l1
exit
int f1/0
ip policy route-map ruijie
int f1/1
ip policy route-map ruijie
exit
⑶ R2配置nat转换
access-list 99 permit 192.168.0.0 0.0.255.255
ip nat pool mudi 200.1.1.2 200.1.1.6 netmask 255.255.255.0
ip nat inside source list 99 pool mudi overload
int f1/0
ip nat inside
int f1/1
ip nat inside
int s1/0
ip nat outside
int l0
ip nat outside
int l1
ip nat outside
exit
⑷ acl配置
S1\S2:
access-list 101 permit ip 192.168.10.0 0.0.0.255 192.168.20.0 0.0.0.255
access-list 101 permit ip 192.168.10.0 0.0.0.255 192.168.30.0 0.0.0.255
access-list 101 permit ip 192.168.10.0 0.0.0.255 192.168.40.0 0.0.0.255
time-range worktime
periodic weekdays 08:00 to 16:00
access-list 101 permit tcp 192.168.20.0 0.0.0.255 host 192.168.10.101 eq ftp time-range worktime
access-list 101 permit tcp 192.168.30.0 0.0.0.255 host 192.168.10.101 eq ftp time-range worktime
access-list 101 permit tcp 192.168.40.0 0.0.0.255 host 192.168.10.101 eq ftp time-range worktime
access-list 101 deny tcp any host 192.168.10.101 eq ftp
access-list 101 permit ip any any
int vlan 10
ip access-group 101 in
int vlan 20
ip access-group 101 in
int vlan 30
ip access-group 101 in
int vlan 40
ip access-group 101 in
exit
R2:
time-range worktime
periodic weekdays 08:00 to 16:00
exit
access-list 50 deny 192.168.0.0 0.0.255.255 time-range worktime
access-list 50 deny 172.16.0.0 0.0.255.255 time-range worktime
access-list 10 permit any
int f1/0
ip access-group 50 in
int f1/1
ip access-group 50 in
exit
OK!!!
文章结束给大家分享下程序员的一些笑话语录: 一条狗在街上闲逛,看见橱窗里一张告示:「招聘程序员。会编程,有团队精神,至少精通两种语言。均等机会。」
那条狗就进去申请,但是被拒绝了。
「我不能雇一条狗在公司里做事。」经理说。
狗不服气,指着告示上「均等机会」几字抗议。
经理没法,叹了口气,不屑地问道:「你会编程吗?」
那条狗默默地走到电脑前,编了个程序,运作准确。
「你有团队精神吗?」经理问。
那条狗掉头看了看门外,一大群野狗在外面虎视耽耽。
「我真的不能雇狗做这份工作。」经理气急败坏地说。
「就算会编程、有团队精神,但是我需要的雇员至少要能精通两种语言。」
那条狗抬头看着经理说:「喵-噢。」
--------------------------------- 原创文章 By
路由器和交换机
---------------------------------