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 Configuring a Basic or Advanced VPN-Target Extended Community Filter

Example for Configuring a Basic or Advanced VPN-Target Extended Community Filter

Basic or advanced VPN-target extended community filters can be configured to filter VPN or VPNv4 routes.

Networking Requirements

In Figure 12-4, an MP-IBGP peer relationship is established between PE1 and PE2. PE2 receives two BGP VPNv4 routes (3.3.3.3/32 and 4.4.4.4/32) from PE1. It is required that a basic or advanced VPN-target extended community filter be configured to filter out the VPNv4 route 4.4.4.4/32 received by PE2.

Figure 12-4 Networking for configuring a basic or advanced VPN-target extended community filter
NOTE:

Interface 1 in this example is GE 1/0/0.



Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure an IP address for each involved interface.

  2. Configure basic MPLS and MPLS LDP, and set up MPLS LSPs.

  3. Configure VPN instance IPv4 address families on PEs.

  4. Establish an MP-IBGP peer relationship between PEs.

  5. Configure static routes and import them to VPN instances on PE1.

  6. Configure a basic or advanced VPN-target extended community filter on PE2.

  7. Configure a route-policy on PE2.

  8. Apply the route-policy on PE2 to the routes to be received from PE1.

Data Preparation

To complete the configuration, you need the following data:

  • VPN instance names: vpna, vpnb, and vpnc

  • ID (1) of a basic VPN-target extended community filter or name (test) of an advanced VPN-target extended community filter

Procedure

  1. Assign an IP address to each interface. For configuration details, see Configuration Files in this section.
  2. Configure basic MPLS and MPLS LDP, and set up MPLS LSPs.

    # Configure PE1.

    [~PE1] mpls lsr-id 1.1.1.1
    [*PE1] mpls
    [*PE1-mpls] commit
    [~PE1-mpls] quit
    [~PE1] mpls ldp
    [*PE1-mpls-ldp] commit
    [~PE1-mpls-ldp] quit
    [~PE1] interface gigabitethernet 1/0/0
    [~PE1-GigabitEthernet1/0/0] mpls
    [*PE1-GigabitEthernet1/0/0] mpls ldp
    [*PE1-GigabitEthernet1/0/0] commit
    [~PE1-GigabitEthernet1/0/0] quit

    # Configure PE2.

    [~PE2] mpls lsr-id 2.2.2.2
    [*PE2] mpls
    [*PE2-mpls] commit
    [~PE2-mpls] quit
    [~PE2] mpls ldp
    [*PE2-mpls-ldp] commit
    [~PE2-mpls-ldp] quit
    [~PE2] interface gigabitethernet 1/0/0
    [~PE2-GigabitEthernet1/0/0] mpls
    [*PE2-GigabitEthernet1/0/0] mpls ldp
    [*PE2-GigabitEthernet1/0/0] commit
    [~PE2-GigabitEthernet1/0/0] quit

  3. Configure VPN instance IPv4 address families on PEs.

    # Configure PE1.

    [~PE1] ip vpn-instance vpna
    [*PE1-vpn-instance-vpna] ipv4-family
    [*PE1-vpn-instance-vpna-af-ipv4] route-distinguisher 1:100
    [*PE1-vpn-instance-vpna-af-ipv4] vpn-target 1:100 both
    [*PE1-vpn-instance-vpna-af-ipv4] quit
    [*PE1-vpn-instance-vpna] quit
    [*PE1] ip vpn-instance vpnb
    [*PE1-vpn-instance-vpnb] ipv4-family
    [*PE1-vpn-instance-vpnb-af-ipv4] route-distinguisher 2:100
    [*PE1-vpn-instance-vpnb-af-ipv4] vpn-target 2:100 both
    [*PE1-vpn-instance-vpnb-af-ipv4] quit
    [*PE1-vpn-instance-vpnb] quit
    [*PE1] commit

    # Configure PE2.

    [~PE2] ip vpn-instance vpnc
    [*PE2-vpn-instance-vpnc] ipv4-family
    [*PE2-vpn-instance-vpnc-af-ipv4] route-distinguisher 1:100
    [*PE2-vpn-instance-vpnc-af-ipv4] vpn-target 3:100 export-extcommunity
    [*PE2-vpn-instance-vpnc-af-ipv4] vpn-target 1:100 import-extcommunity
    [*PE2-vpn-instance-vpnc-af-ipv4] vpn-target 2:100 import-extcommunity
    [*PE2-vpn-instance-vpnc-af-ipv4] quit
    [*PE2-vpn-instance-vpnc] quit
    [*PE2] commit

  4. Establish an MP-IBGP peer relationship between PEs.

    # Configure PE1.

    [~PE1] bgp 100
    [~PE1-bgp] peer 2.2.2.2 as-number 100
    [*PE1-bgp] peer 2.2.2.2 connect-interface loopback 1
    [*PE1-bgp] ipv4-family vpnv4
    [*PE1-bgp-af-vpnv4] peer 2.2.2.2 enable
    [*PE1-bgp-af-vpnv4] commit
    [~PE1-bgp-af-vpnv4] quit
    [~PE1-bgp] quit

    # Configure PE2.

    [~PE2] bgp 100
    [~PE2-bgp] peer 1.1.1.1 as-number 100
    [*PE2-bgp] peer 1.1.1.1 connect-interface loopback 1
    [*PE2-bgp] ipv4-family vpnv4
    [*PE2-bgp-af-vpnv4] peer 1.1.1.1 enable
    [*PE2-bgp-af-vpnv4] commit
    [~PE2-bgp-af-vpnv4] quit
    [~PE2-bgp] quit

  5. Configure static routes and import them to VPN instances on PE1.

    [~PE1] ip route-static vpn-instance vpna 3.3.3.3 32 NULL0
    [*PE1] ip route-static vpn-instance vpnb 4.4.4.4 32 NULL0
    [*PE1] commit
    [~PE1] bgp 100
    [*PE1-bgp] ipv4-family vpn-instance vpna
    [*PE1-bgp-vpna] import-route static
    [*PE1-bgp-vpna] quit
    [*PE1-bgp] ipv4-family vpn-instance vpnb
    [*PE1-bgp-vpnb] import-route static
    [*PE1-bgp-vpnb] quit
    [*PE1-bgp] quit
    [*PE1] commit

    # Run the display bgp vpnv4 all routing-table command on PE2 to check information about BGP VPNv4 routes. The command output shows that VPN instance vpnc receives two routes (3.3.3.3/32 and 4.4.4.4/32).

    [~PE2] display bgp vpnv4 all routing-table 3.3.3.3
     
     BGP local router ID : 10.1.1.2
     Local AS number : 100
     
     Total routes of Route Distinguisher(1:100): 1
     BGP routing table entry information of 3.3.3.3/32:
     Label information (Received/Applied): 32905/NULL
     From: 1.1.1.1 (1.1.1.1)  
     Route Duration: 0d00h06m19s
     Relay IP Nexthop: 10.1.1.1
     Relay IP Out-Interface: GigabitEthernet1/0/0
     Relay Tunnel Out-Interface: GigabitEthernet1/0/0
     Original nexthop: 1.1.1.1
     Qos information : 0x0            
     Ext-Community: RT <1 : 100>
     AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, valid, internal, best, select, pre 255
     Not advertised to any peer yet
        
     VPN-Instance vpnc, Router ID 10.1.1.2:
    
     Total Number of Routes: 1
     BGP routing table entry information of 3.3.3.3/32:
     Route Distinguisher: 1:100
     Remote-Cross route
     Label information (Received/Applied): 32905/NULL
     From: 1.1.1.1 (1.1.1.1)  
     Route Duration: 0d00h06m19s
     Relay Tunnel Out-Interface: GigabitEthernet1/0/0
     Original nexthop: 1.1.1.1
     Qos information : 0x0            
     Ext-Community: RT <1 : 100>
     AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, valid, internal, best, select, pre 255
     Not advertised to any peer yet
    [~PE2] display bgp vpnv4 all routing-table 4.4.4.4
     
     BGP local router ID : 10.1.1.2
     Local AS number : 100
     
     Total routes of Route Distinguisher(2:100): 1
     BGP routing table entry information of 4.4.4.4/32:
     Label information (Received/Applied): 32906/NULL
     From: 1.1.1.1 (1.1.1.1)  
     Route Duration: 0d00h06m24s
     Relay IP Nexthop: 10.1.1.1
     Relay IP Out-Interface: GigabitEthernet1/0/0
     Relay Tunnel Out-Interface: GigabitEthernet1/0/0
     Original nexthop: 1.1.1.1
     Qos information : 0x0            
     Ext-Community: RT <2 : 100>
     AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, valid, internal, best, select, pre 255
     Not advertised to any peer yet
        
     VPN-Instance vpnc, Router ID 10.1.1.2:
    
     Total Number of Routes: 1
     BGP routing table entry information of 4.4.4.4/32:
     Route Distinguisher: 2:100
     Remote-Cross route
     Label information (Received/Applied): 32906/NULL
     From: 1.1.1.1 (1.1.1.1)  
     Route Duration: 0d00h06m24s
     Relay Tunnel Out-Interface: GigabitEthernet1/0/0
     Original nexthop: 1.1.1.1
     Qos information : 0x0            
     Ext-Community: RT <2 : 100>
     AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, valid, internal, best, select, pre 255
     Not advertised to any peer yet

  6. Configure a basic or advanced VPN-target extended community filter on PE2.

    Configure a basic VPN-target extended community filter.

    [~PE2] ip extcommunity-filter 1 index 10 permit rt 1:100
    [*PE2] commit

    Configure an advanced VPN-target extended community filter.

    [~PE2] ip extcommunity-filter advanced test index 10 permit ^1:100$
    [*PE2] commit

  7. Configure a route-policy on PE2.

    In the case of a basic VPN-target extended community filter:

    [~PE2] route-policy test permit node 10
    [*PE2-route-policy] if-match extcommunity-filter 1
    [*PE2-route-policy] quit
    [*PE2] route-policy test deny node 20
    [*PE2] commit

    In the case of an advanced VPN-target extended community filter:

    [~PE2] route-policy test permit node 10
    [*PE2-route-policy] if-match extcommunity-filter test
    [*PE2-route-policy] quit
    [*PE2] route-policy test deny node 20
    [*PE2] commit

  8. Apply the route-policy on PE2 to the routes to be received from PE1.

    [~PE2] bgp 100
    [*PE2-bgp] ipv4-family vpnv4
    [*PE2-bgp-af-vpnv4] peer 1.1.1.1 route-policy test import
    [*PE2-bgp-af-vpnv4] quit
    [*PE2-bgp] quit
    [*PE2] commit

    # Run the display bgp vpnv4 all routing-table command on PE2 to check information about BGP VPNv4 routes. The command output shows that the route 4.4.4.4/32 has been filtered out.

    [~PE2] display bgp vpnv4 all routing-table 3.3.3.3
     
     BGP local router ID : 10.1.1.2
     Local AS number : 100
     
     Total routes of Route Distinguisher(1:100): 1
     BGP routing table entry information of 3.3.3.3/32:
     Label information (Received/Applied): 32905/NULL
     From: 1.1.1.1 (1.1.1.1)  
     Route Duration: 0d00h05m41s
     Relay IP Nexthop: 10.1.1.1
     Relay IP Out-Interface: GigabitEthernet1/0/0
     Relay Tunnel Out-Interface: GigabitEthernet1/0/0
     Original nexthop: 1.1.1.1
     Qos information : 0x0            
     Ext-Community: RT <1 : 100>
     AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, valid, internal, best, select, pre 255
     Not advertised to any peer yet
        
     VPN-Instance vpnc, Router ID 10.1.1.2:
    
     Total Number of Routes: 1
     BGP routing table entry information of 3.3.3.3/32:
     Route Distinguisher: 1:100
     Remote-Cross route
     Label information (Received/Applied): 32905/NULL
     From: 1.1.1.1 (1.1.1.1)  
     Route Duration: 0d00h37m42s
     Relay Tunnel Out-Interface: GigabitEthernet1/0/0
     Original nexthop: 1.1.1.1
     Qos information : 0x0            
     Ext-Community: RT <1 : 100>
     AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, valid, internal, best, select, pre 255
     Not advertised to any peer yet
    [~PE2] display bgp vpnv4 all routing-table 4.4.4.4
    Info: The network does not exist.

Configuration Files

  • PE1 configuration file

    #
    sysname PE1
    #
    ip vpn-instance vpna
     ipv4-family
      route-distinguisher 1:100
      vpn-target 1:100 export-extcommunity
      vpn-target 1:100 import-extcommunity
    #
    ip vpn-instance vpnb
     ipv4-family    
      route-distinguisher 2:100
      vpn-target 2:100 export-extcommunity
      vpn-target 2:100 import-extcommunity
    #
    mpls lsr-id 1.1.1.1
    #
    mpls
    #
    mpls ldp
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 10.1.1.1 255.255.255.0
     mpls
     mpls ldp
    #
    interface LoopBack1
     ip address 1.1.1.1 255.255.255.255
    #
    bgp 100
     peer 2.2.2.2 as-number 100
     peer 2.2.2.2 connect-interface LoopBack1
     #
     ipv4-family unicast
      undo synchronization
      peer 2.2.2.2 enable
     #
     ipv4-family vpnv4
      policy vpn-target
      peer 2.2.2.2 enable
     #
     ipv4-family vpn-instance vpna
      import-route static
     #
     ipv4-family vpn-instance vpnb
      import-route static
    #
    ip route-static 2.2.2.2 255.255.255.255 GigabitEthernet1/0/0 10.1.1.2
    ip route-static vpn-instance vpna 3.3.3.3 255.255.255.255 NULL0
    ip route-static vpn-instance vpnb 4.4.4.4 255.255.255.255 NULL0
    #
    return
  • PE2 configuration file

    #
    sysname PE2
    #
    ip vpn-instance vpnc
     ipv4-family
      route-distinguisher 1:100
      vpn-target 3:100 export-extcommunity
      vpn-target 1:100 import-extcommunity
      vpn-target 2:100 import-extcommunity
    #
    mpls lsr-id 2.2.2.2
    #
    mpls
    #
    mpls ldp
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 10.1.1.2 255.255.255.0
     mpls
     mpls ldp
    #
    interface LoopBack1
     ip address 2.2.2.2 255.255.255.255
    #
    bgp 100
     peer 1.1.1.1 as-number 100
     peer 1.1.1.1 connect-interface LoopBack1
     #
     ipv4-family unicast
      undo synchronization
      peer 1.1.1.1 enable
     #
     ipv4-family vpnv4
      policy vpn-target
      peer 1.1.1.1 enable
      peer 1.1.1.1 route-policy test import
    #
    route-policy test permit node 10
     if-match extcommunity-filter 1
    #               
    route-policy test deny node 20
    #
    ip extcommunity-filter 1 index 10 permit rt 1:100
    #
    ip route-static 1.1.1.1 255.255.255.255 GigabitEthernet1/0/0 10.1.1.1
    #
    return
Translation
Download
Updated: 2019-01-04

Document ID: EDOC1100059437

Views: 20500

Downloads: 15

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