IA总实验

实验题目

 第一步先划分路由

把划分好的结果写入图中

先配置一下各个接口的路由(注意例如r1 第一个32不能用得从第二个开始)

 r1配置

第一步配置

[ r1]int LoopBack 0
[r1-LoopBack0]ip address 192.168.1.33 28
[r3-LoopBack0]ip address 192.168.1.49 28

[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.5 30

第二步写缺省路由:

ip route-static 0.0.0.0 0.0.0.0 192.168.1.2
ip route-static 0.0.0.0 0.0.0.0 192.168.1.6

第三步用静态下一跳方式使处r6以外的网络联通

ip route-static 192.168.1.8 255.255.255.252 192.168.1.2
ip route-static 192.168.1.12 255.255.255.252 192.168.1.6
ip route-static 192.168.1.64 255.255.255.224 192.168.1.2
ip route-static 192.168.1.96 255.255.255.224 192.168.1.6

避免成环

ip route-static 192.168.1.32 255.255.255.224 NULL0
第四步打开远程登陆

[r1]aaa
[r1-aaa]local-user zzz privilege level 15 password cipher 12345
Info: Add a new user.
[r1-aaa]local-user xx service-type telnet
调⽤
[r1]user-interface vty 0 4
[r1-ui-vty0-4]authentication-mode aaa
ping通r6的环回

 

 r2配置

第一步配置

[r2]int LoopBack 0
[r2-LoopBack0]ip address 192.168.1.65 28
[r2-LoopBack0]ip address 192.168.1.81 28

[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.1.9 30

第二步写缺省路由:

[r2]ip route-static 0.0.0.0 0 192.168.1.10

第三步用静态下一跳方式使处r6以外的网络联通

ip route-static 192.168.1.4 255.255.255.252 192.168.1.1
ip route-static 192.168.1.32 255.255.255.224 192.168.1.1

ip route-static 192.168.1.96 255.255.255.224 192.168.1.1
ip route-static 192.168.1.96 255.255.255.224 192.168.1.10
避免成环

ip route-static 192.168.1.64 255.255.255.224 NULL0

r3配置

第一步配置

[r3]int g0/0/2
[r3-GigabitEthernet0/0/2]ip address 192.168.1.97 27
[r3-GigabitEthernet0/0/2]int g0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.13 30

第二步:使r3下两台电脑自动获取ip


[r3]dhcp enable 
[r3]ip pool 1
[r3-ip-pool-1]network 192.168.1.96 mask 27
[r3-ip-pool-1]gateway-list 192.168.1.97
[r3-ip-pool-1]dns 8.8.8.8
[r3]int g0/0/2
[r3-GigabitEthernet0/0/2]dhcp select global 

第三步写缺省路由:

[r3]ip route-static 0.0.0.0 0 192.168.1.14

第三步用静态下一跳方式使处r6以外的网络联通
[r3]ip route-static 192.168.1.32 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.64 27 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.14

r3登录r1

 

r4配置

第一步配置

[r4]int LoopBack 0
[r4-LoopBack0]ip address 192.168.1.129 28
[r4-LoopBack0]ip address 192.168.1.145 28

 interface GigabitEthernet0/0/0
 ip address 192.168.1.10 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 192.168.1.14 255.255.255.252 
#
interface GigabitEthernet0/0/2
 ip address 192.168.1.17 255.255.255.252 
#
interface GigabitEthernet4/0/0
 ip address 192.168.1.21 255.255.255.252 

第二步写缺省路由:

ip route-static 0.0.0.0 0.0.0.0 192.168.1.18
ip route-static 0.0.0.0 0.0.0.0 192.168.1.22 preference 61

第三步用静态下一跳方式使处r6以外的网络联通

ip route-static 192.168.1.0 255.255.255.252 192.168.1.9
ip route-static 192.168.1.4 255.255.255.252 192.168.1.13
ip route-static 192.168.1.32 255.255.255.224 192.168.1.9
ip route-static 192.168.1.32 255.255.255.224 192.168.1.13
ip route-static 192.168.1.64 255.255.255.224 192.168.1.9
ip route-static 192.168.1.96 255.255.255.224 192.168.1.13
避免成环

ip route-static 192.168.1.128 255.255.255.224 NULL0


r5配置

第一步配置

interface GigabitEthernet0/0/0
 ip address 192.168.1.18 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 56.1.1.1 255.255.255.0 

interface GigabitEthernet0/0/2

ip address 192.168.1.22 255.255.255.252 

interface LoopBack0
 ip address 192.168.1.161 255.255.255.224 

第二步写缺省路由:

ip route-static 0.0.0.0 0.0.0.0 56.1.1.2

第三步用静态下一跳方式使处r6以外的网络联通

[r5]ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 p 61
[r5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 p 61
[r5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 p 61
[r5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 p 61
[r5]ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 p 61
[r5]ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 p 61
[r5]ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 p 61
[r5]ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 p61

ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 p 61
ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 p 61
ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 p 61
ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 p 61
ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 p 61
ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 p 61
ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 p 61
ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 p61
 

第四步做nat使内网可以和r6联通

[r5]acl 2000
[r5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r5-acl-basic-2000]int g0/0/1
[r5-GigabitEthernet0/0/1]nat outbound 2000

第五步做端口映射 使r6登录23端口可以登录到r1上
[r5]int g0/0/1  
[r5-GigabitEthernet0/0/1]nat  server protocol tcp global current-interface 23 in
side 192.168.1.33 23
Warning:The port 23 is well-known port. If you continue it may cause function fa
ilure.
Are you sure to continue?[Y/N]:y

 

r6配置

第一步配置

[r6]interface LoopBack 0
[r6-LoopBack0]ip address 6.6.6.6 24
[r6-LoopBack0]int g0/0/0
[r6-GigabitEthernet0/0/0]ip address 56.1.1.2 24

R6telnetR5的公有IP地址时,实际登陆到R1上

 

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值