Saturday, November 30, 2013

Juniper via VMware Fusion 6 + Console for GNS3

Ok...

This has been a major bug bear of mine for quite some time. Finally I have managed to get Olive (Junos) working with GNS3. It just took the release of VMware fusion 6 to make it possible.

Ok on to the show...

What you need:

Vmware Fusion 6 Pro.
GNS3 0.86
Tun/Tap
Socat
bridge
Vmware image of Junos (no I wont give you mine, you can find it through google Im sure.)

I cant remember where I scored bridge from, I know though I had to download it. Google bridge for mac os x and Im sure you will find it.

Anyways...

First things first:

Right click on your vmware machine and go "show package contents" this will give you access to the VMX file, which you need to edit like so:
serial0.present = "TRUE"
serial0.fileType = "pipe"
serial0.yieldOnMsrRead = "TRUE"
serial0.startConnected = "TRUE"
serial0.fileName = "serial0"

save it, then open the vmware image in vmware fusion.

Then from the console window do the following command to see how many active ttys00x sessions you have going:

ls -al /dev/ttys*

Once that is done, in a separate console window enter the following command:

socat UNIX-CONNECT:serial0 PTY

This will enable you to use screen to connect to the PTY feed. Now re do the check for active ttys00x sessions and the newest one will be your console connection to the vmware fusion junos instance.

(How do you do that? easy - enter the command in another console window:

screen -f /dev/ttys00x (where x is the number of the juniper pipe) )

Now for the fun bit:

Visit this link:
Binary Nature's blog on how to connect vmware and GNS3.

Don't worry about creating vms of windows and linux they are unnecessary, however at the stage it mentions to configure the windows ip address stuff do that instead for em0.0 on the juniper instance.

Follow it down to the section labelled: # 3.2 Bridge for Linux VM.

Once there dont go any further. Make sure your cisco router is up in gns3, configure it with an ip address as well (same subnet would be useful), and connect them up via a switch in gns3.

Now ping across the link and *badoosh* you have juniper connected correctly to gns3 via vmware fusion WITH console support.

Now theoretically you could create multiple tap interfaces on the same cloud object and then pair them up to multiple bridges to different vmnets.

Think of it this way:

each VMNET is a switch, that is fed by one port of the virtual juniper. So as long as each interface in the virtual juniper is linked to a DIFFERENT VMNET you are sweet.

Hope that helps.

No comments: