实验要求:
1.内网ip基于172.16.0.0/16进行网划分
2.除了R2--R4路由器各有两个环回
3.全网可达
4.R4--R5正常走100M线路,100M故障时走10M备份线路
一、拓扑规划:
二、ip 地址规划
首先干道可划分5个网段,所以向主机位借3位。具体如下:
000 172.16.0.0/19
001 172.16.32.0/19
010 172.16.64.0/19
100 172.16.128.0/19
011 172.16.96.0/19
其分别对应 R1/R2/R3/R4,又因为R1上有环回、两个地址池,所以可将172.16.0.0/19 划为4个网段,具体如下:
Loopback : 000 172.16.0.0/22
001 172.16.4.0/22
Pool 1: 010 172.16.8.0/22
Pool 2: 100 172.16.16.0/22
R2对应172.16.32.0/19网段,将其划分为两个网段,具体如下:
R2--->R1网段 00 172.16.32.0/21
R2--->R4网段 01 172.16.40.0/21
R3对应 172.16.64.0/19网段,将其划分为4个网段,具体如下:
Loopback :000 172.16.64.0/22
001 172.16.68.0/22
R3--->R1网段 010 172.16.72.0/22
R3--->R4网段 100 172.16.80.0/22
同样R4对应172.16.128.0/19划分,划分两个网段,具体如下:
R4--->R5 1: 00 172.16.128.0/21
01 172.16.136.0/21
同样R5对172.16.96.0/19 划分,划分两个网段,R5 连接运营商的网段可随意配,具体如下:
Loopback : 00 172.16.96.0/21
01 172.16.104.0/21
二、五个路由器均操作
Router(config)#hostname r1
Router(config)#hostname r1
r1(config)#no ip domain-lookup //关闭域名解析
r1(config)#line console 0
r1(config-line)#logging synchronous //开启日志同步
r1(config-line)#exec-timeout 0 0 //永不超时
三、路由---全网可达
1.静态:
R1:
r1(config)#ip route 172.16.40.0 255.255.248.0 172.16.32.2
r1(config)#ip route 172.16.40.0 255.255.248.0 172.16.32.2
r1(config)#ip route 172.16.128.0 255.255.248.0 172.16.32.2
r1(config)#ip route 172.16.136.0 255.255.248.0 172.16.32.2
r1(config)#ip route 172.16.136.0 255.255.248.0 172.16.72.2
r1(config)#ip route 172.16.128.0 255.255.248.0 172.16.72.2
r1(config)#ip route 172.16.80.0 255.255.248.0 172.16.72.2
r1(config)#ip route 0.0.0.0 0.0.0.0 172.16.32.2
r1(config)#ip route 0.0.0.0 0.0.0.0 172.16.72.2
R2:
R2(config)#ip route 172.16.0.0 255.255.252.0 172.16.32.1
R2(config)#ip route 172.16.4.0 255.255.252.0 172.16.32.1
R2(config)#ip route 172.16.128.0 255.255.248.0 172.16.40.2
R2(config)#ip route 172.16.136.0 255.255.248.0 172.16.40.2
R2(config)#ip route 0.0.0.0 0.0.0.0 172.16.40.2
R2(config)#ip route 172.16.8.0 255.255.252.0 172.16.32.1
R2(config)#ip route 172.16.16.0 255.255.252.0 172.16.32.1
R3:
r3(config)#ip route 172.16.0.0 255.255.252.0 172.16.72.1
r3(config)#ip route 172.16.4.0 255.255.252.0 172.16.72.1
r3(config)#ip route 172.16.136.0 255.255.248.0 172.16.80.2
r3(config)#ip route 172.16.128.0 255.255.248.0 172.16.80.2
r3(config)#ip route 0.0.0.0 0.0.0.0 172.16.80.2
r3(config)#ip route 172.16.8.0 255.255.252.0 172.16.72.1
r3(config)#ip route 172.16.16.0 255.255.252.0 172.16.72.1
R4:
r4(config)#ip route 172.16.32.0 255.255.248.0 172.16.40.1
r4(config)#ip route 172.16.4.0 255.255.252.0 172.16.40.1
r4(config)#ip route 172.16.0.0 255.255.252.0 172.16.40.1
r4(config)#ip route 172.16.0.0 255.255.252.0 172.16.80.1
r4(config)#ip route 172.16.4.0 255.255.252.0 172.16.80.1
r4(config)#ip route 172.16.72.0 255.255.252.0 172.16.80.1
r4(config)#ip route 0.0.0.0 0.0.0.0 172.16.128.2
r4(config)#ip route 0.0.0.0 0.0.0.0 172.16.136.2
r4(config)#ip route 172.16.16.0 255.255.252.0 172.16.80.1
r4(config)#ip route 172.16.80.0 255.255.252.0 172.16.80.1
r4(config)#ip route 172.16.80.0 255.255.252.0 172.16.40.1
r4(config)#ip route 172.16.16.0 255.255.252.0 172.16.40.1
R5:
R5(config)#ip route 172.16.40.0 255.255.248.0 172.16.128.1
R5(config)#ip route 172.16.40.0 255.255.248.0 172.16.136.1
R5(config)#ip route 172.16.80.0 255.255.248.0 172.16.128.1
R5(config)#ip route 172.16.80.0 255.255.248.0 172.16.136.1
R5(config)#ip route 172.16.32.0 255.255.248.0 172.16.128.1
R5(config)#ip route 172.16.72.0 255.255.248.0 172.16.128.1
R5(config)#ip route 172.16.72.0 255.255.248.0 172.16.136.1
R5(config)#ip route 172.16.32.0 255.255.248.0 172.16.136.1
R5(config)#ip route 172.16.0.0 255.255.252.0 172.16.136.1
R5(config)#ip route 172.16.4.0 255.255.252.0 172.16.136.1
R5(config)#ip route 172.16.4.0 255.255.252.0 172.16.128.1
R5(config)#ip route 172.16.0.0 255.255.252.0 172.16.128.1
R5(config)#ip route 172.16.8.0 255.255.252.0 172.16.128.1
R5(config)#ip route 172.16.16.0 255.255.252.0 172.16.128.1
R5(config)#ip route 172.16.16.0 255.255.252.0 172.16.136.1
R5(config)#ip route 172.16.8.0 255.255.252.0 172.16.136.1
R5(config)#ip route 0.0.0.0 0.0.0.0 201.1.1.2
测试结果:
三、配地址池
r1(config)#ip dhcp pool ccna
r1(dhcp-config)#network 172.16.8.0 255.255.252.0
r1(dhcp-config)#dns-server 8.8.8.8
r1(dhcp-config)#default-router 172.16.8.1
r1(config)#ip dhcp pool ccnp
r1(dhcp-config)#network 172.16.16.0 255.255.252.0
r1(dhcp-config)#dns-server 8.8.8.8
r1(dhcp-config)#default-router 172.16.16.1
四、修改优先级,完善物理链路。
R5:
ip route 172.16.40.0 255.255.248.0 172.16.136.1 100
ip route 172.16.80.0 255.255.248.0 172.16.136.1 100
ip route 172.16.72.0 255.255.248.0 172.16.136.1 100
ip route 172.16.32.0 255.255.248.0 172.16.136.1 100
ip route 172.16.0.0 255.255.252.0 172.16.136.1 100
ip route 172.16.4.0 255.255.252.0 172.16.136.1 100
ip route 172.16.16.0 255.255.252.0 172.16.136.1 100
ip route 172.16.8.0 255.255.252.0 172.16.136.1 100
R4:
ip route 0.0.0.0 0.0.0.0 172.16.136.2 100