Junos Automation (Scripting)
Reply
Juniper Employee
JUNOS_script
Posts: 2
Registered: ‎11-09-2007
0

Commit script for adding vpls instance

Commit script for adding vpls instance
 
Description: Using an apply-macro this commit script will create a vpls instance.
Tags: VPLS, Commit Script
Contributor: Ferdinand Casido

jnpr@NEBBIOLO-RE0# show routing-instances                            
apply-macro vpls-add {
    ifl ge-0/0/0.609;
    name LAB-VPLS-BGP;
    rd 1;
    sid 1;
    sname MTT-LAB1;
    sr 10;
}

[edit]
jnpr@NEBBIOLO-RE0# show routing-instances | display commit-scripts   
[edit routing-instances apply-macro vpls-add]
  warning: instance is LAB-VPLS-BGP ifname is ge-0/0/0.609 AS is 6453 RD is 1 SNAME is MTT-LAB1 SR is 10 SID is 1
apply-macro vpls-add {
    ifl ge-0/0/0.609;
    name LAB-VPLS-BGP;
    rd 1;
    sid 1;
    sname MTT-LAB1;
    sr 10;
}
LAB-VPLS-BGP {
    instance-type vpls;
    interface ge-0/0/0.609;
    route-distinguisher 6453:1;
    vrf-target target:6453:1;
    protocols {
        vpls {
            site-range 10;
            no-tunnel-services;
            site MTT-LAB1 {
                site-identifier 1;
            }
        }
    }
}

[edit]
jnpr@NEBBIOLO-RE0# run show vpls connections
Layer-2 VPN connections:

Legend for connection status (St)  
EI -- encapsulation invalid      NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch     WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down    NP -- interface hardware not present
CM -- control-word mismatch      -> -- only outbound connection is up
CN -- circuit not provisioned    <- -- only inbound connection is up
OR -- out of range               Up -- operational
OL -- no outgoing label          Dn -- down                     
LD -- local site signaled down   CF -- call admission control failure     
RD -- remote site signaled down  SC -- local and remote site ID collision
LN -- local site not designated  LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status  IL -- no incoming label
MM -- MTU mismatch

Legend for interface status
Up -- operational          
Dn -- down

Instance: LAB-VPLS-BGP
Local site: MTT-LAB1 (1)
    connection-site           Type  St     Time last up          # Up trans
    2                         rmt   Up     Oct  9 10:50:12 2007           1
      Local interface: lsi.1049344, Status: Up, Encapsulation: VPLS
        Description: Intf - vpls LAB-VPLS-BGP local site 1 remote site 2
      Remote PE: 66.110.0.74, Negotiated control-word: No
      Incoming label: 262146, Outgoing label: 262152
Juniper Employee
balapar
Posts: 1
Registered: ‎08-24-2009
0

Re: Commit script for adding vpls instance

Good example script !
Contributor
MBazama
Posts: 16
Registered: ‎10-27-2009
0

Re: adding vpls instance

Hello there, 

 

I have a problem and I would be glad if you have a solution of it.

I have recently upgraded M160 from JUNOS 7.3 to 9.6 to use Inter-AS feature that was first introduced in JUNOS 9.5. The problem is that I can not configure VPLS instances anymore, apparently, I found out that starting from JUNOS 8.1 VPLS is not supported on M160. so is there anyway that I can enable VPLS instances on M160

 

Thank you very much for your support

 

sincerely,

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.