赞
踩
1、全网用192.168.1/24进行IP地址分配
2、R5作为DHCP服务器为pc分配IP地址
3、路由上均具备2个环回地址
4、R4与R5之间正常走1000M,备份走100M
5、全网尽量负载均衡
6、减少路由表数量,并避免环路产生
7、全网可达
1、总共需要14个网段,所以需要拿4位主机位;
2、不能直接编写到达静态路由,所以需要做缺省路由;
3、尽量减少路由表的路透条目,所以需要进行汇总;
4、R4与R5之间,需要配置浮动静态,即修改优先级。
<Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]sysname r1 [r1]interface g0/0/0 [r1-GigabitEthernet0/0/0]ip address 192.168.1.1 28 Mar 15 2023 14:54:13-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 address 192.168.1.33 28 Mar 15 2023 14:54:50-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]dis [r1-GigabitEthernet0/0/1]display ip interface brief *down: administratively down ^down: standby (l): loopback (s): spoofing The number of interface that is UP in Physical is 3 The number of interface that is DOWN in Physical is 1 The number of interface that is UP in Protocol is 3 The number of interface that is DOWN in Protocol is 1 Interface IP Address/Mask Physical Protocol GigabitEthernet0/0/0 192.168.1.1/28 up up GigabitEthernet0/0/1 192.168.1.33/28 up up GigabitEthernet0/0/2 unassigned down down NULL0 unassigned up up(s)
<Huawei>sys [Huawei]sysname r2 [r2]interface g0/0/0 [r2-GigabitEthernet0/0/0]ip address 192.168.1.2 28 [r2-GigabitEthernet0/0/0]int g0/0/1 [r2-GigabitEthernet0/0/1]ip address 192.168.1.17 28 [r2-GigabitEthernet0/0/1]display ip interface brief down: administratively down ^down: standby (l): loopback (s): spoofing The number of interface that is UP in Physical is 3 The number of interface that is DOWN in Physical is 1 The number of interface that is UP in Protocol is 3 The number of interface that is DOWN in Protocol is 1 Interface IP Address/Mask Physical Protocol GigabitEthernet0/0/0 192.162.1.17/28 up up GigabitEthernet0/0/1 192.168.1.17/28 up up GigabitEthernet0/0/2 unassigned down down NULL0 unassigned up up(s)
[Huawei]sysname r3 [r3]interface g0/0/0 [r3-GigabitEthernet0/0/0]ip address 192.168.1.35 28 Mar 15 2023 15:20:27-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.49 28 Mar 15 2023 15:21:00-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]display ip interface brief *down: administratively down ^down: standby (l): loopback (s): spoofing The number of interface that is UP in Physical is 3 The number of interface that is DOWN in Physical is 1 The number of interface that is UP in Protocol is 3 The number of interface that is DOWN in Protocol is 1 Interface IP Address/Mask Physical Protocol GigabitEthernet0/0/0 192.168.1.35/28 up up GigabitEthernet0/0/1 192.168.1.49/28 up up GigabitEthernet0/0/2 unassigned down down NULL0 unassigned up up(s)
<Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]sysname r4 [r4]interface g0/0/0 [r4-GigabitEthernet0/0/0]ip address 192.168.1.18 28 [r4-GigabitEthernet0/0/0] Mar 15 2023 15:22: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 add 192.168.1.50 28 [r4-GigabitEthernet0/0/1] Mar 15 2023 15:23:31-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.65 28 [r4-GigabitEthernet0/0/2] Mar 15 2023 15:23:58-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.181 28 [r4-GigabitEthernet4/0/0] Mar 15 2023 15:25:24-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]display ip interface brief *down: administratively down ^down: standby (l): loopback (s): spoofing The number of interface that is UP in Physical is 5 The number of interface that is DOWN in Physical is 0 The number of interface that is UP in Protocol is 5 The number of interface that is DOWN in Protocol is 0 Interface IP Address/Mask Physical Protocol GigabitEthernet0/0/0 192.168.1.18/28 up up GigabitEthernet0/0/1 192.168.1.50/28 up up GigabitEthernet0/0/2 192.168.1.65/28 up up GigabitEthernet4/0/0 192.168.1.181/28 up up NULL0 unassigned up up(s)
Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]sysname r5 [r5]int g0/0/0 [r5-GigabitEthernet0/0/0]ip add 192.168.1.66 28 Mar 15 2023 15:28:23-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 add 192.168.1.82 28 Mar 15 2023 15:28:44-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]display ip interface brief *down: administratively down ^down: standby (l): loopback (s): spoofing The number of interface that is UP in Physical is 4 The number of interface that is DOWN in Physical is 0 The number of interface that is UP in Protocol is 3 The number of interface that is DOWN in Protocol is 1 Interface IP Address/Mask Physical Protocol GigabitEthernet0/0/0 192.168.1.66/28 up up GigabitEthernet0/0/1 192.168.1.82/28 up up GigabitEthernet0/0/2 unassigned up down NULL0 unassigned up up(s)
r1]int Loop
[r1]int LoopBack 0
[r1-LoopBack0]ip add 192.168.1.97 28
[r1-LoopBack0]q
[r1]int loop
[r1]int LoopBack 1
[r1-LoopBack1]ip add 192.168.1.113 28
[r1-LoopBack1]q
[r1]disp
[r1]display curr
[r1]display current-configuration
R2
[r2]interface LoopBack 4
[r2-LoopBack4]ip address 192.168.1.161 28
[r2-LoopBack4]q
[r2]interface LoopBack 5
[r2-LoopBack5]ip address 192.168.1.177 28
[r2-LoopBack5]q
[r2]display current-configuration
R3
[r3]interface LoopBack 2
[r3-LoopBack2]ip address 192.168.1.129 28
[r3-LoopBack2]q
[r3]interface LoopBack 3
[r3-LoopBack3]ip address 192.168.1.145 28
[r3-LoopBack3]display current-configuration
[r4]interface LoopBack 6
[r4-LoopBack6]ip address 192.168.1.193 28
[r4-LoopBack6]q
[r4]interface LoopBack 7
[r4-LoopBack7]ip address 192.168.1.209 28
[r4-LoopBack7]display current-configuration
[r5]interface LoopBack 8
[r5-LoopBack8]ip address 5.5.5.1 24
[r5-LoopBack8]display current-configuration
[r1]ip route-static 192.168.1.16 28 192.168.1.2 [r1]ip route-static 192.168.1.48 28 192.168.1.35 //负载均衡 [r1]ip route-static 192.168.1.64 27 192.168.1.2 [r1]ip route-static 192.168.1.64 27 192.168.1.35 //缺省路由 [r1]ip route-static 0.0.0.0 0 192.168.1.2 //回环的静态路由 [r1]ip route-static 192.168.1.160 27 192.168.1.2 //L4和L5 [r1]ip route-static 192.168.1.128 27 192.168.1.35 //L2和L3 [r1]ip route-static 192.168.1.192 27 192.168.1.2 //L6和L7 [r1]display ip routing-table //查看路由表
[r2]ip route-static 192.168.1.32 27 192.168.1.1 [r2]ip route-static 192.168.1.64 27 192.168.1.18 //缺省路由 [r2]ip route-static 0.0.0.0 0 192.168.1.18 //回环的静态路由 [r2]ip route-static 192.168.1.96 27 192.168.1.1 // L0和L1 [r2]ip route-static 192.168.1.128 27 192.168.1.1 //L2和L3 [r2]ip route-static 192.168.1.192 27 192.168.1.18 //L6和L7 [r2]display ip routing-table
[r3]ip route-static 192.168.1.0 27 192.168.1.50
[r3]ip route-static 192.168.1.64 27 192.168.1.50
//缺省路由
[r3]ip route-static 0.0.0.0 0 192.168.1.50
//回环的静态路由
[r3]ip route-static 192.168.1.96 27 192.168.1.33 // L0和L1
[r3]ip route-static 192.168.1.192 27 192.168.1.50 //L4和L5
[r3]ip route-static 192.168.1.160 27 192.168.1.33 //L2和L3
[r3]display ip routing-table
[r4]ip route-static 192.168.1.0 28 192.168.1.17 [r4]ip route-static 192.168.1.32 28 192.168.1.49 //回环的静态路由 [r4]ip route-static 192.168.1.96 27 192.168.1.17 // L0和L1 [r4]ip route-static 192.168.1.160 27 192.168.1.17 //L4和L5 [r4]ip route-static 192.168.1.128 27 192.168.1.49 //L2和L3 //缺省路由 [r4]ip route-static 0.0.0.0 0 192.168.1.66 [r4]ip route-static 0.0.0.0 0 192.168.1.82 preference 61 //设置优先级 [r4]display ip routing-table
[r5]ip route-static 192.168.1.32 27 192.168.1.65 [r5]ip route-static 192.168.1.32 27 192.168.1.81 preference 61
//192.168.1.65为1000M的, 192.168.1.81 为100M的,以下同理
[r5]ip route-static 192.168.1.0 27 192.168.1.65 [r5]ip route-static 192.168.1.0 27 192.168.1.81 preference 61
//回环的静态路由
[r5]ip route-static 192.168.1.96 27 192.168.1.65 //L1和L2
[r5]ip route-static 192.168.1.96 27 192.168.1.81 preference 61
[r5]ip route-static 192.168.1.160 27 192.168.1.65 //L4和L5
[r5]ip route-static 192.168.1.160 27 192.168.1.81 preference 61
[r5]ip route-static 192.168.1.128 27 192.168.1.65 //L2和L3
[r5]ip route-static 192.168.1.128 27 192.168.1.81 preference 61
[r5]ip route-static 192.168.1.192 27 192.168.1.65 //L6和L7
[r5]ip route-static 192.168.1.192 27 192.168.1.81 preference 61
[r1]ip route-static 192.168.1.96 27 NULL 0
[r2]ip route-static 192.168.1.160 27 NULL 0
[r3]ip route-static 192.168.1.128 27 NULL 0
[r4]ip route-static 192.168.1.192 27 NULL 0
[r5]interface g0/0/2 [r5-GigabitEthernet0/0/2]ip address 192.168.2.1 24 Mar 15 2023 16:46:52-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/2 has entered the UP state. [r5-GigabitEthernet0/0/2]q [r5]dhcp enable Info: The operation may take a few seconds. Please wait for a moment.done. [r5]ip pool shazi Info: It's successful to create an IP address pool. [r5-ip-pool-shazi]dns [r5-ip-pool-shazi]dns-list 8.8.8.8 114.114.114.114 [r5-ip-pool-shazi]q [r5]interface g0/0/2 [r5-GigabitEthernet0/0/2]dhcp select global [r5-GigabitEthernet0/0/2]display ip pool ----------------------------------------------------------------------- Pool-name : shazi Pool-No : 0 Position : Local Status : Unlocked Gateway-0 : 192.168.2.1 Mask : - VPN instance : -- IP address Statistic Total :0 Used :0 Idle :0 Expired :0 Conflict :0 Disable :0
R1ping R5的回环地址
R2ping R5的回环地址
R3ping R5的回环地址
R4ping R5的回环地址
R5ping
在R5ping192.168.1.17的同时,在R4上断掉g0/0/2口
R4:
[r4]interface g0/0/2
[r4-GigabitEthernet0/0/2]shutdown
显示R5的接口G0/0/0 down
在R2的G0/0/1上抓包看
R5ping
在R5ping192.168.1.17的同时,在R4上断掉g0/0/2口
R4:
[r4]interface g0/0/2
[r4-GigabitEthernet0/0/2]shutdown
R5:
显示R5的接口G0/0/0 down
在R2的G0/0/1上抓包看
一开始是从192.168.1.66传输,也就是1000M的路线,后面1000Mshutdown,从192.168.1.82开始传输,也就是100M的
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。