Monday, May 12, 2008

How to make Olive Alive

I read Himawan Nugroho blog at http://brokenpipes.blogspot.com/2008/01/olive-is-alive.html about Olive, he posted a detailed procedure for making Olive alive, but i got stuck in installing the Junos but after making some changes i have made the Olive alive.
So i thought to share my experience with people seeking the information about Olive.
The softwares except Junos i used for Olive are same as he used. I used jinstall-7.2R3.3-export-signed instead of jinstall-8.3R2.8-export-signed.tgz. Later i upgraded my olive to jinstall-8.3R2.8-export-signed.tgz.

I will follow the steps written by Himawan but for making all steps clear i am also quoting the steps written by him.

1. Download the latest version of Qemu for Windows.
2. Download OpenVPN to create TAP interface.
3. Download FreeBSD 4.4 mini ISO.
4. Get JunOS mine is 7.2R3.3.
5. Download modified version of Qemu, Jqemu. I have uploaded the Jqemu to a site as it is difficult to download the file from Chinese site. Download site is http://imran29.esmartdesign.com/jqemu-100full.rar
6. C:\qemu>qemu-img.exe create olive.img -f qcow2 3G Formating 'olive.img', fmt=qcow2, size=3145728 kB

7. Put the FreeBSD mini ISO in the same Qemu directory, and use this command to boot FreeBSD from the iso.


C:\qemu>qemu.exe -L . -m 256 -hda olive.img -cdrom 4.4-mini.iso -boot d -localtime

Follow the FreeBSD installation instruction wriiten on http://brokenpipes.blogspot.com/2008/01/olive-is-alive.html


8. Upload JunOS install package from Windows, as freeBSD has been isntalled on the system and now it is the time to start the freeBSD with valid network connection with your system. We have created Tap interface with open VPN, rename that tap interface to Tap1 and assign the IP 10.1.1.1/8, now its time to start freeBSD. I am starting my freeBSD with one fxp0 interfaces.


C:\qemu>jqemu.exe -L . -m 256 -hda Olive.img -localtime -net nic,vlan=1,macaddr=00:aa:00:00:01:01,model=i82559er -net tap,vlan=1,ifname=Tap1

Login to freeBSD with root account and change the IP of fxp0 to 10.1.1.2/8 by #ifconfig fxp0 up 10.1.1.2
Checck the N/W connectivity by ping command, ping 10.1.1.1

If you have got the reply then it means that u have got the working N/W interface with your PC.

You should have ftp server(Filezilla is a free FTP server for windows) running on your PC.

#cd /var/tmp
#ftp 10.1.1.1

Change type to binary and get the jinstall file.

rm /dev/wd0c

ln -s /dev/ad0c /dev/wd0c

mkdir /var/etc

touch /var/etc

touch /var/etc/master.passwd

touch /var/etc/inetd.conf

touch /var/etc/group

pkg_add /var/tmp/jinstall-7.2R3.3-export-signed.tgz

shutdown -r now

While it's shuttingdown, exit from Qemu by pressing Ctrl-Alt-2, then type: quit

10. Login to Olive for the first time!

So start Qemu again using Jqemu.exe and this time put the option to redirect the output to serial port emulated by local TCP port 1001. Now I am starting my Junos with two fxp0 interfaces.

c:\qemu>jqemu.exe -L . -m 256 -hda Olive.img -serial telnet::1001,server -localtime -net nic,vlan=1,macaddr=00:aa:00:00:01:01,model=i82559er -net nic,vlan=1,macaddr=00:aa:00:00:01:03,model=i82559er -vnc :1 -usbdevice tablet -net tap,vlan=1,ifname=Tap1

Qemu windows will pop up and it's waiting for TCP connection to port 1001

Open putty (a free telnet client for windows) and telnet to 127.0.0.1 with port 1001.

You can see the whole installation process.

Once your Olive gets up, login with root and at this time it will not ask for password. type command "cli" , now you are in Olive Junos prompt, now you need to configure IP to the fxp0 interface but before configuring IP you need to configure the root-authentication.


root@%cli
root>configure
[edit]
root#edit system root-authentication
root#set plain-text-password

It will now ask for the password after giving password, type commit

Now assign the IP to fxp0 interface by command

root#set interface fxp0 unit 0 family inet address 10.1.1.2/8

Again type commit.

Now start the shell again by command.

root>start shell

root@% cd /var/tmp/

Ftp to 10.1.1.1 and get jinstall-8.3R2.8-export-signed.tgz and then upgrade the JuNOS by.
pkg_add jinstall-8.3R2.8-export-signed.tgz
Reboot the system.
After restart you have 8.3R2.8.










12 comments:

North Shield said...

hi

First of all thank you for you efforts. when i configured my fxp0 interface i can't ping through my windows but i can ping from windows to qemu. Do you have any idea what would be a problem

Shane said...

@North Shield -

You problem is Windows Firewall.


http://www.shanekillian.net

Anonymous said...

hi can i have your junos "jinstall-7.2R3.3-export-signed.tgz"

Syed Tabrez Ahmed Shah said...

Hi Imran,
Assalaualikum..

Thank you for your support bhai.. just give ur email ID so that I can contact you..

Need your help in implementing JunOS in my GNS 3 and qemu also..

mahmoud mokhtar said...
This comment has been removed by the author.
mahmoud mokhtar said...
This comment has been removed by the author.
mahmoud mokhtar said...

Dear All,

I can't run ospf between olive roueter does olive support multicast.

Zeeshan said...

is it possible for you to post screen shots of whole configuration ?

Zeeshan said...

i sucked after 7 step, I am receiving error

CD ROM failure
hard disk failure

in my open cli new page. after this i have no further option to do.


Please help me out.

dawit assefa kebede said...

Hello,

In the first place i would like to extend my warmest appreciation for your good work. you tried to make installation of olive as simple as possible. Good job! now my question is that right now I do have qemu based olive for Junos version10. So how can we make GNS3 to work for junos as it works for Cisco IOS. I mean you can use the Cisco IOS directly on GNS3 and you can add up a number of routers based on that IOS and play with it. How can we do this with JUNOS?...hoping to hear from all of you. you can shoot a message through dawita3@gmail.com

Dawit [CCIE-written, CCNP, CCNA, HCNE,SCSA, MCSE]

Unknown said...

Very Thank you its helpful and very nice share Info i cant thank you but i 'll pray for you Imran,you not just copy and paste but you add some Experience to us from yours that what we need go a head Man..:)
i was stuck in chckpic issues..but with your info amazing i cant believe finally i get Junos.

mb_rahman said...

Hello,

I can't seem to use jqemu.exe. Giving me \\.\kqemu acceleration layer error. And when i load it using qemu.exe, i keep getting these fxp0 not activated errors and can't connect to the host machine.

Any help is greatly appreciated.

Thanks.