ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

ENSP小练习

2021-11-12 20:01:31  阅读:252  来源: 互联网

标签:R4 24 R6 ENSP R1 ip 练习 GigabitEthernet0


   

 要求:1.全网可达;2.PC5和PC2需要动态路由配置DHCP,3.客服端可以接受到服务端的信息,4.R5和R1有换回路由5.R6,R5,R6互相之间不能设置下一跳直连(练习是我自己编的,使用使用指定路由网段,后面会修改)

首先配置路由器(R1,R4,R5,R6):

//R1
<Huawei>SYS
Enter system view, return user view with Ctrl+Z.
[Huawei]SYSN R1
[R1]interface g0/0/1
[R1-GigabitEthernet0/0/1]ip  address  4.0.0.2 24
Nov 12 2021 12:29:17-08:00 R1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R1-GigabitEthernet0/0/1]int g0/0/2
[R1-GigabitEthernet0/0/2]ip address 1.0.0.2 24
Nov 12 2021 12:30:07-08:00 R1 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[R1-GigabitEthernet0/0/2]int g0/0/0
[R1-GigabitEthernet0/0/0]ip  add	
[R1-GigabitEthernet0/0/0]ip  address   2.0.0.2 24
Nov 12 2021 12:30:37-08:00 R1 %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R1-GigabitEthernet0/0/0]q
//R4
<Huawei>SYS
Enter system view, return user view with Ctrl+Z.
[Huawei]SYSN R4
[R4]inter	
[R4]interface  g0/0/0
[R4-GigabitEthernet0/0/0]ip address 4.0.0.1  24
//R6
<Huawei>SYS
Enter system view, return user view with Ctrl+Z.
[Huawei]SYSN R6	
[R6]interface  g0/0/0
[R6-GigabitEthernet0/0/0]ip address 2.0.0.1  24
[R6]interface  g0/0/1
[R6-GigabitEthernet0/0/1]ip address 3.0.0.1  24
//R5
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]SYSN R5
[R5]interface  g0/0/1
[R5-GigabitEthernet0/0/1]ip address 5.0.0.1  24
Nov 12 2021 12:27:47-08:00 R5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R5-GigabitEthernet0/0/1]int  g0/0/0
[R5-GigabitEthernet0/0/0]ip  address  1.0.0.1  24
Nov 12 2021 12:28:06-08:00 R5 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R5-GigabitEthernet0/0/0]q

然后开始配置DHCP: (DHCP的四个过程见前文)

 

//R4
[R4-GigabitEthernet0/0/1]ip address 192.168.3.1 24
Nov 12 2021 14:00:58-08:00 R4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
//我这里出了问题,没有先配置网络接口就先设置了HCDP(顺序已改正)
[R4]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[R4]ip  pool daibi
Info: It's successful to create an IP address pool.
[R4-ip-pool-daibi]network 192.168.3.0 ?
  mask  Mask
  <cr>  Please press ENTER to execute command 
[R4-ip-pool-daibi]network 192.168.3.0  mask 24
[R4-ip-pool-daibi]gateway-list 192.168.3.1
[R4-ip-pool-daibi]dns-list 144.144.144.144  8.8.8.8
[R4-ip-pool-daibi]q
[R4]inter	
[R4]interface  g0/0/1
[R4-GigabitEthernet0/0/1]dhcp select global
[R4-GigabitEthernet0/0/1]q

//R6
[R6-GigabitEthernet0/0/1]ip address 192.168.5.1 24
Nov 12 2021 14:00:58-08:00 R4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R6]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[R6]ip  pool shabi
Info: It's successful to create an IP address pool.
[R6-ip-pool-shabi]network 192.168.5.0  mask 24
[R6-ip-pool-shabi]gateway-list 192.168.5.1
[R6-ip-pool-shabi]dns-list 144.144.144.144
[R6-ip-pool-shabi]q
[R6]interface  g0/0/2
[R6-GigabitEthernet0/0/2]dhcp select global
[R6-GigabitEthernet0/0/2]q

 然后开始配置(R1,R5)环回路由:

//R5
[R5]interface  LoopBack  0
[R5-LoopBack0]ip address  192.168.9.0 24
Error: The specified IP address is invalid.
//这里有配置环路路由设置错误(设置成广播地址)
[R5-LoopBack0]ip address 192.168.9.1 24

//R1
[R1]interface  LoopBack  0
[R1-LoopBack0]ip add	
[R1-LoopBack0]ip address 192.168.1.1 24

然后配置缺省路由:

//R4(R1的G0/0/1口)
[R4]ip route-static 0.0.0.0  0  4.0.0.2
//R5(R1的G0/0/2口)
[R5]ip route-static 0.0.0.0  0  1.0.0.2
//R6(R1的G0/0/0口)
[R6]ip route-static 0.0.0.0  0  2.0.0.2

 在R1设置下一跳配置:

[R1]ip route-static 192.168.3.0  24  4.0.0.1
[R1]ip route-static 3.0.0.0 24 2.0.0.1
[R1]ip route-static 192.168.5.0 24 2.0.0.1
[R1]ip route-static 5.0.0.0 24 1.0.0.1
[R1]ip route-static 192.168.9.0 24 1.0.0.1

现在已经做到全网联通,开始设置客户端和服务端

    

标签:R4,24,R6,ENSP,R1,ip,练习,GigabitEthernet0
来源: https://blog.csdn.net/qq_44685426/article/details/121291593

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有