eNSP静态路由的综合实验
首先我们根据192.168.1.0/24划分网段:
192.168.1.0/24
192.168.1.000 00000 /27 192.168.1.0/27-------骨干链路
192.168.1.0/30
192.168.1.4/30
192.168.1.8/30
192.168.1.12/30
192.168.1.16/30
192.168.1.20/30
192.168.1.24/30
192.168.1.28/30
192.168.1.001 00000/27 192.168.1.32/27 -----R1的环回
192.168.1.32/28
192.168.1.48/28
192.168.1.010 00000/27 192.168.1.64/27 -----R2的环回
192.168.1.64/28
192.168.1.80/28
192.168.1.011 00000/27 192.168.1.96/27 -----R3的网段
192.168.1.100 00000/27 192.168.1.128/27 -----R4的环回
192.168.1.128/28
192.168.1.144/28
192.168.1.101 00000/27 192.168.1.160/27 -----R5的环回
用作保留
192.168.1.110 00000/27 192.168.1.192/27
192.168.1.111 00000/27 192.168.1.224/27
给每台路由器配置ip地址:
R1路由器
R2路由器
R3 配置动态路由
[R3]dhcp enable
[R3]ip pool dhcp
[R3-ip-pool-dhcp]network 192.168.1.96 mask 27
[R3-ip-pool-dhcp]gateway-list 192.168.1.97 ----设置网关
[R3-ip-pool-dhcp]dns-list 114.114.114.114 ----设置dns
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]dhcp select global
R4路由器
R5路由器
R6路由器
配置路由信息
[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 -----负载均衡
[R1]ip route-static 192.168.1.64 27 192.168.1.2 ----汇总路由
[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.97 27 192.168.1.6
R2路由器
[R2]ip route-static 0.0.0.0 0 192.168.1.10 -----配置缺省路由
[R2]ip route-static 192.168.1.96 27 192.168.1.10 -----负载均衡
[R2]ip route-static 192.168.1.96 27 192.168.1.1
[R2]ip route-static 192.168.1.4 30 192.168.1.1
[R2]ip route-static 192.168.1.32 27 192.168.1.1 -----汇总路由
R3路由器
[R3]ip route-static 0.0.0.0 0 192.168.1.14 -----缺省路由
[R3]ip route-static 192.168.1.64 27 192.168.1.14 -----负载均衡
[R3]ip route-static 192.168.1.64 27 192.168.1.5
[R3]ip route-static 192.168.1.0 30 192.168.1.5
[R3]ip route-static 192.168.1.32 27 192.168.1.5 -----汇总路由
R4路由器
[R4]ip route-static 0.0.0.0 0 192.168.1.22 preference 70 -----配置浮动路由
[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 ------汇总路由
[R4]ip route-static 192.168.1.0 30 192.168.1.9
[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.128 27 NULL 0 -----空接口路由,避免环路
[R4]ip route-static 192.168.1.160 27 192.168.1.18
[R4]ip route-static 192.168.1.0 24 NULL 0 ------空接口路由,避免环路
[R4]ip route-static 0.0.0.0 0 GigabitEthernet 2/0/0 192.168.1.18
R5路由器
测试全网可达