Archive

Posts Tagged ‘ESXi’

Cisco XRv has been released

February 9, 2014 14 comments

Many of you have probably heard of Cisco VIRL or what is now called Cisco Modeling
Labs (CML). CML is due for release later this year and is supposed to include
support for IOS, IOS XE, NXOS and IOS XR.

Last year Cisco released the Cloud Services Router (CSR1000v) which is a virtual
router running IOS XE.

Now Cisco has released the XRv which is a virtual router running IOS XR. This is
great news for anyone that wants to learn IOS XR or to test changes and to try
different concepts on IOS XR.

The VM can be run on ESXi or KVM/QEMU which gives flexibility. The installation
guide is located here.

To find the download path on CCO, this is what it should look like.

Download path

Every VM needs 3GB of RAM to start but when it’s running it seems to only use 1GB
and has a very low CPU usage.

Resource_usage

At this moment the download is restricted but Cisco is working on moving the restriction.
Expect this to be solved this coming week. XRv will be available in three packages.

Packages

There is restriction on 2 Mbit BW which should not be an issue for labbing purposes.

The initial release has some nasty bugs. So make sure to not use more than one CPU.

Caveats

To be able to run the image the server must meet the following requirements.

Requirements

The complete list of release notes are here.

After you have deployed the VM, which can be done with OVF template or by creating
a VM and using VMDK, don’t forget to create a serial interface and tie this to the
network or you will not be able to see any output from the VM. This is described
in the release notes.

Cisco also provides a free workbook with some basic concepts for IOS XR which can be
found here.

I would also recommend this also free IOS XR workbook by Jeffrey Fry. It’s a great
contribution to the community and it can be found here.

Have fun learning IOS XR!

Advertisements

Connecting Cisco CSR1000v to Dynamips

April 18, 2013 5 comments

As we all know Cisco recently released the CSR1000v. This post will describe how
to create a home lab consisting of Dynamips and CSR1000v running on ESXi.
You should already have deployed the CSR and have a Dynamips box ready. I will
use Ubuntu for my Dynamips machine but you can choose whatever OS you like.

So to start you should have ESXi 5.0. If you have an enterprise version of ESX
that is great but I don’t so I’m using ESXi. I am managing it via the vSphere client.

To install the CSR you can go to Cisco CSR config guide or read the guide by Brian Dennis at INE

I have installed Ubuntu desktop 12.10 64-bit version. You will need some tools to
have a good setup. I recommend you install the following:

Dynamips
Dynagen
XRDP
Wireshark
Gnome-fallback
Vmware tools
Screen

sudo apt-get install dynamips
sudo apt-get install dynagen
sudo apt-get install xrdp
sudo apt-get install wireshark
sudo apt-get install open-vm-tools
sudo apt-get install screen
sudo apt-get install gnome-session-fallback
cd ~
touch .xsession
echo gnome-session --session=gnome-fallback > .xsession

You can then use RDP to connect to the Ubuntu machine. If you don’t need the graphics you
can use use SSH as usual.

I will put together a topology that looks like this:

CSR_physical

As you can see I will be using 3 VLANs. One VLAN is for managing the devices.
I can login to the CSRs and the Dynamips routers from this network. The CSRs
uses GigabitEthernet0 by default as a management interface that are placed
in the VRF Mgmt-intf.

You can use a dedicated vSwitch or create the VLANs on the standard vSwitch. I have
just created VLANs in the regular vSwitch. You configure this under Inventory -> Configuration
-> Networking -> Add networking

Vmware1_configuration

Vmware2_networking

After clicking “Add Networking” choose connection type “Virtual machine”

Vmware3_Connection_type

Choose an existing vSwitch or create a new one if you wish.

Vmware4_Network_access

Then choose the name for your network and assign a VLAN ID to it. You can use the same
numbers I did or choose something else.

Vmware5_Connection_settings

Finish the guide and the new network will be present. We want to edit a setting
for the networks that will connect to Dynamips. We want to set the port group to
promiscous mode so that CDP frames and other traffic not destined to the VM can
arrive to the VMs. This will create some overhead but shouldn’t be an issue in
a lab network. Click “Properties…” for the vSwitch.

Vmware6_vSwitch_properties

Select the network and choose “Edit…” then under the Security tab set
“Promiscous Mode:” to Accept.

Vmware7_Security

After creating all the networks they need to be assigned to the virtual machines.
For the CSRs the GigabitEthernet0 will be assigned to the MGMT network and Gi1 to
CSR to Dynamips 1 and Gi2 to CSR to Dynamips2.

Right click the VM and choose “Edit Settings…”. The NICs should be assigned like this:

Vmware8_VM_properties

Do the same also for the Dynamips VM. In theory there should now be connectivity.
We will use a topology that looks like this:

CSR_logical

We need to create a .net file that can be used to create this topology.
5 routers will be running in Dynamips so 1 or 2 hypervisors should be enough.
As usual you need to find suitable Idle-PC value for your topology. My .net
looks like this.

autostart = False
[127.0.0.1:7200]
	workingdir = /home/daniel/dynamips/working/CSR
	udp = 10000
	[[7200]]
        	image = /home/daniel/IOS/c7200-adventerprisek9-mz.150-1.M1.bin-unpacked
        	ram = 256
        	idlepc = 0x628cc49c
        	ghostios = True
	[[ROUTER R1]]
        	model = 7200
        	console = 20061
        	f1/0 = R2 f1/0
		f1/1 = R3 f1/0
		f2/0 = nio_gen_eth:eth1
	[[ROUTER R2]]
        	model = 7200
        	console = 2002
        	f1/0 = R1 f1/0
		f1/1 = R4 f1/0
	[[ROUTER R3]]
        	model = 7200
        	console = 2003
        	f1/0 = R1 f1/1
		f1/1 = R4 f1/0
	[[ROUTER R4]]
        	model = 7200
        	console = 2004
        	f1/0 = R2 f1/1
		f1/1 = R3 f1/1
	[[ROUTER R5]]
        	model = 7200
        	console = 2005
        	f1/0 = nio_gen_eth:eth2
	

The only thing special here is that R1 and R5 are connecting to the outside
world. By using the generic NIO descriptor we are connecting to the Ethernet
interfaces leading to the VM networks.

It’s time to start the Dynamips process. I will use screen because I want to
keep the process running even if I disconnect my session.

daniel@Dynamips:~/.gns3$ sudo screen -mS dynamips dynamips -H 7200 &
daniel@Dynamips:~/.gns3$ dynagen CSR3.net

I have started all devices so I should be able to reach them and configure them now.

I will configure routers R1-R4 to run OSPF. R4 will announce its loopback 4.4.4.4
and this should be reachable from R5 on the other side of the network.
R1 will run BGP to both CSR1 and 2. This is the configuration applied to R1.

interface FastEthernet1/0
 ip address 12.12.12.1 255.255.255.0
 ip ospf 1 area 0
 duplex auto
 speed auto
 !
!
interface FastEthernet1/1
 ip address 13.13.13.1 255.255.255.0
 ip ospf 1 area 0
 duplex auto
 speed auto
 !
!
interface FastEthernet2/0
 ip address 10.10.10.1 255.255.255.0
 duplex auto
 speed auto
 !
!
interface FastEthernet2/1
 no ip address
 shutdown
 duplex auto
 speed auto
 !
!
router ospf 1
 router-id 1.1.1.1
 log-adjacency-changes
 redistribute bgp 1 subnets
!
router bgp 1
 no synchronization
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 redistribute ospf 1
 neighbor 10.10.10.11 remote-as 100
 neighbor 10.10.10.12 remote-as 100
 no auto-summary

Configuration for CSRs is very simple.

interface GigabitEthernet1
 ip address 10.10.10.11 255.255.255.0
 negotiation auto
!
interface GigabitEthernet2
 ip address 20.20.20.1 255.255.255.0
 ip ospf 1 area 0
 negotiation auto
!
interface GigabitEthernet0
 vrf forwarding Mgmt-intf
 ip address dhcp
 negotiation auto
!
router ospf 1
 redistribute bgp 100 subnets
!
router bgp 100
 bgp log-neighbor-changes
 redistribute ospf 1
 neighbor 10.10.10.1 remote-as 1

CSR2 only has different addressing. Now do we see any routes?

CSR1#sh bgp ipv4 uni
BGP table version is 7, local router ID is 20.20.20.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  4.4.4.4/32       10.10.10.1               3             0 1 ?
 *>  12.12.12.0/24    10.10.10.1               0             0 1 ?
 *>  13.13.13.0/24    10.10.10.1               0             0 1 ?
 *>  20.20.20.0/24    0.0.0.0                  0         32768 ?
 *>  24.24.24.0/24    10.10.10.1               2             0 1 ?
 *>  34.34.34.0/24    10.10.10.1               2             0 1 ?

Looks good. Now let’s just verify that R5 sees them as well.

R5#sh ip route ospf | be Gate
Gateway of last resort is not set

      4.0.0.0/32 is subnetted, 1 subnets
O E2     4.4.4.4 [110/1] via 20.20.20.2, 00:03:33, FastEthernet1/0
                 [110/1] via 20.20.20.1, 00:05:18, FastEthernet1/0
      12.0.0.0/24 is subnetted, 1 subnets
O E2     12.12.12.0 [110/1] via 20.20.20.2, 00:03:33, FastEthernet1/0
                    [110/1] via 20.20.20.1, 00:05:18, FastEthernet1/0
      13.0.0.0/24 is subnetted, 1 subnets
O E2     13.13.13.0 [110/1] via 20.20.20.2, 00:03:33, FastEthernet1/0
                    [110/1] via 20.20.20.1, 00:05:18, FastEthernet1/0
      24.0.0.0/24 is subnetted, 1 subnets
O E2     24.24.24.0 [110/1] via 20.20.20.2, 00:03:33, FastEthernet1/0
                    [110/1] via 20.20.20.1, 00:05:18, FastEthernet1/0
      34.0.0.0/24 is subnetted, 1 subnets
O E2     34.34.34.0 [110/1] via 20.20.20.2, 00:03:33, FastEthernet1/0
                    [110/1] via 20.20.20.1, 00:05:18, FastEthernet1/0

ECMP is implemented since the cost is the same to ASBRs.
Final test is to ping 4.4.4.4.

R5#ping 4.4.4.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/20/24 ms

And it works! Pretty cool stuff. So now we have a lab with both IOS and IOS-XE.
If we had real switches we could throw this into the topology as well.
If you have enterprise ESX you could even practice Nexus with N1kv image.
So you see that we can build some great topologies here.

This does take some computing power, mostly RAM. If I check ESXi I see that
the Ubuntu box is using around 2GHz CPU and about 2GB RAM. The CSRs are using
each 750MHz CPU and 3GB RAM. So in total you are looking at around 4GHz CPU
and 8GB RAM. It is doable on a well equipped laptop.

Categories: Dynamips, IOS-XE Tags: , , ,