Olive reloaded or how to emulate Juniper routers

October 29th, 2009 by Jeremy Grossmann Leave a reply »

« »

Testing

To check if everything work, let’s configure 2 Olives:

root@%cli
root>edit
[edit]
root#

[edit]
root#set system root-authentication plain-text-password
New password:
Retype new password:

[edit]
root#set interfaces em0 unit 0 family inet address 10.0.0.1/8
[edit]
root#commit
commit complete

Configure the other device using the same commands but with another IP address (e.g. 10.0.0.2/8) and ping.

root#exit
Exiting configuration mode
root> ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2): 56 data bytes

64 bytes from 10.0.0.2: icmp_seq=0 ttl=64 time=9.771 ms
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.614 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.693 ms
64 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=0.630 ms

Additionally, configure OSPF (or any other multicast based protocol) to test if your routers can talk to each other using multicast packets. Again, type those commands on both routers:

root# set protocols ospf area 0 interface em0

[edit]
root# commit
commit complete

[edit]
root# exit
Exiting configuration mode

Then monitor the traffic from one of the router, you should see some multicast traffic (from/to 224.0.0.5):

root> monitor traffic interface em0

02:30:30.973748 Out IP 10.0.0.1 > 224.0.0.5: OSPFv2, Hello, length 48
02:30:31.007675  In IP 10.0.0.2 > 224.0.0.5: OSPFv2, Hello, length 48

Is everything working? yes? then you are successfully running JunOS! Happy networking :)

133 comments

  1. HakimK says:

    I’ve followed all the instruction but after “qemu -m 256 -hda olive-base.img -boot c -localtime -nographic -serial stdio”, nothing happen. No qemu window appear and I only can see “stderr” and “stdout” files in the Qemu folder.

    stderr notepad shows:
    qemu: could not open serial device ‘mon:stdio’

    stdout notepad shows:
    Unable to open driver: stdio

    I’m trying to install olive in WinXP SP3 with qemu-0.11.0.patched.win32.

    did anyone have the same problem as me?

  2. Philip says:

    Hi,

    I always encounter this error (ELF Binary Type ’0′ Not Known). Do I missed something?

    Thanks

  3. Brad says:

    Everything went smoothly following the directions exactly a written, till I actually got to pkg_add.

    The VM complained about not enough space, saying I needed to change PKG_TMPDIR to a location that had at least 905682568 bytes. I cleaned out files I don’t need any more and made sure PKG_TMPDIR was pointing to /var/tmp. After clening out the files I had 1060060 K bytes free. So that should be enough. But kept getting same error.

  4. juber says:

    O tried to run scp [email protected]:~/Desktop/jinstall-8.5R1.14-domestic-signed.tgz /var/tmp command but request gets timed out.

    I put my PCs hostname instead of user, even i tried with the user i logged in with in my pc but still the request is getting timed out “ssh: connect to host 10.0.2.2 port 22: Operation time out”

    I wasted my 3 days to resolved this don’t know y its not working.

    I had put only “qemu -m 256 -hda olive-base.img -boot c -localtime ” command when booting olive image cause when i put “qemu -m 256 -hda olive-base.img -boot c -localtime \
    -net nic,macaddr=00:aa:00:60:01:01,model=e1000 -net user” the qemu does’n start….

    Please help guys

  5. arvind says:

    hi while trying to upload Junos iam getting following error.

    scp [email protected]:xxxxx\jinstall \var\tmp
    ssh: connect to host 10.0.2.2 port 22: Operation timed out.

    I thought my antivirus firewall might be blocking the udp and tcp packets so disabled that and tried .. then also i was unsuccessful pl help here.

  6. Carlos M says:

    FTR, the pcap check in the patch is wrong.
    Compiler barfs at not caster int return and also,
    the $TMPC should be abefore the $LIBPCAP for the test compile to work.

  7. Max says:

    Does anyone running this on a MAC OS X 10.6 know the replacement option for “-cdrom” in the QEMU command:

    qemu -m 256 -hda olive-base.img -cdrom 4.11-RELEASE-i386-miniinst.iso \ -boot d -localtime

    /Volumes doesn’t work. Using the mount point doesn’t work. I had this working on 10.5, but remember -cdrom didn’t work.

    Any help is appreciated!

    Thanks!

  8. Aamir Maqbool says:

    Hi, I’ve installed the olive by following the above procedure. However I’m facing currently two problems.
    1. I configure the Juniper Router in GNS3 and commit changes bye using commit command. But it does not take effect. until unless I reload all the routers.
    2. I’m unable to find serial interfaces, ATM interfaces & Sonet interfaces.

    Can Anyone provide me the help regarding this.

  9. Cristian Vnd says:

    Resolved JUNOS image upload problem :
    My settings
    - tap-interface with DHCP : ip taken 10.0.2.16
    - Core FTP (mini-sftp-server) to upload your junos image (username=user,password=user)
    then
    sfttp [email protected]:jinstall-8.5R1.14-domestic-signed.tgz /var/tmp
    from your freebsd VM

  10. Ryan says:

    I’m not able to proceed with the following command:

    qemu R1.img -m 96 -nographic -daemonize -serial telnet::2001,server,nowait \
    -localtime -net nic,macaddr=00:aa:00:60:01:01,model=e1000 -net user
    telnet localhost 2001

    It produces a stderr.txt file containing:

    qemu: invalid option — `-daemonize`

    If I remove this option, it produces another error:

    qemu: could not open monitor device `stdio`

    Anyone else having this same issue?

  11. neor says:

    Where do I put this command
    “qemu-img create -f qcow2 olive-base.img 4G”

  12. jomih says:

    Hi to all,
    I’ve tried to emulate JUNOS in GNS3 without success.
    When I use the command “qemu -m 256 -hda olive-base.img -boot c -localtime \ -net nic -net tap,ifname=tap0 -net nic,macaddr=00:aa:00:60:01:01,model=e1000 -net user” (in Ubuntu 10.04) and after creating the tap interface with tunctl, I get the following message:
    can’t add tap0 to bridge wlan0: operation not supported
    I’ve tried to do it using the eth0 interface instead of wlan0, but I got the same results.
    can anyone tell me what’s wrong??
    Thanks!!

  13. josem says:

    hi,

    once olive is loaded, I configure an ip address for the en0 interface and do a commit but the check-out fails with this message:

    vci/vpi/allow-any-vci is required

    how is this possible if my interface is en0?

Leave a Reply