Campus Network as a Service
CNaaS init access with one uplink
CNaaS init access with temporarily one uplink
If you need to do ZTP of an access switch while only one of it's eventual two uplinks are connected you can "fake" the other uplink by manually adding the missing link to the database:
curl -ks -H "Authorization: Bearer $JWT_AUTH_TOKEN" ${CNAASURL}/api/v1.0/linknets -X POST -d '{"device_a": "eosdist2", "device_a_port": "Ethernet2", "device_b": "mac-0800275C091F", "device_b_port": "Ethernet3"}' -H "Content-Type: application/json"
device_a is the device hostname of the other DIST switch in the mgmtdomain pair (the one that's not currently connected)
device_a_port is the port/interface on the DIST switch that should be used as downlink later on once it has been connected
device_b is the device hostname of the access switch that you want to initialize, it should already be in DISCOVERED state
device_b_port is the port/interface on the access switch that will be connected to the dist_a_id at some later point
CNaaS init access with permanent one uplink
From NMS v1.4 you can configure the dist downlink interface with the setting: redundant_link: false to be able to do ZTP of access switches that are connected via a single link.
If you at some later point want to connect a second uplink you can do so using these steps. a1 is the access switch, d1 is the dist switch that was connected from the beginning, and d2 is the dist switch added later. d1 and d2 has to belong to the same mgmtdomain.
- config d1 downlink as redundant
- sync d1
cnaas-curl https://localhost/api/v1.0/device/a1/interfaces -d '{"interfaces": {"Ethernet28": {"configtype": "ACCESS_UPLINK", "data": {"neighbor": "d2"}}}}' -X PUT -H "Content-Type: application/json"
sync config a1
flap port on d2 to get unstuck in port-channel fallback mode?
flap port on a1 to recover errdisable
wait for lldp neighborscurl -ks -H "Authorization: Bearer $JWT_AUTH_TOKEN" ${CNAASURL}/api/v1.0/linknets -X POST -d '{"device_a": "d2", "device_a_port": "Ethernet47", "device_b": "a1", "device_b_port": "Ethernet28"}' -H "Content-Type: application/json"
sync config d2