Cisco IOU:Scripted Start Multiple Routing with L2IOU, memory

This was sent in. Got lots more flexibility and more easily adapted for changes in your IOU image (if there are ever any). Comments are my own (hopefully they are accurate).

#where are your IOU files

#where is the wrapper-linux file

#name of the IOU image ?

#filename of image for end points / hosts IOU image

#name of the L2 IOU (switching) image.

SMEMORY="-m 116"
MEMORY="-m 192"
L2MEMORY="-m 96"

#how many 4 port ethernet port modules ?
INTE="-e 1"
#how many 4 port serial modules ?
INTS="-s 0"
#L2IOU ethernet ports
L2INTE="-e 2"
L2INTS="-s 0"

$WRAPPER -m $L2IMAGE -p 2011 -- $L2MEMORY $L2INTE $L2INTS 11 &
echo $! > pid/
$WRAPPER -m $L2IMAGE -p 2012 -- $L2MEMORY $L2INTE $L2INTS 12 &
echo $! > pid/
$WRAPPER -m $L2IMAGE -p 2021 -- $L2MEMORY $L2INTE $L2INTS 21 &
echo $! > pid/
$WRAPPER -m $L2IMAGE -p 2022 -- $L2MEMORY $L2INTE $L2INTS 22 &
echo $! > pid/

$WRAPPER -m $SIMAGE -p 2041 -- $SMEMORY $INTE $INTS 41 &
echo $! > pid/
$WRAPPER -m $SIMAGE -p 2042 -- $SMEMORY $INTE $INTS 42 &
echo $! > pid/
$WRAPPER -m $SIMAGE -p 2043 -- $SMEMORY $INTE $INTS 43 &
echo $! > pid/
$WRAPPER -m $SIMAGE -p 2044 -- $SMEMORY $INTE $INTS 44 &
echo $! > pid/


Matching Kill Script

#! /bin/sh

for i in ${PIDFILES}; do
kill `cat $i`;
rm $i;

Other Posts in A Series On The Same Topic

  1. Cisco IOU:Connect IOU with real or external networks (17th April 2011)
  2. Cisco IOU:Scripted Start Multiple Routing with L2IOU, memory (15th April 2011)
  3. Cisco IOU: What can Cisco do for Testing, Validation & the IPv6 challenge ? (15th April 2011)
  4. Cisco IOU: Starting Multiple Routers (15th April 2011)
  5. Cisco IOU: Shutting down the IOU Processes (15th April 2011)
  • Udara


    How can i find the L2IOU image? if anyone has a link please send it to me

  • Trooper58

    Are there any Significant differences in IOU and L2IOU vs real routers and switches? Specifically in MPLS, IPv6, QoS and IP Multicast?

    Would IOU and L2IOU make a good replacement for real gear for ccie r/s studies? I ask this because cisco is offering virtual labs at a much cheaper cost than buying your own gear or renting time on real gear.

    Thank you.

    • Etherealmind

      There are a number of minor differences. For example, QoS configuration depends intimately on the hardware and its different for the 3560 from an IOS router. But you could certainly achieve 95% or more of your training with IOU. I’ve heard that there are versions of the IPexpert lab configuration for IOU that work pretty well.

      • Trooper58


        love the site btw, keep up the good work.

        • Etherealmind

          Thanks for saying so. Nice to be appreciated.

  • Khanirfan

    in L2IOU there is no Communication between switches, how to resolve this problem.

  • sphinx


    I cannot make etherchannel work properly. Even though show command shows everything ok which is obviously not. Can you confirm that it is working or am I doing something wrong.


    • Guest

      I had the same issue…weird though….it came up as I changed the other side to LACP…then when I played a bit I never got it up again…

  • Trooper58

    from what I have gathered the l2 has issues with excessive collisions, communicating with either a switch instance or a router instance. since the l2 image won’t allow a duplex change and the router image appears to be unaffected by the duplex command, as of right now, any topology with redundant links using an l2 instance is doomed. the collisions eventually will cripple the host system’s cpu.

    what I mean by  l2 image not allowing a duplex change is: the int level “speed” command is missing and the switch defaults to autoneg for Ethernet ints.

    • Trooper58

      cpu usage on the instances should look something like this:

      SW1#sh proc cpu sorted 5min

      CPU utilization for five seconds: 84%/1%; one minute: 83%; five minutes: 61%

       PID Runtime(ms)   Invoked      uSecs   5Sec   1Min   5Min TTY Process

        23      129940     57590       2256 30.07% 33.27% 24.10%   0 ARP Input

        33      122868     54746       2244 28.39% 33.08% 23.15%   0 ARP Snoop

        80       39528     51746        763 14.31%  7.26%  6.52%   0 Ethernet
      Msec Ti

      R1#sh proc cpu sorted 5min

      CPU utilization for five seconds: 13%/0%; one minute: 14%; five minutes: 11%

       PID Runtime(ms)     Invoked      uSecs   5Sec   1Min   5Min TTY Process

        18       71112     6005898         11 13.59% 14.09% 11.45%   0 ARP Input

         1         180          12      15000  0.00%  0.00%  0.00%   0 Chunk

  • Iouguest

    You can use this kill script and avoid creating redundant pid files. The format of the /tmp/netio directory is just /tmp/netio + your numeric user id:

    #!/bin/shfor i in /tmp/netio`id -u`/*.lck;do         kill `cat $i`; done

    • Iouguest

      man that didn’t come out how I wanted it to at all, attaching an image instead.

  • Gianni

    I’ve tried some simple configurations with L2IOU switches and I’ve noticed that if I connect 3 switches in a loop the spanning three protocol works as it should, blocking one port on a switch but as soon as I do a ping from one switch to another the CPU utilization goes very high and I can see a lot of traffic on the switches’ interfaces.. I think that the ARP request loops through the “triangle topology” even if it shouldn’t… Did you experience this? The NETMAP I’ve used is very simple:

    401:0/2 402:0/1
    401:0/3 403:0/1
    402:0/3 403:0/2

    I’ve tried the following changes, but any of them solved the problem:
    – force the link-type to point-to-point instead of shared (since I can not set full-duplex on the interfaces, they are seen as shared interfaces)
    – set rapid-pvstp
    – force another switch to become the root bridge

    Any idea or possible solution?

  • swclab_2006

    i rebuild ioul2 with debian OS on my vmware machine ,
    i run that i0u with 8 routers(core switch+distributed switch+access
    switch) and make ACL+VLAN Lab,my lab has successed and can ping each
    but why sometimes i had segmentation fault on my core switch?
    can u help me?

  • falandri

    Hi all,

    I have a problem with the wrapper version 1.1

    When I launch my lab (about 25 switches) after one or two minutes some process crash and the wrapper print in the output “IOU 2874 exit” (2874 is the pid).

    Any idea? There is a new version of the wrapper?



  • vishi

    Looking for 95% working L2iou modifying IOU so it shows fastethernet interfaces instead of ethernet and fixing some of the bugs that IOU has. I heard in cisco discussion form. It does 98% of the actual exam.