- Overview
- Product Documentation
- CML 2.6 Release Notes
- CML 2.6 Installation Guide
- CML 2.6 User Guide
- CML 2.6 Admin Guide
- CML Administrator's Guide
- Cisco Modeling Labs System Overview
- System Defaults
- Creating a New Node Definition
- Custom VM Images
- Clustering
- CML Admin Tools
- System Settings
- Networking
- Resources
Example: External Connector using NAT¶
NAT connectivity can be provided to any connected node in the topology
using the External Connector node (ext-conn
). This connection can be
leveraged, for example, to install packages from a Linux repository or
other external public or private package repository.
An IP address is dynamically assigned to the connected node using the next available address from the DHCP pool. The node interface must be configured for DHCP to receive the address; most server nodes do so out-of-box, but router and switch nodes need specific configuration for this.
Network |
|
Gateway |
|
DHCP Pool |
|
The router and switch used in the following topology example are not required to leverage NAT mode. They are included only for demonstration and to provide a use case reference.
Use Case |
Provide NAT access to the external network for a Linux server running in a simulation. |
Topology |
IOSv router connecting an IOSv-L2 switch and a Server node connected to an upstream switch and an External Connector node. |
Required Nodes |
External Connector (×1) Server (×1) IOSv (×1) IOSvL2(×1) |
Note
The NAT network is not currently editable. This network is the internal interface of the External Connector and is not exposed to the Workbench. Making the NAT network for the External Connector node configurable via the Workbench is on the CML roadmap and is planned for a future release.
Procedure
Add a new lab in the Dashboard. The view will switch to the created lab’s Workbench view.
Optional: Give the new lab a name by clicking the date-based title at the top of the workbench, editing the Title text field and clicking the Apply checkmark button to its side. Example: nat_connector.
Open the Add Nodes pane from the top toolbar. Drag-and-drop all required nodes onto the canvas.
Connect ext-conn
to server
, using eth1
.
Connect the iosv
and iosvl2
nodes to each other using gi0/1
.
Connect the server
and iosvl2
nodes to each other using eth0
to gi1/0
.
Select the ext-conn
node.
Click the Config tab in the sidebar pane.
Change the value of the selected external connector dropdown to NAT.
Note
Any new ext-conn node will initially use the default external connector. Unless changed by an administrator, this is the same NAT bridge (virbr0). It is therefore not strictly necessary to make the change in uncustomized CML server instances.
Optional: Click the Lab -> Bootstrap Lab menu in the top toolbar.
This action provides a basic configuration including a system-assigned
username and password of cisco/cisco
to the Cisco routers in the
lab. You could also edit each node’s configuration for DHCP OOB management.
This example will add the configuration to the running nodes later.
Click the Lab -> Start Lab menu in the top toolbar.
The system will start a lab simulation, and the node VMs will start booting.
Wait for all nodes to finish booting, indicated by a green checkmark on the node.
Once all nodes have booted, you still need to configure each node for DHCP on the interface connected to the ext-conn node, or verify the edited bootstrap configuration was effective.
Select the server node.
Right-click the server node and click the Console menu.
Click the Open Console button in the Console pane that appears.
Log in.
Use the credentials that you set in the initial configurations for the devices. | Username: cisco | Password: cisco
Run the following command to verify connectivity: ifconfig eth1
The command should return an IP address for subnet ``192.168.255.0/24``.
Run the following command to verify connectivity: netstat -nr
The command should return the default gateway IP of ``192.168.255``.