路由重发布+路由策略
R1:
interface Loopback0
ip address 1.1.0.1 255.255.255.0
interface Loopback1
ip address 1.1.1.1 255.255.255.0
interface Loopback2
ip address 1.1.2.1 255.255.255.0
interface Loopback3
ip address 1.1.3.1 255.255.255.0
interface Loopback4
ip address 1.1.4.1 255.255.255.0
interface Loopback5
ip address 1.1.5.1 255.255.255.0
interface Loopback6
ip address 1.1.6.1 255.255.255.0
interface Loopback7
ip address 1.1.7.1 255.255.255.0
interface Serial1/2
ip address 12.1.1.1 255.255.255.0
ip rip authentication key-chain cisco
ip summary-address rip 1.1.0.0 255.255.0.0
router rip
version 2
network 1.0.0.0
network 12.0.0.0
no auto-summary
R2:
interface Loopback0
ip address 2.2.0.1 255.255.255.0
interface Loopback1
ip address 2.2.1.1 255.255.255.0
interface Loopback2
ip address 2.2.2.1 255.255.255.0
interface Loopback3
ip address 2.2.3.1 255.255.255.0
interface Loopback4
ip address 2.2.4.1 255.255.255.0
interface Loopback5
ip address 2.2.5.1 255.255.255.0
interface Loopback6
ip address 2.2.6.1 255.255.255.0
interface Loopback7
ip address 2.2.7.1 255.255.255.0
interface Serial1/2
ip address 23.2.2.2 255.255.255.0
ip ospf authentication
ip ospf message-digest-key 1 md5 cisco
interface Serial1/3
ip address 12.1.1.2 255.255.255.0
ip rip authentication key-chain cisco
router ospf 110
redistribute rip subnets
network 2.2.0.0 0.0.255.255 area 0
network 23.2.2.0 0.0.0.255 area 0
access-list 20 permit 2.2.0.0 0.0.255.255
access-list 20 permit 23.2.0.0 0.0.255.255
router rip
version 2
redistribute ospf 110 metric 2 route-map os-ri
network 12.0.0.0
no auto-summary
route-map os-ri permit 10
match tag 3 4
route-map os-ri permit 20
match ip address 20
R3:
interface Loopback0
ip address 3.3.0.1 255.255.255.0
interface Loopback1
ip address 3.3.1.1 255.255.255.0
interface Loopback2
ip address 3.3.2.1 255.255.255.0
interface Loopback3
ip address 3.3.3.1 255.255.255.0
interface Loopback4
ip address 3.3.4.1 255.255.255.0
interface Loopback5
ip address 3.3.5.1 255.255.255.0
interface Loopback6
ip address 3.3.6.1 255.255.255.0
interface Loopback7
ip address 3.3.7.1 255.255.255.0
interface Serial1/2
ip address 34.3.3.3 255.255.255.0
ip authentication mode eigrp 90 md5
ip authentication key-chain eigrp 90 cisco
interface Serial1/3
ip address 23.2.2.3 255.255.255.0
ip ospf authentication
ip ospf message-digest-key 1 md5 cisco
router eigrp 90
redistribute ospf 110 metric 1000 100 250 10 1000
redistribute rip metric 1000 100 250 10 2000
network 34.0.0.0
no auto-summary
router ospf 110
redistribute eigrp 90 subnets route-map ei-os
redistribute rip metric 1000 subnets route-map ri-os
network 23.2.0.0 0.0.255.255 area 0
router rip
version 2
network 3.0.0.0
no auto-summary
route-map ri-os permit 10
set tag 3
!
route-map ei-os permit 10
match tag 4
R4:
interface Loopback0
ip address 4.4.0.1 255.255.255.0
interface Loopback1
ip address 4.4.1.1 255.255.255.0
interface Loopback2
ip address 4.4.2.1 255.255.255.0
interface Loopback3
ip address 4.4.3.1 255.255.255.0
interface Loopback4
ip address 4.4.4.1 255.255.255.0
interface Loopback5
ip address 4.4.5.1 255.255.255.0
interface Loopback6
ip address 4.4.6.1 255.255.255.0
interface Loopback7
ip address 4.4.7.1 255.255.255.0
interface Serial1/3
ip address 34.3.3.4 255.255.255.0
ip authentication mode eigrp 90 md5
ip authentication key-chain eigrp 90 cisco
ip summary-address rip 4.4.0.0 255.255.0.0
router eigrp 90
redistribute rip metric 1000 100 250 10 1000 route-map ri-ei
network 34.0.0.0
no auto-summary
router rip
version 2
network 4.0.0.0
no auto-summary
route-map ri-ei permit 10
set tag 4