connect module¶
The connect module defines some services to manage and configure l2 connections within an existing backbone network.
Services¶
UserNetworkInterface
: Represent and manage an interface where an l2 connection can be terminated. Each instance of the service allows to manage the mtu and the encapsulation type of the interfaces which are part of the uni. The uni can be single-homed (one port) or multi-homed (up to 2 ports).
Service attributes example:
{
"mtu": 9212,
"name": "south-west",
"ports": [
{
"port_id": 18, // Resolved from external inventory
"port_name": "1/1/c2/1",
"device_name": "router-south",
"network_element": { // Resolved from external inventory using device name
"id": "3",
"name": "router-south",
"device": {
"os": "TiMos",
"model": "A77501",
"vendor": "Nokia",
"mgmt_ip": "172.25.131.13",
"version": "23.10",
"mgmt_port": 830,
"password_env": "NETCONF_DEVICE_PASSWORD",
"username_env": "NETCONF_DEVICE_USER"
},
"router_ip": "10.255.255.3"
}
},
{
"port_id": 20, // Resolved from external inventory
"port_name": "1/1/c6/1",
"device_name": "router-west",
"network_element": { // Resolved from external inventory using device name
"id": "4",
"name": "router-west",
"device": {
"os": "TiMos",
"model": "A77501",
"vendor": "Nokia",
"mgmt_ip": "172.25.131.14",
"version": "23.10",
"mgmt_port": 830,
"password_env": "NETCONF_DEVICE_PASSWORD",
"username_env": "NETCONF_DEVICE_USER"
},
"router_ip": "10.255.255.4"
}
}
],
"details": {
"es_id": "0x0000002333c000000000",
"lag_id": "608",
"allocated_lag_id": 608 // Automatically allocated based on existing lags
},
"documentation": "...",
"encapsulation": "qinq"
}
Service representation:
l2Connect
: Represent and manage a layer 2 connection between twoUserNetworkInterface
. Each instance will have two endpoints, each being attached to a uni. The service can chose either of two backends:LDP
andEVPN
. Each endpoint should pick a vlan encapsulation that is supported by the uni, and that is not used by another service.
Service attributes example:
{
"backend": "EVPN",
"bandwidth": 1000000,
"endpoints": [
{
"uni": "3724c0cc-087d-3f02-8d66-2570273e9032", // Reference to existing uni service instance
"vlan": "1730.*",
"identifier": "ep-0"
},
{
"uni": "bfc565a4-c31b-3953-b755-12541b911844", // Reference to existing uni service instance
"vlan": "1731.*",
"identifier": "ep-1"
}
],
"identifier": "gu-evpn-mh-sh",
"service_id": 10503, // Automatically allocated based on existing services
"documentation": "...",
"connection_type": "POINT_TO_POINT"
}
Service representation:
carrierEthernetEvc
: Similar tol2Connect
, except the service definition matches theCarrierEthernet
service defined by MEF.
Features¶
Inventory: The connect module supports documenting the services it creates in netbox natively, it is however possible to use any other inventory (some work will be required to integrate it.).
Multi vendor: The connect module already supports nokia sros, juniper mx, cisco xr and cisco xe devices.
Customization via configuration file: The module can adapt some of its behavior based on a static configuration file (yaml format) provided in the project repo. This configuration file allows to easily enable/disable some features of the module, and customize some parts of the configuration pushed on the devices (such as interface descriptions).
Configuration¶
Connect can be configuration and customized using configuration files and templates:
Topologies
Hardware/vendors
Allocation Policies
UNI Resolvers
Naming conventions
Etc.
The connect
module will load its configuration from a file named connect-config.yaml
, which should be located in the files
folder of the project using this module.
The project’s structure is depicted as below:
connect-project/
├── files
│ └── connect-config.yaml
├── main.cf
└── project.yml
Minimal configuration: All configuration options have a meaningful default, so the minimum configuration you need to provide is actually an empty file.
{}
Default configuration: The configuration below illustrates all the default values for the configuration, using it is equivalent to using the minimal configuration provided above.
carrier_ethernet_evc:
backend:
default: LDP
enabled:
- LDP
- EVPN
mtu: 1514
multi_homing:
create_esi: true
enabled: false
es_id: template://connect/es_id.j2
es_name: template://connect/es_name.j2
lag_id: template://connect/lag_id.j2
service_id:
end: 100
start: 1
strategy: next
cisco:
netconf_retry_count: 5
netconf_retry_interval: 5
xconnect:
group_name: evpn-vpws
l2_interface_description: template://connect/cisco/l2_interface_description.j2
l2_interface_name: template://connect/cisco/l2_interface_name.j2
qos_input:
policy_class: class-default
policy_name: template://connect/cisco/input_policy_name.j2
traffic_class: 2
qos_output:
policy_class: class-default
policy_name: template://connect/cisco/output_policy_name.j2
service_name: template://connect/cisco/xconnect_service_name.j2
direct_internet_access:
link_local_p2p: false
p2p_networks: []
vrf_name: template://connect/dia/vrf_name.j2
eth_cfm:
check_interval: 1s
domain_name: Network_Domain
enabled: false
eth_tag: template://connect/eth_cfm/eth_tag.j2
eth_test: true
level: 0
md_admin_name: '64512'
mep_direction: up
mep_id: template://connect/eth_cfm/mep_id.j2
mep_mac_address: template://connect/eth_cfm/mep_mac_address.j2
juniper:
netconf_retry_count: 5
netconf_retry_interval: 5
label_distribution_protocol: {}
main:
allowed_uni_resolvers:
- inmanta
inventory:
netbox:
agent_autostart: false
token: null
token_env: null
url: null
inventory_path: source:///connect-inventory.yaml
nokia:
customer_id: '1'
epipe:
enable_sdp: true
esi_port_id: template://connect/nokia/port_esi.j2
evpn:
bgp:
filters:
ldp: false
rsvp: false
sr_isis: false
sr_te: false
local_attachment_name: template://connect/nokia/local_attachment_name.j2
remote_attachment_name: template://connect/nokia/remote_attachment_name.j2
resolution: any
tagging: true
qos_egress:
cbs: auto
mbs: auto
pir: max
policy_name: default-policy
queue_id: 3
qos_ingress:
cbs: auto
mbs: auto
pir: max
policer_id: 3
policy_name: default-policy
sap_description: template://connect/nokia/sap_description.j2
sap_id: template://connect/nokia/sap_id.j2
service_name: template://connect/nokia/epipe_service_name.j2
netconf_retry_count: 5
netconf_retry_interval: 5
uni:
netconf_retry_count: 5
netconf_retry_interval: 5
port_mode: template://connect/nokia/port_mode.j2
vpls:
evpn:
bgp:
filters:
ldp: false
rsvp: false
sr_isis: false
sr_te: false
local_attachment_name: template://connect/nokia/local_attachment_name.j2
remote_attachment_name: template://connect/nokia/remote_attachment_name.j2
resolution: any
tagging: true
fdb:
table_high_wmark: 80
table_low_wmark: 60
table_size: 2500
proxy_arp:
age_time: '900'
send_refresh: '300'
table_size: 2500
qos_egress:
cbs: auto
mbs: auto
pir: max
policy_name: default-policy
queue_id: 1
qos_ingress:
cbs: auto
mbs: auto
pir: max
policy_name: default-policy
queue_id: 1
sap_description: template://connect/nokia/sap_description.j2
sap_dist_cpu_protection: null
sap_id: template://connect/nokia/sap_id.j2
service_name: template://connect/nokia/vpls_service_name.j2
uni:
lag_id_range:
end: 64
start: 1