hpe:switch:5800:configuring_static_routing
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
hpe:switch:5800:configuring_static_routing [2021/06/09 17:30] – 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 18: | Line 18: | ||
* 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. | * 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 46: | Line 46: | ||
permanent ] [ description description-text ] | permanent ] [ description description-text ] | ||
- | * Ordered List ItemConfigure | + | * Configure |
ip route-static default-preference default- preference-value | ip route-static default-preference default- preference-value | ||
Line 168: | Line 168: | ||
* Configure static routes: | * 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 | [SwitchA] ip route-static 0.0.0.0 0.0.0.0 1.1.4.2 | ||
- | Configure two static routes on Switch B: | + | |
+ | **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.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 | [SwitchB] ip route-static 1.1.3.0 255.255.255.0 1.1.5.6 | ||
- | Configure a default route on Switch C: | + | |
+ | **Configure a default route on Switch C:** | ||
< | < | ||
Line 184: | Line 186: | ||
**Configure the hosts:** | **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. | + | **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 configuration: | ||
Line 190: | Line 192: | ||
**Display the IP routing table of Switch A:** | **Display the IP routing table of Switch A:** | ||
- | [SwitchA] display ip routing-table | + | |
- | + | ||
- | Routing Tables: Public | + | Routing Tables: Public |
- | | + | |
- | + | | |
- | Destination/ | + | Destination/ |
- | + | | |
- | 0.0.0.0/ | + | 0.0.0.0/ |
- | 1.1.2.0/ | + | 1.1.2.0/ |
- | 1.1.2.3/ | + | 1.1.2.3/ |
- | 1.1.4.0/ | + | 1.1.4.0/ |
- | 1.1.4.1/ | + | 1.1.4.1/ |
- | 127.0.0.0/ | + | 127.0.0.0/ |
- | 127.0.0.1/ | + | 127.0.0.1/ |
+ | |||
**Display the IP routing table of Switch B:** | **Display the IP routing table of Switch B:** | ||
- | [SwitchB] display ip routing-table | + | |
- | Routing Tables: Public | + | Routing Tables: Public |
- | | + | |
- | + | | |
- | Destination/ | + | Destination/ |
- | + | | |
- | 1.1.2.0/ | + | 1.1.2.0/ |
- | 1.1.3.0/ | + | 1.1.3.0/ |
- | 1.1.4.0/ | + | 1.1.4.0/ |
- | 1.1.4.2/ | + | 1.1.4.2/ |
- | 1.1.5.4/ | + | 1.1.5.4/ |
- | 1.1.5.5/ | + | 1.1.5.5/ |
- | 127.0.0.0/ | + | 127.0.0.0/ |
- | 127.0.0.1/ | + | 127.0.0.1/ |
- | 1.1.6.0/ | + | 1.1.6.0/ |
- | 1.1.6.1/ | + | 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.** | **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: | + | 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 |
- | 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: | + | Ping statistics for 1.1.2.2: |
- | Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), | + | Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), |
- | Approximate round trip times in milli-seconds: | + | Approximate round trip times in milli-seconds: |
- | Minimum = 1ms, Maximum = 1ms, Average = 1ms | + | Minimum = 1ms, Maximum = 1ms, Average = 1ms |
+ | |||
**Use the tracert command on Host B to check the reachability of Host A.** | **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 | + | Tracing route to 1.1.2.2 over a maximum of 30 hops |
- | 1 <1 ms <1 ms <1 ms 1.1.6.1 | + | 1 <1 ms <1 ms <1 ms 1.1.6.1 |
- | 2 <1 ms <1 ms <1 ms 1.1.4.1 | + | 2 <1 ms <1 ms <1 ms 1.1.4.1 |
- | 3 1 ms <1 ms <1 ms 1.1.2.2 | + | 3 1 ms <1 ms <1 ms 1.1.2.2 |
+ | |||
**Static route FRR configuration example:** | **Static route FRR configuration example:** | ||
hpe/switch/5800/configuring_static_routing.1623277801.txt.gz · Last modified: 2021/06/09 17:30 by aperez