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 Importing Routes to RIP

Example for Importing Routes to RIP

Networking Requirements

As shown in Figure 3-10, two RIP processes, RIP100 and RIP200, run on RouterB. RouterA needs to communicate with network segment 192.168.3.0/24.

Figure 3-10 Network diagram of configuring RIP to import external routes

Configuration Roadmap

The configuration roadmap is as follows:

  1. Enable RIP on each router to implement network connections between processes.

  2. Import routes between RIP100 and RIP200 on RouterB and set the default metric of routes imported from RIP200 to 3.

  3. Configure an ACL on RouterB to filter route 192.168.4.0/24 imported from RIP200 so that RouterA can only communicate with network segment 192.168.3.0/24.

Procedure

  1. Configure an IP address for each interface.

    # Configure Router A.

    <Huawei> system-view
    [Huawei] sysname RouterA
    [RouterA] interface gigabitethernet 1/0/0
    [RouterA-GigabitEthernet1/0/0] ip address 192.168.1.1 24
    [RouterA-GigabitEthernet1/0/0] quit
    [RouterA] interface gigabitethernet 2/0/0
    [RouterA-GigabitEthernet2/0/0] ip address 192.168.0.1 24
    [RouterA-GigabitEthernet2/0/0] quit

    The configurations of Router B, and Router C are similar to the configuration of Router A, and are not mentioned here.

  2. Configure the basic RIP functions.

    # Enable RIP process 100 on RouterA.

    [RouterA] rip 100
    [RouterA-rip-100] network 192.168.0.0
    [RouterA-rip-100] network 192.168.1.0
    [RouterA-rip-100] quit

    # Enable RIP processes 100 and 200 on RouterB.

    [RouterB] rip 100
    [RouterB-rip-100] network 192.168.1.0
    [RouterB-rip-100] quit
    [RouterB] rip 200
    [RouterB-rip-200] network 192.168.2.0
    [RouterB-rip-200] quit

    # Enable RIP process 200 on RouterC.

    [RouterC] rip 200
    [RouterC-rip-200] network 192.168.2.0
    [RouterC-rip-200] network 192.168.3.0
    [RouterC-rip-200] network 192.168.4.0
    [RouterC-rip-200] quit

    # View the routing table on RouterA.

    [RouterA] display ip routing-table
    Route Flags: R - relay,
    D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 7       Routes : 7
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
          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
    127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
        192.168.0.0/24  Direct  0    0           D   192.168.0.1     GigabitEthernet2/0/0
        192.168.0.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet2/0/0
      192.168.0.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet2/0/0
        192.168.1.0/24  Direct  0    0           D   192.168.1.1     GigabitEthernet1/0/0
        192.168.1.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet1/0/0
      192.168.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet1/0/0
    255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

  3. Configure RIP to import external routes.

    # On RouterB, set the default metric of imported routes to 3 and configure the RIP processes to import routes into each other's routing table.

    [RouterB] rip 100
    [RouterB-rip-100] default-cost 3
    [RouterB-rip-100] import-route rip 200
    [RouterB-rip-100] quit
    [RouterB] rip 200
    [RouterB-rip-200] import-route rip 100
    [RouterB-rip-200] quit

    # View the routing table of RouterA after the routes are imported.

    [RouterA] display ip routing-table
    Route Flags: R - relay,
    D - download to fib
    ------------------------------------------------------------------------------
    
    Routing Tables: Public
             Destinations : 10       Routes : 10
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
          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
    127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
        192.168.0.0/24  Direct  0    0           D   192.168.0.1     GigabitEthernet2/0/0
        192.168.0.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet2/0/0
      192.168.0.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet2/0/0
        192.168.1.0/24  Direct  0    0           D   192.168.1.1     GigabitEthernet1/0/0
        192.168.1.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet1/0/0
      192.168.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet1/0/0
        192.168.2.0/24  RIP     100  4           D   192.168.1.2     GigabitEthernet1/0/0
        192.168.3.0/24  RIP     100  4           D   192.168.1.2     GigabitEthernet1/0/0
        192.168.4.0/24  RIP     100  4           D   192.168.1.2     GigabitEthernet1/0/0
    255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    

  4. Configure RIP to filter imported routes.

    # Configure an ACL on RouterB and add a rule to the ACL. The rule denies the packets sent from 192.168.4.0/24.

    [RouterB] acl 2000
    [RouterB-acl-basic-2000] rule deny source 192.168.4.0 0.0.0.255
    [RouterB-acl-basic-2000] rule permit
    [RouterB-acl-basic-2000] quit

    # Configure RouterB to filter route 192.168.4.0/24 imported from RIP200.

    [RouterB] rip 100
    [RouterB-rip-100] filter-policy 2000 export
    [RouterB-rip-100] quit

  5. Verify the configuration.

    # Display the RIP routing table of RouterA after the routes are filtered.

    [RouterA] display ip routing-table
    Route Flags: R - relay,
    D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 9        Routes : 9
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
          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
    127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
        192.168.0.0/24  Direct  0    0           D   192.168.0.1     GigabitEthernet2/0/0
        192.168.0.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet2/0/0
      192.168.0.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet2/0/0
        192.168.1.0/24  Direct  0    0           D   192.168.1.1     GigabitEthernet1/0/0
        192.168.1.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet1/0/0
      192.168.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet1/0/0
        192.168.2.0/24  RIP     100  4           D   192.168.1.2     GigabitEthernet1/0/0
        192.168.3.0/24  RIP     100  4           D   192.168.1.2     GigabitEthernet1/0/0
    255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

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.0.1 255.255.255.0
    #
    rip 100
     network 192.168.0.0
     network 192.168.1.0
    #
    return
  • Configuration file of RouterB

    #
     sysname RouterB
    #
    acl number 2000
     rule 5 deny source 192.168.4.0 0.0.0.255
     rule 10 permit
    #
    interface GigabitEthernet1/0/0
     ip address 192.168.1.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 192.168.2.1 255.255.255.0
    #
    rip 100
     default-cost 3
     network 192.168.1.0
     filter-policy 2000 export
     import-route rip 200
    #
    rip 200
     network 192.168.2.0
     import-route rip 100
    #
    return
  • Configuration file of RouterC

    #
     sysname RouterC
    #
    interface GigabitEthernet1/0/0
     ip address 192.168.2.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 192.168.3.1 255.255.255.0
    #
    interface GigabitEthernet3/0/0
     ip address 192.168.4.1 255.255.255.0
    #
    rip 200
     network 192.168.2.0
     network 192.168.3.0
     network 192.168.4.0
    #
    return
Translation
Download
Updated: 2019-05-17

Document ID: EDOC1000174069

Views: 112421

Downloads: 252

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