静态路由配置

 2.1配置路由器R1

[r1]int l0
[r1-LoopBack0]ip address 192.168.1.2 28
[r1-LoopBack0]int l1
[r1-LoopBack1]ip address 192.168.1.18 28

[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.33 28
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.49 28

         2.2配置路由器R2

[r2]int l0
[r2-LoopBack0]ip address 192.168.1.66 28
[r2-LoopBack0]int l1
[r2-LoopBack1]ip address 192.168.1.82 28

[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.34 28
[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.1.129 28

         2.3配置路由器R3

[r3]int l0
[r3-LoopBack0]ip address 192.168.1.98 28
[r3-LoopBack0]int l1
[r3-LoopBack1]ip address 192.168.1.114 28

[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.50 28
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.145 28

         2.4配置路由器R4

[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.146 28 
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.130 28
[r4-GigabitEthernet0/0/1]int g0/0/2
[r4-GigabitEthernet0/0/2]ip address 192.168.1.193 28
[r4-GigabitEthernet0/0/2]int g4/0/0
[r4-GigabitEthernet4/0/0]ip address 192.168.1.209 28
[r4-GigabitEthernet4/0/0]int l0
[r4-LoopBack0]ip address 192.168.1.162 28
[r4-LoopBack0]int l1
[r4-LoopBack1]ip address 192.168.1.178 28

         2.5配置路由器R5

[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.194 28
[r5-GigabitEthernet0/0/0]int g0/0/1
[r5-GigabitEthernet0/0/1]ip address 192.168.1.210 28
[r5-GigabitEthernet0/0/1]int l0
[r5-LoopBack0]ip address 5.5.5.5 24

配置静态、缺省路由

        3.1配置R1

[r1]ip route-static 0.0.0.0 0 192.168.1.34
[r1]ip route-static 0.0.0.0 0 192.168.1.50
[r1]ip route-static 192.168.1.81 28 192.168.1.34
[r1]ip route-static 192.168.1.65 28 192.168.1.34
[r1]ip route-static 192.168.1.129 28 192.168.1.34
[r1]ip route-static 192.168.1.177 28 192.168.1.34
[r1]ip route-static 192.168.1.161 28 192.168.1.34
[r1]ip route-static 192.168.1.193 28 192.168.1.34
[r1]ip route-static 192.168.1.209 28 192.168.1.34 preference 61

[r1]ip route-static 192.168.1.97 28 192.168.1.50
[r1]ip route-static 192.168.1.113 28 192.168.1.50
[r1]ip route-static 192.168.1.145 28 192.168.1.50
[r1]ip route-static 192.168.1.161 28 192.168.1.50
[r1]ip route-static 192.168.1.177 28 192.168.1.50
[r1]ip route-static 192.168.1.193 28 192.168.1.50
[r1]ip route-static 192.168.1.209 28 192.168.1.50 preference 61       

        3.2配置R2

[r2]ip route-static 0.0.0.0 0 192.168.1.130
[r2]ip route-static 192.168.1.161 28 192.168.1.130
[r2]ip route-static 192.168.1.177 28 192.168.1.130
[r2]ip route-static 192.168.1.193 28 192.168.1.130
[r2]ip route-static 192.168.1.209 28 192.168.1.130 preference 61
[r2]ip route-static 192.168.1.145 28 192.168.1.130
[r2]ip route-static 192.168.1.97 28 192.168.1.130
[r2]ip route-static 192.168.1.113 28 192.168.1.130

[r2]ip route-static 192.168.1.97 28 192.168.1.33
[r2]ip route-static 192.168.1.113 28 192.168.1.33
[r2]ip route-static 192.168.1.49 28 192.168.1.33
[r2]ip route-static 192.168.1.1 28 192.168.1.33
[r2]ip route-static 192.168.1.17 28 192.168.1.33

        3.3配置R3

[r3]ip route-static 0.0.0.0 0 192.168.1.146
[r3]ip route-static 192.168.1.177 28 192.168.1.146
[r3]ip route-static 192.168.1.168 28 192.168.1.146
[r3]ip route-static 192.168.1.193 28 192.168.1.146
[r3]ip route-static 192.168.1.209 28 192.168.1.146 preference 61
[r3]ip route-static 192.168.1.129 28 192.168.1.146
[r3]ip route-static 192.168.1.81 28 192.168.1.146
[r3]ip route-static 192.168.1.65 28 192.168.1.146

[r3]ip route-static 192.168.1.81 28 192.168.1.49
[r3]ip route-static 192.168.1.65 28 192.168.1.49
[r3]ip route-static 192.168.1.33 28 192.168.1.49
[r3]ip route-static 192.168.1.1 28 192.168.1.49
[r3]ip route-static 192.168.1.17 28 192.168.1.49

        3.4配置R4

[r4]ip route-static 0.0.0.0 0 192.168.1.194
[r4]ip route-static 0.0.0.0 0 192.168.1.210 preference 61
[r4]ip route-static 192.168.1.97 28 192.168.1.145
[r4]ip route-static 192.168.1.113 28 192.168.1.145
[r4]ip route-static 192.168.1.49 28 192.168.1.145
[r4]ip route-static 192.168.1.17 28 192.168.1.145
[r4]ip route-static 192.168.1.1 28 192.168.1.145
[r4]ip route-static 192.168.1.17 28 192.168.1.129
[r4]ip route-static 192.168.1.1 28 192.168.1.129
[r4]ip route-static 192.168.1.33 28 192.168.1.129
[r4]ip route-static 192.168.1.81 28 192.168.1.129
[r4]ip route-static 192.168.1.65 28 192.168.1.129

        3.5配置R5

[r5]ip route-static 0.0.0.0 0 NULL 0
[r5]ip route-static 192.168.1.161 28 192.168.1.193
[r5]ip route-static 192.168.1.177 28 192.168.1.193
[r5]ip route-static 192.168.1.129 28 192.168.1.193
[r5]ip route-static 192.168.1.145 28 192.168.1.193
[r5]ip route-static 192.168.1.113 28 192.168.1.193
[r5]ip route-static 192.168.1.97 28 192.168.1.193
[r5]ip route-static 192.168.1.81 28 192.168.1.193
[r5]ip route-static 192.168.1.65 28 192.168.1.193
[r5]ip route-static 192.168.1.49 28 192.168.1.193
[r5]ip route-static 192.168.1.33 28 192.168.1.193
[r5]ip route-static 192.168.1.17 28 192.168.1.193
[r5]ip route-static 192.168.1.1 28 192.168.1.193
[r5]ip route-static 192.168.1.1 28 192.168.1.209 preference 61
[r5]ip route-static 192.168.1.17 28 192.168.1.209 preference 61
[r5]ip route-static 192.168.1.33 28 192.168.1.209 preference 61
[r5]ip route-static 192.168.1.49 28 192.168.1.209 preference 61
[r5]ip route-static 192.168.1.65 28 192.168.1.209 preference 61
[r5]ip route-static 192.168.1.81 28 192.168.1.209 preference 61
[r5]ip route-static 192.168.1.97 28 192.168.1.209 preference 61
[r5]ip route-static 192.168.1.113 28 192.168.1.209 preference 61
[r5]ip route-static 192.168.1.129 28 192.168.1.209 preference 61
[r5]ip route-static 192.168.1.145 28 192.168.1.209 preference 61
[r5]ip route-static 192.168.1.161 28 192.168.1.209 preference 61
[r5]ip route-static 192.168.1.177 28 192.168.1.209 preference 61

  • 19
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值