HCIP(路由过滤)--7

实验要求:

HCIP(路由过滤)--7_第1张图片

实现过程:

(一)配置IP地址与环回地址:

AR1:

[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 100.1.1.1 24
Apr 22 2024 19:24:50-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR1-GigabitEthernet0/0/0]int l0
[AR1-LoopBack0]ip add 192.168.0.1 32
[AR1-LoopBack0]int l1
[AR1-LoopBack1]ip add 192.168.1.1 32
[AR1-LoopBack1]q
 

AR2:

[AR2]int g 0/0/0
[AR2-GigabitEthernet0/0/0]ip add 100.1.1.2 24
[AR2]int g 0/0/1
[AR2-GigabitEthernet0/0/1]ip add 100.2.2.2 24
 

AR3:

[AR3]int g 0/0/0
[AR3-GigabitEthernet0/0/0]ip add 100.2.2.3 24
Apr 22 2024 19:27:47-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR3-GigabitEthernet0/0/0]int g 0/0/1
[AR3-GigabitEthernet0/0/1]ip add 100.3.3.3 24
Apr 22 2024 19:28:16-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR3-GigabitEthernet0/0/1]int l0
[AR3-LoopBack0]ip add 192.168.2.1 32
[AR3-LoopBack0]int l1
[AR3-LoopBack1]ip add 192.168.3.1 32
[AR3-LoopBack1]q
 

AR4:

[AR4]int g 0/0/0
[AR4-GigabitEthernet0/0/0]ip add 100.3.3.4 24
Apr 22 2024 19:29:17-08:00 AR4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR4-GigabitEthernet0/0/0]int l0
[AR4-LoopBack0]ip add 192.168.4.1 32
[AR4-LoopBack0]int l1
[AR4-LoopBack1]ip add 192.168.5.1 32
[AR4-LoopBack1]q
 

(二)配置RIP与OSPF协议:

AR1:

[AR1]rip 1
[AR1-rip-1]v 2
[AR1-rip-1]ne    
[AR1-rip-1]undo su    
[AR1-rip-1]undo summary 
[AR1-rip-1]net 100.0.0.0
[AR1-rip-1]

[AR1-rip-1]network 192.168.0.0
[AR1-rip-1]net    
[AR1-rip-1]network 192.168.1.0
[AR1-rip-1]

AR2:

[AR2]rip 1
[AR2-rip-1]v 2 
[AR2-rip-1]undo su    
[AR2-rip-1]undo summary 
[AR2-rip-1]ne 100.0.0.0

[AR2-ospf-1]a 0
[AR2-ospf-1-area-0.0.0.0]ne    
[AR2-ospf-1-area-0.0.0.0]network 100.2.2.0 0.0.0.255
 

AR3:

[AR3]ospf 1 r    
[AR3]ospf 1 router-id 3.3.3.3
[AR3-ospf-1]a 0
[AR3-ospf-1-area-0.0.0.0]ne 100.2.2.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]ne 100.3.3.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]ne 192.168.2.1 0.0.0.0
[AR3-ospf-1-area-0.0.0.0]ne 192.168.3.1 0.0.0.0
[AR3-ospf-1-area-0.0.0.0]

AR4:

[AR4]ospf 1 r    
[AR4]ospf 1 router-id 4.4.4.4
[AR4-ospf-1]a 0
[AR4-ospf-1-area-0.0.0.0]ne 192.168.4.1 0.0.0.0
[AR4-ospf-1-area-0.0.0.0]ne 192.168.5.1 0.0.0.0
[AR4-ospf-1-area-0.0.0.0]ne 100.3.3.0 0.0.0.255
 

(三)路由引入与路由策略的配置:

AR2:

[AR2-rip-1]import-route ospf
[AR2]ospf 1 router-id 2.2.2.2
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[AR2-ospf-1]im    
[AR2-ospf-1]import-route rip
[AR2-ospf-1]

[AR2]acl 2000
[AR2-acl-basic-2000]rule deny source 192.168.4.0 0.0.1.255
[AR2-acl-basic-2000]rule permit source 0.0.0.0 255.255.255.255
[AR2-acl-basic-2000]q
 

(四)配置路由过滤prefix-list:

AR4:

[AR4]ip ip-prefix abc index 10 deny 192.168.0.0 23 less    
[AR4]ip ip-prefix abc index 10 deny 192.168.0.0 23 less-equal 32
[AR4]ip ip-    
[AR4]ip ip-prefix abc in    
[AR4]ip ip-prefix abc index 20 permit 0.0.0.0 0 less    
[AR4]ip ip-prefix abc index 20 permit 0.0.0.0 0 less-equal 32
[AR4-ospf-1]filter-policy ip-prefix abc import 
 

(五)AR2上配置静默接口:

[AR2]rip 1
[AR2-rip-1]sil    
[AR2-rip-1]silent-interface g    
[AR2-rip-1]silent-interface GigabitEthernet 0/0/1
 

你可能感兴趣的:(网络)