Open What?

I was ask by some students to describe the difference between the “Open” standards associated with SDn (Software Defined Networking)

So I did this little presentation for them

OpenWhat

Posted in GNS3 WorkBench | Tagged | 2 Comments

GNS3 and IOU remote server install on Centos 6.5

GNS3 and IOU remote server install on Centos 6.5.

Posted in GNS3 WorkBench | Leave a comment

Subnetting without tears

Forget the bitwise operations. Here’s how I do subnets.  In my head!  Any subnet, any mask in 30 seconds or less.

1.    First – credit where it is due.  My method has been shamelessly stolen from Wendell Odom’s CCENT/CCNA ICND1 Official Exam Certification Guide. If you want to learn more, like how to use magic numbers to calculate the number of subnets for a given mask, read his books.
2.    The whole secret around subnets lies in:
a) the subnet mask
b) knowing your 2x, 4x, 8x, 16x, 32x, 64x and 128x times tables as far as 256
Most people can handle 2x, 4x and (at a pinch) 8x.  32x, 64x and 128x only have 8, 4 or 2 items before you hit 256, so that leaves you your 16x tables to learn.

Here’s the deal:

Look at the “interesting” number in the subnet mask.  That is, the number that is NOT 0 or 255.  In your case:
138.43.39.15
255.255.255.240
Your “interesting” octet is octet 4 ie 240.
Subtract this number from 256 – you’ll get 16 (256-240=16) in this case.

The key concept here is that your subnets will be in groups of size 16 

Back to 138.43.39.15 255.255.255.240

256-240=16.  Odom calls this the “magic number”.  I’ll stick with his definition.

The key to understanding subnet is this “magic number”.  Read the following carefully:

If the “magic number” is 16, then

  • ALL of your subnet numbers will be multiples of 16, starting at 0
  • The broadcast address on any subnet is simply the next subnet address minus 1 in the last octet
    • ie All of your broadcast addresses will be 1 less than a multiple of 16. (15, 31, 47…)
  • The first IP address on any subnet is simply the subnet address plus 1 in the last octet (1,17,33…)
  • The last IP address on any subnet is simply the broadcast address minus 1 in the last octet. (14,30,46…)

Now read that last section again until it sticks.

In your case, where the magic number is 16, the subnet MUST be one of the following:
0
16
32
48
64
80
96
112
128
144
160
176
192
208
224
240
(256)

There you go – that’s your 16x tables up to 256. Told you to learn this didn’t I?  By the way, your 32x tables is just every 2nd number from the above.,  64x tables every 4th number and 128x tables every 8th number.

Note that the last entry before 256 is the same as the subnet mask’s “interesting octet”.  This is ALWAYS the case.

Back to 138.43.39.15 255.255.255.240 again.

Now your “interesting octet” is the 4th octet, which for your IP address is 15.

  • Your subnet number MUST be less than 15, but one of the multiples of 16 listed above.  Clearly 0 is the only multiple of 16 less than 15.  So your subnet is
  • 138.43.39.0
  • The next subnet would be 138.43.39.16 ie the NEXT multiple of 16.
  • The first address on your subnet will be 138.43.39.0+1 = 138.43.39.1
  • The broadcast address will be the NEXT subnet minus 1 ie 138.43.39.16-1 = 138.43.39.15
  • The last address will be one less than the broadcast address: 138.43.39.15-1 = 138.43.39.14

So the address you started with is the broacast address for its subnet = 138.43.39.15

Here’s another example:

134.27.183.219 255.255.255.248
Magic number=256-248=8
The “interesting octet” is the last octet, so I focus on 219
Recalling my 8x tables around 219
0
8
..
208
216
224
etc

  • I can see that my subnet number must be .216 – the closest multiple of 8 to 219 that is not greater than 219.
  • The first address then would be .217 (216+1)
  • The broadcast address would be .223 (1 less than the next multiple of 8 224-1)
  • The last address would be .222 (223-1)

Or expressed fully:

  • Subnet: 134.27.183.216
  • 1st Address: 134.27.183.217
  • Last Address: 134.27.183.222
  • Broadcast: 134.27.183.223
  • Next Subnet: 134.27.183.224 (I list this because I actually figure this out then work backwards for the broadcast and last address)

This one is a bit harder – the interesting octet is the 3rd octet

22.19.178.234 255.255.224.0
Magic number=256-224=32
The interesting octet is the 3rd octet, so I focus on 178.
Recalling my 32x tables around 178
0
32
..
160
192
224

  • I see 160 is the closest multiple of 32 that is not greater than 178
  • This makes my subnet 22.19.160.0
  • The first address 22.19.160.0+1=22.19.160.1
  • The NEXT subnet (’cause I’m going to work backwards) is 22.19.192.0
  • So the broadcast address is 22.19.192.0-1=22.19.191.255
  • And the last address 1 less than the broadcast address: 22.19.191.255-1=22.19.191.254

Remember there are only 7 possible magic numbers (8 if you count 256-255=1), so they are not hard to learn.  Here they are
Mask Magic number
255    1 (just for completeness)
254    2
252    4 (this is a common one)
248    8
240   16
224   32
192   64
128  128

One more tricky one to finish:
12.34.56.78 255.255.252.0
Magic number=256-252=4
The interesting octet is the 3rd octet, so I focus on 56.
Recalling my 4x tables around 56
0
4
..
48
52
56
60

  • I can see that my subnet number must be 56 – the closest multiple of 4 to 56 that is not greater than56.  See why it is tricky?  The “interesting octet” value is a multiple of the magic number, so you stop there.
  • This makes my subnet 12.34.56.0
  • The first address 12.34.56.0+1=12.34.56.1
  • The NEXT subnet (’cause I’m going to work backwards) is 12.34.60.0
  • So the broadcast address is 12.34.60.0-1=12.34.59.255
  • And the last address 1 less than the broadcast address: 12.34.59.255-1=12.34.59.254

Finally, if you want to learn this stuff (like for CCNA exam) spend half an hour a night onhttp://www.subnettingquestions.com

Posted in GNS3 WorkBench | 2 Comments

Using GNS3 WorkBench labs on real equipment

This request came up the other day:

I just need some guided labs that I can do at home with my equipment.

So I thought about how you could use GNS3 WorkBench exercises to do just that.

Here is what I suggested:

I’d suggest downloading the v8.7_Windows_OSXversion of GNS3 WorkBench and store it somewhere (BTW, I also think it would be a good idea to install GNS3 anyway, but let’s stick with the story of using these exercises on your own equipment)

tree1

Once you have unzipped the ExtractToUserGNS3Folder.zip, file somewhere you will see a directory structure like this:

tree2

In each lab’s folder, look for the Instructions folder, and open instructions.html.  Then you’ll have your instructions for your lab.

Note that the lab will hav a series of snapshots – each snapshot in a folder with a name like topology_x (description). Let’s start witht he topology_0 …. folder, and find the configs folder within.

Just configure you home lab to look like the topology (which is also shown in topology.png) and paste the configs for (in this case) R1 and R2 into your routers, and look at the startrup.vpc file to see what  IP addresses you need to give your PCs that are attached to the lab.

You will also see topology folders that contain the final configs so you can check your answers.  In some cases, the instructions will have some hints or workthroughs too.

The lab that I most highly recommend is the ICND1 Readiness Test.  Click on the link for more info.

Note: This post was originally posted as a reply on the Cisco Learning Network https://learningnetwork.cisco.com/thread/75799#434963

 

 

Posted in CCNA, dynamips, GNS3, GNS3 WorkBench | Tagged , , , , | 3 Comments

Quick check to see if VPCS is working

If you are having trouble getting the Virtual PC Simulator (VPCS) to talk to your GNS3 (dyanamips) routers, then you might want to try this quick check to verify that VPCS itself is functioning correctly and that there are no firewall rules blocking UDP ports 20000+ and 30000+

The idea is that we will open VPCS, and reverse the sending and listening ports of one of the VPCs so we can get two of the VPCs to ping each other.

Step 1: Open the VPCS

On windows – issue this command in a command window (assumes you have GNS3 installed. Quotes are necessary):

"\Program Files\GNS3\vpcs\vpcs.exe"

On OS X – issue this command in a command window (assumes you have GNS3 installed):

/Applications/GNS3.app/Contents/Resources/vpcs

On Linux – vpcs should be in the path, so you just need to type:

vpcs

Step 2: Configure the 1st Virtual PC

When VPCS has opened, give the first VPC an ip address using the ip command:

VPCS[1]> ip 1.1.1.1
Checking for duplicate address...
PC1 : 1.1.1.1 255.255.255.0

Now issue the show ip command and note the LPORT and RHOST:PORT values. You should see this:

VPCS[1]> show ip

NAME : VPCS[1]
IP/MASK : 1.1.1.1/24
GATEWAY : 0.0.0.0
DNS :
MAC : 00:50:79:66:68:00
LPORT : 20000
RHOST:PORT : 127.0.0.1:30000
MTU: : 0

Step 3: Reconfigure the 2nd Virtual PC

What you will need to do is set up VPC#2 to have the reverse of these values, so change focus to VPC#2, and issue the set lport and set rport commands, as shown below:

VPCS[1]> 2
VPCS[2]> set lport 30000
VPCS[2]> set rport 20000
VPCS[2]> show ip
NAME : VPCS[2]
IP/MASK : 0.0.0.0/0
GATEWAY : 0.0.0.0
DNS :
MAC : 00:50:79:66:68:01
LPORT : 30000
RHOST:PORT : 127.0.0.1:20000
MTU: : 0

Note how the port numbers for VPC#2 are the reverse of VPC#1.

Step 4: Give the 2nd Virtual PC an IP and test

All you need to do now is give VPC#2 an IP address on the same subnet as VPC#1 and they should be able to ping each other, as shown below:

VPCS[2]> ip 1.1.1.2
Checking for duplicate address...
PC2 : 1.1.1.2 255.255.255.0

VPCS[2]> ping 1.1.1.1
1.1.1.1 icmp_seq=1 ttl=64 time=0.096 ms
1.1.1.1 icmp_seq=2 ttl=64 time=0.301 ms
1.1.1.1 icmp_seq=3 ttl=64 time=0.882 ms
1.1.1.1 icmp_seq=4 ttl=64 time=0.186 ms
1.1.1.1 icmp_seq=5 ttl=64 time=0.166 ms

If you can’t get ping replies, then your host PC is doing something to stop this.  There is really only two possibilities:

  1. You have a firewall blocking UDP port 20000 and/or 30000
  2. You have another application already using UDP port 20000 or 30000.  You can check for this using the netstat command on your host operating system (after closing vpcs of course)

Windows:

netstat -ap UDP | find "20000"
netstat -ap UDP | find "30000"

OS X:

netstat -anp UDP | grep 20000
netstat -anp UDP | grep 30000

Linux

netstat -an | grep udp | grep 20000
netstat -an | grep udp | grep 30000

 

If you see any output from either of these commands, you should be able to trace back to the program that is using these ports using the netstat -b command (Windows and OS X anyway)

 

 

Posted in dynamips, GNS3, GNS3 WorkBench | Tagged , , ,

HOW TO install GNS3 v1.0 beta on Ubuntu/Linux Mint/Debian

I wrote a script to keep my Linux Mint 17.0 GNS3 v1.0 beta install updated.
[Edit: The script has been updated to download the latest release version, rather than the beta version]

This script has been tested on 32 bit Linux Mint 17 and 32 bit Ubuntu 14.04, and is an updated version of my earlier alpha installer.

Download the script from this post on the new GNS3 Jungle website, and decompress the file in your home directory (or wherever you choose) and make sure you run the script as sudo (it will remind you to do so if you forget)

The script attempts to setup the GNS3v1 beta on your existing Linux system.

It is based on instructions at http://forum.gns3.net/post27906.html

http://forum.gns3.net/topic8988.html and https://github.com/GNS3/gns3-server

http://forum.gns3.net/post28922.html and http://forum.gns3.net/topic11444.html

If you have problems, please refer to the forum posts. Good Luck

It will, depending on the type of install you choose:

* Create my recommended directory structure for you

* Install git (developer install)

* Install subversion (developer install)

* Install bison parser generator (developer install)

* Install flex lexical analyzer (developer install)

* Install all the python stuff you need

* Install dynamips

* Install pip

* Install Dan Lintott’s gns3-converter http://forum.gns3.net/post35824.html

* Install vboxwrapper and VirtualBox

* Install iouyap -Ref: http://forum.gns3.net/topic8966.html

* Fix link to libssl1.0.0 -Ref: http://forum.gns3.net/topic8988.html

* Install SSH

* Install Wireshark

* Install VPCS

* Install BBE

* Install ROXTerm

* Create a iourc file for you (you’ll have to add your own licence)

* Add an entry to your hosts file for xml.cisco.com

* Install gns3-server (beta)

* Install gns3-gui (beta)

When run (must be run as sudo) it will give you 6 options:

An archive install installs dynamips from the deb repository, and gns3 
components from the latest release version using wget (Safest option)

A developer install pulls latest development sourcecode for dynamips, 
iouyap, vpcs, gns3-server and gns3-gui using git clone or git pull 
(or svn for vpcs)
This is the bleeding edge code.

Full install options re-installs everything - no questions asked
Note: Will not overwrite iourc if it exists
Normally, supplemtary apps like pip and ssh are skipped if already installed.
The full archive install can also be invoked using the -full command line 
option.

Would you like:
a. an interactive archive (release version) install?
A. an archive (release version) install? - no questions asked.
f. a full archive install (re-installs everything)? - no questions asked.

d. an interactive developer (bleeding edge) install?
D. a developer (bleeding edge) install? - no questions asked.
F. a full developer install (re-installs everything)? - no questions asked.

q. quit. Get me out of here!

a/A/d/D/f/F/q [a]
Posted in GNS3 | Tagged , , | 8 Comments

WordPress Changed their editor – and it sucks

Welcome to the keyhole. Trying to edit/create a blog post using WordPress just got harder (as if it wasn’t hard enough already!)

When I go to create a page, the first thing you notice is that you have to edit in a keyhole. The new edit page looks like this:

Screen Shot 2014-08-17 at 08.43.39  (2)

It used to look like this:Screen Shot 2014-08-17 at 08.41.48  (2)

Notice that there is a lot more editing room in the old page.  And if I’m in “Visual” mode, the editing screen gets even bigger!

And that’s not all. I used to have a [Save Draft] option. That’s gone – so when I went looking for it and clicked on something that took me somewhere else, when I cam back I’d lost some of my work. Not happy.

And Preview page doesn’t work (although it DOES force a “save draft”)

So WordPress, so far your new editor scores about 3/10 from me. Mind you, the “Classic Editor” is only worth about 6/10.

Posted in rant, wordpress | Tagged ,