Cisco OSPF结合前缀列表进行路由过滤实验
一、实验拓扑:
二、配置实验1:前缀列表过滤路由:
1、基本的配置:
R1:
interface Loopback0
ip address 1.1.1.1 255.255.255.255
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
router ospf 10
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 1
network 192.168.1.0 0.0.0.255 area 0
R2:
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface Loopback1
ip address 3.3.3.3 255.255.255.255
interface Loopback2
ip address 4.4.4.4 255.255.255.255
interface FastEthernet0/0
ip address 192.168.1.2 255.255.255.0
duplex auto
speed auto
router ospf 10
router-id 3.3.3.3
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 2
network 3.3.3.3 0.0.0.0 area 0
network 4.4.4.4 0.0.0.0 area 4
network 192.168.1.0 0.0.0.255 area 0
2、测试R1路由表:
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/2] via 192.168.1.2, 00:00:13, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/2] via 192.168.1.2, 00:00:13, FastEthernet0/0
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/2] via 192.168.1.2, 00:00:13, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
3