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

ME60 V800R010C10SPC500 Configuration Guide - IP Routing 01

This is ME60 V800R010C10SPC500 Configuration Guide - IP Routing
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 Applying a Route-Policy to Imported Routes

Example for Applying a Route-Policy to Imported Routes

By applying route-policies, you can control the import of routes and set attributes for imported routes.

Networking Requirements

In Figure 12-2, Device A and Device B exchange routing information through OSPF; Device B and Device C exchange routing information through IS-IS.

It is required that Device B import IS-IS routes to OSPF and use the route-policy to set the cost of the route to 172.10.1.0/24 to 100 and set the tag of the route to 172.10.2.0/24 to 20.

Figure 12-2 Applying a route-policy to imported routes
NOTE:

Interfaces 1 through 4 in this example are GE 1/0/0, GE 2/0/0, GE 3/0/0, GE 1/0/1, respectively.



Precautions

When applying a route-policy to imported routes, note the following rules:

  • When configuring an IP prefix list, specify the IP prefix range as required.

  • The route-policy name is case sensitive.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure basic IS-IS functions on Device B and Device C.

  2. Configure OSPF on Device A and Device B and import IS-IS routes.

  3. Configure a routing policy on Device B, apply the route-policy when OSPF imports IS-IS routes, and check the routes.

Data Preparation

To complete the configuration, you need the following data:

  • Area IDs, IS-IS levels, and system IDs of Device B and Device C

  • Area 0 (backbone area), in which Device A and Device B are located

  • ACL number, name of the IP prefix list, cost of the route to 172.10.1.0/24, and tag of the route to 172.10.2.0/24

Procedure

  1. Configure IP addresses for interfaces. For configuration details, see Configuration Files in this section.
  2. Configure IS-IS.

    # Configure Device C.

    [~DeviceC] isis
    [*DeviceC-isis-1] is-level level-2
    [*DeviceC-isis-1] network-entity 10.0000.0000.0001.00
    [*DeviceC-isis-1] quit
    [*DeviceC] interface gigabitethernet 1/0/1
    [*DeviceC-GigabitEthernet1/0/1] isis enable
    [*DeviceC-GigabitEthernet1/0/1] quit
    [*DeviceC] interface GigabitEthernet 1/0/0
    [*DeviceC-GigabitEthernet1/0/0] isis enable
    [*DeviceC-GigabitEthernet1/0/0] quit
    [*DeviceC] interface GigabitEthernet 2/0/0
    [*DeviceC-GigabitEthernet2/0/0] isis enable
    [*DeviceC-GigabitEthernet2/0/0] quit
    [*DeviceC] interface GigabitEthernet 3/0/0
    [*DeviceC-GigabitEthernet3/0/0] isis enable
    [*DeviceC-GigabitEthernet3/0/0] commit
    [~DeviceC-GigabitEthernet3/0/0] quit

    # Configure Device B.

    [~DeviceB] isis
    [*DeviceB-isis-1] is-level level-2
    [*DeviceB-isis-1] network-entity 10.0000.0000.0002.00
    [*DeviceB-isis-1] quit
    [*DeviceB] interface gigabitethernet 2/0/0
    [*DeviceB-GigabitEthernet2/0/0] isis enable
    [*DeviceB-GigabitEthernet2/0/0] commit
    [~DeviceB-GigabitEthernet2/0/0] quit

  3. Configure OSPF and import routes.

    # Configure Device A and enable OSPF.

    [~DeviceA] ospf
    [*DeviceA-ospf-1] area 0
    [*DeviceA-ospf-1-area-0.0.0.0] network 192.158.1.0 0.0.0.255
    [*DeviceA-ospf-1-area-0.0.0.0] commit
    [~DeviceA-ospf-1-area-0.0.0.0] quit
    [*DeviceA-ospf-1] quit

    # Configure Device B, enable OSPF, and import IS-IS routes.

    [~DeviceB] ospf
    [*DeviceB-ospf-1] area 0
    [*DeviceB-ospf-1-area-0.0.0.0] network 192.158.1.0 0.0.0.255
    [*DeviceB-ospf-1-area-0.0.0.0] quit
    [*DeviceB-ospf-1] import-route isis 1
    [*DeviceB-ospf-1] commit
    [~DeviceB-ospf-1] quit

    # Check the IP routing table on Device A to view the imported routes.

    [~DeviceA] display ospf routing
              OSPF Process 1 with Router ID 192.158.1.1
                       Routing Tables
     Routing for Network
     Destination        Cost  Type       NextHop         AdvRouter       Area
     192.158.1.0/24     1  Stub       192.158.1.1     192.158.1.1     0.0.0.0
     Routing for ASEs
     Destination        Cost      Type       Tag         NextHop         AdvRouter
     172.10.1.0/24      1        Type2      1           192.158.1.2     192.158.1.2
     172.10.2.0/24      1        Type2      1           192.158.1.2     192.158.1.2
     172.10.3.0/24      1        Type2      1           192.158.1.2     192.158.1.2
     192.158.2.0/24     1        Type2      1           192.158.1.2     192.158.1.2
     Routing for NSSAs
     Destination        Cost      Type       Tag         NextHop         AdvRouter
     Total Nets: 5
     Intra Area: 1  Inter Area: 0  ASE: 4  NSSA: 0

  4. Configure filters.

    # Configure an ACL numbered 2002 to import the route to 172.10.2.0/24.

    [~DeviceB] acl number 2002
    [*DeviceB-acl4-basic-2002] rule permit source 172.10.2.0 0.0.0.255
    [*DeviceB-acl4-basic-2002] commit
    [~DeviceB-acl4-basic-2002] quit

    # Configure an IP prefix list named prefix-a to import the route to 172.10.1.0/24.

    [~DeviceB] ip ip-prefix prefix-a index 10 permit 172.10.1.0 24
    [*DeviceB] commit

  5. Configure a route-policy.

    [~DeviceB] route-policy isis2ospf permit node 10
    [*DeviceB-route-policy] if-match ip-prefix prefix-a
    [*DeviceB-route-policy] apply cost 100
    [*DeviceB-route-policy] quit
    [*DeviceB] route-policy isis2ospf permit node 20
    [*DeviceB-route-policy] if-match acl 2002
    [*DeviceB-route-policy] apply tag 20
    [*DeviceB-route-policy] quit
    [*DeviceB] route-policy isis2ospf permit node 30
    [*DeviceB] commit
    [~DeviceB-route-policy] quit

  6. Apply the route-policy when routes are imported.

    # Configure Device B and apply the route-policy when routes are imported.

    [~DeviceB] ospf
    [*DeviceB-ospf-1] import-route isis 1 route-policy isis2ospf
    [*DeviceB-ospf-1] commit
    [~DeviceB-ospf-1] quit

    # Check the OSPF routing table on Device A. The command output shows that the cost of the route to 172.10.1.0/24 is 100, the tag of the route to 172.10.2.0/24 is 20, and that other route attributes remain unchanged.

    [~DeviceA] display ospf routing
              OSPF Process 1 with Router ID 192.158.1.1
                       Routing Tables
     Routing for Network
     Destination        Cost  Type       NextHop         AdvRouter       Area
     192.158.1.0/24     1  Stub       192.158.1.1     192.158.1.1     0.0.0.0
     Routing for ASEs
     Destination        Cost      Type       Tag         NextHop         AdvRouter
     172.10.1.0/24      100       Type2      1           192.158.1.2     192.158.1.2
     172.10.2.0/24      1          Type2      20          192.158.1.2     192.158.1.2
     172.10.3.0/24      1          Type2      1           192.158.1.2     192.158.1.2
     192.158.2.0/24     1          Type2      1           192.158.1.2     192.158.1.2
     Routing for NSSAs
     Destination        Cost      Type       Tag         NextHop         AdvRouter
     Total Nets: 5
     Intra Area: 1  Inter Area: 0  ASE: 4  NSSA: 0

Configuration Files

  • Device A configuration file

    #
     sysname DeviceA
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 192.158.1.1 255.255.255.0
    #
    ospf 1
     area 0.0.0.0
      network 192.158.1.0 0.0.0.255
    #
    return
  • Device B configuration file

    #
    sysname DeviceB
    #
    acl number 2002
     rule 5 permit source 172.10.2.0 0.0.0.255
    #
    isis 1
     is-level level-2
     network-entity 10.0000.0000.0002.00
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 192.158.1.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 192.158.2.2 255.255.255.0
     isis enable 1
    #
    ospf 1
     import-route isis 1 route-policy isis2ospf
     area 0.0.0.0
      network 192.158.1.0 0.0.0.255
    #
    route-policy isis2ospf permit node 10
     if-match ip-prefix prefix-a
     apply cost 100
    #
    route-policy isis2ospf permit node 20
     if-match acl 2002
     apply tag 20
    #
    route-policy isis2ospf permit node 30
    #
    ip ip-prefix prefix-a index 10 permit 172.10.1.0 24
    #
    return
  • Device C configuration file

    #
    sysname DeviceC
    #
    isis 1
     is-level level-2
     network-entity 10.0000.0000.0001.00
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 172.10.1.1 255.255.255.0
     isis enable 1
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 172.10.2.1 255.255.255.0
     isis enable 1
    #
    interface GigabitEthernet3/0/0
     undo shutdown
     ip address 172.10.3.1 255.255.255.0
     isis enable 1
    #
    interface GigabitEthernet1/0/1
     ip address 192.158.2.1 255.255.255.0
     isis enable 1
    #
    return
Translation
Download
Updated: 2019-01-04

Document ID: EDOC1100059437

Views: 20330

Downloads: 15

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