No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CLI-based Configuration Guide - IP Unicast Routing

AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R009

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Configuring Local PBR

Example for Configuring Local PBR

Networking Requirements

As shown in Figure 12-7, RouterA and RouterB are connected by two links.

Users want locally generated packets with different lengths to be sent to different next hop addresses.
  • Packets with 64 to 1400 bytes are sent to next hop address 192.168.1.2.
  • Packets with 1401 to 1500 bytes are sent to next hop address 192.168.2.2.
  • Packets with other lengths are routed based on destination addresses.
Figure 12-7 Networking diagram of configuring local PBR

Configuration Roadmap

The configuration roadmap is as follows:
  1. Configure a match rule of IP packet length on RouterA so that locally generated packets with different lengths match different PBR nodes.
  2. Configure actions of the local PBR on RouterA so that locally generated packets with different lengths are sent to different next hop addresses.
  3. Enable local PBR.

Procedure

  1. Configure IP addresses for interfaces.

    # Configure IP addresses for all interfaces of RouterA.

    <Huawei> system-view
    [Huawei] sysname RouterA
    [RouterA] interface gigabitethernet 1/0/0
    [RouterA-GigabitEthernet1/0/0] ip address 192.168.1.1 255.255.255.0
    [RouterA-GigabitEthernet1/0/0] quit
    [RouterA] interface gigabitethernet 2/0/0
    [RouterA-GigabitEthernet2/0/0] ip address 192.168.2.1 255.255.255.0
    [RouterA-GigabitEthernet2/0/0] quit
    [RouterA] interface loopback 0
    [RouterA-LoopBack0] ip address 10.1.1.1 255.255.255.0
    [RouterA-LoopBack0] quit
    

    # Configure IP addresses for all interfaces of RouterB.

    <Huawei> system-view
    [Huawei] sysname RouterB
    [RouterB] interface gigabitethernet 1/0/0
    [RouterB-GigabitEthernet1/0/0] ip address 192.168.1.2 255.255.255.0
    [RouterB-GigabitEthernet1/0/0] quit
    [RouterB] interface gigabitethernet 2/0/0
    [RouterB-GigabitEthernet2/0/0] ip address 192.168.2.2 255.255.255.0
    [RouterB-GigabitEthernet2/0/0] quit
    [RouterB] interface loopback 0
    [RouterB-LoopBack0] ip address 10.1.2.1 255.255.255.0
    [RouterB-LoopBack0] quit

  2. Configure static routes.

    # Configure a static route on RouterA.

    [RouterA] ip route-static 10.1.2.0 24 192.168.1.2
    [RouterA] ip route-static 10.1.2.0 24 192.168.2.2

    # Configure a static route on RouterB.

    [RouterB] ip route-static 10.1.1.0 24 192.168.1.1
    [RouterB] ip route-static 10.1.1.0 24 192.168.2.1

  3. Configure a PBR route.

    # Configure a PBR route named lab1.

    [RouterA] policy-based-route lab1 permit node 10
    [RouterA-policy-based-route-lab1-10] if-match packet-length 64 1400
    [RouterA-policy-based-route-lab1-10] apply ip-address next-hop 192.168.1.2
    [RouterA-policy-based-route-lab1-10] quit
    [RouterA] policy-based-route lab1 permit node 20
    [RouterA-policy-based-route-lab1-20] if-match packet-length 1401 1500
    [RouterA-policy-based-route-lab1-20] apply ip-address next-hop 192.168.2.2
    [RouterA-policy-based-route-lab1-20] quit

    # Enable local PBR.

    [RouterA] ip local policy-based-route lab1

  4. Verify the configurations.

    # Clear interface statistics on RouterB.

    <RouterB> reset counters interface gigabitethernet 1/0/0
    <RouterB> reset counters interface gigabitethernet 2/0/0

    # View interface statistics on RouterB.

    <RouterB> display interface gigabitethernet 1/0/0 
    GigabitEthernet1/0/0 current state : UP                                         
    Line protocol current state : UP                                                
    Last line protocol up time : 2012-07-30 11:23:24                                
    Description:HUAWEI, AR Series, GigabitEthernet1/0/0 Interface                   
    Route Port,The Maximum Transmit Unit is 1500                                    
    Internet Address is 192.168.1.2/24                                                
    IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0819-a6ce-7d4c 
    Last physical up time   : 2012-07-30 11:23:24                                   
    Last physical down time : 2012-07-24 16:54:19                                   
    Current system time: 2012-07-30 14:57:28                                        
    Port Mode: COMMON COPPER                                                        
    Speed : 1000,  Loopback: NONE                                                   
    Duplex: FULL,  Negotiation: ENABLE                                              
    Mdi   : AUTO                                                                    
    Last 300 seconds input rate 40 bits/sec, 0 packets/sec                          
    Last 300 seconds output rate 0 bits/sec, 0 packets/sec                          
    Input peak rate 7568 bits/sec,Record time: 2012-07-30 12:57:02                  
    Output peak rate 1008 bits/sec,Record time: 2012-07-30 12:42:42                 
                                                                                    
    Input:  135403 packets, 118911125 bytes                                         
      Unicast:             107066,  Multicast:               10468                  
      Broadcast:            17869,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      CRC:                      0,  Giants:                      0                  
      Jabbers:                  0,  Throttles:                   0                  
      Runts:                    0,  Symbols:                     0                  
      Ignoreds:                 0,  Frames:                      0                  
                                                                                    
    Output:  59070 packets, 14217739 bytes                                          
      Unicast:              37581,  Multicast:               21485                  
      Broadcast:                4,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      Collisions:               0,  ExcessiveCollisions:         0                  
      Late Collisions:          0,  Deferreds:                   0                  
                                                                                    
        Input bandwidth utilization threshold : 100.00%                             
        Output bandwidth utilization threshold: 100.00%                             
        Input bandwidth utilization  : 0.01%                                        
        Output bandwidth utilization : 0.01%    
    <RouterB> display interface gigabitethernet 2/0/0
    GigabitEthernet2/0/0 current state : UP                                         
    Line protocol current state : UP                                                
    Last line protocol up time : 2012-07-30 11:23:29                                
    Description:HUAWEI, AR Series, GigabitEthernet2/0/0 Interface                   
    Route Port,The Maximum Transmit Unit is 1500                                    
    Internet Address is 192.168.2.2/24                                                
    IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0819-a6ce-7d4d 
    Last physical up time   : 2012-07-30 11:23:29                                   
    Last physical down time : 2012-07-30 11:09:17                                   
    Current system time: 2012-07-30 14:58:24                                        
    Port Mode: COMMON COPPER                                                        
    Speed : 1000,  Loopback: NONE                                                   
    Duplex: FULL,  Negotiation: ENABLE                                              
    Mdi   : AUTO                                                                    
    Last 300 seconds input rate 48 bits/sec, 0 packets/sec                          
    Last 300 seconds output rate 0 bits/sec, 0 packets/sec                          
    Input peak rate 11576 bits/sec,Record time: 2012-07-30 13:46:52                 
    Output peak rate 11576 bits/sec,Record time: 2012-07-30 13:46:52                
                                                                                    
    Input:  135403 packets, 118911125 bytes                                         
      Unicast:             107066,  Multicast:               10468                  
      Broadcast:            17869,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      CRC:                      0,  Giants:                      0                  
      Jabbers:                  0,  Throttles:                   0                  
      Runts:                    0,  Symbols:                     0                  
      Ignoreds:                 0,  Frames:                      0                  
                                                                                    
    Output:  59070 packets, 14217739 bytes                                          
      Unicast:              37581,  Multicast:               21485                  
      Broadcast:                4,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      Collisions:               0,  ExcessiveCollisions:         0                  
      Late Collisions:          0,  Deferreds:                   0                  
                                                                                    
        Input bandwidth utilization threshold : 100.00%                             
        Output bandwidth utilization threshold: 100.00%                             
        Input bandwidth utilization  : 0.01%                                        
        Output bandwidth utilization : 0.01%    

    # On RouterA, ping the IP address of Loopback0 on RouterB and set the packet length to 80 bytes.

    <RouterA> ping -s 80 10.1.2.1
      PING 10.1.2.1: 80  data bytes, press CTRL_C to break                          
        Reply from 10.1.2.1: bytes=80 Sequence=1 ttl=255 time=2 ms                  
        Reply from 10.1.2.1: bytes=80 Sequence=2 ttl=255 time=2 ms                  
        Reply from 10.1.2.1: bytes=80 Sequence=3 ttl=255 time=2 ms                  
        Reply from 10.1.2.1: bytes=80 Sequence=4 ttl=255 time=2 ms                  
        Reply from 10.1.2.1: bytes=80 Sequence=5 ttl=255 time=2 ms                  
                                                                                    
      --- 10.1.2.1 ping statistics ---                                              
        5 packet(s) transmitted                                                     
        5 packet(s) received                                                        
        0.00% packet loss                                                           
        round-trip min/avg/max = 2/2/2 ms                                           
    
                                          

    # View interface statistics on RouterB.

    <RouterB> display interface gigabitethernet 1/0/0 
    GigabitEthernet1/0/0 current state : UP                                         
    Line protocol current state : UP                                                
    Last line protocol up time : 2012-07-30 11:23:24                                
    Description:HUAWEI, AR Series, GigabitEthernet1/0/0 Interface                   
    Route Port,The Maximum Transmit Unit is 1500                                    
    Internet Address is 192.168.1.2/24                                                
    IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0819-a6ce-7d4c 
    Last physical up time   : 2012-07-30 11:23:24                                   
    Last physical down time : 2012-07-24 16:54:19                                   
    Current system time: 2012-07-30 15:00:15                                        
    Port Mode: COMMON COPPER                                                        
    Speed : 1000,  Loopback: NONE                                                   
    Duplex: FULL,  Negotiation: ENABLE                                              
    Mdi   : AUTO                                                                    
    Last 300 seconds input rate 152 bits/sec, 0 packets/sec                         
    Last 300 seconds output rate 16 bits/sec, 0 packets/sec                         
    Input peak rate 7568 bits/sec,Record time: 2012-07-30 12:57:02                  
    Output peak rate 1008 bits/sec,Record time: 2012-07-30 12:42:42                 
                                                                                    
    Input:  135403 packets, 118911125 bytes                                         
      Unicast:             107066,  Multicast:               10468                  
      Broadcast:            17869,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      CRC:                      0,  Giants:                      0                  
      Jabbers:                  0,  Throttles:                   0                  
      Runts:                    0,  Symbols:                     0                  
      Ignoreds:                 0,  Frames:                      0                  
                                                                                    
    Output:  59070 packets, 14217739 bytes                                          
      Unicast:              37581,  Multicast:               21485                  
      Broadcast:                4,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      Collisions:               0,  ExcessiveCollisions:         0                  
      Late Collisions:          0,  Deferreds:                   0                  
                                                                                    
        Input bandwidth utilization threshold : 100.00%                             
        Output bandwidth utilization threshold: 100.00%                             
        Input bandwidth utilization  : 0.01%                                        
        Output bandwidth utilization : 0.01%    
    <RouterB> display interface gigabitethernet 2/0/0
    GigabitEthernet2/0/0 current state : UP                                         
    Line protocol current state : UP                                                
    Last line protocol up time : 2012-07-30 11:23:29                                
    Description:HUAWEI, AR Series, GigabitEthernet2/0/0 Interface                   
    Route Port,The Maximum Transmit Unit is 1500                                    
    Internet Address is 192.168.2.2/24                                                
    IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0819-a6ce-7d4d 
    Last physical up time   : 2012-07-30 11:23:29                                   
    Last physical down time : 2012-07-30 11:09:17                                   
    Current system time: 2012-07-30 15:01:02                                        
    Port Mode: COMMON COPPER                                                        
    Speed : 1000,  Loopback: NONE                                                   
    Duplex: FULL,  Negotiation: ENABLE                                              
    Mdi   : AUTO                                                                    
    Last 300 seconds input rate 112 bits/sec, 0 packets/sec                         
    Last 300 seconds output rate 0 bits/sec, 0 packets/sec                          
    Input peak rate 11576 bits/sec,Record time: 2012-07-30 13:46:52                 
    Output peak rate 11576 bits/sec,Record time: 2012-07-30 13:46:52                
                                                                                    
    Input:  135403 packets, 118911125 bytes                                         
      Unicast:             107066,  Multicast:               10468                  
      Broadcast:            17869,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      CRC:                      0,  Giants:                      0                  
      Jabbers:                  0,  Throttles:                   0                  
      Runts:                    0,  Symbols:                     0                  
      Ignoreds:                 0,  Frames:                      0                  
                                                                                    
    Output:  59070 packets, 14217739 bytes                                          
      Unicast:              37581,  Multicast:               21485                  
      Broadcast:                4,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      Collisions:               0,  ExcessiveCollisions:         0                  
      Late Collisions:          0,  Deferreds:                   0                  
                                                                                    
        Input bandwidth utilization threshold : 100.00%                             
        Output bandwidth utilization threshold: 100.00%                             
        Input bandwidth utilization  : 0.01%                                        
        Output bandwidth utilization : 0.01%    

    Compare statistics about interfaces of RouterB before and after you run the ping -s 80 10.1.2.1 command on RouterA. You can find that GigabitEthernet 1/0/0 of RouterB sends five packets, that is, GigabitEthernet 1/0/0 of RouterB sends five ICMP reply packets to RouterA after receiving five ICMP requests from RouterA. RouterA determines that the next hop address is 192.168.1.2 based on the PBR.

    # Clear interface statistics on RouterB.

    <RouterB> reset counters interface gigabitethernet 1/0/0
    <RouterB> reset counters interface gigabitethernet 2/0/0

    # View interface statistics on RouterB.

    <RouterB> display interface gigabitethernet 1/0/0 
    GigabitEthernet1/0/0 current state : UP                                         
    Line protocol current state : UP                                                
    Last line protocol up time : 2012-07-30 11:23:24                                
    Description:HUAWEI, AR Series, GigabitEthernet1/0/0 Interface                   
    Route Port,The Maximum Transmit Unit is 1500                                    
    Internet Address is 192.168.1.2/24                                                
    IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0819-a6ce-7d4c 
    Last physical up time   : 2012-07-30 11:23:24                                   
    Last physical down time : 2012-07-24 16:54:19                                   
    Current system time: 2012-07-30 16:04:14                                        
    Port Mode: COMMON COPPER                                                        
    Speed : 1000,  Loopback: NONE                                                   
    Duplex: FULL,  Negotiation: ENABLE                                              
    Mdi   : AUTO                                                                    
    Last 300 seconds input rate 0 bits/sec, 0 packets/sec                           
    Last 300 seconds output rate 0 bits/sec, 0 packets/sec                          
    Input peak rate 7568 bits/sec,Record time: 2012-07-30 12:57:02                  
    Output peak rate 1008 bits/sec,Record time: 2012-07-30 12:42:42                 
                                                                                    
    Input:  135403 packets, 118911125 bytes                                         
      Unicast:             107066,  Multicast:               10468                  
      Broadcast:            17869,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      CRC:                      0,  Giants:                      0                  
      Jabbers:                  0,  Throttles:                   0                  
      Runts:                    0,  Symbols:                     0                  
      Ignoreds:                 0,  Frames:                      0                  
                                                                                    
    Output:  59070 packets, 14217739 bytes                                          
      Unicast:              37581,  Multicast:               21485                  
      Broadcast:                4,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      Collisions:               0,  ExcessiveCollisions:         0                  
      Late Collisions:          0,  Deferreds:                   0                  
                                                                                    
        Input bandwidth utilization threshold : 100.00%                             
        Output bandwidth utilization threshold: 100.00%                             
        Input bandwidth utilization  : 0.01%                                        
        Output bandwidth utilization : 0.01%    
    <RouterB> display interface gigabitethernet 2/0/0
    GigabitEthernet2/0/0 current state : UP                                         
    Line protocol current state : UP                                                
    Last line protocol up time : 2012-07-30 11:23:29                                
    Description:HUAWEI, AR Series, GigabitEthernet2/0/0 Interface                   
    Route Port,The Maximum Transmit Unit is 1500                                    
    Internet Address is 192.168.2.2/24                                                
    IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0819-a6ce-7d4d 
    Last physical up time   : 2012-07-30 11:23:29                                   
    Last physical down time : 2012-07-30 11:09:17                                   
    Current system time: 2012-07-30 16:04:19                                        
    Port Mode: COMMON COPPER                                                        
    Speed : 1000,  Loopback: NONE                                                   
    Duplex: FULL,  Negotiation: ENABLE                                              
    Mdi   : AUTO                                                                    
    Last 300 seconds input rate 0 bits/sec, 0 packets/sec                           
    Last 300 seconds output rate 0 bits/sec, 0 packets/sec                          
    Input peak rate 11576 bits/sec,Record time: 2012-07-30 13:46:52                 
    Output peak rate 11576 bits/sec,Record time: 2012-07-30 13:46:52                
                                                                                    
    Input:  135403 packets, 118911125 bytes                                         
      Unicast:             107066,  Multicast:               10468                  
      Broadcast:            17869,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      CRC:                      0,  Giants:                      0                  
      Jabbers:                  0,  Throttles:                   0                  
      Runts:                    0,  Symbols:                     0                  
      Ignoreds:                 0,  Frames:                      0                  
                                                                                    
    Output:  59070 packets, 14217739 bytes                                          
      Unicast:              37581,  Multicast:               21485                  
      Broadcast:                4,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      Collisions:               0,  ExcessiveCollisions:         0                  
      Late Collisions:          0,  Deferreds:                   0                  
                                                                                    
        Input bandwidth utilization threshold : 100.00%                             
        Output bandwidth utilization threshold: 100.00%                             
        Input bandwidth utilization  : 0.01%                                        
        Output bandwidth utilization : 0.01%    

    # On RouterA, ping the IP address of Loopback0 on RouterB and set the packet length to 1401 bytes.

    <RouterA> ping -s 1401 10.1.2.1
      PING 10.1.2.1: 1401  data bytes, press CTRL_C to break                        
        Reply from 10.1.2.1: bytes=1401 Sequence=1 ttl=255 time=1 ms                
        Reply from 10.1.2.1: bytes=1401 Sequence=2 ttl=255 time=1 ms                
        Reply from 10.1.2.1: bytes=1401 Sequence=3 ttl=255 time=1 ms                
        Reply from 10.1.2.1: bytes=1401 Sequence=4 ttl=255 time=1 ms                
        Reply from 10.1.2.1: bytes=1401 Sequence=5 ttl=255 time=2 ms                
                                                                                    
      --- 10.1.2.1 ping statistics ---                                              
        5 packet(s) transmitted                                                     
        5 packet(s) received                                                        
        0.00% packet loss                                                           
        round-trip min/avg/max = 1/1/2 ms
    

    # View interface statistics on RouterB.

    <RouterB> display interface gigabitethernet 1/0/0 
    GigabitEthernet1/0/0 current state : UP                                         
    Line protocol current state : UP                                                
    Last line protocol up time : 2012-07-30 11:23:24                                
    Description:HUAWEI, AR Series, GigabitEthernet1/0/0 Interface                   
    Route Port,The Maximum Transmit Unit is 1500                                    
    Internet Address is 192.168.1.2/24                                                
    IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0819-a6ce-7d4c 
    Last physical up time   : 2012-07-30 11:23:24                                   
    Last physical down time : 2012-07-24 16:54:19                                   
    Current system time: 2012-07-30 16:04:50                                        
    Port Mode: COMMON COPPER                                                        
    Speed : 1000,  Loopback: NONE                                                   
    Duplex: FULL,  Negotiation: ENABLE                                              
    Mdi   : AUTO                                                                    
    Last 300 seconds input rate 40 bits/sec, 0 packets/sec                          
    Last 300 seconds output rate 0 bits/sec, 0 packets/sec                          
    Input peak rate 7568 bits/sec,Record time: 2012-07-30 12:57:02                  
    Output peak rate 1008 bits/sec,Record time: 2012-07-30 12:42:42                 
                                                                                    
    Input:  135403 packets, 118911125 bytes                                         
      Unicast:             107066,  Multicast:               10468                  
      Broadcast:            17869,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      CRC:                      0,  Giants:                      0                  
      Jabbers:                  0,  Throttles:                   0                  
      Runts:                    0,  Symbols:                     0                  
      Ignoreds:                 0,  Frames:                      0                  
                                                                                    
    Output:  59070 packets, 14217739 bytes                                          
      Unicast:              37581,  Multicast:               21485                  
      Broadcast:                4,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      Collisions:               0,  ExcessiveCollisions:         0                  
      Late Collisions:          0,  Deferreds:                   0                  
                                                                                    
        Input bandwidth utilization threshold : 100.00%                             
        Output bandwidth utilization threshold: 100.00%                             
        Input bandwidth utilization  : 0.01%                                        
        Output bandwidth utilization : 0.01%    
    <RouterB> display interface gigabitethernet 2/0/0
    GigabitEthernet2/0/0 current state : UP                                         
    Line protocol current state : UP                                                
    Last line protocol up time : 2012-07-30 11:23:29                                
    Description:HUAWEI, AR Series, GigabitEthernet2/0/0 Interface                   
    Route Port,The Maximum Transmit Unit is 1500                                    
    Internet Address is 192.168.2.2/24                                                
    IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0819-a6ce-7d4d 
    Last physical up time   : 2012-07-30 11:23:29                                   
    Last physical down time : 2012-07-30 11:09:17                                   
    Current system time: 2012-07-30 16:04:55                                        
    Port Mode: COMMON COPPER                                                        
    Speed : 1000,  Loopback: NONE                                                   
    Duplex: FULL,  Negotiation: ENABLE                                              
    Mdi   : AUTO                                                                    
    Last 300 seconds input rate 200 bits/sec, 0 packets/sec                         
    Last 300 seconds output rate 192 bits/sec, 0 packets/sec                        
    Input peak rate 11576 bits/sec,Record time: 2012-07-30 13:46:52                 
    Output peak rate 11576 bits/sec,Record time: 2012-07-30 13:46:52                
                                                                                    
    Input:  135403 packets, 118911125 bytes                                         
      Unicast:             107066,  Multicast:               10468                  
      Broadcast:            17869,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      CRC:                      0,  Giants:                      0                  
      Jabbers:                  0,  Throttles:                   0                  
      Runts:                    0,  Symbols:                     0                  
      Ignoreds:                 0,  Frames:                      0                  
                                                                                    
    Output:  59070 packets, 14217739 bytes                                          
      Unicast:              37581,  Multicast:               21485                  
      Broadcast:                4,  Jumbo:                       0                  
      Discard:                  0,  Total Error:                 0                  
                                                                                    
      Collisions:               0,  ExcessiveCollisions:         0                  
      Late Collisions:          0,  Deferreds:                   0                  
                                                                                    
        Input bandwidth utilization threshold : 100.00%                             
        Output bandwidth utilization threshold: 100.00%                             
        Input bandwidth utilization  : 0.01%                                        
        Output bandwidth utilization : 0.01%    

    Compare statistics about interfaces of RouterB before and after you run the ping -s 1401 10.1.2.1 command on RouterA. You can find that GigabitEthernet 2/0/0 of RouterB sends five packets, that is, GigabitEthernet 2/0/0 of RouterB sends five ICMP reply packets to RouterA after receiving ICMP requests from RouterA. RouterA determines that the next hop address is 192.168.2.2 based on the PBR.

Configuration Files

  • Configuration file of RouterA

    #
     sysname RouterA
    #                                                                               
    interface GigabitEthernet1/0/0                                                  
     ip address 192.168.1.1 255.255.255.0   
    #                                                                               
    interface GigabitEthernet2/0/0                                                  
     ip address 192.168.2.1 255.255.255.0   
    #                                                                               
    interface LoopBack0                                                             
     ip address 10.1.1.1 255.255.255.0 
    #                                                                               
     ip route-static 10.1.2.0 255.255.255.0 192.168.1.2                              
     ip route-static 10.1.2.0 255.255.255.0 192.168.2.2   
    #                                                                               
     policy-based-route lab1 permit node 10                                         
      if-match packet-length 64 1400                                                 
      apply ip-address next-hop 192.168.1.2                                           
     policy-based-route lab1 permit node 20                                         
      if-match packet-length 1401 1500                                              
      apply ip-address next-hop 192.168.2.2 
    #                                                                               
     ip local policy-based-route lab1  
    
  • Configuration file of RouterB

    #
     sysname RouterB
    #                                                                               
    interface GigabitEthernet1/0/0                                                  
     ip address 192.168.1.2 255.255.255.0   
    #                                                                               
    interface GigabitEthernet2/0/0                                                  
     ip address 192.168.2.2 255.255.255.0   
    #                                                                               
    interface LoopBack0                                                             
     ip address 10.1.2.1 255.255.255.0 
    #                                                                               
     ip route-static 10.1.1.0 255.255.255.0 192.168.1.1                              
     ip route-static 10.1.1.0 255.255.255.0 192.168.2.1   
    
Translation
Download
Updated: 2019-05-17

Document ID: EDOC1000174069

Views: 123827

Downloads: 269

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next