当前位置: 首页 > news >正文

静态路由+DHCP实验(四路由器八PC)

一.200.1.1.0/24子网划分

1.划分八个子网

2.选用前5个,第五个子网再划分4个子网作为骨干

二.规划路由

三.配置(下一跳)

1.先依次实现四个路由器之间全网可通

2.为路由器配置地址池,使用全局模式获取dhcp,指定网关和dns

3.PC测试


 

一.200.1.1.0/24子网划分

1.划分八个子网

200.1.1.0/27

200.1.1.32/27

200.1.1.64/27

200.1.1.96/27

200.1.1.128/27

200.1.1.160/27

200.1.1.192/27

200.1.1..224/27

2.选用前5个,第五个子网再划分4个子网作为骨干

200.1.1.128/29

200.1.1.136/29

200.1.1.144/29

200.1.1.152/29

二.规划路由

AR1:

到达200.1.1.0/27一条

到达200.1.1.64/27一条

到达200.1.1.96/27两条

到达200.1.1.144/29一条

到达200.1.1.152/29一条

AR2:

到达200.1.1.0/27两条

到达200.1.1.32/27一条

到达200.1.1.96/27一条

到达200.1.1.128/29一条

到达200.1.1.152/29一条

AR3:

到达200.1.1.32/27两条

到达200.1.1.64/27一条

到达200.1.1.0/27一条

到达200.1.1.128/29一条

到达200.1.1.136/29一条

AR4:

到达200.1.1.64/27两条

到达200.1.1.32/27一条

到达200.1.1.64/27一条

到达200.1.1.136/29一条

到达200.1.1.144/29一条

三.配置(下一跳)

1.先依次实现四个路由器之间全网可通

[Huawei]ip route-static 200.1.1.136 29 200.1.1.130
#根据规划路由依次写静态路由实现通信

AR1:

[r1]display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : StaticDestinations : 5        Routes : 6        Configured Routes : 6Static routing table status : <Active>Destinations : 5        Routes : 6Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface200.1.1.0/27  Static  60   0          RD   200.1.1.129     GigabitEthernet
0/0/1200.1.1.64/27  Static  60   0          RD   200.1.1.138     GigabitEthernet
0/0/0200.1.1.96/27  Static  60   0          RD   200.1.1.129     GigabitEthernet
0/0/1Static  60   0          RD   200.1.1.138     GigabitEthernet
0/0/0200.1.1.144/29  Static  60   0          RD   200.1.1.138     GigabitEthernet
0/0/0200.1.1.152/29  Static  60   0          RD   200.1.1.129     GigabitEthernet
0/0/1Static routing table status : <Inactive>Destinations : 0        Routes : 0

AR2:

[r2]display ip routing-table protocol static 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : StaticDestinations : 5        Routes : 6        Configured Routes : 6Static routing table status : <Active>Destinations : 5        Routes : 6Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface200.1.1.0/27  Static  60   0          RD   200.1.1.146     GigabitEthernet
0/0/0Static  60   0          RD   200.1.1.137     GigabitEthernet
0/0/1200.1.1.32/27  Static  60   0          RD   200.1.1.137     GigabitEthernet
0/0/1200.1.1.96/27  Static  60   0          RD   200.1.1.146     GigabitEthernet
0/0/0200.1.1.128/29  Static  60   0          RD   200.1.1.137     GigabitEthernet
0/0/1200.1.1.152/29  Static  60   0          RD   200.1.1.146     GigabitEthernet
0/0/0Static routing table status : <Inactive>Destinations : 0        Routes : 0

AR3:

[r3]display ip routing-table protocol static 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : StaticDestinations : 5        Routes : 6        Configured Routes : 6Static routing table status : <Active>Destinations : 5        Routes : 6Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface200.1.1.0/27  Static  60   0          RD   200.1.1.154     GigabitEthernet
0/0/0200.1.1.32/27  Static  60   0          RD   200.1.1.154     GigabitEthernet
0/0/0Static  60   0          RD   200.1.1.145     GigabitEthernet
0/0/1200.1.1.64/27  Static  60   0          RD   200.1.1.145     GigabitEthernet
0/0/1200.1.1.128/29  Static  60   0          RD   200.1.1.154     GigabitEthernet
0/0/0200.1.1.136/29  Static  60   0          RD   200.1.1.145     GigabitEthernet
0/0/1Static routing table status : <Inactive>Destinations : 0        Routes : 0

AR4:

[r4]display ip routing-table protocol static 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : StaticDestinations : 5        Routes : 6        Configured Routes : 6Static routing table status : <Active>Destinations : 5        Routes : 6Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface200.1.1.32/27  Static  60   0          RD   200.1.1.130     GigabitEthernet
0/0/0200.1.1.64/27  Static  60   0          RD   200.1.1.130     GigabitEthernet
0/0/0Static  60   0          RD   200.1.1.153     GigabitEthernet
0/0/1200.1.1.96/27  Static  60   0          RD   200.1.1.153     GigabitEthernet
0/0/1200.1.1.136/29  Static  60   0          RD   200.1.1.130     GigabitEthernet
0/0/0200.1.1.144/29  Static  60   0          RD   200.1.1.153     GigabitEthernet
0/0/1Static routing table status : <Inactive>Destinations : 0        Routes : 0

2.为路由器配置地址池,使用全局模式获取dhcp,指定网关和dns

[r1]dhcp enable 
[r1]ip pool s1
[r1-ip-pool-s1]network 200.1.1.32 mask 27 
[r1-ip-pool-s1]dns-list 114.114.114.114 8.8.8.8
[r1-ip-pool-s1]gateway-list 200.1.1.33
[r1]interface GigabitEthernet 0/0/2
[r1-GigabitEthernet0/0/2]dhcp select global 
#四个路由器同样做此配置

AR1:

[r1]ip pool s1
[r1-ip-pool-s1]display this 
[V200R003C00]
#
ip pool s1gateway-list 200.1.1.33 network 200.1.1.32 mask 255.255.255.224 dns-list 114.114.114.114 8.8.8.8 
#
return

AR2:

[r2]ip pool S2
[r2-ip-pool-s2]display this 
[V200R003C00]
#
ip pool s2gateway-list 200.1.1.65 network 200.1.1.64 mask 255.255.255.224 dns-list 114.114.114.114 8.8.8.8 
#
return

AR3:

[r3]ip pool s3
[r3-ip-pool-s3]display this 
[V200R003C00]
#
ip pool s3gateway-list 200.1.1.97 network 200.1.1.96 mask 255.255.255.224 dns-list 114.114.114.114 8.8.8.8 
#
return

AR4:

[r4]ip pool s4
[r4-ip-pool-s4]dis	
[r4-ip-pool-s4]display th	
[r4-ip-pool-s4]display this 
[V200R003C00]
#
ip pool s4gateway-list 200.1.1.1 network 200.1.1.0 mask 255.255.255.224 dns-list 114.114.114.114 8.8.8.8 
#
return

3.PC测试

PC>ipconfig             #PC8Link local IPv6 address...........: fe80::5689:98ff:fe61:7b69
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 200.1.1.29
Subnet mask.......................: 255.255.255.224
Gateway...........................: 200.1.1.1
Physical address..................: 54-89-98-61-7B-69
DNS server........................: 114.114.114.1148.8.8.8PC>ping 200.1.1.62Ping 200.1.1.62: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
From 200.1.1.62: bytes=32 seq=3 ttl=126 time=78 ms
From 200.1.1.62: bytes=32 seq=4 ttl=126 time=78 ms
From 200.1.1.62: bytes=32 seq=5 ttl=126 time=94 ms--- 200.1.1.62 ping statistics ---5 packet(s) transmitted3 packet(s) received40.00% packet lossround-trip min/avg/max = 0/83/94 msPC>ping 200.1.1.61Ping 200.1.1.61: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 200.1.1.61: bytes=32 seq=2 ttl=126 time=62 ms
From 200.1.1.61: bytes=32 seq=3 ttl=126 time=79 ms
From 200.1.1.61: bytes=32 seq=4 ttl=126 time=93 ms
From 200.1.1.61: bytes=32 seq=5 ttl=126 time=78 ms--- 200.1.1.61 ping statistics ---5 packet(s) transmitted4 packet(s) received20.00% packet lossround-trip min/avg/max = 0/78/93 msPC>ping 200.1.1.94Ping 200.1.1.94: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
Request timeout!
Request timeout!
From 200.1.1.94: bytes=32 seq=5 ttl=125 time=78 ms--- 200.1.1.94 ping statistics ---5 packet(s) transmitted1 packet(s) received80.00% packet lossround-trip min/avg/max = 0/78/78 msPC>ping 200.1.1.93Ping 200.1.1.93: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 200.1.1.93: bytes=32 seq=2 ttl=125 time=94 ms
From 200.1.1.93: bytes=32 seq=3 ttl=125 time=46 ms
From 200.1.1.93: bytes=32 seq=4 ttl=125 time=79 ms
From 200.1.1.93: bytes=32 seq=5 ttl=125 time=78 ms--- 200.1.1.93 ping statistics ---5 packet(s) transmitted4 packet(s) received20.00% packet lossround-trip min/avg/max = 0/74/94 msPC>ping 200.1.1.125Ping 200.1.1.125: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 200.1.1.125: bytes=32 seq=2 ttl=126 time=78 ms
From 200.1.1.125: bytes=32 seq=3 ttl=126 time=78 ms
From 200.1.1.125: bytes=32 seq=4 ttl=126 time=47 ms
From 200.1.1.125: bytes=32 seq=5 ttl=126 time=62 ms--- 200.1.1.125 ping statistics ---5 packet(s) transmitted4 packet(s) received20.00% packet lossround-trip min/avg/max = 0/66/78 msPC>ping 200.1.1.126Ping 200.1.1.126: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 200.1.1.126: bytes=32 seq=2 ttl=126 time=62 ms
From 200.1.1.126: bytes=32 seq=3 ttl=126 time=78 ms
From 200.1.1.126: bytes=32 seq=4 ttl=126 time=63 ms
From 200.1.1.126: bytes=32 seq=5 ttl=126 time=62 ms--- 200.1.1.126 ping statistics ---5 packet(s) transmitted4 packet(s) received20.00% packet lossround-trip min/avg/max = 0/66/78 ms
http://www.lryc.cn/news/43586.html

相关文章:

  • 数据挖掘(作业汇总)
  • 基于微信小程序的图书馆选座系统源码
  • K8S 三种探针 readinessProbe、livenessProbe和startupProbe
  • Android 设置背景颜色透明度
  • 聚类算法层次聚类
  • js 数据类型
  • 多级评论单表结构设计
  • Mac M1通过VMWare Fusion安装Centos7记录(镜像和网络有大坑)
  • 女生适合当程序员吗?
  • 昇腾AI机器人发布,12家企业、5家高校签约,昇腾AI开发者创享日全国巡展沈阳首站成功举办
  • anaconda如何改变虚拟环境安装路径
  • 根据卫星运动矢量计算轨道六根数
  • 关于微信小程序安装npm的过程,从下载到小程序内部安装完成
  • IO-操作系统
  • Downie 4 4.6.12 MAC上最好的一款视频下载工具
  • unity 玩家移动时idle和run动画频繁切换
  • 小程序 table组件
  • 利用摄影测量进行地形建模的介绍
  • 中文代码138
  • JQuery用法
  • Python采集热门城市景点数据+简单制作数据可视化图
  • VUE-cli搭建项目
  • Feign返回值统一处理
  • 探究如何在Linux系统中修改进程资源限制:四种方法调整进程限制,让你的系统高效运行(包含应用层getrlimit和setrlimit API)
  • 9.5. 机器翻译与数据集
  • 跟着凯新生物2 Arm PEG Biotin,2-Branched PEG Biotin,生物素-聚乙二醇-二臂/支,学试剂知识
  • react组件进阶(四)
  • 阿维塔城区NCA智驾导航辅助,复杂路口,全面胜任
  • [Pandas] div()函数
  • c++并发与多线程