R1#sh 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
172.168.0.0/24 is subnetted, 4 subnets
C 172.168.0.0 is directly connected, Loopback0
C 172.168.1.0 is directly connected, Loopback0
C 172.168.2.0 is directly connected, Loopback0
C 172.168.3.0 is directly connected, Loopback0
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.255.0 is directly connected, Serial1/1
O E2 192.168.255.0/24 [110/200] via 172.16.255.2, 00:00:16, Serial1/1
O E2 192.168.0.0/24 [110/200] via 172.16.255.2, 00:00:16, Serial1/1
O E2 192.168.1.0/24 [110/200] via 172.16.255.2, 00:00:16, Serial1/1
O E2 192.168.2.0/24 [110/200] via 172.16.255.2, 00:00:16, Serial1/1
O E2 192.168.3.0/24 [110/200] via 172.16.255.2, 00:00:16, Serial1/1 (
没做过滤之前学到了5条O E2 型路由)
|
R3#sh 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
172.168.0.0/16 is variably subnetted, 4 subnets, 2 masks
R 172.168.1.0/24 [120/10] via 192.168.255.2, 00:00:24, Serial1/0
R 172.168.0.1/32 [120/10] via 192.168.255.2, 00:00:24, Serial1/0
R 172.168.2.0/24 [120/10] via 192.168.255.2, 00:00:24, Serial1/0
R 172.168.3.0/24 [120/10] via 192.168.255.2, 00:00:24, Serial1/0
172.16.0.0/24 is subnetted, 1 subnets
R 172.16.255.0 [120/10] via 192.168.255.2, 00:00:24, Serial1/0 (
没做过滤之前学到了5条R型路由)
C 192.168.255.0/24 is directly connected, Serial1/0
C 192.168.0.0/24 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, Loopback0
C 192.168.2.0/24 is directly connected, Loopback0
C 192.168.3.0/24 is directly connected, Loopback0
|
R2(config)#access-list 1 deny 192.168.2.0 0.0.0.255
R2(config)#access-list 1 deny 192.168.3.0 0.0.0.255
R2(config)#access-list 1 permit any
R2(config)#route-map rip-ospf permit 1 (
建立rip到ospf 区域的route-map)
R2(config-route-map)#match ip address 1(
匹配访问控制列表1)
R2(config)#router ospf 1
R2(config-router)#redistribute rip route-map rip-ospf metric 200 subnets(
引用route-map对重分发的路由进行过滤)
|
R1#sho 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
172.168.0.0/24 is subnetted, 4 subnets
C 172.168.0.0 is directly connected, Loopback0
C 172.168.1.0 is directly connected, Loopback0
C 172.168.2.0 is directly connected, Loopback0
C 172.168.3.0 is directly connected, Loopback0
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.255.0 is directly connected, Serial1/1
O E2 192.168.255.0/24 [110/200] via 172.16.255.2, 00:00:11, Serial1/1
O E2 192.168.0.0/24 [110/200] via 172.16.255.2, 00:00:10, Serial1/1
O E2 192.168.1.0/24 [110/200] via 172.16.255.2, 00:00:10, Serial1/1
(
现在只学到了3条)
|
R2(config)#access-list 2 deny 172.168.0.0 0.0.0.255
R2(config)#access-list 2 deny 172.168.1.0 0.0.0.255
R2(config)#access-list 2 permit any
R2(config)#route-map ospf-rip permit 2 (
建立ospf到rip 区域的route-map)
R2(config-route-map)#match ip address 2(
匹配访问控制列表2)
R2(config)#router rip
R2(config-router)#redistribute ospf 1 route-map ospf-rip metric 10 (
引用route-map对重分发的路由进行过滤)
|
R3#sh 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
172.168.0.0/24 is subnetted, 2 subnets
R 172.168.2.0 [120/10] via 192.168.255.2, 00:00:11, Serial1/0
R 172.168.3.0 [120/10] via 192.168.255.2, 00:00:11, Serial1/0
172.16.0.0/24 is subnetted, 1 subnets
R 172.16.255.0 [120/10] via 192.168.255.2, 00:00:11, Serial1/0
(
只学到了三条)
C 192.168.255.0/24 is directly connected, Serial1/0
C 192.168.0.0/24 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, Loopback0
C 192.168.2.0/24 is directly connected, Loopback0
C 192.168.3.0/24 is directly connected, Loopback0
|