Cisco iol
| Description | Two Cisco IOL routers connected via a Cisco IOL L2 switch |
| Components | Cisco IOL |
| Resource requirements1 | 1 2 GB |
| Topology file | cisco_iol.clab.yml |
| Name | cisco_iol |
| Version information2 | cisco_iol:17.12.01 |
Description#
This lab consists of two Cisco IOL routers connected through a Cisco IOL L2 switch.
graph LR
r1[r1] <--> sw[sw] <--> r2[r2]
The IOL images are built with vrnetlab. The routers use the regular IOL image, the switch uses the L2 image and is marked with type: l2 in the topology file.
Configuration#
On boot every node gets the containerlab startup configuration applied: the Ethernet0/0 management interface is placed in its own management VRF and receives its IP addressing from docker, and SSH is enabled. Data-plane interfaces start at Ethernet0/1 and come up unnumbered.
Log in with admin/admin and configure the router interfaces:
The switch forwards both router ports in VLAN 1 by default, so no configuration is needed on sw for this lab.
Verification#
Ping between the routers across the switch:
r1#ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/2 ms
Multinode Labs and Cisco IOL L2#
Labs running on different hosts can be interconnected with containerlab by stitching an interface from each topology together with a VXLAN tunnel:
graph LR
subgraph server1[Server 1]
topology1[topology1.clab.yml]
end
subgraph server2[Server 2]
topology2[topology2.clab.yml]
end
topology1 <-->|vxlan-stitch| topology2
Read more about this in the vxlan-stitch link documentation and the multi-node labs example.
When interconnecting labs this way, extra configuration is necessary to ensure crossfunctionality between topologies utilizing Cisco IOL L2 images. Due to system internals of how the APP ID is generated and used for the images, an ID OFFSET needs to be configured to avoid duplicate/overlapping Bridge IDs and STP issues in the supertopology.
The OFFSET can be controlled with the pid-offset config key:
For example, setting the OFFSET to 64 would skew the starting bridge ID for the topology from aabb.cc00.0100 to aabb.cc00.4100.
Refer to the multinode-site-a and multinode-site-b examples for more information.