Hands-on with GNS3 1.0 (Alpha) - Part 2 - Issues, Fixes and RSTP


Firstly I can't say how much nicer it is to use IOU and not have to remember to use "copy run unix:" instead of "copy run start", I can't tell you how many times my IOU router has crashed because I forgot to save to unix rather than the conventional way. Now with IOU running within GNS3 I can copy run start to my hearts content!

Yesterday I tried to play around with the server settings to connect the native GNS3 router to the IOU device. Don't try this at home, or in the office, or on the bus. This feature won't make an appearance until the next alpha release. But I found this out the hard way, and nothing was talking:


After much searching I found the file hidden away in %APPDATA%\GNS3\GNS3.ini and in there is my failed attempt to bridge the two:
[Servers]
local_server_host=192.168.56.1
local_server_port=8000
local_server_path=C:/Program Files (x86)/GNS3-ER/gns3server.exe
remote\size=1
remote\1\host=192.168.56.101
remote\1\port=8000
Once I changed the file back to:
[Servers]
local_server_host=127.0.0.1
local_server_port=8000
local_server_path=C:/Program Files (x86)/GNS3-ER/gns3server.exe
remote\size=1
remote\1\host=192.168.56.101
remote\1\port=8000
Then everything is back up and running as it should be!

In the previous post I was having issues with ethernet interfaces on my IOU devices. I did think that maybe it was due to the IOU image I was using, so now I have switched images now. It didn't help that I was being stupid and didn't use the "no switchport" command, which then would have allowed me to specify an IP address, but now we are good to go!
IOU5#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
IOU5(config)#vlan 10
IOU5(config-vlan)#exit
% Applying VLAN changes may take few minutes.  Please wait...

IOU5(config)#int vlan 10
IOU5(config-if)#ip add
*Apr  3 09:41:32.651: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to down
IOU5(config-if)#ip add 1.1.1.1 255.255.255.0
IOU5(config-if)#
IOU5(config-if)#int e0/0
IOU5(config-if)#ip add
IOU5(config-if)#no switchport
IOU5(config-if)#ip add
IOU5(config-if)#ip address
*Apr  3 09:42:56.715: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
IOU5(config-if)#exit
IOU5(config)#exit
IOU5#sh ver | i IOS
Cisco IOS Software, Linux Software (I86BI_LINUX_L2-UPK9-M), Experimental Version 15.0(20120621:060510) [dstivers-june20-2012-golden_spike 101]
IOU5#
One thing to note is that the does seem to be a limit on the size of the IOU image you can upload via the webpage. This can be sorted by using WinSCP to copy the file to the correct location. This is then picked up correctly, but you do need to change the permissions, the group needs to be gns3 and so does the owner, and it needs to be executable - if you don't change the permissions you will get this error: "Server error [-3200]: IOU1: could not start IOU: [Errno 13] Permission denied".
Enough chat, let's dig in! Here is our topology for today:


The ability to add text to the topology doesn't appear to be working at the moment, so we'll have to make do with a few show commands to be able to work out the interfaces:
IOU1#sh cdp neigh | beg Device
Device ID    Local Intrfce     Holdtme    Capability  Platform  Port ID
IOU3         Eth 0/1           145              R S   Linux Uni Eth 0/0
IOU2         Eth 0/0           129              R S   Linux Uni Eth 0/0
IOU4         Eth 0/2           140              R S   Linux Uni Eth 0/2
IOU1#

IOU2#sh cdp neigh | beg Device
Device ID    Local Intrfce     Holdtme    Capability  Platform  Port ID
IOU3         Eth 0/1           162              R S   Linux Uni Eth 0/1
IOU1         Eth 0/0           131              R S   Linux Uni Eth 0/0
IOU5         Eth 0/2           150              R S   Linux Uni Eth 0/1
IOU2#

IOU3#sh cdp neigh | beg Device
Device ID    Local Intrfce     Holdtme    Capability  Platform  Port ID
IOU2         Eth 0/1           130              R S   Linux Uni Eth 0/1
IOU1         Eth 0/0           136              R S   Linux Uni Eth 0/1
IOU5         Eth 0/3           152              R S   Linux Uni Eth 0/0
IOU4         Eth 0/2           166              R S   Linux Uni Eth 0/0
IOU3#

IOU4#sh cdp neigh | beg Device
Device ID    Local Intrfce     Holdtme    Capability  Platform  Port ID
IOU3         Eth 0/0           130              R S   Linux Uni Eth 0/2
IOU1         Eth 0/2           159              R S   Linux Uni Eth 0/2
IOU5         Eth 0/1           143              R S   Linux Uni Eth 0/2
IOU4#

IOU5#sh cdp neigh | beg Device
Device ID    Local Intrfce     Holdtme    Capability  Platform  Port ID
IOU3         Eth 0/0           150              R S   Linux Uni Eth 0/3
IOU2         Eth 0/1           152              R S   Linux Uni Eth 0/2
IOU4         Eth 0/2           151              R S   Linux Uni Eth 0/1
IOU5#
On IOU1 I have created a couple of VLANs:
IOU1#sh vlan

VLAN Name                         Status  Ports
---- ---------------------------- ------- ---------------------------
1    default                      active  Et0/3, Et1/0, Et1/1, Et1/2
                                          Et1/3
10   VLAN10                       active
20   VLAN20                       active
30   VLAN30                       active
1002 fddi-default                 act/unsup
1003 token-ring-default           act/unsup
1004 fddinet-default              act/unsup
1005 trnet-default                act/unsup
All interfaces have been set to trunk using the commands "switchport trunk encapsulation dot1q" followed by "switchport mode trunk". IOU1 is set as the VTP server for the domain 802101.com and the others are set as clients (I am only showing IOU2 though):
IOU1(config)#vtp domain 802101.com
Changing VTP domain name from NULL to 802101.com
IOU1(config)#
*Apr  3 10:20:17.623: %SW_VLAN-6-VTP_DOMAIN_NAME_CHG: VTP domain name changed to 802101.com.
IOU1(config)#vtp mode server
Device mode already VTP Server for VLANS.
IOU1(config)#

IOU2(config)#vtp domain 802101.com
Domain name already set to 802101.com.
IOU2(config)#vtp mode client
Setting device to VTP Client mode for VLANS.
IOU2(config)#
The switches now pick up the VLANs created on IOU1 (again just showing IOU2):
IOU2#sh vlan

VLAN Name                         Status    Ports
---- ---------------------------- --------- ---------------------------
1    default                      active    Et0/3, Et1/0, Et1/1, Et1/2
                                            Et1/3
10   VLAN10                       active
20   VLAN20                       active
30   VLAN30                       active
So far we havn't done anything that new here, but it does show that GNS3 now supports switching. One of the new features is support for Rapid Spanning Tree, to lets set that up as well. IOU1 will become the root for VLAN10, IOU2 the roo for VLAN20 and IOU3 the root for VLAN30. IOU4 will be the secondary root for VLAN 10 and 20, and IOU5 will be the secondary root for VLAN30:
IOU1(config)#spanning-tree mode rapid-pvst
IOU1(config)#spanning-tree vlan 10 root primary
IOU1(config)#

IOU2(config)#spanning-tree mode rapid-pvst
IOU2(config)#spanning-tree vlan 20 root primary
IOU2(config)#

IOU3(config)#spanning-tree mode rapid-pvst
IOU3(config)#spanning-tree vlan 30 root primary
IOU3(config)#

IOU4(config)#spanning-tree mode rapid-pvst
IOU4(config)#spanning-tree vlan 10 root secondary
IOU4(config)#spanning-tree vlan 20 root secondary
IOU4(config)#

IOU5(config)#spanning-tree mode rapid-pvst
IOU5(config)#spanning-tree vlan 30 root secondary

IOU1#sh spanning-tree vlan 10

VLAN0010
  Spanning tree enabled protocol rstp
  Root ID    Priority    24586
             Address     aabb.cc00.0100
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24586  (priority 24576 sys-id-ext 10)
             Address     aabb.cc00.0100
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- -------------------
Et0/0               Desg FWD 100       128.1    Shr
Et0/1               Desg FWD 100       128.2    Shr
Et0/2               Desg FWD 100       128.3    Shr

IOU1#

IOU2#sh spanning-tree vlan 20

VLAN0020
  Spanning tree enabled protocol rstp
  Root ID    Priority    24596
             Address     aabb.cc00.0200
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24596  (priority 24576 sys-id-ext 20)
             Address     aabb.cc00.0200
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- -------------------
Et0/0               Desg LRN 100       128.1    Shr Dispute
Et0/1               Desg FWD 100       128.2    Shr
Et0/2               Desg FWD 100       128.3    Shr

IOU2#

IOU3#sh spanning-tree vlan 30

VLAN0030
  Spanning tree enabled protocol rstp
  Root ID    Priority    24606
             Address     aabb.cc00.0300
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24606  (priority 24576 sys-id-ext 30)
             Address     aabb.cc00.0300
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- -------------------
Et0/0               Desg FWD 100       128.1    Shr
Et0/1               Desg FWD 100       128.2    Shr
Et0/2               Desg FWD 100       128.3    Shr
Et0/3               Desg FWD 100       128.4    Shr

IOU3#

IOU5#sh spanning-tree vlan 30

VLAN0030
  Spanning tree enabled protocol rstp
  Root ID    Priority    24606
             Address     aabb.cc00.0300
             Cost        100
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    28702  (priority 28672 sys-id-ext 30)
             Address     aabb.cc00.0500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- -------------------
Et0/0               Root FWD 100       128.1    Shr
Et0/1               Desg FWD 100       128.2    Shr
Et0/2               Desg FWD 100       128.3    Shr

IOU5#
We can add redundant links into our topology, and RSTP happily plays along (again with the added bonus that we don't have to switch the device off to add the link!):
IOU2#sh ip int bri | i up
Interface          IP-Address      OK? Method Status         Protocol
Ethernet0/0        unassigned      YES unset  up             up
Ethernet0/1        unassigned      YES unset  up             up
Ethernet0/2        unassigned      YES unset  up             up
Ethernet0/3        unassigned      YES unset  up             up
Ethernet1/0        unassigned      YES unset  up             up
Ethernet1/1        unassigned      YES unset  up             up
Ethernet1/2        unassigned      YES unset  up             up
Ethernet1/3        unassigned      YES unset  up             up
IOU2#
*Apr  3 10:36:06.955: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1/1, changed state to down
*Apr  3 10:36:07.959: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1/1, changed state to up
IOU2#sh cdp neigh | beg Device
Device ID    Local Intrfce     Holdtme    Capability  Platform  Port ID
IOU3         Eth 1/1           166              R S   Linux Uni Eth 1/1
IOU3         Eth 0/1           137              R S   Linux Uni Eth 0/1
IOU1         Eth 0/3           146              R S   Linux Uni Eth 1/0
IOU1         Eth 0/0           157              R S   Linux Uni Eth 0/0
IOU5         Eth 1/0           133              R S   Linux Uni Eth 1/0
IOU5         Eth 0/2           128              R S   Linux Uni Eth 0/1
IOU2#sh spanning-tree vlan 20

VLAN0020
  Spanning tree enabled protocol rstp
  Root ID    Priority    24596
             Address     aabb.cc00.0200
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24596  (priority 24576 sys-id-ext 20)
             Address     aabb.cc00.0200
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- -----------------
Et0/0               Desg FWD 100       128.1    Shr
Et0/1               Desg FWD 100       128.2    Shr
Et0/2               Desg FWD 100       128.3    Shr
Et0/3               Desg BLK 100       128.4    Shr Dispute
Et1/0               Desg FWD 100       128.33   Shr
Et1/1               Desg FWD 100       128.34   Shr

IOU2#
Now our topology looks like this:

All is working as it should, and I am a happy guy!

CCIE #49337, author of CCNA and Beyond, BGP for Cisco Networks, MPLS for Cisco Networks, VPNs and NAT for Cisco Networks.

Related Posts

Previous
Next Post »

4 comments

comments
Anonymous
13 June 2014 at 02:42 delete

Hi Stuart,
I did your trick, but still can't connect to local server. I can add IOU switches, but when trying to add a router (preferences>IOS routers, locally stored IOS), it tries to connect to the server?
I'm using VMPlayer.

Thanks

Reply
avatar
13 June 2014 at 03:39 delete

Does your local server IP match the IP address in the config file? I have not tried VMPlayer, so not sure if it's something to do with that or not

Reply
avatar
Anonymous
13 June 2014 at 05:07 delete

These are the lines in GNS3.ini
----
[Servers]
local_server_host=127.0.0.1
local_server_port=8000
local_server_path=gns3server.exe
remote\size=1
remote\1\host=192.168.106.129
remote\1\port=8000
----
The other unusal thing is that the GNS3 is showing the Python path different that existing one.
http://i60.tinypic.com/333emgy.png

(the path to Python is C:\Python34)

Reply
avatar
13 June 2014 at 05:41 delete

My ini file looks like this:

local_server_host=192.168.56.1
local_server_port=8000
local_server_path=C:/Program Files (x86)/GNS3-ER/gns3server.exe
remote\size=1
remote\1\host=192.168.56.101
remote\1\port=8000
local_server_auto_start=true

Maybe change your local_server_host to match the remote\1\host ip?

You could try reinstalling Python

Reply
avatar