IP第三次作业

这篇具有很好参考价值的文章主要介绍了IP第三次作业。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

实验拓扑及要求如图所示: 

IP第三次作业,算法

我连接的拓扑:

IP第三次作业,算法

 

实验思路:

1.按图示配置设备IP地址

2.使用路由协议让私网公网全网通

3.配置pap,chap,HDLC封装

4.配置MGRE,GRE

5.配置RIP协议

6.配置NAT,使得访问内网环回

 实验开始:

1.IP配置:

R1

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
Mar 30 2024 14:09:59-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R1-GigabitEthernet0/0/0]int s3/0/0
[R1-Serial3/0/0]ip add 15.1.1.1 24

R2:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 45.1.1.1 24
Mar 30 2024 14:13:25-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R2-GigabitEthernet0/0/0]int s3/0/0
[R2-Serial3/0/0]ip add 15.1.1.1 24
[R2-Serial3/0/0]
Mar 30 2024 14:13:42-08:00 R2 %%01PPP/4/SAMEIP(l)[1]:On the interface Serial3/0/
0, IPCP negotiation failed because the peer IP address was the same as local add
ress. 
[R2-Serial3/0/0]int s3/0/1
[R2-Serial3/0/1]ip add 5.5.5.1 24
[R2-Serial3/0/1]
Mar 30 2024 14:14:12-08:00 R2 %%01PPP/4/SAMEIP(l)[2]:On the interface Serial3/0/
0, IPCP negotiation failed because the peer IP address was the same as local add
ress. 
[R2-Serial3/0/1]
Mar 30 2024 14:14:12-08:00 R2 %%01PPP/4/SAMEIP(l)[3]:On the interface Serial3/0/
0, IPCP negotiation failed because the peer IP address was the same as local add
ress. 
[R2-Serial3/0/1]int s4/0/0
[R2-Serial4/0/0]ip add 35.1.1.1 24
 

R3:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 45.1.1.2 24
Mar 30 2024 14:16:08-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 192.168.4.1 24
[R3-GigabitEthernet0/0/1]
Mar 30 2024 14:16:26-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R3-GigabitEthernet0/0/1]

R4:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R4
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.3.1 24
Mar 30 2024 14:17:19-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R4-GigabitEthernet0/0/0]int s3/0/0
[R4-Serial3/0/0]ip add 35.1.1.2 24
[R4-Serial3/0/0]
Mar 30 2024 14:17:42-08:00 R4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol PPP
 IPCP on the interface Serial3/0/0 has entered the UP state. 
[R4-Serial3/0/0] 

R5:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R5
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 192.168.2.1 24
Mar 30 2024 14:18:24-08:00 R5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R5-GigabitEthernet0/0/0]int s3/0/0
[R5-Serial3/0/0]ip add 25.1.1.2 24
[R5-Serial3/0/0]
Mar 30 2024 14:18:41-08:00 R5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol PPP
 IPCP on the interface Serial3/0/0 has entered the UP state. 
[R5-Serial3/0/0] 

电脑如图配置即可(我用的PC1):

IP第三次作业,算法

2.内网外网通:
实现外网通:
题目说R5(我图的R2)只能进行
Ip配置,在其他几个路由上配置一个缺省即可:
R1:[R1]ip route-static 0.0.0.0 0 15.1.1.2
R3:[R3]ip route-static 0.0.0.0 0 45.1.1.1
R4:[R4]ip route-static 0.0.0.0 0 35.1.1.1
R5:[R5]ip route-static 0.0.0.0 0 25.1.1.1

R1和R2间使用PPP的PAP认证,R2为主认证方

R2]aaa
[R2-aaa]lo    
[R2-aaa]local-user yuzhiwei p    
[R2-aaa]local-user yuzhiwei password c    
[R2-aaa]local-user yuzhiwei password cipher yzw12345
Info: Add a new user.
[R2-aaa]l    
[R2-aaa]local-user yuzhiwei s    
[R2-aaa]local-user yuzhiwei service-type ppp
[R2-aaa]q
[R2]int s 4/0/0
[R2-Serial4/0/0]ppp au    
[R2-Serial4/0/0]ppp authentication-mode ?
  chap  Enable CHAP authentication
  pap   Enable PAP authentication
[R2-Serial4/0/0]ppp authentication-mode pap
[R2-Serial4/0/0]

[R1-Serial4/0/0]ppp     
[R1-Serial4/0/0]ppp ?
  authentication-mode  Specify PPP authentication-mode
  chap                 Specify CHAP parameters 
  ipcp                 Specify IPCP parameters
  mp                   Multilink PPP
  pap                  Specify PAP parameters
  timer                Specify timer 
[R1-Serial4/0/0]ppp pap?
  pap  Specify PAP parameters
[R1-Serial4/0/0]ppp pap l    
[R1-Serial4/0/0]ppp pap local-user lt p    
[R1-Serial4/0/0]ppp pap local-user lt password c    
[R1-Serial4/0/0]ppp pap local-user lt password cipher 12345
[R1-Serial4/0/0]
[R1-Serial4/0/0]
[R1-Serial4/0/0]shutdown
Mar 30 2024 14:17:59-08:00 r1 %%01PPP/4/PHYSICALDOWN(l)[0]:On the interface Seri
al4/0/0, PPP link was closed because the status of the physical layer was Down. 

[R1-Serial4/0/0] IPCP on the interface Serial4/0/0 has entered the DOWN state. 
[R1-Serial4/0/0]
Mar 30 2024 16:15:59-08:00 r1 %%01RM/4/IPV4_DEFT_RT_CHG(l)[4]:IPV4 default Route
 is changed. (ChangeType=Delete, InstanceId=0, Protocol=Static, ExitIf=Unknown, 
Nexthop=15.1.1.5, Neighbour=0.0.0.0, Preference=1006632960, Label=NULL, Metric=0

[R1-Serial4/0/0]undo shutdow IPCP on the interface Serial4/0/0 has entered the UP state. 
[R1-Serial4/0/0]
R2与R5之间使用ppp的CHAP认证,R5为主认证方

[R5-aaa]lo    
[R5-aaa]local-user NQ    
[R5-aaa]local-user NQ p    
[R5-aaa]local-user NQ password c    
[R5-aaa]local-user NQ password cipher 12345
Info: Add a new user.
[R5-aaa]lo    
[R5-aaa]local-user NQ s    
[R5-aaa]local-user NQ service-type ppp
[R5-aaa]q
[R5]int s 3/0/1
[R5-Serial3/0/1]ppp chap ?
  password  Specify user password 
  user      Specify user name 
[R5-Serial3/0/1]ppp au    
[R5-Serial3/0/1]ppp authentication-mode chap
[R5-Serial3/0/1]
[R5-Serial3/0/1]q
[R5]

[R2]
[R2]int s 3/0/0
[R2-Serial3/0/0]ppp c    
[R2-Serial3/0/0]ppp chap u    
[R2-Serial3/0/0]ppp chap user ln
[R2-Serial3/0/0]ppp c    
[R2-Serial3/0/0]ppp chap p    
[R2-Serial3/0/0]ppp chap password c    
[R2-Serial3/0/0]ppp chap password cipher 112345
[R2-Serial3/0/0]shutdown
[R2-Serial3/0/0]
[R2-Serial3/0/0]undo shutdown

R3与R2之间使用HDLC封装;

[R3]int s 4/0/0
[R3-Serial4/0/0]lin    
[R3-Serial4/0/0]link-protocol h    
[R3-Serial4/0/0]link-protocol hdlc 
[R3-Serial4/0/0]
[R2]int s 3/0/0
[R2-Serial3/0/0]lin    
[R2-Serial3/0/0]link-protocol h    
[R2-Serial3/0/0]link-protocol hdlc 
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y

R1、R5、R3构建一个MGRE环境,R1为中心站点,R1、R4间为点到点的GRE

[R1]int t    
[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]t    
[R1-Tunnel0/0/0]    
[R1-Tunnel0/0/0]te    
[R1-Tunnel0/0/0]tu    
[R1-Tunnel0/0/0]tunnel-protocol gre?
  gre  Generic Routing Encapsulation
[R1-Tunnel0/0/0]tunnel-protocol gre ?
  p2mp  Point to multi-point GRE mode
  <cr>  Please press ENTER to execute command 
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]
[R1-Tunnel0/0/0]
[R1-Tunnel0/0/0]s    
[R1-Tunnel0/0/0]so    
[R1-Tunnel0/0/0]sour    
[R1-Tunnel0/0/0]source s     
[R1-Tunnel0/0/0]source Serial 4/0/0
[R1-Tunnel0/0/0]
[R1-Tunnel0/0/0]n    
[R1-Tunnel0/0/0]nat
[R1-Tunnel0/0/0]nhrp n    
[R1-Tunnel0/0/0]nhrp network-id 100
[R1-Tunnel0/0/0]q
[R1]dis ip int b    
[R1]dis ip int brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 3

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.254/24     up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
Serial4/0/0                       15.1.1.1/24          up         up        
Serial4/0/1                       unassigned           down       down      
Tunnel0/0/0                       10.1.2.1/24          up         up        
[R1]

R5]int t    
[R5]int Tunnel 0/0/0
[R5-Tunnel0/0/0]ip add 10.1.2.2 24
[R5-Tunnel0/0/0]tu    
[R5-Tunnel0/0/0]tunnel-protocol gre p    
[R5-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R5-Tunnel0/0/0]
[R5-Tunnel0/0/0]q
[R5]dis ip int b    
[R5]dis ip int brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 5
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 6

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.2.254/24     up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
Serial3/0/0                       25.1.1.2/24          up         up        
Serial3/0/1                       unassigned           down       down      
Serial4/0/0                       unassigned           down       down      
Serial4/0/1                       unassigned           down       down      
Tunnel0/0/0                       10.1.2.2/24          up         down      
[R5]


[R3]int t    
[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]ip add 10.1.2.3 24
[R3-Tunnel0/0/0]tu    
[R3-Tunnel0/0/0]tunnel-protocol gre     
[R3-Tunnel0/0/0]tunnel-protocol gre p    
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R3-Tunnel0/0/0]
[R3-Tunnel0/0/0]
[R3-Tunnel0/0/0]q
[R3]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on[r3]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 4

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.3.254/24     up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
Serial4/0/0                       35.1.1.3/24          up         up        
Serial4/0/1                       unassigned           down       down      
Tunnel0/0/0                       10.1.2.3/24          up         down      
[r3]int t    
[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]so    
[R3-Tunnel0/0/0]source s    
[R3-Tunnel0/0/0]source Serial 4/0/0
Mar 30 2024 14:46:53-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[R3-Tunnel0/0/0]
[R3-Tunnel0/0/0]nh    
[R3-Tunnel0/0/0]nhrp n    
[R3-Tunnel0/0/0]nhrp network-id 100

[R3]int tu    
[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]nh    
[R3-Tunnel0/0/0]nhrp en    
[R3-Tunnel0/0/0]nhrp entry 10.2.1.1 15.1.1.1 re    
[R3-Tunnel0/0/0]nhrp entry 10.2.1.1 15.1.1.1 register 
[R3-Tunnel0/0/0]
[R3-Tunnel0/0/0]q
[R3]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 3

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.3.254/24     up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
Serial4/0/0                       35.1.1.3/24          up         up        
Serial4/0/1                       unassigned           down       down      
Tunnel0/0/0                       10.1.2.3/24          up         up        
[r3]

[R1]int t    
[R1]int Tunnel 0/0/1
[R1-Tunnel0/0/1]ip add 10.1.1.1 24
[R1-Tunnel0/0/1]tu    
[R1-Tunnel0/0/1]tunnel-protocol gre
[R1-Tunnel0/0/1]so    
[R1-Tunnel0/0/1]source 15.1.1.1
[R1-Tunnel0/0/1]dest    
[R1-Tunnel0/0/1]destination 45.1.1.4
Mar 30 2024 15:35:40-08:00 r1 %%01IFNET/4/LINK_STATE(l)[9]:The line protocol IP 
on the interface Tunnel0/0/1 has entered the UP state. 

[R4]int t    
[R4]int Tunnel 0/0/1
[R4-Tunnel0/0/1]ip add 10.1.1.2 24
[R4-Tunnel0/0/1]tu    
[R4-Tunnel0/0/1]tunnel-protocol gre
[R4-Tunnel0/0/1]sc    
[R4-Tunnel0/0/1]so    
[R4-Tunnel0/0/1]source 45.1.1.4
[R4-Tunnel0/0/1]dest    
[R4-Tunnel0/0/1]destination 15.1.1.1 

整个私有网络基本RIP全网可达(以R1和R5为例)

[R1]rip 1
[R1-rip-1]v 2
[R1-rip-1]undo summary
[R1-rip-1]network 10.0.0.0

[R5]rip 1
[R5-rip-1]v 2
[R5-rip-1]undo    
[R5-rip-1]undo summary 
[R5-rip-1]network 192.168.2.0
[R5-rip-1]network 10.0.0.0


配置NAT,使得访问内网环回
[R1-acl-basic-2000]rule 5 per    
[R1-acl-basic-2000]rule 5 permit s    
[R1-acl-basic-2000]rule 5 permit source 192.168.1.0 0.0.0.255
[R1-acl-basic-2000]q
[R1]int s    
[R1]int Serial 3/0/0
[R1-Serial3/0/0]n    
[R1-Serial3/0/0]nat out    
[R1-Serial3/0/0]nat outbound 2000
[R1-Serial3/0/0]

[R5]acl 2000
[R5-acl-basic-2000]ru    
[R5-acl-basic-2000]rule 5 p    
[R5-acl-basic-2000]rule 5 permit s    
[R5-acl-basic-2000]rule 5 permit source 192.168.2.0 0.0.0.255
[R5-acl-basic-2000]q
[R5]int s    
[R5]int Serial 3/0/0
[R5-Serial3/0/0]n    
[R5-Serial3/0/0]nat ou    
[R5-Serial3/0/0]nat outbound 2000

[R3]acl 2000
[R3-acl-basic-2000]
[R3-acl-basic-2000]rule 5 p    
[R3-acl-basic-2000]rule 5 permit s    
[R3-acl-basic-2000]rule 5 permit source 192.168.3.0 0.0.0.255
[R3-acl-basic-2000]q
[R3]int s    
[R3]int Serial 3/0/0
[R3-Serial3/0/0]nat    
[R3-Serial3/0/0]nat ou    
[R3-Serial3/0/0]nat outbound 2000


[R4]acl 2000
[R4-acl-basic-2000]ru    
[R4-acl-basic-2000]rule 5 pr    
[R4-acl-basic-2000]rule 5 p    
[R4-acl-basic-2000]rule 5 permit s    
[R4-acl-basic-2000]rule 5 permit source 192.168.4.0 0.0.0.255
[R4acl-basic-2000]q
[R4int g 0/0/1
[R4GigabitEthernet0/0/1]nat    
[R4-GigabitEthernet0/0/1]nat ou    
[R4-GigabitEthernet0/0/1]nat outbound 2000
 文章来源地址https://www.toymoban.com/news/detail-846307.html

到了这里,关于IP第三次作业的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • MySQL第三次作业-多表查询

    目录 1.实验需求 2. 实验步骤: 1、根据上述实验需求可知,要查询数据表中的内容,首先要创建一个db_school数据库并使用。 2、然后创建 student和score表 3.接下来给student和score表插入数据 (1)向student表插入数据 (2)用 select * from student; 查看student表中数据来验证数据是否插

    2024年01月20日
    浏览(32)
  • PTA三次作业

    1.前言: 第一次作业难度较大,从无到有的设计,涉及到的主要类有Paper,Question,AnswerPaper,Main,主要题目方向为字符串判断与字符串处理(提取有效信息),判断对错算总分,配合一些Java自带的数据结构如ArrayList即可快速解决问题,第一次作业是后面作业的基础,需自行了解

    2024年04月22日
    浏览(34)
  • 面向对象java前三次pta作业

    1、前言 2、设计与分析 3、踩坑心得 4、主要困难及改进建议 5、总结   面向对象程序设计(Object-Oriented Programming,简称OOP)是一种编程范式,它以对象作为程序的基本单元,将数据和操作封装在一起。面向对象程序设计的基本概念包括类、对象、继承、多态等。 类(Class)是

    2024年02月08日
    浏览(30)
  • SQL第三次实验

    接实验2 目录 一、数据库的单表查询和连接查询 1.查询各位学生的学号、班级和姓名 2.查询课程的全部信息  3.查询数据库有哪些专业班级  4.查询学时数大于60的课程信息 5.查询在1986年出生的学生的学号、姓名和出生日期  6.查询三次作业的成绩都在80分以上的学号、课程号

    2023年04月08日
    浏览(30)
  • 云计算第三次笔记(DHCP)

    DHCP-动态主机配置协议-UDP协议 67/68端口 典型的C/S架构协 DHCP客户端-----需要获取IP的设备                  DHCP服务器-----需要发放IP的设备 第一种获取IP地址的: DHCP客户端向 DHCP服务器去要地址----- 广播   源IP:0.0.0.0(代表自己)   目标IP:255.255.255.255  源MAC:自己

    2024年02月04日
    浏览(23)
  • 百度松果菁英班--oj赛(第三次)

    **题目:**假期快到了,小码哥在宾馆打暑假工。 小码哥需要处理接下来n天的住房信息,其中第i天宾馆有ri个房间可供租借。共有m份订单,每份订单用三个正整数描述,分别为dj,sj,tj,表示需要从第sj天到第tj天住房(包括第sj天和第tj天),每天需要出租dj个房间。 宾馆入

    2024年02月03日
    浏览(29)
  • 面向对象程序设计第三次bolg

    本次博客针对面向对象程序设计的课程所发的PTA作业7,8以及期末考试中的面向对象编程题的分析和总结,重点介绍课程成绩统计程序系列题目以及期末考试的编程题。 在这次作业中7-1、7-2内容和考点相同,在此我分析一下7-2Hashmap的排序这个问题。 7-2 容器-HashMap-排序 分数

    2024年02月05日
    浏览(44)
  • 第三次CCF计算机软件能力认证

    第一题:门禁系统 涛涛最近要负责图书馆的管理工作,需要记录下每天读者的到访情况。 每位读者有一个编号,每条记录用读者的编号来表示。 给出读者的来访记录,请问每一条记录中的读者是第几次出现。 输入格式 输入的第一行包含一个整数 n,表示涛涛的记录条数。

    2024年02月15日
    浏览(30)
  • Java程序设计2023-第三次上机练习

    这次的练习主要是一些类的高阶操作,像继承、接口和内部类这些,但其实还是挺简单的   目录 7-1 jmu-Java-03面向对象基础-04-形状-继承 前言 本题描述 思考 输入样例: 输出样例:  7-3 jmu-Java-04面向对象进阶-03-接口-自定义接口ArrayIntegerStack main方法说明 思考 输入样例 输出样例

    2024年02月05日
    浏览(37)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包