# L2VPN (VPLS with BGP autodiscovery) configuration

# URL

frinx-openconfig-network-instance:network-instances/network-instance=

# OPENCONFIG YANG

{
    "network-instance": [
        {
            "config": {
                "name": ""
                "type": "L2VSI" //matches vpls-instance-type in ietf
                "enabled": true
            }
            "connection-points": {
                "connection-point": [
                    {
                        "config": {
                            "connection-point-id": "1"
                        }
                        "endpoints": {
                            "endpoint": [
                                {
                                    "config": {
                                        "endpoint-id": ""
                                        "type": "LOCAL"
                                        "local": {
                                            "config": {
                                                "interface": ""
                                                "subinterface": 
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                    {
                        "config": {
                            "connection-point-id": "2"
                        }
                        "endpoints": {
                            "endpoint": [
                                {
                                    "config": {
                                        "endpoint-id": ""
                                        "type": "REMOTE"
                                        "remote": {
                                            "config": {
                                                "virtual-circuit-identifier": 
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}
{
    "network-instance": [
        {
            "config": {
                "name": "default"
            }
            "protocols": {
                "protocol": [
                    {
                        "config": {
                            "identifier": "BGP"
                            "enabled": true
                        }
                        "bgp": {
                            "global": {
                                "as": 
                            }
                        }
                    }
                ]
            }
        }
    ]
}

# OS Configuration Commands

# Cisco IOS (not fully tested yet ... vIOS does not support VPLS)

# CLI

If connection point type remote

bridge-domain 

l2 vfi  autodiscovery
 vpn id 
 bridge-domain 

If connection point type local without subif

bridge-domain 

interface 
 service instance  ethernet
  encapsulation untagged
  bridge-domain 

If connection point type local with subif

bridge-domain 

interface 
 service instance  ethernet
  encapsulation dot1q
  rewrite ingress tag pop 1 symmetric
  bridge-domain 
# Unit

NOT IMPLEMENTED

# CISCO IOS XR (5.1.3) (6.1.2)

# CLI

If connection point type remote

l2vpn
 bridge group frinx
  bridge-domain 
   vfi 
    vpn-id 
    autodiscovery bgp
     rd auto
     route-target :
     signaling-protocol bgp
      ve-id 

If connection point type local without subif

interface 
 l2transport

l2vpn
 bridge group frinx
  bridge-domain 
   interface 

If connection point type local with subif (for XRv 5.1.3)

interface . l2transport
 dot1q vlan 

l2vpn
 bridge group frinx
  bridge-domain 
   interface .

If connection point type local with subif (for XRv 6.1.2)

interface . l2transport
 encapsulation dot1q 
 rewrite ingress tag pop 1 symmetric
 
l2vpn
 bridge group frinx
  bridge-domain 
   interface .
# Unit

NOT IMPLEMENTED