1配置ip
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 100.1.1.1 24
[r1-GigabitEthernet0/0/0]int l0
[r1-LoopBack0]ip add 192.168.0.1 32
[r1-LoopBack0]int l1
[r1-LoopBack1]ip add 192.168.1.1 32
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 100.1.1.2 24
[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 100.2.2.2 24
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 100.2.2.3 24
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 100.3.3.3 24
[r3-GigabitEthernet0/0/1]int l0
[r3-LoopBack0]ip add 192.168.2.1 32
[r3-LoopBack0]int l1
[r3-LoopBack1]ip add 192.168.3.1 32
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 100.3.3.4 24
[r4-GigabitEthernet0/0/0]int l0
[r4-LoopBack0]ip add 192.168.4.1 32
[r4-LoopBack0]int l1
[r4-LoopBack1]ip add 192.168.5.1 32
2配置rip和ospf
[r1]rip
[r1-rip-1]v 2
[r1-rip-1]undo summary
[r1-rip-1]net
[r1-rip-1]network 192.168.0.0
[r1-rip-1]net
[r1-rip-1]network 100.0.0.0
[r2]rip
[r2-rip-1]v 2
[r2-rip-1]undo summary
[r2-rip-1]net
[r2-rip-1]network 100.0.0.0
[r2]ospf 1
[r2-ospf-1]a 0
[r2-ospf-1-area-0.0.0.0]net
[r2-ospf-1-area-0.0.0.0]network 100.2.2.0 0.0.0.255
[r3]ospf 1
[r3-ospf-1]a 0
[r3-ospf-1-area-0.0.0.0]net
[r3-ospf-1-area-0.0.0.0]network 100.2.2.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]network 192.168.2.1 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 192.168.3.1 0.0.0.0
[r3-ospf-1]a 1
[r3-ospf-1-area-0.0.0.1]network 100.3.3.0 0.0.0.25
[r4]ospf 1
[r4-ospf-1]a 1
[r4-ospf-1-area-0.0.0.1]network 0.0.0.0 255.255.255.255
3,做过滤r4业务网段
[r2]acl 2000
[r2-acl-basic-2000]rule deny source 192.168.4.0 0.0.1.255
[r2-acl-basic-2000]rule permit source 0.0.0.0 255.255.255.255
[r2]route-policy aa permit node 10
[r2-route-policy]if-match acl 2000
[r2]rip 1
[r2-rip-1]import-route ospf route-policy aa
4,在r4入口做策略让r4学习不到r1业务网段
[r4]ip ip-prefix ww index 10 deny 192.168.0.0 23 less-equal 32
[r4]ip ip-prefix ww index 20 permit 0.0.0.0 0 less-equal 32
[r4-ospf-1]filter-policy ip-prefix ww import
5配置静默接口使rip不进入ospf中
[r2-rip-1]silent-interface GigabitEthernet 0/0/1