实验静态综合
4号设备缺个接口,需要加入一个模块(在设备启动前加入),设备不自动保存之前的设置,所以需要在开启设备前加,4号设备右键点击设置,只需加入一个1GEC(1千兆)模块。
IP地址规划:(地址划分核心目的,后期好汇总)R5环回地址固定5.5.5.0/24,母网地址192.168.1.0/24,需要化14个子网,需要借4位,会产生16个子网,可简单看为5个子网,把1,2,3,4看成都只有一个网段。
用到的5个网段地址:
000 00000 192.168.1.0/27 骨干网段
001 00000 192.168.1.32/27 R1环回 0010 192.168.1.32/28 0011 192.168.1.48/28
010 00000 192.168.1.64/27 R2环回 0100 192.168.1.64/28 0101 192.168.1.80/28
011 00000 192.168.1.96/27 R3环回 0110 192.168.1.96/28 0111 192.168.1.112/28
100 00000 192.168.1.128/27 R4环回 1000 192.168.1.128/28 1001 192.168.1.144/28
预留的后期客户网段地址:
101 00000 192.168.1.160/27
110 00000 192.168.1.192/27
111 00000 192.168.1.224/27
子网划分最高借位为30位 全0 全1不能用
000 000 00 192.168.1.0/30
000 001 00192.168.1.4/30
000 010 00 192.168.1.8/30
000 011 00 192.168.1.12/30
000 100 00 192.168.1.16/30
000 101 00 192.16.1.20/30
留的骨干网段地址(可以在以后增加路由器):
000 110 00 192.168.1.24/30
000 111 00 192.168.28/30
ip地址配置(重命名):
r1;sys
sysname r1
r2:sys
sysname r2
r3:sys
sysname r3
r4:sys
sysname r4
r5:sys
sysname r5
定义环回地址:
r1:interface LookBack 0
ip address 192.168.1.33 28
interface LookBack 1
ip address 192.168.1.49 28
r2:interface LookBack 0
ip address 192.168.1.65 28
interface LookBack 1
ip address 192.168.1.81 28
r3:interface LookBack 0
ip address 192.168.1.97 28
interface LookBack 1
ip address 192.168.1.113 28
r4:interface LookBack 0
ip address 192.168.1.129 28
interface LookBack 1
ip address 192.168.1.145 28
r5:interface LookBack 0
ip address 5.5.5.5 24
定义(设置)端口:
r1:int g0/0/0
ip address 192.168.1.1 30
int g0/0/1
ip address 192.168.1.5 30
r2:int g0/0/0
ip address 192.168.1.2 30
int g0/0/0
ip address 192.168.1.9 30
r3:int g0/0/0
ip address 192.168.1.6 30
int g0/0/1
ip address 192.168.1.13 30
r4:int g0/0/0
ip address 192.168.1.10 30
int g0/0/1
ip address 192.168.1.14 30
int g0/0/2
ip address 192.168.1. 17 30
int g4/0/0
ip address 192.168.1.21 30
r5:int g0/0/0
ip address 192.168.1.18 30
int g0/0/1
ip address 192.168.1.22 30
配置静态路由指令:
[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.96 27 192.168.1.6
[r1]ip route-static 192.168.1.8 30 192.168.1.2
[r1]ip route-static 192.168.1.12 30 192.168.1.6
[r1]ip route-static 192.168.1.128 27 192.168.1.2
[r1]ip route-static 192.168.1.128 27 192.168.1.6
[r1]ip route-static 192.168.1.16 30 192.168.1.2
[r1]ip route-static 192.168.1.16 30 192.168.1.6
[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]ip route-static 192.168.1.128 27 192.168.1.10
[r2]ip route-static 192.168.1.4 30 192.168.1.1
[r2]ip route-static 192.168.1.12 30 192.168.1.10
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.10
[r2]ip route-static 192.168.1.16 30 192.168.1.10
[r3]ip route-static 192.168.1.32 27 192.168.1.5
[r3]ip route-static 192.168.1.128 27 192.168.1.14
[r3]ip route-static 192.168.1.0 30 192.168.1.5
[r3]ip route-static 192.168.1.8 30 192.168.1.14
[r3]ip route-static 192.168.1.64 27 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r3]ip route-static 192.168.1.16 30 192.168.1.14
[r4]ip route-static 192.168.1.64 27 192.168.1.9
[r4]ip route-static 192.168.1.96 27 192.168.1.13
[r4]ip route-static 192.168.1.4 30 192.168.1.13
[r4]ip route-static 192.168.1.0 30 192.168.1.9
[r4]ip route-static 192.168.1.32 27 192.168.1.9
[r4]ip route-static 192.168.1.32 27 192.168.1.13
[r5]ip route-static 192.168.1.128 27 192.168.1.17
[r5]ip route-static 192.168.1.32 27 192.168.1.17
[r5]ip route-static 192.168.1.64 27 192.168.1.17
[r5]ip route-static 192.168.1.96 27 192.168.1.17
[r5]ip route-static 192.168.1.0 30 192.168.1.17
[r5]ip route-static 192.168.1.4 30 192.168.1.17
[r5]ip route-static 192.168.1.12 30 192.168.1.17
[r5]ip route-static 192.168.1.8 30 192.168.1.17
后进行ping 监测,内网全网可达
32 64 96 128 汇总后会有黑洞,安全方法一一配置。
缺省
[r1]ip route-static 0.0.0.0 0 192.168.1.2
[r1]ip route-static 0.0.0.0 0 192.168.1.6
[r2]ip route-static 0.0.0.0 0 192.168.1.10
[r3]ip route-static 0.0.0.0 0 192.168.1.14
[r4]ip route-static 0.0.0.0 0 192.168.1.18
可能会出现黑洞,需做一条空接口路由,丢弃包裹,防止因缺省形成环路,若无空接口,会一直进行死循环,正常的为发一个包,接受回一个包
[r1]ip route-static 192.168.1.32 27 NULL 0
[r2]iP route-static 192.168.1.64 27 NULL 0
[r3]ip route-static 192.168.1.96 27 NULL 0
[r4]ip route-static 192.168.1.128 27 NULL 0
浮动静态,由于有缺省,不需要一一再次进行添加
[r4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
[r5]ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 p 61
[r5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 p 61
[r5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 p 61
[r5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 p 61
[r5]ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 p 61
[r5]ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 p 61
[r5]ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 p 61
[r5]ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 p 61
display this
display ip routing-table