当前位置:网站首页>Network topology example 12: static routing for routing load sharing

Network topology example 12: static routing for routing load sharing

2020-12-08 09:57:16 Nankong City

Networking graph

    

Introduction to static routing

Networking requirements

  • Pictured 1 Shown ,PC1 and PC2 adopt 4 platform Switch Connected to a , You can see from the topological diagram that , Data from PC1 To PC2 There are two ways to get to , Namely PC1-SwitchA-SwitchB-SwitchC-PC2 and PC1-SwitchA-SwitchD-SwitchC-PC2, In order to use the link effectively , Demand from PC1 To PC2 The data flow of is evenly distributed to two links , And when one link fails, the data flow will automatically switch to another link .

Configuration ideas

  • 1. establish VLAN And configure the interfaces VLAN, Configure each VLANIF Interface IP Address .
  • 2. Configure static routing of data flow back and forth in two directions .
  • 3. Configure... On each host IP Address and default gateway .

Operation steps

  • 1. Configure the interfaces VLAN

  # To configure SwitchA.SwitchB、SwitchC and SwitchD Configuration and SwitchA similar , I won't repeat .

<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 10 100 400
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type access
[SwitchA-GigabitEthernet0/0/1] port default vlan 10
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type trunk
[SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 100
[SwitchA-GigabitEthernet0/0/2] quit
[SwitchA] interface gigabitethernet 0/0/3
[SwitchA-GigabitEthernet0/0/3] port link-type trunk
[SwitchA-GigabitEthernet0/0/3] port trunk allow-pass vlan 400
[SwitchA-GigabitEthernet0/0/3] quit
  •  2. Configure each VLANIF Interface IP Address

  # To configure SwitchA.SwitchB、SwitchC and SwitchD Configuration and SwitchA similar , I won't repeat .

[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 10.1.1.1 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 100
[SwitchA-Vlanif100] ip address 192.168.12.1 24
[SwitchA-Vlanif100] quit
[SwitchA] interface vlanif 400
[SwitchA-Vlanif400] ip address 192.168.14.1 24
[SwitchA-Vlanif400] quit
  •  3. To configure PC1–PC2 The static route to the destination

  # To configure SwitchA, Configure two equivalent static routes , The next jump points to SwitchB and SwitchD, In this way, the load sharing of the flow to the destination can be realized .

[SwitchA] ip route-static 10.1.2.0 24 192.168.12.2
[SwitchA] ip route-static 10.1.2.0 24 192.168.14.2

   # To configure SwitchB.

[SwitchB] ip route-static 10.1.2.0 24 192.168.23.2

   # To configure SwitchD.

[SwitchD] ip route-static 10.1.2.0 24 192.168.34.1
  •  4. To configure PC1–PC2 Static routing of backhaul

  # To configure SwitchC, Configure two equivalent static routes , The next jump points to SwitchB and SwitchD, In this way, the load sharing of return flow can be realized .

[SwitchC] ip route-static 10.1.1.0 24 192.168.23.1
[SwitchC] ip route-static 10.1.1.0 24 192.168.34.2

   # To configure SwitchB.

[SwitchB] ip route-static 10.1.1.0 24 192.168.12.1

   # To configure SwitchD.

[SwitchD] ip route-static 10.1.1.0 24 192.168.14.1
  •  5. Configure the host

   Configure the host PC1 Of IP The address is 10.1.1.2/24, The default gateway is 10.1.1.1; Configure the host PC2 Of IP The address is 10.1.2.2, The default gateway is 10.1.2.1.

  • 6. Verify configuration results

  # see SwitchA Of IP Routing table .

[SwitchA] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 9        Routes : 10       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

       10.1.1.0/24  Direct  0    0           D   10.1.1.1        Vlanif10
       10.1.1.1/32  Direct  0    0           D   127.0.0.1       Vlanif10
       10.1.2.0/24  Static  60   0          RD   192.168.12.2    Vlanif100
                    Static  60   0          RD   192.168.14.2    Vlanif400
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
   192.168.12.0/24  Direct  0    0           D   192.168.12.1    Vlanif100
   192.168.12.1/32  Direct  0    0           D   127.0.0.1       Vlanif100
   192.168.14.0/24  Direct  0    0           D   192.168.14.1    Vlanif400
   192.168.14.1/32  Direct  0    0           D   127.0.0.1       Vlanif400

    from SwitchA Of IP You can see in the routing table , arrive 10.1.2.0/24 This segment has two equivalent routes , In this case, the data flow will be evenly distributed to two different links , That is to realize the load sharing of traffic .

 

版权声明
本文为[Nankong City]所创,转载请带上原文链接,感谢
https://chowdera.com/2020/12/20201208095645753k.html