- Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcreate-network-models-with-cmls.html
33 lines (31 loc) · 7.12 KB
/
create-network-models-with-cmls.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
url: /2013/10/create-network-models-with-cmls/
title: "Create Network Models with CML’s AutoNetKit"
date: "2013-10-29T09:27:00.000+01:00"
---
<p>Last week I described how Cisco Modeling Lab (CML, the product formerly known as VIRL) <ahref="/2013/10/cisco-modeling-lab-virl-behind-scenes/">works behind its fantastic UI</a>, and promised more information about the UI once I get access to a preview version of CML, which I got a few days ago. Here are the results of the first brief stroll down the virtual lane.<!--more--></p>
<h4>Brief recap</h4><p>CML has two major components: a network modeling engine (AutoNetKit) and a simulation engine. </p>
<p>After creating the network model (including initial configurations) in the modeling engine, you can start the simulation, either locally or somewhere else. The communication between the UI and back-end simulation engine runs over HTTP, allowing you to build all sorts of interesting simulation-as-a-service environments.</p>
<h4>Create the topology</h4><p>After a brief struggle with the initial setup (totally my fault, I should have read the documentation first), I got to the main topology window, which allows you to add new devices to the simulated network.</p>
<p>Adding nodes is exceedingly simple: click on the node type, click on the topology canvas, and you have a new node.</p>
<divclass="separator"><ahref="/2013/10/s1600-VIRL+Nodes.png" imageanchor="1"><imgborder="0" src="/2013/10/s400-VIRL+Nodes.png"/></a></div>
<p>You can set a node’s properties immediately after adding the node. As you can see in the following screenshot, AutoNetKit helps you build BGP and OSPF (or IS-IS or EIGRP) topology, and layer-3 VPNs.</p>
<divclass="separator"><ahref="/2013/10/s1600-VIRL+Node+Properties.png" imageanchor="1"><imgborder="0" src="/2013/10/s400-VIRL+Node+Properties.png"/></a></div>
<p>Next step: connect the devices. As simple as clicking on them. Device interfaces are created automatically (and they all have to be Gigabit Ethernet interfaces – no serial links or ATM … but then it’s pretty easy to simulate serial links with PPPoE).</p>
<divclass="separator"><ahref="/2013/10/s1600-VIRL+Links.png" imageanchor="1"><imgborder="0" src="/2013/10/s400-VIRL+Links.png"/></a></div>
<p>Last step (or maybe the first one if you read the documentation ;) – set global AutoNetKit properties. You can decide to have IPv4, IPv6 or dual-stack network, set address ranges, choose the default routing protocol, and a few other bits and pieces.</p>
<divclass="separator"><ahref="/2013/10/s1600-VIRL+AutoNetKit+Properties.png" imageanchor="1"><imgborder="0" src="/2013/10/s400-VIRL+AutoNetKit+Properties.png"/></a></div>
<h4>Create the initial configurations</h4><p>A single click on the menu creates initial configurations of all routers in the topology. Here’s the configuration of my GW-A router (edge BGP router in an autonomous system):</p>
<preclass="code">hostname GW-A<br/>!<br/>ip cef<br/>ipv6 unicast-routing<br/>ipv6 cef<br/>!<br/>service timestamps debug datetime msec<br/>service timestamps log datetime msec<br/>no service password-encryption<br/>no service config<br/>enable password cisco<br/>ip classless<br/>ip subnet-zero<br/>no ip domain lookup<br/>line vty 0 4<br/> exec-timeout 720 0<br/> password cisco<br/> login<br/>line con 0<br/> password cisco<br/>!<br/>!<br/>cdp run<br/>!<br/>!<br/>interface Loopback0<br/> description Loopback<br/> ip address 192.168.0.1 255.255.255.255<br/> ipv6 address ::a:1:0:0:1/128<br/> ipv6 ospf cost 1<br/> ipv6 ospf 1 area 0<br/>!<br/>interface GigabitEthernet0/1<br/> description to Int-A<br/> ip address 10.0.0.1 255.255.0.0<br/> ipv6 address ::b:1:1:0:5/126<br/> cdp enable<br/> ip ospf cost 1<br/> ipv6 ospf cost 1<br/> ipv6 ospf 1 area 0<br/> duplex auto<br/> speed auto<br/> no shutdown<br/>!<br/>interface GigabitEthernet0/2<br/> description to GW-B<br/> ip address 10.1.0.1 255.255.128.0<br/> ipv6 address ::b:2:1:0:5/126<br/> cdp enable<br/> duplex auto<br/> speed auto<br/> no shutdown<br/>!<br/>!<br/>router ospf 1<br/># Loopback<br/> network 192.168.0.1 0.0.0.0 area 0<br/> log-adjacency-changes<br/> passive-interface Loopback0<br/> network 10.0.0.0 0.0.255.255 area 0<br/>router ospfv3 1<br/> router-id 192.168.0.1<br/> !<br/> address-family ipv6 unicast<br/> exit-address-family<br/>!<br/>!<br/>router bgp 65001<br/> bgp router-id 192.168.0.1<br/> no synchronization<br/> network 192.168.0.1 mask 255.255.255.255<br/>! ibgp<br/> ! ibgp peers<br/> !<br/> neighbor 192.168.0.2 remote-as 65001<br/> neighbor 192.168.0.2 description iBGP peer Int-A<br/> neighbor 192.168.0.2 update-source Loopback0<br/> neighbor 192.168.0.2 next-hop-self<br/> !<br/> neighbor ::a:1:0:0:2 remote-as 65001<br/> neighbor ::a:1:0:0:2 description iBGP peer Int-A<br/> neighbor ::a:1:0:0:2 update-source Loopback0<br/> neighbor ::a:1:0:0:2 next-hop-self<br/>!<br/>! ebgp<br/> !<br/> neighbor 10.1.0.2 remote-as 65002<br/> neighbor 10.1.0.2 description eBGP to GW-B<br/> neighbor 10.1.0.2 send-community<br/> neighbor 10.1.0.2 next-hop-self<br/> !<br/> neighbor ::b:2:1:0:6 remote-as 65002<br/> neighbor ::b:2:1:0:6 description eBGP to GW-B<br/> neighbor ::b:2:1:0:6 send-community<br/> neighbor ::b:2:1:0:6 next-hop-self<br/>!<br/>!<br/>end</pre><p>AutoNetKit did a great job – all the BGP sessions are configured correctly (IBGP between loopbacks, EBGP between directly-connected addresses) and OSPF runs only within an autonomous system.</p>
<h4>Changing the (virtual) hardware</h4><p>Want to replace IOS devices with IOS XR devices? No problem, change the node subtype in the network topology from vIOS to xrvr, click on the <em>build configurations </em>icon, and you have initial configurations in IOS XR format. </p>
<h4>Launching the network model</h4><p>You could (if you wish) modify the initial configuration files, but it’s probably much simpler to do that in a running network (and then extract the configuration files before shutting down the network model).</p>
<p>A single click on the menu launches all device instances. CML console window opens and you can watch the lab being built:</p>
<p>Once all the nodes become active, all you have to do is click on a node and telnet to its console port.</p>
<divclass="separator"><ahref="/2013/10/s1600-VIRL+Console.png" imageanchor="1"><imgborder="0" src="/2013/10/s400-VIRL+Console.png"/></a></div>
<h4>Summary</h4><p>I like what I’ve seen so far:</p>
<ulclass="ListParagraph"><li>Creating network topology in GUI is nice;</li>
<li>Deploying the topology on a configurable target environment is great;</li>
<li>Having automatically generated initial configurations with IP addresses and reasonably configured routing protocols is awesome.</li>
</ul>
<p>Whenever I wanted to do a quick test of a new IOS feature in the past, I spent more time creating the initial router configurations (or browsing through previously created topologies and configurations, trying to figure out which ones would closely match my current requirements) than doing the actual tests (I even wrote a Perl script to create the configurations).</p>
<p>The ability to create a topology on the fly and get a running network in a few minutes is priceless. </p>