# L2P2P configuration

# URL

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

# OPENCONFIG YANG

{
    "network-instance": [
        {
            "config": {
                "name": ""
                "type": "L2P2P" //matches vpws-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": {
                                                "remote-system": ""
                                                "virtual-circuit-identifier": ""
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}

# OS Configuration Commands

# Cisco IOS (VIOS 15.6(2)T)

# CLI

If connection points remote and local without subif

interface 
 xconnect   encapsulation mpls

If connection points remote and local with subif

interface .
 encapsulation dot1Q 
 xconnect   encapsulation mpls

If both connection points are type local without subif

connect  <(local_1)local_interface_id> <(local_2)local_interface_id> interworking ethernet

If both connection points are type local with subif

connect  <(local_1)local_interface_id>.<(local_1)local_vlan> <(local_2)local_interface_id>.<(local_2)local_vlan> interworking ethernet
# Unit

Link to github : ios-unit

# CISCO IOS XR (5.1.3) (6.1.2)

# CLI

If connection point type remote

l2vpn
 xconnect group frinx
  p2p 
   neighbor ipv4  pw-id 

If connection point type local without subif

interface 
 l2transport

l2vpn
 xconnect group frinx
  p2p 
   interface 

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

interface . l2transport
 dot1q vlan 

l2vpn
 xconnect group frinx
  p2p 
   interface .

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

interface . l2transport
 encapsulation dot1q 
 rewrite ingress tag pop 1 symmetric
 
l2vpn
 xconnect group frinx
  p2p 
   interface .

If both connection points are local we can use the same translation code as above .. the combined output will look like this example:

interface <(local_1)local_interface_id>
 l2transport
 
interface <(local_2)local_interface_id>
 l2transport

l2vpn
 xconnect group frinx
  p2p 
   interface <(local_1)local_interface_id>
   interface <(local_2)local_interface_id>
# Unit

Link to github : xr-unit

# Brocade (V5.6.0fT163)

# CLI

If connection point type remote

router mpls
 vll  
  vll-peer 

If connection point type local without subif

router mpls
 vll  
  untag 

If both connection points are type local

With subif

router mpls
 vll  
  vlan 
   tag 

If both connection points are type local without subif

router mpls
 vll-local 
  untag 

With subif

router mpls
 vll-local 
  vlan 
   tag 
# Unit

Link to github : brocade-unit