Friday, May 27, 2011

L3 VPN with static routes

Configuration for CE:-
===================

Default static route to the PE

#--------------------------------------------------
echo "Static Route Configuration"
#--------------------------------------------------
        static-route 0.0.0.0/0 next-hop 192.168.1.2
#--------------------------------------------------










Configurations at the PE


*A:SAS-X>config>router>bgp# info
----------------------------------------------
            family vpn-ipv4
            router-id 11.11.11.11
            group "mpbgp"
                local-address 11.11.11.11 << --- Local router id
                neighbor 10.10.10.10 <<--- Neighbor router id
                    local-address 11.11.11.11
                    local-as 1
                    peer-as 1
                exit
            exit
----------------------------------------------
*A:SAS-X>config>router>bgp#


*A:SAS-X>config>service>vprn# info
----------------------------------------------
            router-id 11.11.11.11
            maximum-routes 32000
            autonomous-system 1
            route-distinguisher 1:1010
            auto-bind ldp
            vrf-target target:1:1010
            interface "ce1" create
                address 192.168.1.2/24
                sap 1/1/14 create
                exit
            exit
            static-route 66.1.1.1/32 next-hop 192.168.1.1  <<---Static route pointing towards the CE router
            no shutdown
----------------------------------------------
*A:SAS-X>config>service>vprn#

*A:SAS-X>config>service>vprn# show router 1010 route-table

===============================================================================
Route Table (Service: 1010)
===============================================================================
Dest Prefix                                   Type    Proto    Age         Pref
       Next Hop[Interface Name]                                     Metric    
-------------------------------------------------------------------------------
66.1.1.1/32                                   Remote  Static   00h47m12s   5   <<-- CE attached
       192.168.1.1                                                  1
88.1.1.1/32                                   Remote  BGP VPN  00h22m13s   170 <<--Route from remote CE
       10.10.10.10                                                  0
172.1.1.0/24                                  Remote  BGP VPN  00h23m12s   170 <<-- Remote prefix for the AC.
       10.10.10.10                                                  0
192.168.1.0/24                                Local   Local    00h47m12s   0  
       ce1                                                          0
-------------------------------------------------------------------------------
No. of Routes: 4
===============================================================================
*A:SAS-X>config>service>vprn#

show router bgp routes vpn-ipv4

===============================================================================
 BGP Router ID:11.11.11.11      AS:1           Local AS:1         
===============================================================================
 Legend -
 Status codes  : u - used, s - suppressed, h - history, d - decayed, * - valid
 Origin codes  : i - IGP, e - EGP, ? - incomplete, > - best

===============================================================================
BGP VPN-IPv4 Routes

*A:SAS-X>config>service>vprn# show router bgp routes vpn-ipv4
===============================================================================
 BGP Router ID:11.11.11.11      AS:1           Local AS:1         
===============================================================================
 Legend -
 Status codes  : u - used, s - suppressed, h - history, d - decayed, * - valid
 Origin codes  : i - IGP, e - EGP, ? - incomplete, > - best

===============================================================================
BGP VPN-IPv4 Routes
===============================================================================
Flag  Network                                            LocalPref   MED      
      Nexthop                                                        VPNLabel 
      As-Path                                                                 
-------------------------------------------------------------------------------
u*>i  1:1010:88.1.1.1/32                                 100         None     
      10.10.10.10                                                    131069   
      No As-Path                                                              
u*>i  1:1010:172.1.1.0/24                                100         None     
      10.10.10.10                                                    131069   
      No As-Path                                                              
-------------------------------------------------------------------------------
Routes : 2
Press any key to continue (Q to quit)

Pinging between the CE routers does not require any extra configuration however the following configuration is required while pinging from the PE devices:-

*A:SAS-X# ping 172.1.1.2 router 1010

198 2011/05/19 04:42:40.66 UTC WARNING: SYSTEM #2007 Base OAM
"Test name "CliIcmpPing-6", owner name "TiMOS CLI" managed object created"
PING 172.1.1.2 56 data bytes
64 bytes from 172.1.1.2: icmp_seq=1 ttl=63 time=15.9ms.
64 bytes from 172.1.1.2: icmp_seq=2 ttl=63 time=11.0ms.
64 bytes from 172.1.1.2: icmp_seq=3 ttl=63 time=11.0ms.
64 bytes from 172.1.1.2: icmp_seq=4 ttl=63 time=10.5ms.
64 bytes from 172.1.1.2: icmp_seq=5 ttl=63 time=36.2ms.

---- 172.1.1.2 PING Statistics ----
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min = 10.5ms, avg = 16.9ms, max = 36.2ms, stddev = 9.81ms

199 2011/05/19 04:42:44.73 UTC WARNING: SYSTEM #2008 Base OAM
"Test name "CliIcmpPing-6", owner name "TiMOS CLI" managed object deleted"
*A:SAS-X#