Example for Configuring RIP to Import External Routes

Created: Mar 16, 2016 17:39:09Latest reply: Mar 16, 2016 17:39:16 1453 1 0 0

To obtain more RIP routing information, you can configure RIP to import external routes. You can run commands to view the configuration results.

Networking Requirements

As shown in Figure 3-2, two RIP processes, RIP 100 and RIP 200, run on Router B. Router B exchanges routing information with Router A and Router C through RIP 100 and RIP 200 respectively.

It is required that the two RIP processes of Router B import RIP routes from each other. The cost of the routes imported from RIP 200 defaults to 3.

In addition, a filtering policy needs to be configured on Router B to filter out the route 192.168.4.0/24 imported from RIP 200 and prevent it from being advertised to Router A.

Figure 3-2  Networking diagram for configuring RIP to import external routes

Configuration Roadmap

The configuration roadmap is as follows:

  1. Enable RIP 100 and RIP 200 on each router and specify network segments.

  2. Configure the two RIP processes on Router B to import routes from each other and set the default cost of the routes imported from RIP 200 to 3.

  3. Configure an ACL on Router B to filter the routes imported from RIP 200.

Data Preparation

To complete the configuration, you need the following data:

  • RIP 100 and network segments (192.168.1.0 and 192.168.0.0) on Router A

  • RIP 100, RIP 200, and network segments (192.168.1.0 and 192.168.2.0) on Router B

  • RIP 200 and network segments (192.168.2.0, 192.168.3.0, and 192.168.4.0) on Router C

  • Default cost of the routes imported by Router B from RIP 200, which is 3

  • ACL 2000 that is used to deny the route with the source network segment being 192.168.4.0

Procedure

  1. Configure an IP address for each interface.

    The configuration details are not described here.

  2. Configure basic RIP functions.

    # Enable RIP process 100 on Router A.

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

    # Enable two RIP processes, RIP 100 and RIP 200, on Router B.

    [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 Router C.

    [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

    # Check the routing table of Router A.

    [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
        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       InLoopBack0
        192.168.1.0/24  Direct 0    0        D      192.168.1.1     Pos1/0/0
        192.168.1.1/32  Direct 0    0        D      127.0.0.1       InLoopBack0
  3. Configure RIP to import external routes.

    # Set the default route cost of RIP 200 routes imported by RIP 100 to 3 on Router B and configure the two RIP processes to import routes from each other.

    [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

    # Check the routing table of Router A after the routes are imported. The routes to network segments 192.168.2.0/24, 192.168.3.0/24, and 192.168.4.0/24 are imported to RIP.

    [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
        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       InLoopBack0
        192.168.1.0/24  Direct 0    0        D      192.168.1.1     Pos1/0/0
        192.168.1.1/32  Direct 0    0       D      127.0.0.1       InLoopBack0
        192.168.2.0/24  RIP    100  4        D      192.168.1.2     Pos1/0/0
        192.168.3.0/24  RIP    100  4        D      192.168.1.2     Pos1/0/0
        192.168.4.0/24  RIP    100  4        D      192.168.1.2     Pos1/0/0
  4. Configure RIP to filter the imported routes.

    # Configure an ACL on Router B and set a rule to deny the packets with the source address being 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

    # Filter out the route 192.168.4.0/24 imported from RIP 200 on Router B according to the ACL rule.

    [RouterB] rip 100
    [RouterB-rip-100] filter-policy 2000 export
  5. Verify the configuration.

    # Check the routing table of Router A after the filtering. The route to 192.168.4.0/24 does not exist in the routing table. This means that the route is filtered out.

    [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
        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       InLoopBack0
        192.168.1.0/24  Direct 0    0        D      192.168.1.1     Pos1/0/0
        192.168.1.1/32  Direct 0    0        D      127.0.0.1       InLoopBack0
        192.168.2.0/24  RIP    100  4        D      192.168.1.2     Pos1/0/0
        192.168.3.0/24  RIP    100  4        D      192.168.1.2     Pos1/0/0
  • x
  • convention:

Nana00     Created Mar 16, 2016 17:39:16 Helpful(0) Helpful(0)

Configuration Files

  • Configuration file of Router A

    #
     sysname RouterA
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 192.168.0.1 255.255.255.0
    #
    interface Pos1/0/0
     link-protocol ppp
     undo shutdown
     ip address 192.168.1.1 255.255.255.0
    #
    rip 100
     network 192.168.0.0
     network 192.168.1.0
    #
    return
  • Configuration file of Router B

    #
     sysname RouterB
    #
    acl number 2000
     rule 5 deny source 192.168.4.0 0.0.0.255
     rule 10 permit
    #
    interface Pos1/0/0
     link-protocol ppp
     undo shutdown
     ip address 192.168.1.2 255.255.255.0
    #
    interface Pos2/0/0
     link-protocol ppp
     undo shutdown
     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 Router C

    #
     sysname RouterC
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 192.168.3.1 255.255.255.0
    #
    interface GigabitEthernet3/0/0
     undo shutdown
     ip address 192.168.4.1 255.255.255.0
    #
    interface Pos1/0/0
     link-protocol ppp
     undo shutdown
     ip address 192.168.2.2 255.255.255.0
    #
    rip 200
     network 192.168.2.0
     network 192.168.3.0
     network 192.168.4.0
    #
    return
  • x
  • convention:

Reply

Reply
You need to log in to reply to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Fast reply Scroll to top