Syntax Test for DPA feature

Syntax on Peer statement

dpa_syntax_peer.cfg

Tests

  1. Group 1 peer statement with dpa 20 as 3552
  2. Group 2 autonomous-system used
  3. Group 3 - no dpa option used
  4. Group 4 - DPA & Communities in syntax (dpa 20 as 3552)
  5. Group 5 - DPA null & community set
  6. Group 6 - DPA & Communities in syntax
  7. Group 7 - DPA, Community, MED
  8. test 22 - dpa:as 1 dpa 30,

Any packets received with the bgp peer or aspath will also be check for DPA within the bgp packet of this value. The DPA is specified as part of the AS Path optional (aspath-opt) attributes.

  • the export statement for bgp Any packets exported to a bgp neighbor may select routes to be sent by specifying DPA on the source bgp protocol. In addition, packets exported to a peer may have the DPA modified by specifying DPA as part of the AS PATH modified.

    BGP Group statement syntax

    
    group type [internal | external] peeras 185 
    	aspath-opt {
    	dpa [number] 
    	}
    	{
    	peer host-addr;
    	}
    
    
    Examples of this code are:
    
    group type internal peeras 185
    	aspath-opt {
    	dpa 20
    	}
    	{
    	peer 198.108.60.43;
    	}
    
    group type external peeras 65 
    	aspath-opt {
    	dpa 20
    	}
    	{
    	peer 198.108.60.43;
    	}
    
    

    import syntax

    
    import proto bgp as as-id 
    	aspath-opt {
    		dpa [number] 
    	  } [pref [number]]
            {
            route-filter;
            };
    
    
    Example of this code is:
    
    import proto bgp as 185 
    	aspath-opt
    		{ 
    		dpa 20 as 20;
    		}
    	pref 20
    	{
    	128.2 restrict;
    	all;
    	}
    
    

    export syntax

    
    export proto bgp as 2750
            {
            proto bgp as 2704 
    	aspath-opt {
    		dpa 10 as 20
    		}   
    		 {
                    route-filter;
                    }
            }
    
    
  • This export statement adds the dpa value to a set of routes. export proto bgp as 2750 mod-aspath { dpa value; # Note AS will be taken from this node } { proto bgp as 2704 { route-filter; } proto bgp aspath any { route-filter; } };
  • Tests

    The new DPA feature needs to test:
    1. syntax tests
    2. importing gated route with DPA
    3. exporting gated route with DPA already there
    4. adding DPA as export the route

    Syntax Tests

    1. Test 1: DPA on peer statement
    2. Test 2: DPA on import statement with AS
    3. Test 3: DPA on import statement with AS path
    4. Test 4: DPA on export statement as "proto as"
    5. Test 5: DPA on export statement as "proto aspath"
    6. Test 6: DPA on export statement as "mod-aspath"

    Each of the DPA statements on import and export will test:

    1. DPA without AS (assumes this AS)
    2. DPA on import statement with AS that is this AS
    3. DPA on import statement with AS that is not this AS

    Import gated route with DPA

    Test preference setting based on AS based on

    1. AS
    2. AS_PATH
    3. AS & nlri prefix
    4. AS_PATH & nlri prefix

    Export gated route with DPA

    Export with DPA as additional filter on
    1. AS
    2. AS_PATH
    3. AS & nlri prefix
    4. AS_PATH & nlri prefix

    DPA as export the route

    Adding to route from the following sources

    1. static
    2. egp
    3. bgp
    4. rip
    5. ospf