User Tools

Site Tools


hpe:switch:5800:configuring_static_routing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
hpe:switch:5800:configuring_static_routing [2021/06/09 17:30] aperezhpe: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 the default preference for static routes.+  * Configure the default preference for static routes.
  
   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:+**Configure a default route on Switch A:**
  
   <SwitchA> system-view   <SwitchA> system-view
   [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> system-view   <SwitchB> system-view
   [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:**
  
   <SwitchC> system-view   <SwitchC> system-view
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 +  [SwitchA] display ip routing-table 
- +   
-Routing Tables: Public +  Routing Tables: Public 
- Destinations : 7       Routes : 7  +   Destinations : 7       Routes : 7  
-  +    
-Destination/Mask    Proto  Pre  Cost         NextHop         Interface  +  Destination/Mask    Proto  Pre  Cost         NextHop         Interface  
-  +    
-0.0.0.0/          Static 60              1.1.4.2         Vlan500  +  0.0.0.0/          Static 60              1.1.4.2         Vlan500  
-1.1.2.0/24          Direct 0    0            1.1.2.3         Vlan300  +  1.1.2.0/24          Direct 0    0            1.1.2.3         Vlan300  
-1.1.2.3/32          Direct 0    0            127.0.0.1       InLoop0  +  1.1.2.3/32          Direct 0    0            127.0.0.1       InLoop0  
-1.1.4.0/30          Direct 0    0            1.1.4.1         Vlan500  +  1.1.4.0/30          Direct 0    0            1.1.4.1         Vlan500  
-1.1.4.1/32          Direct 0    0            127.0.0.1       InLoop0  +  1.1.4.1/32          Direct 0    0            127.0.0.1       InLoop0  
-127.0.0.0/        Direct 0    0            127.0.0.1       InLoop0  +  127.0.0.0/        Direct 0    0            127.0.0.1       InLoop0  
-127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0  +  127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0  
 +  
 **Display the IP routing table of Switch B:** **Display the IP routing table of Switch B:**
  
-[SwitchB] display ip routing-table  +  [SwitchB] display ip routing-table  
-Routing Tables: Public  +  Routing Tables: Public  
-         Destinations : 10       Routes : 10  +           Destinations : 10       Routes : 10  
-  +    
-Destination/Mask    Proto  Pre  Cost         NextHop         Interface  +  Destination/Mask    Proto  Pre  Cost         NextHop         Interface  
-  +    
-1.1.2.0/24          Static 60              1.1.4.1         Vlan500  +  1.1.2.0/24          Static 60              1.1.4.1         Vlan500  
-1.1.3.0/24          Static 60              1.1.5.6         Vlan600  +  1.1.3.0/24          Static 60              1.1.5.6         Vlan600  
-1.1.4.0/30          Direct 0    0            1.1.4.2         Vlan500  +  1.1.4.0/30          Direct 0    0            1.1.4.2         Vlan500  
-1.1.4.2/32          Direct 0    0            127.0.0.1       InLoop0  +  1.1.4.2/32          Direct 0    0            127.0.0.1       InLoop0  
-1.1.5.4/30          Direct 0    0            1.1.5.5         Vlan600  +  1.1.5.4/30          Direct 0    0            1.1.5.5         Vlan600  
-1.1.5.5/32          Direct 0    0            127.0.0.1       InLoop0  +  1.1.5.5/32          Direct 0    0            127.0.0.1       InLoop0  
-127.0.0.0/        Direct 0    0            127.0.0.1       InLoop0  +  127.0.0.0/        Direct 0    0            127.0.0.1       InLoop0  
-127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0  +  127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0  
-1.1.6.0/24          Direct 0    0            1.1.6.1         Vlan100  +  1.1.6.0/24          Direct 0    0            1.1.6.1         Vlan100  
-1.1.6.1/32          Direct 0    0            127.0.0.1       InLoop0  +  1.1.6.1/32          Direct 0    0            127.0.0.1       InLoop0  
 +  
 **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:\Documents and Settings\Administrator>ping 1.1.2.2  +  C:\Documents and Settings\Administrator>ping 1.1.2.2  
-  +    
-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:\Documents and Settings\Administrator>tracert 1.1.2.2  +  C:\Documents and Settings\Administrator>tracert 1.1.2.2  
-  +    
-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

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki