配置
R1#show run | s route
router rip
version 2
offset-list 1 in 3 Serial1/0
network 1.0.0.0
network 12.0.0.0
network 14.0.0.0
no auto-summary
R1#show ac
R1#show acc
R1#show access-l
R1#show access-lists 1
Standard IP access list 1
10 permit 2.2.2.2 (2 matches)
R1#
R2#show run | s route
router ospf 1
router-id 2.2.2.2
redistribute rip subnets route-map c2
network 23.1.1.2 0.0.0.0 area 0
distance 130 4.4.4.4 0.0.0.0 1
router rip
version 2
redistribute ospf 1 metric 1 route-map c1
network 2.0.0.0
network 12.0.0.0
no auto-summary
route-map c2 permit 10
match ip address prefix-list c1
set metric-type type-1
route-map c2 permit 20
set metric 21
route-map c2 permit 30
route-map c1 permit 10
match ip address 2
set metric 3
route-map c1 permit 20
R2#show acc
R2#show access-l
R2#show access-lists 1
Standard IP access list 1
10 permit 1.1.1.1 (5 matches)
20 permit 14.1.1.0 (4 matches)
R2#show access-lists 2
Standard IP access list 2
10 permit 4.4.4.4 (4 matches)
20 permit 34.1.1.0 (4 matches)
R2#show run | s route-map
redistribute rip subnets route-map c2
redistribute ospf 1 metric 1 route-map c1
route-map c2 permit 10
match ip address prefix-list c1
set metric-type type-1
route-map c2 permit 20
set metric 21
route-map c2 permit 30
route-map c1 permit 10
match ip address 2
set metric 3
route-map c1 permit 20
R3#show run | s route
router ospf 1
router-id 3.3.3.3
network 3.3.3.3 0.0.0.0 area 0
network 23.1.1.3 0.0.0.0 area 0
network 34.1.1.3 0.0.0.0 area 0
R4#show run | s route
router ospf 1
router-id 4.4.4.4
redistribute rip subnets
network 4.4.4.4 0.0.0.0 area 0
network 34.1.1.4 0.0.0.0 area 0
distance 130 2.2.2.2 0.0.0.0 1
router rip
version 2
redistribute ospf 1 metric 1 route-map c1
network 14.0.0.0
no auto-summary
route-map c1 permit 10
match ip address 2
set metric 3
route-map c1 permit 20
R4#show acc
R4#show access-l
R4#show access-lists
Standard IP access list 1
10 permit 2.2.2.2 (7 matches)
30 permit 1.1.1.1 (5 matches)
20 permit 12.1.1.0 (7 matches)
Standard IP access list 2
10 permit 23.1.1.0 (3 matches)
R4#show run | s route-map
R4#show run | s route-map
redistribute ospf 1 metric 1 route-map c1
route-map c1 permit 10
match ip address 2
set metric 3
route-map c1 permit 20
结果 R1#show ip route Codes: L - local, 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, H - NHRP, l - LISP + - replicated route, % - next hop override
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 R 2.2.2.2 [120/1] via 12.1.1.2, 00:00:29, Serial1/1 3.0.0.0/32 is subnetted, 1 subnets R 3.3.3.3 [120/1] via 14.1.1.4, 00:00:18, Serial1/0 [120/1] via 12.1.1.2, 00:00:29, Serial1/1 4.0.0.0/32 is subnetted, 1 subnets R 4.4.4.4 [120/1] via 14.1.1.4, 00:00:18, Serial1/0 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 12.1.1.0/24 is directly connected, Serial1/1 L 12.1.1.1/32 is directly connected, Serial1/1 14.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 14.1.1.0/24 is directly connected, Serial1/0 L 14.1.1.1/32 is directly connected, Serial1/0 23.0.0.0/24 is subnetted, 1 subnets R 23.1.1.0 [120/1] via 12.1.1.2, 00:00:29, Serial1/1 34.0.0.0/24 is subnetted, 1 subnets R 34.1.1.0 [120/1] via 14.1.1.4, 00:00:18, Serial1/0 R1#
R2#show ip route Codes: L - local, 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, H - NHRP, l - LISP + - replicated route, % - next hop override
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 12.1.1.1, 00:00:05, Serial1/0 2.0.0.0/32 is subnetted, 1 subnets C 2.2.2.2 is directly connected, Loopback0 3.0.0.0/32 is subnetted, 1 subnets O 3.3.3.3 [110/65] via 23.1.1.3, 00:09:41, Serial1/1 4.0.0.0/32 is subnetted, 1 subnets O 4.4.4.4 [110/129] via 23.1.1.3, 00:09:41, Serial1/1 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 12.1.1.0/24 is directly connected, Serial1/0 L 12.1.1.2/32 is directly connected, Serial1/0 14.0.0.0/24 is subnetted, 1 subnets R 14.1.1.0 [120/1] via 12.1.1.1, 00:00:05, Serial1/0 23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 23.1.1.0/24 is directly connected, Serial1/1 L 23.1.1.2/32 is directly connected, Serial1/1 34.0.0.0/24 is subnetted, 1 subnets O 34.1.1.0 [110/128] via 23.1.1.3, 00:09:41, Serial1/1 R2#
R3#show ip route Codes: L - local, 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, H - NHRP, l - LISP + - replicated route, % - next hop override
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O E2 1.1.1.1 [110/20] via 34.1.1.4, 00:09:14, Serial1/1 2.0.0.0/32 is subnetted, 1 subnets O E1 2.2.2.2 [110/84] via 23.1.1.2, 00:09:14, Serial1/0 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 4.0.0.0/32 is subnetted, 1 subnets O 4.4.4.4 [110/65] via 34.1.1.4, 00:09:14, Serial1/1 12.0.0.0/24 is subnetted, 1 subnets O E1 12.1.1.0 [110/84] via 23.1.1.2, 00:09:14, Serial1/0 14.0.0.0/24 is subnetted, 1 subnets O E1 14.1.1.0 [110/84] via 23.1.1.2, 00:09:14, Serial1/0 23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 23.1.1.0/24 is directly connected, Serial1/0 L 23.1.1.3/32 is directly connected, Serial1/0 34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 34.1.1.0/24 is directly connected, Serial1/1 L 34.1.1.3/32 is directly connected, Serial1/1 R3# R4#show ip route Codes: L - local, 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, H - NHRP, l - LISP + - replicated route, % - next hop override
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 14.1.1.1, 00:00:01, Serial1/0 2.0.0.0/32 is subnetted, 1 subnets R 2.2.2.2 [120/2] via 14.1.1.1, 00:00:01, Serial1/0 3.0.0.0/32 is subnetted, 1 subnets O 3.3.3.3 [110/65] via 34.1.1.3, 00:10:34, Serial1/1 4.0.0.0/32 is subnetted, 1 subnets C 4.4.4.4 is directly connected, Loopback0 12.0.0.0/24 is subnetted, 1 subnets R 12.1.1.0 [120/1] via 14.1.1.1, 00:00:01, Serial1/0 14.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 14.1.1.0/24 is directly connected, Serial1/0 L 14.1.1.4/32 is directly connected, Serial1/0 23.0.0.0/24 is subnetted, 1 subnets O 23.1.1.0 [110/128] via 34.1.1.3, 00:10:34, Serial1/1 34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 34.1.1.0/24 is directly connected, Serial1/1 L 34.1.1.4/32 is directly connected, Serial1/1