HCIP静态综合实验

一,实验题目及要求(该图为实验拓扑图)

实验要求:

1、R6为ISP,接口IP地址均为公有地址,该设备只能配置IP地址,之后不能再对其进行任何配置;
2、R1-R5为局域网,私有IP地址192.168.1.0/24,请合理分配;
3、R1、R2、R4,各有两个环回IP地址;R5,R6各有一个环回地址;所有路由器上环回均代表连接用户的接口;
4、R3下面的两台PC通过DHCP自动获取IP地址;
5、选路最佳,路由表尽量小,避免环路;
6、R1-R5均可以访问R6的环回;
7、R6 telnet R5的公有地址时,实际登录到R1上;
8、R4与R5正常通过1000M链路,故障时通过100m链路;

实验思路

1.网段划分

        根据要求二的条件进行子网划分,也就是ip地址192.168.1.0/24,从主机位拿出3位就可以产生8个广播域,分别为:

  1. 192.168.1.0/27        
  2. 192.168.1.16/27
  3. 192.168.1.32/27
  4. 192.168.1.96/27
  5. 192.168.1.128/27
  6. 192.168.1.160/27
  7. 192.168.1.192/27
  8. 192.168.1.224/27

        同理我们可将第一个再扩展三位,得到骨干链路的八个网段

  1. 192.168.1.0/30       
  2. 192.168.1.4/30
  3. 192.168.1.8/30
  4. 192.168.1.12/30
  5. 192.168.1.16/30
  6. 192.168.1.20/30
  7. 192.168.1.24/30
  8. 192.168.1.28/30

2.进行网段分配

R1--R2骨干链路:192.168.1.0/30   

R1--R3骨干链路:192.168.1.8/30   

R2--R3骨干链路:192.168.1.4/30   

R3--R4骨干链路:192.168.1.12/30   

R4--R5骨干链路(1000M):192.168.1.16/30   

R4--R5骨干链路(100M):192.168.1.20/30   

R3下面的网段:192.168.1.96/27

R1的环回:192.168.1.32/27
L0:       192.168.1.32/28
L1:       192.168.1.48/28

R2的环回:192.168.1.64/27
L0:       192.168.1.64/28
L1:       192.168.1.80/28

R4的环回:192.168.1.128/27
L0:       192.168.1.128/28
L1:       192.168.1.144/28

R5的环回:192.168.1.160/27

L0:          192.168.1.161/27

R6的环回:

L0:                1.1.1.0/24

3.IP地址配置

R1

[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
Mar 24 2024 11:55:11-08:00 R1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.1.9 30
Mar 24 2024 11:55:26-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 l0
[R1-LoopBack0]ip add 192.168.1.33 28
[R1-LoopBack0]int l1
[R1-LoopBack1]ip add 192.168.1.49 28
[R1-LoopBack1]quit
[R1]dis ip int br	
[R1]dis ip int brief 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.1/30       up         up        
GigabitEthernet0/0/1              192.168.1.9/30       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         192.168.1.33/28      up         up(s)     
LoopBack1                         192.168.1.49/28      up         up(s)     
NULL0                             unassigned           up         up(s)   

R2

[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.1.2 30
Mar 24 2024 11:26:56-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 g0/0/1
[R2-GigabitEthernet0/0/1]ip add 192.168.1.5 30
Mar 24 2024 11:27:43-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R2-GigabitEthernet0/0/1]int l0
[R2-LoopBack0]ip add 192.168.1.65 28
[R2-LoopBack0]int l1
[R2-LoopBack1]ip add 192.168.1.81 28
[R2]dis ip inter brief 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.2/30       up         up        
GigabitEthernet0/0/1              192.168.1.5/30       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         192.168.1.65/28      up         up(s)     
LoopBack1                         192.168.1.81/28      up         up(s)     
NULL0                             unassigned           up         up(s)   

R3

[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.1.10 30
Mar 24 2024 11:30:12-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.1.13 30
Mar 24 2024 11:30:41-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]int g0/0/2
[R3-GigabitEthernet0/0/2]ip add 192.168.1.97 27
[R3-GigabitEthernet0/0/2]
Mar 24 2024 11:31:21-08:00 R3 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[R3-GigabitEthernet0/0/2]
[R3-GigabitEthernet0/0/2]quit
[R3]dis ip inter br	
[R3]dis ip inter brief 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.10/30      up         up        
GigabitEthernet0/0/1              192.168.1.13/30      up         up        
GigabitEthernet0/0/2              192.168.1.97/27      up         up        
NULL0                             unassigned           up         up(s) 

R4

[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.1.6 30
Mar 24 2024 11:32:33-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 g0/0/1
[R4-GigabitEthernet0/0/1]ip add 192.168.1.14 30
Mar 24 2024 11:32:50-08:00 R4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R4-GigabitEthernet0/0/1]int g0/0/2
[R4-GigabitEthernet0/0/2]ip add 192.168.1.17 30
Mar 24 2024 11:33:14-08:00 R4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[R4-GigabitEthernet0/0/2]int g4/0/0
[R4-GigabitEthernet4/0/0]ip add 192.168.1.21 30
[R4-GigabitEthernet4/0/0]
Mar 24 2024 11:33:44-08:00 R4 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet4/0/0 has entered the UP state. 
[R4-GigabitEthernet4/0/0]int l0
[R4-LoopBack0]ip add 192.168.1.129 28
[R4-LoopBack0]int l1
[R4-LoopBack1]ip add 192.168.1.145 28
[R4-LoopBack1]quit
[R4]dis ip inter br	
[R4]dis ip inter brief 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.6/30       up         up        
GigabitEthernet0/0/1              192.168.1.14/30      up         up        
GigabitEthernet0/0/2              192.168.1.17/30      up         up        
GigabitEthernet4/0/0              192.168.1.21/30      up         up        
GigabitEthernet4/0/1              unassigned           down       down      
GigabitEthernet4/0/2              unassigned           down       down      
GigabitEthernet4/0/3              unassigned           down       down      
LoopBack0                         192.168.1.129/28     up         up(s)     
LoopBack1                         192.168.1.145/28     up         up(s)     
NULL0                             unassigned           up         up(s)  

R5

[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 192.168.1.18 30
Mar 24 2024 11:35: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 g0/0/2
[R5-GigabitEthernet0/0/2]ip add 192.168.1.22 30
Mar 24 2024 11:35:53-08:00 R5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[R5-GigabitEthernet0/0/2]int g0/0/1
[R5-GigabitEthernet0/0/1]ip add 12.0.0.5 24
[R5-GigabitEthernet0/0/1]
Mar 24 2024 11:36:25-08:00 R5 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R5-GigabitEthernet0/0/1]int l0
[R5-LoopBack0]ip add 192.168.1.161 27
[R5-LoopBack0]quit
[R5]dis ip inter br	
[R5]dis ip inter brief 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.18/30      up         up        
GigabitEthernet0/0/1              12.0.0.5/24          up         up        
GigabitEthernet0/0/2              192.168.1.22/30      up         up        
LoopBack0                         192.168.1.161/27     up         up(s)     
NULL0                             unassigned           up         up(s)  

R6

[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ip add 12.0.0.6 24
Mar 24 2024 11:38:19-08:00 R6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R6-GigabitEthernet0/0/0]int l0
[R6-LoopBack0]
[R6-LoopBack0]ip add 1.1.1.1 24
[R6-LoopBack0]quit
[R6]dis ip int br
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              12.0.0.6/24          up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         1.1.1.1/24           up         up(s)     
NULL0                             unassigned           up         up(s)

4.DHCP服务器配置

(1)开启DHCP服务
1.dhcp enable---激活
2.[r1]ip pool 名字---创建地址池
3.配置地址池
4.在接口选择全局配置
[R3]dhcp enable 
[R3]ip pool aaa
[R3-ip-pool-aaa]network 192.168.1.96 mask 27
[R3-ip-pool-aaa]gateway-list 192.168.1.97
[R3-ip-pool-aaa]q
[R3]int g 0/0/2
[R3-GigabitEthernet0/0/2]dhcp select global 

5.  内部网域实现全网通

R1

[R1]ip route-static 192.168.1.64 27 192.168.1.2
[R1]ip route-static 192.168.1.4 30 192.168.1.2
[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.10
[R1]ip route-static 192.168.1.160 27 192.168.1.10
[R1]ip route-static 192.168.1.160 27 192.168.1.2
[R1]ip route-static 192.168.1.20 30 192.168.1.10
[R1]ip route-static 192.168.1.20 30 192.168.1.2
[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.10
[R1]ip route-static 192.168.1.96 27 192.168.1.10
[R1]ip route-static 192.168.1.12 30 192.168.1.10

R2

[R2]ip route-static 192.168.1.128 27 192.168.1.6
[R2]ip route-static 192.168.1.16 30 192.168.1.6
[R2]ip route-static 192.168.1.160 27 192.168.1.6
[R2]ip route-static 192.168.1.20 30 192.168.1.6
[R2]ip route-static 192.168.1.12 30 192.168.1.6
[R2]ip route-static 192.168.1.96 27 192.168.1.6
[R2]ip route-static 192.168.1.96 27 192.168.1.1
[R2]ip route-static 192.168.1.8 30 192.168.1.1
[R2]ip route-static 192.168.1.32 27 192.168.1.1

R3

[R3]ip route-static 192.168.1.128 27 192.168.1.14 
[R3]ip route-static 192.168.1.16 30 192.168.1.14  
[R3]ip route-static 192.168.1.160 27 192.168.1.14  
[R3]ip route-static 192.168.1.20 30 192.168.1.14  
[R3]ip route-static 192.168.1.4 30 192.168.1.14
[R3]ip route-static 192.168.1.0 30 192.168.1.9
[R3]ip route-static 192.168.1.64 27 192.168.1.9  
[R3]ip route-static 192.168.1.64 30 192.168.1.14
[R3]ip route-static 192.168.1.32 27 192.168.1.9  

R4

[R4]ip route-static 192.168.1.160 27 192.168.1.18
[R4]ip route-static 192.168.1.160 27 192.168.1.22
[R4]ip route-static 192.168.1.96 27 192.168.1.13
[R4]ip route-static 192.168.1.8 30 192.168.1.13
[R4]ip route-static 192.168.1.32 27 192.168.1.13
[R4]ip route-static 192.168.1.32 27 192.168.1.5
[R4]ip route-static 192.168.1.0 30 192.168.1.5
[R4]ip route-static 192.168.1.64 27 192.168.1.5


6防环路径

[R1]ip route-static 192.168.1.32 27 Null 0

[R2]ip route-static 192.168.1.64 27 Null 0

[R4]ip route-static 192.168.1.128 27 Null 0

7.在R5上配置nat协议

[R5]acl 2000
[R5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[R5-acl-basic-2000]q
[R5]int g 0/0/1
[R5-GigabitEthernet0/0/1]nat outbound 2000

8.R1上启动Telnet

[R1]aaa
[R1-aaa]local-user dameiza privilege level 15 password cipher 123456
[R1-aaa]quit
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa

9.R5的nat映射配置

[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]nat server protocol  tcp global current-interface 24 in
side 192.168.1.1 24
Warning:The port 24 is well-known port. If you continue it may cause function fa
ilure.
Are you sure to continue?[Y/N]:y

实验结果

内网可通

pc获取ip

R6telnet R5,能否登入到r1(不太行)

  • 18
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

艾44

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值