地址汇总

地址汇总

拓扑图

地址汇总_第1张图片

实现步骤

1.配置路由器接口IP地址,配置OSPF协议,RIP协议,实现全网互通

①配置R1

1)配置接口IP地址

R1(config)#interface e0/0-

R1(config-if)#ip add 192.168.0.1 255.255.255.252

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#interface e0/1

R1(config-if)#ip address 192.168.0.5 255.255.255.252

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#interface loopback 0

R1(config-if)#ip address 1.1.1.1 255.255.255.255

R1(config-if)#no shutdown

R1(config-if)#exit

2)配置路由

R1(config)#router ospf 1

R1(config-router)#router-id 1.1.1.1

R1(config-router)#network 192.168.0.1 0.0.0.0 area 1

R1(config-router)#network 192.168.0.5 0.0.0.0 area 0

②配置R2

1)配置接口IP地址及Loopback接口地址

R2(config)#interface e0/0

R2(config-if)#ip address 192.168.0.2 255.255.255.252

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#interface loopback 0

R2(config-if)#ip address 2.2.2.2 255.255.255.255

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#interface loopback 1

R2(config-if)#ip address 172.16.0.1 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#interface loopback 2

R2(config-if)#ip address 172.16.1.1 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#interface loopback 3

R2(config-if)#ip address 172.16.2.1 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#interface loopback 4

R2(config-if)#ip address 172.16.3.1 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit

2)配置路由

R2(config)#router ospf 1

R2(config-router)#router-id 2.2.2.2

R2(config-router)#network 192.168.0.2 0.0.0.0 area 1

R2(config-router)#network 2.2.2.2 0.0.0.0 area 1

R2(config-router)#network 172.16.0.1 0.0.0.0 area 1

R2(config-router)#network 172.16.1.1 0.0.0.0 area 1

R2(config-router)#network 172.16.2.1 0.0.0.0 area 1

R2(config-router)#network 172.16.3.1 0.0.0.0 area 1

③配置R3

1)配置接口IP地址

R3(config)#interface e0/0

R3(config-if)#ip address 192.168.0.9 255.255.255.252

R3(config-if)#no shutdown

R3(config-if)#exit

R3(config)#interface e0/1

R3(config-if)#ip address 192.168.0.6 255.255.255.252

R3(config-if)#no shutdown

R3(config-if)#exit

R3(config)#interface loopback 0

R3(config-if)#ip address 3.3.3.3 255.255.255.255

R3(config-if)#no shutdown

R3(config-if)#exit

2)配置路由

R3(config)#router ospf 1

R3(config-router)#router-id 3.3.3.3

R3(config-router)#network 192.168.0.6 0.0.0.0 area 0

R3(config-router)#network 3.3.3.3 0.0.0.0 area 0

R3(config)#router rip

R3(config-router)#version 2

R3(config-router)#no auto-summary

R3(config-router)#network 192.168.0.8

④配置R4

1)配置接口IP地址及Loopback接口地址

R4(config)#interface e0/0

R4(config-if)#ip address 192.168.0.10 255.255.255.252

R4(config-if)#no shutdown

R4(config-if)#exit

R4(config)#interface loopback 0

R4(config-if)#ip address 10.0.0.1 255.255.255.0

R4(config-if)#no shutdown

R4(config-if)#exit

R4(config)#interface loopback 1

R4(config-if)#ip address 10.0.1.1 255.255.255.0

R4(config-if)#no shutdown

R4(config-if)#exit

R4(config)#interface loopback 2

R4(config-if)#ip address 10.0.2.1 255.255.255.0

R4(config-if)#no shutdown

R4(config-if)#exit

R4(config)#interface loopback 3

R4(config-if)#ip address 10.0.3.1 255.255.255.0

R4(config-if)#no shutdown

R4(config-if)#exit

R4(config)#interface loopback 4

R4(config-if)#ip address 10.0.4.1 255.255.255.0

R4(config-if)#no shutdown

R4(config-if)#exit

R4(config)#interface loopback 5

R4(config-if)#ip address 10.0.5.1 255.255.255.0

R4(config-if)#no shutdown

R4(config-if)#exit

R4(config)#interface loopback 6

R4(config-if)#ip address 10.0.6.1 255.255.255.0

R4(config-if)#no shutdown

R4(config-if)#exit

R4(config)#interface loopback 7

R4(config-if)#ip address 10.0.7.1 255.255.255.0

R4(config-if)#no shutdown

R4(config-if)#exit

2)配置路由

R4(config)#router rip

R4(config-router)#version 2

R4(config-router)#no auto-summary

R4(config-router)#network 192.168.0.8

R4(config-router)#network 10.0.0.0

R4(config-router)#network 10.0.1.0

R4(config-router)#network 10.0.2.0

R4(config-router)#network 10.0.3.0

R4(config-router)#network 10.0.4.0

R4(config-router)#network 10.0.5.0

R4(config-router)#network 10.0.6.0

R4(config-router)#network 10.0.7.0

2.R3HSBR)上配置(RIPOSPF)路由重分发

R3(config)#router rip

R3(config-router)#redistribute ospf 1 metric 3

R3(config-router)#exit

R3(config)#router ospf 1

R3(config-router)#redistribute rip subnets

R3(config-router)#exit

3.查看各路由器的路由表

①R1

clip_image004

②R2

clip_image006

③R3

clip_image008

④|R4

clip_image010

4.配置路由汇总

①在R1(ABR)上配置区域间汇总

R1(config)#router ospf 1

R1(config-router)#area 1 range 172.16.0.0 255.255.255.252

②在R3(ASBR)上配置外部路由汇总

R3(config)#router ospf 1

R3(config-router)#summary-address 10.0.0.0 255.255.248.0

5.查看各路由器的路由表,与步骤3进行比较

①R1

clip_image012

②R2

clip_image014

③R3

clip_image016

④R4

clip_image018

你可能感兴趣的:(职场,地址,汇总,休闲,ospf)