静态路由实验

例图:

 

 要求:

1.  全网可达 192.168.1.0/ 24进行IP地址分配。

2.  R5作为DHCP服务器为pc分配IP地址。

3. 路由上均具备2个环回地址。

4. R4与R5之间正常走1000M,备用走100M。

5. 全网尽量负载均衡。

6. 减少路由表数量,并避免环路产生。

7. 全网可达

分析

1.子网划分和汇总。

2.配置接口IP。

3.配置每个路由器的两个回环。

4.开启dhcp并配置。

5.缺省路由。(左到右缺省、右到左汇总、剩下的精细)

 

配置:

AR1配置:

[r1]int g0/0/0       //配接口IP
[r1-GigabitEthernet0/0/0]ip ad	
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
Aug 16 2022 19:13:28-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 g0/0/1
[r1-GigabitEthernet0/0/1]ip ad	
[r1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
Aug 16 2022 19:14:01-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r1-GigabitEthernet0/0/1]int l 0         //配回环
[r1-LoopBack0]ip ad	
[r1-LoopBack0]ip address 192.168.1.33 28
[r1-LoopBack0]int l 1
[r1-LoopBack1]ip ad	
[r1-LoopBack1]ip address 192.168.1.49 28
[r1-LoopBack1]q
[r1]

[r1]ip route-s	      //配缺省
[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

AR2配置:

[r2]int g0/0/0           //配接口IP
[r2-GigabitEthernet0/0/0]ip ad	
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
Aug 16 2022 19:17:08-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 ad	
[r2-GigabitEthernet0/0/1]ip address 192.168.1.9 30
Aug 16 2022 19:17:30-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 l 0       //配回环
[r2-LoopBack0]ip ad	
[r2-LoopBack0]ip address 192.168.1.65 28
[r2-LoopBack0]int l 1
[r2-LoopBack1]ip ad	
[r2-LoopBack1]ip address 192.168.1.81 28
[r2-LoopBack1]q
[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向左配置
[r2]ip route-static 192.168.1.4 30 192.168.1.1
[r2]ip route-static 192.168.1.12 30 192.168.1.10
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.10
[r2]

AR3配置:

[r3]int g0/0/0           //配接口IP
[r3-GigabitEthernet0/0/0]ip ad	
[r3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
Aug 16 2022 19:20:11-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 ad	
[r3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
Aug 16 2022 19:20:23-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 l 0        //配回环
[r3-LoopBack0]
[r3-LoopBack0]ip ad	
[r3-LoopBack0]ip address 192.168.1.97 28
[r3-LoopBack0]int l 1
[r3-LoopBack1]ip ad	
[r3-LoopBack1]ip address 192.168.1.113 28
[r3-LoopBack1]q
[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向左配置
[r3]ip route-static 192.168.1.0 30 192.168.1.5
[r3]ip route-static 192.168.1.8 30 192.168.1.14
[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

AR4配置:

[r4]int g0/0/0        //配置接口IP
[r4-GigabitEthernet0/0/0]ip ad	
[r4-GigabitEthernet0/0/0]ip address 192.168.1.10 30
Aug 16 2022 19:21:57-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 ad	
[r4-GigabitEthernet0/0/1]ip address 192.168.1.14 30
Aug 16 2022 19:22:21-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 ad	
[r4-GigabitEthernet0/0/2]ip address 192.168.1.17 30
[r4-GigabitEthernet0/0/2]
Aug 16 2022 19:22:43-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 ad	
[r4-GigabitEthernet4/0/0]ip address 192.168.1.21 30
[r4-GigabitEthernet4/0/0]
Aug 16 2022 19:23:03-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 l 0     //配置环回
[r4-LoopBack0]ip ad	
[r4-LoopBack0]ip address 192.168.1.129 28
[r4-LoopBack0]int l 1
[r4-LoopBack1]ip ad	
[r4-LoopBack1]ip address 192.168.1.145 28
[r4-LoopBack1]q

[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 preference 90     //改优先级

[r4]ip route-static 192.168.1.64 27 192.168.1.9      //将R4向左配置
[r4]ip route-static 192.168.1.96 27 192.168.1.13
[r4]ip route-static 192.168.1.0 30 192.168.1.9
[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.9
[r4]ip route-static 192.168.1.32 27 192.168.1.13

AR5配置:

[r5]int g0/0/0         //配接口IP
[r5-GigabitEthernet0/0/0]ip ad	
[r5-GigabitEthernet0/0/0]ip address 192.168.1.18 30
Aug 16 2022 19:25:35-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/1
[r5-GigabitEthernet0/0/1]ip ad	
[r5-GigabitEthernet0/0/1]ip address 192.168.1.22 30
[r5-GigabitEthernet0/0/1]
Aug 16 2022 19:26:01-08:00 r5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r5-GigabitEthernet0/0/1]int g0/0/2
[r5-GigabitEthernet0/0/2]ip ad	
[r5-GigabitEthernet0/0/2]ip address 192.168.1.25 29
[r5-GigabitEthernet0/0/2]
Aug 16 2022 19:26:23-08:00 r5 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[r5-GigabitEthernet0/0/2]int l 0        //配回环
[r5-LoopBack0]ip ad	
[r5-LoopBack0]ip address 192.168.1.161 28
[r5-LoopBack0]int l 1
[r5-LoopBack1]ip ad	
[r5-LoopBack1]ip address 192.168.1.177 28
[r5-LoopBack1]q
[r5]

[r5]dhcp enable           //开启dhcp并配置
Info: The operation may take a few seconds. Please wait for a moment.done.
[r5]ip pool l
Info: It's successful to create an IP address pool.
[r5-ip-pool-l]nework 192.168.1.24 mask 29
[r5-ip-pool-l]gateway-list 192.168.1.25
[r5-ip-pool-l]dns-list 6.6.6.6
[r5-ip-pool-l]q
[r5]int g0/0/2
[r5-GigabitEthernet0/0/2]dhcp select global

[r5]ip route-static 192.168.1.0 24 192.168.1.17      //配汇总
[r5]ip route-static 192.168.1.0 24 192.168.1.21 preference 90    //改优先级   


结果

全网可达

 

 

 

 

 

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值