R1配置如下:

 

R1#sh run

Building configuration...

Current configuration : 916 bytes

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

hostname R1

boot-start-marker

boot-end-marker

!

!

no aaa new-model

memory-size iomem 5

!

!

ip cef

no ip domain lookup

!

 

interface Loopback0

 ip address 1.1.1.1 255.255.255.0

 ip router isis a

!         

interface Serial0/0

 ip address 192.168.1.1 255.255.255.0

 ip router isis a

 serial restart-delay 0

!

interface Serial0/1

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/2

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/3

 no ip address

 shutdown

 serial restart-delay 0

!

router isis a  

 net 49.0001.1111.1111.1111.00 

 is-type level-1 

no ip http server

no ip http secure-server

 

control-plane

!

 

line con 0

 exec-timeout 0 0

 logging synchronous

line aux 0

line vty 0 4

!

!

end

 

 

 

R2配置:

 

R2#sh run 

Building configuration...

 

Current configuration : 960 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R2

!

boot-start-marker

boot-end-marker

!

!

no aaa new-model

memory-size iomem 5

!

!

ip cef

no ip domain lookup

!

interface Serial0/0

 ip address 192.168.1.2 255.255.255.0

 ip router isis b1

 serial restart-delay 0

 clock rate 64000

!

interface Serial0/1

 ip address 192.168.2.1 255.255.255.0

 ip router isis b2

 serial restart-delay 0

 clock rate 64000

!

interface Serial0/2

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/3

 no ip address

 shutdown

 serial restart-delay 0

!

router isis b2 //启用isis路由协议,tag为b1 (与R1直连)

 net 49.0002.2222.2222.2222.00

!

router isis b1 //启用isis路由协议,tag为b1 (与R2直连)

 net 49.0001.2222.2222.2222.00

 is-type level-1  //is类型为LEVEL-1-2

no ip http server

no ip http secure-server

!

 

control-plane

!

 

line con 0

 exec-timeout 0 0

 logging synchronous

line aux 0

line vty 0 4

!

!

end

 

 

R3配置:

 

R3#sh run

Building configuration...

 

Current configuration : 1082 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R3

!

boot-start-marker

boot-end-marker

!

!

no aaa new-model

memory-size iomem 5

!

!

ip cef

no ip domain lookup

!

 

interface Serial0/0

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/1

 ip address 192.168.2.2 255.255.255.0

 ip router isis c

 serial restart-delay 0

!

interface Serial0/2

 ip address 192.168.3.1 255.255.255.0

 serial restart-delay 0

!

interface Serial0/3

 no ip address

 shutdown

 serial restart-delay 0

!

router ospf 1 //启用ospf路由协议,进程ID为1

 log-adjacency-changes

 area 1 nssa  //讲area1设为nssa区域

 redistribute connected subnets  //重发布直联网段

 redistribute isis c level-1-2 subnets  //重发布isis的类型LEVEL-1-2

 network 192.168.3.0 0.0.0.255 area 1  //声明网络。区域为AREA 1

router isis c

 net 49.0002.3333.3333.3333.00

 redistribute ospf 1 metric 10 metric-type external //将OSPF 1发布到ISIS中

 default-information originate //启用默认路由

!

no ip http server

no ip http secure-server

!

 

control-plane

!

        

line con 0

 exec-timeout 0 0

 logging synchronous

line aux 0

line vty 0 4

!

!

end

 

 

R4配置:

 

R4#sh run

Building configuration...

 

Current configuration : 967 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R4

!

boot-start-marker

boot-end-marker

!

!

no aaa new-model

memory-size iomem 5

!

ip cef

no ip domain lookup

!

interface Serial0/0

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/1

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/2

 ip address 192.168.3.2 255.255.255.0

 serial restart-delay 0

 clock rate 64000

!

interface Serial0/3

 ip address 192.168.4.1 255.255.255.0

 serial restart-delay 0

 clock rate 64000

!

router ospf 1

 log-adjacency-changes

 area 1 nssa default-information-originate //启用默认路由

 network 192.168.3.0 0.0.0.255 area 1

 network 192.168.4.0 0.0.0.255 area 0

!

no ip http server

no ip http secure-server

!

 

control-plane

!

line con 0

 exec-timeout 0 0

 logging synchronous

line aux 0

line vty 0 4

!

end

 

 

 

R5配置:

 

R5#sh run 

Building configuration...

 

Current configuration : 1266 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R5

!

boot-start-marker

boot-end-marker

!

!

no aaa new-model

memory-size iomem 5

!

!

ip cef

no ip domain lookup

!

interface Serial0/0

 ip address 192.168.5.1 255.255.255.0

 serial restart-delay 0

!         

interface Serial0/1

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/2

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/3

 ip address 192.168.4.2 255.255.255.0

 serial restart-delay 0

!

router eigrp 100

 redistribute ospf 1 metric 10000 100 255 1 1500 //将ospf 1 重发布到eigrp 100中

 network 192.168.5.0

 no auto-summary

!

router ospf 1

 log-adjacency-changes

 redistribute eigrp 100 subnets route-map ahxh //将EIGRP 100重发布到OSPF中,并调用路由策略 AHXH

 network 192.168.4.0 0.0.0.255 area 0

!

no ip http server

no ip http secure-server

!

!

!

access-list 1 permit 7.7.0.0 0.0.254.0 

access-list 2 permit 7.7.1.0 0.0.254.0

access-list 2 permit 192.168.5.0 0.0.0.255

!

route-map ahxh permit 10 

 match ip address 1    

 set metric-type type-1  

!

route-map ahxh permit 20

 match ip address 2

 set metric-type type-2

!

!

!

control-plane

ne con 0

 exec-timeout 0 0

 logging synchronous

line aux 0

line vty 0 4

!

!

end

 

 

R6配置:

 

R6#sh run

Building configuration...

 

Current configuration : 1007 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R6

!

boot-start-marker

boot-end-marker

!

!

no aaa new-model

memory-size iomem 5

!

!

ip cef

no ip domain lookup

!

interface Serial0/0

 ip address 192.168.5.2 255.255.255.0

 serial restart-delay 0

 clock rate 64000

!

interface Serial0/1

 ip address 192.168.6.1 255.255.255.0

 serial restart-delay 0

 clock rate 64000

!

interface Serial0/2

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/3

 no ip address

 shutdown

 serial restart-delay 0

!

router eigrp 100

 redistribute rip metric 10000 100 255 1 1500

 network 192.168.5.0

 no auto-summary

!

router rip

 version 2

 redistribute eigrp 100 metric 2

 network 192.168.6.0

 no auto-summary

!

no ip http server

no ip http secure-server

!

control-plane

!     

line con 0

 exec-timeout 0 0

 logging synchronous

line aux 0

line vty 0 4

!

!

end

 

 

R7配置:

 

R7#sh run       

Building configuration...

 

Current configuration : 1063 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R7

!

boot-start-marker

boot-end-marker

!

!

no aaa new-model

memory-size iomem 5

!

!

ip cef

no ip domain lookup

!

 

interface Loopback0

 ip address 7.7.0.1 255.255.255.0

!

interface Loopback1

 ip address 7.7.1.1 255.255.255.0

!

interface Loopback2

 ip address 7.7.2.1 255.255.255.0

!

interface Loopback3

 ip address 7.7.3.1 255.255.255.0

!

interface Serial0/0

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/1

 ip address 192.168.6.2 255.255.255.0

 serial restart-delay 0

!

interface Serial0/2

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/3

 no ip address

 shutdown

 serial restart-delay 0

!

router rip

 version 2

 network 7.0.0.0

 network 192.168.6.0

 no auto-summary

!

no ip http server

no ip http secure-server

trol-plane

line con 0

 exec-timeout 0 0

 logging synchronous

line aux 0

line vty 0 4

!

!

end

测试:

1。用1.1.1.1 ping 7.7.1.1,结果如下:

 

2.在R4上查看7.7.z.0(z为偶数)是否变成O E1:

 

 

 

 

如图 7.7.0.0和7.7.2.0 变成O E1了!

实验完成,重点看灰色部分。由于时间仓促,来不及过多解释,请见谅,如有不对之处,还请各个提出宝贵意见!