Juniper olive Simulator
I have been working in IP Networks since November, 2006. Previously there was all CISCO in our Network which was replaced with Juniper later.
Initially I came to know that there is some CISCO IOS Simulator which runs original IOS of Cisco routers and we can practice everything on it. I used Dynagen and now GNS03. But when Juniper came i was researching about Juniper Routers Simulator.
Now back in March April 2008 I was able to make it after 2 months continuous researching.
I was thinking of JNCIS-M and JNCIP-M Now I have already done JNCIS-M and preparing for JNCIP-M
I will not let you wait more to know about Juniper Simulator Olive.
Here is the method of making Juniper Simulator Olive.
2. What is Olive
3. VMware specifics
4. Installation of FreeBSD
5. Installation of JUNOS
6. Gaining Access
7. Upgrading Olive.
The credits goes to Smoogy and also to some Chinese sites regarding juniper from where I got the method to access the Juniper routers in olive.
What is Olive:
Olive is a nothing. It is basically a simulation of Juniper OS (JUNOS) in Vmware FreeBSD. Exact information will be known to you later on.
You can use Vmware server or Client for this purpose. Just make sure that when you make a virtual machine it has maximum ethernet cards support. I used Vmware Workstation 6.0.1
Vmware Profile I used: 256MB RAM (I may lower this later once Olive is built); 1 x CDROM ; 3 x Ethernet NICs configured as ‘bridged’ (you would be fine with one NIC); 1 x serial port ; 8 GB hard disk (untick ‘allocate all disk space now’); for Operating System profile choose ‘Other’ then ‘FreeBSD’.
Installation of FreeBSD:
Downlaod FreeBSD 4.10-RELEASE-i386-miniinst.iso (~220MB) and when bound to a VMWare CDROM, this will boot.
Start VMWare machine, and at the “Kernel Configuration Menu” choose the top option of “Skip kernel config<snip>”
At the “SysInstall Main Menu” choose “Express – Begin a quick installation (for the impatient)”
At the FDISK Parition Editor type A to use Entire Disk, then type Q to finish
For the “Boot Manager” choose “Standard – Install a standard MBR (no boot manager)”
For the “Disklabel Editor”:
Step 1 of 4: Type C to create, then delete the values and insert 500M <ENTER>, then choose FS (File System), then type / <ENTER>
Step 2 of 4: Type C, delete values, insert 500M <ENTER>, then choose Swap space
Step 3 of 4: Type C, delete values, insert 100M <ENTER>, choose FS, type /config <ENTER>
Step 4 of 4: Type C, accept the values presented with an <ENTER>, choose FS, type /var <ENTER>
Type Q to finish
For “Choose Distributions” choose “Exit this menu – returning to previous” (i.e. no need to install any extras)
For “Choose installation media” choose “CD/DVD“
At the “User Confirmation Requested” where it asks if you want to proceed with the install, choose “Yes” – Lots of install stuff will now happen
At the window where it gives you an opportunity to “Visit the general config menu for a chance to set any last options”, choose “Yes“
Using the cursor keys, choose “Root password“<ENTER> and enter twice a new ‘root’ password
Using the cursor keys, choose “Interfaces“<ENTER>, then choose “em0“, for IPv6 choose “no“, for dhcp choose “yes“, for host put in a dummy name like “olive” then scroll down to “OK” (using DHCP will give you an IP address, allowing you to FTP jinstall images to your Olive machine. If you do not have a DHCP server on your bridged LAN segment, then configure a static IP and default gateway as appropriate)
Then choose “Exit“, then choose “Exit install” from the SysInstall main menu
A final confirmation will ask if you want to reboot, choose “Yes“
Initially install JUNOS 5.7 “jinstall-5.7R2.4-domestic-signed.tgz”, and then later get a more recent JUNOS 8 image on to the virtual machine, so it would detect and use the network cards. You cannot initially install a version greater than 7.4 as it will return an ‘ELF binary type “0″ not known’ error.
Do the following
1. Get JUNOS 5.7 jinstall-5.7R2.4-domestic-signed.tgz”
2. Get Magic ISO Software and make the JUNOS-5.7.iso file of that jinstall-7.7R2.4-domestic-signed.tgz
3. Now give path of that .iso in CDrom of FreeBSD Machine.
4. Mount Cdrom by “mount -t cd9660 /dev/acd0c /cdrom”
5. copy jinstall-7.7R2.4-domestic-signed.tgz by command “cp /cdrom/jinstall-7.7R2.4-domestic-signed.tgz /var/tmp“
Now you have jinstall-7.7R2.4-domestic-signed.tgz in your /var/tmp directory Just give below commands :
ln -s /dev/ad0c /dev/wd0c
shutdown -r now
NOTE: at this point, if you loaded a JUNOS version of below 7.4, then when you reload – you will lose the ability to use any of the virtual NIC cards in this virtual machine When the virtual machine reboots, you may lose access to the CLI
Gaining access :
You can get access of router by adding serial port to your virtual serial machine and this software Virtual.Serial.Port.Driver 6.9 Also have a look at video
For upgradation you have to upgrade it to JUNOS 7.2R4.2 then you will upgrade it to JUNOS 8.5R1.4. SO same steps are required as given below for JUNOS7.2.
Now make a second machine having FreeBSD only and copy again by process of .iso file into its /var/tmp directory, then halt the system. shutdown -h now
Now copy its hard-disk by copying the hard disk .vmdk file to the JUNOS virtual machine directory, and add it as a second hard disk. Then when JUNOS boots, you can mount the second hard disk, and pull over the new file.
To add the second hard disk: Click “edit virtual machine settings”; Click Add; Click Next; Click “use existing virtual disk” radio button; Browse to the .vmdk file; Click Finish. You should now have a second IDE hard disk called “IDE 0:1″
Now boot the JUNOS machine – you should see that both hard disks are found in the boot output of the serial port.
Now perform the following to get the image across to the primary (and the only long-term hard disk partition):
mount /dev/ad1s1f /var2
check file exists: ls -al
Move the file using: mv <jinstall-filename.tgz> /var/tmp e.g. mv jinstall-8.5R1.4-export-signed.tgz /var/tmp
pkg_add <jinstall-filename.tgz> e.g. pkg_add /var/tmp/jinstall-8.5R1.4-export-signed.tgz
shutdown -h now
Edit the virtual machine settings again and remove the second hard disk, and delete the second hard disk partition file if you so choose.
When you restart this virtual machine, you should have a welcome site of all NICs detected and JUNSO 8.5 (or your chosen version) fully working.
Now the only thing which is left is multicast patching.
download the multicast patching from following link
Now follow the steps given below :
Copy that patch syscall.ko in two directories
Restart the router and press space bar until prompt stops like this
recorded reboot as normal shutdown
Consoles: serial port
BIOS drive A: is disk0
BIOS drive C: is disk1
BIOS 638kB/260032kB available memory
FreeBSD/i386 bootstrap loader, Revision 1.1
(firstname.lastname@example.org, Wed Dec 17 23:00:37 UTC 2008)
/kernel text=0xa2f02c data=0x6d248+0×81120 syms=[0x4+0x9f750+0x4+0xaae32]
Hit [Enter] to boot immediately, or space bar for command prompt.
Type ‘?’ for a list of commands, ‘help’ for more detailed help.
Now enter in single user mode boot -s
OK boot -s
ACPI autoload failed – no such file or directory
GDB: debug ports: sio
GDB: current port: sio
KDB: debugger backends: ddb gdb
KDB: current backend: ddb
Copyright (c) 1996-2008, Juniper Networks, Inc.
Now press space bar again until prompt stops like given below
Attaching /packages/jbase via /dev/mdctl…
Mounted jbase package on /dev/md0…
System watchdog timer disabled
Enter full pathname of shell or ‘recovery’ for root password recovery or RETURN for /bin/sh:
NOTE: to go to multi-user operation, exit the single-user shell (with ^D)
Apr 26 16:55:34 init: can’t exec /packages/mnt/jbase for single user: No such file or directory
# cd /boot
# kldload syscall.ko
Then press Ctrl+D
Verified manifest signed by PackageProduction_8_5_0
Verified jboot signed by PackageProduction_8_5_0
then in shell mode
enter following command for every em interfaces
root@R5% sysctl dev.em.0.fix_em_multicast = 1
sysctl dev.em.1.fix_em_multicast = 1
sysctl dev.em.2.fix_em_multicast = 1
Wish u all the best.