hpe:switch:5800:configuring_static_routing
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
hpe:switch:5800:configuring_static_routing [2021/06/09 16:42] – aperez | hpe:switch:5800:configuring_static_routing [2021/06/09 17:40] (current) – aperez | ||
---|---|---|---|
Line 6: | Line 6: | ||
Before configuring a static route, understand the following concepts: | Before configuring a static route, understand the following concepts: | ||
- | Destination address and mask: In the ip route-static command, an IPv4 address is in dotted decimal format and a mask can be either in dotted decimal format or in the form of mask length (the number of consecutive 1s in the mask). | + | **Destination address and mask:** In the ip route-static command, an IPv4 address is in dotted decimal format and a mask can be either in dotted decimal format or in the form of mask length (the number of consecutive 1s in the mask). |
- | Output interface and next hop address: When configuring a static route, specify either the output interface or the next hop address, or both depending on the specific occasion. The next hop address cannot be a local interface IP address or the route configuration does not take effect. | + | **Output interface and next hop address:** When configuring a static route, specify either the output interface or the next hop address, or both depending on the specific occasion. The next hop address cannot be a local interface IP address or the route configuration does not take effect. |
In fact, each route lookup operation has to find the next hop to resolve the destination link layer address. | In fact, each route lookup operation has to find the next hop to resolve the destination link layer address. | ||
Line 14: | Line 14: | ||
When specifying the output interface: | When specifying the output interface: | ||
- | * Unordered List ItemIf | + | * If the output interface is a Null 0 interface, there is no need to configure the next hop address. |
- | * Unordered List ItemIf | + | * If the user specifies a broadcast interface (such as VLAN interface) as the output interface, the user must specify the corresponding next hop for the output interface. |
- | Other attributes: The user can configure different priorities for different static routes so that route management policies can be more flexible. For example, specifying the same priority for different routes to the same destination enables load sharing, but specifying different priorities for these routes enables route backup. | + | **Other attributes:** The user can configure different priorities for different static routes so that route management policies can be more flexible. For example, specifying the same priority for different routes to the same destination enables load sharing, but specifying different priorities for these routes enables route backup. |
===== 2. Configuring a static route ===== | ===== 2. Configuring a static route ===== | ||
- | Prerequisites: | + | **Prerequisites: |
Before configuring a static route, complete the following tasks: | Before configuring a static route, complete the following tasks: | ||
Line 30: | Line 30: | ||
* Configure the IP addresses for related interfaces | * Configure the IP addresses for related interfaces | ||
- | Procedure: | + | **Procedure:** |
When configuring a static route, the static route does not take effect if the user specifies the next hop address first and then configure it as the IP address of a local interface, such as VLAN interface. | When configuring a static route, the static route does not take effect if the user specifies the next hop address first and then configure it as the IP address of a local interface, such as VLAN interface. | ||
Line 36: | Line 36: | ||
If the user does not specify the preference when configuring a static route, the default preference will be used. Reconfiguring the default preference applies only to newly created static routes. | If the user does not specify the preference when configuring a static route, the default preference will be used. Reconfiguring the default preference applies only to newly created static routes. | ||
- | * Unordered List ItemEnter | + | * Enter system view. |
system-view | system-view | ||
- | * Unordered List ItemOrdered | + | * Ordered |
ip route-static dest-address { mask | mask- length } { next-hop-address [ track track- entry-number ] | | ip route-static dest-address { mask | mask- length } { next-hop-address [ track track- entry-number ] | | ||
Line 46: | Line 46: | ||
permanent ] [ description description-text ] | permanent ] [ description description-text ] | ||
- | * Unordered List ItemOrdered List ItemConfigure | + | * Configure |
ip route-static default-preference default- preference-value | ip route-static default-preference default- preference-value | ||
Line 66: | Line 66: | ||
For direct session: | For direct session: | ||
- | * Unordered List ItemOrdered | + | * Ordered |
system-view | system-view | ||
Line 77: | Line 77: | ||
For indirect session: | For indirect session: | ||
- | * Unordered List ItemOrdered | + | * Ordered |
system-view | system-view | ||
Line 94: | Line 94: | ||
BFD cannot be used for a static route with the outbound interface having the spoofing attribute. BFD can be used for static routes with direct nexthops rather than non-direct nexthops. | BFD cannot be used for a static route with the outbound interface having the spoofing attribute. BFD can be used for static routes with direct nexthops rather than non-direct nexthops. | ||
- | * Unordered List ItemEnter | + | * Enter system view. |
system-view | system-view | ||
- | * Unordered List ItemConfigure | + | * Configure |
bfd echo-source-ip ip-address | bfd echo-source-ip ip-address | ||
- | * Unordered List ItemEnable | + | * Enable |
ip route-static dest-address { mask | mask-length } interface- type interface-number next-hop-address bfd echo-packet [ | ip route-static dest-address { mask | mask-length } interface- type interface-number next-hop-address bfd echo-packet [ | ||
Line 127: | Line 127: | ||
Static route FRR takes effect only for static routes that have both the outbound interface and next hop specified. Do not use static route FRR and BFD (for static route) at the same time. | Static route FRR takes effect only for static routes that have both the outbound interface and next hop specified. Do not use static route FRR and BFD (for static route) at the same time. | ||
- | * Unordered List ItemEnter | + | * Enter system view. |
system-view | system-view | ||
- | * Unordered List ItemConfigure | + | * Configure |
bfd echo-source-ip ip-address | bfd echo-source-ip ip-address | ||
- | * Unordered List ItemConfigure | + | * Configure |
ip route-static fast-reroute route- policy route-policy-name | ip route-static fast-reroute route- policy route-policy-name | ||
Line 143: | Line 143: | ||
The VPN instance support in delete [ vpn-instance vpn-instance-name ] static-routes all depends on the device model. | The VPN instance support in delete [ vpn-instance vpn-instance-name ] static-routes all depends on the device model. | ||
- | * Unordered List ItemDisplay | + | * Display |
display ip routing-table protocol static [ inactive | verbose ] [ | { begin | exclude | include } regular- | display ip routing-table protocol static [ inactive | verbose ] [ | { begin | exclude | include } regular- | ||
expression ] | expression ] | ||
- | * Unordered List ItemDelete | + | * Delete |
delete static-routes all | delete static-routes all | ||
Line 154: | Line 154: | ||
===== 6. Static route configuration examples ===== | ===== 6. Static route configuration examples ===== | ||
+ | **Basic static route configuration example:** | ||
+ | |||
+ | **Network requirements: | ||
+ | |||
+ | **Figure 2:** Network diagram for static route configuration | ||
+ | |||
+ | {{: | ||
+ | |||
+ | **Procedure: | ||
+ | |||
+ | * Configure IP addresses for interfaces (omitted). | ||
+ | |||
+ | * Configure static routes: | ||
+ | |||
+ | **Configure a default route on Switch A:** | ||
+ | |||
+ | < | ||
+ | [SwitchA] ip route-static 0.0.0.0 0.0.0.0 1.1.4.2 | ||
+ | | ||
+ | **Configure two static routes on Switch B:** | ||
+ | |||
+ | < | ||
+ | [SwitchB] ip route-static 1.1.2.0 255.255.255.0 1.1.4.1 | ||
+ | [SwitchB] ip route-static 1.1.3.0 255.255.255.0 1.1.5.6 | ||
+ | | ||
+ | **Configure a default route on Switch C:** | ||
+ | |||
+ | < | ||
+ | [SwitchC] ip route-static 0.0.0.0 0.0.0.0 1.1.5.5 | ||
+ | | ||
+ | **Configure the hosts:** | ||
+ | |||
+ | **The default gateways for hosts A, B and C are 1.1.2.3, 1.1.6.1 and 1.1.3.1, respectively. The configuration procedure is omitted.** | ||
+ | |||
+ | **Display the configuration: | ||
+ | |||
+ | **Display the IP routing table of Switch A:** | ||
+ | |||
+ | [SwitchA] display ip routing-table | ||
+ | | ||
+ | Routing Tables: Public | ||
+ | | ||
+ | |||
+ | Destination/ | ||
+ | |||
+ | 0.0.0.0/ | ||
+ | 1.1.2.0/ | ||
+ | 1.1.2.3/ | ||
+ | 1.1.4.0/ | ||
+ | 1.1.4.1/ | ||
+ | 127.0.0.0/ | ||
+ | 127.0.0.1/ | ||
+ | | ||
+ | **Display the IP routing table of Switch B:** | ||
+ | |||
+ | [SwitchB] display ip routing-table | ||
+ | Routing Tables: Public | ||
+ | | ||
+ | |||
+ | Destination/ | ||
+ | |||
+ | 1.1.2.0/ | ||
+ | 1.1.3.0/ | ||
+ | 1.1.4.0/ | ||
+ | 1.1.4.2/ | ||
+ | 1.1.5.4/ | ||
+ | 1.1.5.5/ | ||
+ | 127.0.0.0/ | ||
+ | 127.0.0.1/ | ||
+ | 1.1.6.0/ | ||
+ | 1.1.6.1/ | ||
+ | | ||
+ | **Use the ping command on Host B to check the reachability of Host A, assuming Windows XP runs on the two hosts.** | ||
+ | |||
+ | C: | ||
+ | |||
+ | Pinging 1.1.2.2 with 32 bytes of data: | ||
+ | |||
+ | Reply from 1.1.2.2: bytes=32 time=1ms TTL=255 | ||
+ | Reply from 1.1.2.2: bytes=32 time=1ms TTL=255 | ||
+ | Reply from 1.1.2.2: bytes=32 time=1ms TTL=255 | ||
+ | Reply from 1.1.2.2: bytes=32 time=1ms TTL=255 | ||
+ | |||
+ | Ping statistics for 1.1.2.2: | ||
+ | Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), | ||
+ | Approximate round trip times in milli-seconds: | ||
+ | Minimum = 1ms, Maximum = 1ms, Average = 1ms | ||
+ | | ||
+ | **Use the tracert command on Host B to check the reachability of Host A.** | ||
+ | |||
+ | C: | ||
+ | |||
+ | Tracing route to 1.1.2.2 over a maximum of 30 hops | ||
+ | 1 <1 ms <1 ms <1 ms 1.1.6.1 | ||
+ | 2 <1 ms <1 ms <1 ms 1.1.4.1 | ||
+ | 3 1 ms <1 ms <1 ms 1.1.2.2 | ||
+ | | ||
+ | **Static route FRR configuration example:** | ||
+ | |||
+ | **Network requirements: | ||
+ | |||
+ | Switch S, Switch A, and Switch D are interconnected through static routes, as illustrated in Figure 3. Configure static route FRR so that when the link between Switch S and Switch D fails, traffic can be switched to Link B immediately. | ||
+ | |||
+ | **Figure 3: Network diagram for static route FRR configuration** | ||
+ | |||
+ | {{: | ||
+ | |||
+ | **Procedure: | ||
+ | |||
+ | ** * Configure IP addresses for the interfaces on each switch and configure static routes:** | ||
+ | |||
+ | Configure static routes on Switch S, Switch A, and Switch D so that Switch S can reach Loopback 0 on Switch D, and | ||
+ | Switch D can reach Loopback 0 on Switch S. | ||
+ | |||
+ | Configure a static route on Switch S: | ||
+ | |||
+ | < | ||
+ | [SwitchS] ip route-static 4.4.4.4 32 vlan-interface 200 13.13.13.2 | ||
+ | |||
+ | Configure a static route on Switch D: | ||
+ | |||
+ | < | ||
+ | [SwitchD] ip route-static 1.1.1.1 32 vlan-interface 200 13.13.13.1 | ||
+ | |||
+ | Configure a static route on Switch A: | ||
+ | |||
+ | < | ||
+ | [SwitchA] ip route-static 4.4.4.4 32 vlan-interface 101 24.24.24.4 | ||
+ | [SwitchA] ip route-static 1.1.1.1 32 vlan-interface 100 12.12.12.1 | ||
+ | |||
+ | |||
+ | ** * Configure static route FRR:** | ||
+ | |||
+ | Configure Switch S: | ||
+ | |||
+ | [SwitchS] bfd echo-source-ip 1.1.1.1 | ||
+ | [SwitchS] ip ip-prefix abc index 10 permit 4.4.4.4 32 | ||
+ | [SwitchS] route-policy frr permit node 10 | ||
+ | [SwitchS-route-policy] if-match ip-prefix abc | ||
+ | [SwitchS-route-policy] apply fast-reroute backup-interface vlan-interface 100 backupnexthop | ||
+ | 12.12.12.2 | ||
+ | [SwitchS-route-policy] quit | ||
+ | [SwitchS] ip route-static fast-reroute route-policy frr | ||
+ | |||
+ | Configure Switch D: | ||
+ | |||
+ | [SwitchD] bfd echo-source-ip 4.4.4.4 | ||
+ | [SwitchD] ip ip-prefix abc index 10 permit 1.1.1.1 32 | ||
+ | [SwitchD] route-policy frr permit node 10 | ||
+ | [SwitchD-route-policy] if-match ip-prefix abc | ||
+ | [SwitchD-route-policy] apply fast-reroute backup-interface vlan-interface 101 backupnexthop | ||
+ | 24.24.24.2 | ||
+ | [SwitchD-route-policy] quit | ||
+ | [SwitchD] ip route-static fast-reroute route-policy frr | ||
+ | | ||
+ | ** * Verify the configuration: | ||
+ | |||
+ | **Display route 4.4.4.4/32 on Switch S to view the backup next hop information.** | ||
+ | |||
+ | [SwitchS] display ip routing-table 4.4.4.4 verbose | ||
+ | Routing Table : Public | ||
+ | Summary Count : 1 | ||
+ | |||
+ | Destination: | ||
+ | | ||
+ | | ||
+ | | ||
+ | NextHop: 13.13.13.2 | ||
+ | BkNextHop: 12.12.12.2 | ||
+ | RelyNextHop: | ||
+ | Tunnel ID: 0x0 Label: NULL | ||
+ | BKTunnel ID: 0x0 BKLabel: NULL | ||
+ | State: Active Adv Age: 00h01m27s | ||
+ | Tag: 0 | ||
+ | |||
+ | **Display route 1.1.1.1/32 on Switch D to view the backup next hop information.** | ||
+ | |||
+ | [SwitchD] display ip routing-table 1.1.1.1 verbose | ||
+ | Routing Table : Public | ||
+ | Summary Count : 1 | ||
+ | |||
+ | Destination: | ||
+ | | ||
+ | | ||
+ | | ||
+ | NextHop: 13.13.13.1 | ||
+ | BkNextHop: 24.24.24.2 | ||
+ | RelyNextHop: | ||
+ | Tunnel ID: 0x0 Label: NULL | ||
+ | BKTunnel ID: 0x0 BKLabel: NULL | ||
+ | State: Active Adv Age: 00h01m27s | ||
+ | Tag: 0 | ||
+ | |||
+ | **BFD for static routes configuration example:** | ||
+ | |||
+ | **Network requirements: | ||
+ | |||
+ | As shown in Figure 4: | ||
+ | |||
+ | * Configure a static route to subnet 120.1.1.0/ | ||
+ | |||
+ | * When the link over (which Switch A communicates with Switch B through the Layer 2) switch fails, BFD can detect the failure immediately. Switch A and Switch B then communicate through Switch C. | ||
+ | |||
+ | **Figure 4: Network diagram for configuring BFD for static routes** | ||
+ | |||
+ | {{: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | **Procedure: | ||
+ | |||
+ | ** * Configure IP addresses for the interfaces (omitted).** | ||
+ | |||
+ | ** * Configure BFD:** | ||
+ | |||
+ | **Configure static routes on Switch A and enable BFD control packet mode for the static route through the Layer 2 switch.** | ||
+ | |||
+ | < | ||
+ | [SwitchA] interface vlan-interface10 | ||
+ | [SwitchA-vlan-interface10] bfd min-transmit-interval 500 | ||
+ | [SwitchA-vlan-interface10] bfd min-receive-interval 500 | ||
+ | [SwitchA-vlan-interface10] bfd detect-multiplier 9 | ||
+ | [SwitchA-vlan-interface10] quit | ||
+ | [SwitchA] ip route-static 120.1.1.0 24 vlan-interface 10 12.1.1.2 bfd control-packet | ||
+ | [SwitchA] ip route-static 120.1.1.0 24 vlan-interface 11 10.1.1.100 preference 65 | ||
+ | [SwitchA] quit | ||
+ | |||
+ | **Configure static routes on Switch B and enable BFD control packet mode for the static route through the Layer 2 switch.** | ||
+ | |||
+ | < | ||
+ | [SwitchB] interface vlan-interface10 | ||
+ | [SwitchB-vlan-interface10] bfd min-transmit-interval 500 | ||
+ | [SwitchB-vlan-interface10] bfd min-receive-interval 500 | ||
+ | [SwitchB-vlan-interface10] bfd detect-multiplier 9 | ||
+ | [SwitchB-vlan-interface10]] quit | ||
+ | [SwitchB] ip route-static 121.1.1.0 24 vlan-interface 10 12.1.1.1 bfd control-packet | ||
+ | [SwitchB] ip route-static 121.1.1.0 24 vlan-interface 13 13.1.1.2 preference 65 | ||
+ | [SwitchB] quit | ||
+ | | ||
+ | **Verify the configuration: | ||
+ | |||
+ | **The following operations are performed on Switch A. The operations on Switch B are similar.** | ||
+ | |||
+ | < | ||
+ | |||
+ | Total Session Num: 1 Init Mode: Active | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | **Display the static route information of Switch A:** | ||
+ | |||
+ | < | ||
+ | Public Routing Table : Static | ||
+ | Summary Count : 2 | ||
+ | |||
+ | Static Routing table Status : < Active> | ||
+ | Summary Count : 1 | ||
+ | Destination/ | ||
+ | 120.1.1.0/ | ||
+ | |||
+ | Direct Routing table Status : < | ||
+ | Summary Count : 1 | ||
+ | Destination/ | ||
+ | 120.1.1.0/ | ||
+ | |||
+ | |||
+ | **Enable BFD debugging on Switch A. When the link between Switch A and Layer 2 switch fails, Switch A can detect the failure:** | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | %Jul 27 10: | ||
+ | UP-> | ||
+ | *Jul 27 10: | ||
+ | [Src: | ||
+ | *Jul 27 10: | ||
+ | [Src: | ||
+ | *Jul 27 10: | ||
+ | packet | ||
+ | |||
+ | **Use display ip routing-table protocol static to display the static route information on Switch A.** | ||
+ | < | ||
+ | Public Routing Table : Static | ||
+ | Summary Count : 2 | ||
+ | Static Routing table Status : < Active> | ||
+ | Summary Count : 1 | ||
+ | Destination/ | ||
+ | 120.1.1.0/ | ||
+ | Static Routing table Status : < Inactive> | ||
+ | Summary Count : 1 | ||
+ | Destination/ | ||
+ | 120.1.1.0/ |
hpe/switch/5800/configuring_static_routing.1623274940.txt.gz · Last modified: 2021/06/09 16:42 by aperez