静态路由实验

 要求

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

1,为R14接口配置ip地址

2,划分网段:

192.168.1.0/27-骨干                                        192.168.1.32/27--R1环回

              192.168.1.0/30--R1-R2                                        192.168.1.32/30

              192.168.1.4/30--R1-R3                                        192.168.1.48/30

              192.168.1.8/30--R2-R4                            192.168.1.64/27--R2环回

             192.168.1.12/30--R3-R4                                        192.168.1.64/28

              192.168.1.16/30--R4-R5                                        192.168.1.80/28

              192.168.1.20/30--R4-R5                           192.168.1.96/27--R4环回

              192.168.1.24/30                                                      192.168.1.96/28

              192.168.1.28/30                                                       192.168.1.112/28

                                                                           192.168.1.128/27--R5环回

                                                                           192.168.1.160/27--R3环回

                                                                           192.168.1.129/27

                                                                            192.168.1.224/27

3,对接口配置IP:

4,向R3配置dhcp服务:

[r3]ip pool 1                         

[r3-ip-pool-1]network 192.168.1.160 mask 27

[r3-ip-pool-1]gateway-list 192.168.1.161  

[r3]interface g0/0/0

[r3-GigabitEthernet0/0/0]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.160 27 192.168.1.6

[r1]ip route-static 0.0.0.0 0 192.168.1.2

[r1]ip route-static 0.0.0.0 0 192.168.1.6

[r1]ip route-static 192.168.1.8 30 192.168.1.2

[r1]ip route-static 192.168.1.12 30 192.168.1.6

配置缺省路由,还配置其他路由原因:使链路最优 

R2:

[r2]ip route-static 0.0.0.0 0 192.168.1.10

[r2]ip route-static 192.168.1.32 27 192.168.1.1

[r2]ip route-static 192.168.1.4 30 192.168.1.1

[r2]ip route-static 192.168.1.160 27 192.168.1.1

[r2]ip route-static 192.168.1.160 27 192.168.1.10

R3:

[r3]ip route-static 0.0.0.0 0 192.168.1.14

[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

R4:

[r4]ip route-static 0.0.0.0 0 192.168.1.18

[r4]ip route-static 0.0.0.0 0 192.168.1.22 pr

[r4]ip route-static 0.0.0.0 0 192.168.1.22 preference 99

[r4]ip route-static 192.168.1.64 27 192.168.1.9

[r4]ip route-static 192.168.1.0 30 192.168.1.9

[r4]ip route-static 192.168.1.32 27 192.168.1.9

[r4]ip route-static 192.168.1.160 27 192.168.1.13

[r4]ip route-static 192.168.1.4 30 192.168.1.13

[r4]ip route-static 192.168.1.32 27 192.168.1.13

 R5:

[r5]ip route-static 0.0.0.0 0 12.0.0.2

[r5]ip route-static 192.168.1.0 24 192.168.1.21   

[r5]ip route-static 192.168.1.0 24 192.168.1.21 preference 99

防环:

R1:

[r1]ip route-static 192.168.1.32 27 NULL 0 

R2:

[r2]ip route-static 192.168.1.64 27 NULL 0 

R3:

[r3]ip route-static 192.168.1.160 27 NULL 0 

R4:

[r4]ip route-static 192.168.1.96 27 NULL  0 

R5:

[r5]ip route-static 192.168.1.128 27 NULL 0

[r5]ip route-static 192.168.1.24 29 NULL 0

[r5]ip route-static 192.168.1.192 26 NULL 0

6, R5做nat转换,访问公网:

[r5]acl 2000

[r5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255

[r5-GigabitEthernet0/0/1]nat outbound 2000

7,R5:

[r5]interface g0/0/1

[r5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface telnet inside 192.168.1.1 telnet

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

 R1:

[r1]user-interface vty 0 4

[r1-ui-vty0-4]authentication-mode aaa

[r1]aaa

[r1-aaa]local-user aaa password cipher 123

Info: Add a new user.

[r1-aaa]local-user aa privilege  level 15

Info: Add a new user.

[r1-aaa]local-user aa service-type telnet

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值