7
October 29th, 2009 by Jeremy Grossmann October 29th, 2009 by Jeremy Grossmann Leave a reply » Leave a reply » Olive reloaded or how to emulate Juniper routers « » Installation Requirements JunOS runs on top of FreeBSD. So you need to download the mini installation ISO, version >= 4.5 because earlier versions don’t support the Intel e1000 interface (em driver). Personally, I used the FreeBSD 4.11 mini-inst ISO but you could use FreeBSD 6 or 7. JunOS itself. If you are smart and patient you will find it. I used jinstall-8.5R1.14-domestic-signed.tgz for my installations. Qemu source code. Again, I used Qemu 0.11.0. You can choose to download it later with wget (I’ll show you how). Download OpenVPN to create TAP interfaces (Windows only, optional). More stuff whether you compile Qemu on Mac OS X, Windows or Linux. Qemu compilation and patching on Mac OS X The following procedure has been tested on Mac OS X Snow Leopard. First you have to install the MacPorts [http://www.macports.org/install.php] and its dependencies (e.g. latest Apple’s Xcode Developer Tools). Open a terminal window and install zlib, wget and libpcap via the MacPorts: sudo port install zlib wget libpcap Unzip qemu somewhere (e.g. in Documents/JunOS). Then from the qemu directory, patch and compile qemu: Because FreeBSD hanged a few times when I was installing it inside Qemu, I applied a patch (qemu-0.11.0-macosx) which apparently fixed the problem (this is totally optional, maybe you won’t have any issue if not applied). wget http://download.savannah.gnu.org/releases/qemu/qemu-0.11.0.tar.gz tar xvzf qemu-0.11.0.tar.gz cd qemu-0.11.0 wget http:// downloads.sourceforge.net/gns-3/qemu-0.11.0-macosx.patch?download patch -p1 -i qemu-0.11.0-macosx.patch wget http://downloads.sourceforge.net/gns-3/qemu-0.11.0-olive.patch?download patch -p1 -i qemu-0.11.0-olive.patch ./configure --disable-aio --disable-kvm --disable-kqemu --disable-sdl \ --target-list=i386-softmmu make Technical Blog Ads by Google Juniper Junos Olive Oil Per Olive Olive Trees Olive reloaded or how to emulate Juniper routers ... http://blog.gns3.net/2009/10/olive-juniper/2/ 1 of 7 10/28/2011 10:26 PM

Olive Reloaded or How to Emulate Juniper Routers GNS3

  • Upload
    st3lios

  • View
    10

  • Download
    1

Embed Size (px)

DESCRIPTION

Juniper emulation

Citation preview

  • October 29th, 2009 by Jeremy GrossmannOctober 29th, 2009 by Jeremy Grossmann Leave a reply Leave a reply

    Olive reloaded or how to emulate Juniper routers

    Installation

    Requirements

    JunOS runs on top of FreeBSD. So you need to download the mini installation ISO, version >= 4.5 because

    earlier versions dont support the Intel e1000 interface (em driver). Personally, I used the FreeBSD 4.11

    mini-inst ISO but you could use FreeBSD 6 or 7.

    JunOS itself. If you are smart and patient you will find it. I used jinstall-8.5R1.14-domestic-signed.tgz for my

    installations.

    Qemu source code. Again, I used Qemu 0.11.0. You can choose to download it later with wget (Ill show you

    how).

    Download OpenVPN to create TAP interfaces (Windows only, optional).

    More stuff whether you compile Qemu on Mac OS X, Windows or Linux.

    Qemu compilation and patching on Mac OS X

    The following procedure has been tested on Mac OS X Snow Leopard.

    First you have to install the MacPorts [http://www.macports.org/install.php] and its dependencies (e.g. latest

    Apples Xcode Developer Tools).

    Open a terminal window and install zlib, wget and libpcap via the MacPorts:

    sudo port install zlib wget libpcap

    Unzip qemu somewhere (e.g. in Documents/JunOS). Then from the qemu directory, patch and compile qemu:

    Because FreeBSD hanged a few times when I was installing it inside Qemu, I applied a patch (qemu-0.11.0-macosx)

    which apparently xed the problem (this is totally optional, maybe you wont have any issue if not applied).

    wget http://download.savannah.gnu.org/releases/qemu/qemu-0.11.0.tar.gz

    tar xvzf qemu-0.11.0.tar.gz

    cd qemu-0.11.0

    wget http://downloads.sourceforge.net/gns-3/qemu-0.11.0-macosx.patch?download

    patch -p1 -i qemu-0.11.0-macosx.patch

    wget http://downloads.sourceforge.net/gns-3/qemu-0.11.0-olive.patch?download

    patch -p1 -i qemu-0.11.0-olive.patch

    ./configure --disable-aio --disable-kvm --disable-kqemu --disable-sdl \

    --target-list=i386-softmmu

    make

    Technical Blog

    Ads by Google Juniper Junos Olive Oil Per Olive Olive Trees

    Olive reloaded or how to emulate Juniper routers ... http://blog.gns3.net/2009/10/olive-juniper/2/

    1 of 7 10/28/2011 10:26 PM

  • sudo make install

    Qemu compilation and patching on Windows

    If you do not want to compile Qemu on Windows (I can understand that I provide a static version that you can

    download here [http://downloads.sourceforge.net/gns-3/qemu-0.11.0.patched.win32.zip?download] .

    First some dependencies must be installed, I chose to almost compile everything:

    Download MinGW and install it (choose custom installation with g++ and make included). The file I downloaded

    was MinGW-5.1.6.exe

    Download MSYS and install it, answer yes to post-installation questions and put the correct path to MinGW

    directory (should be C:\MinGW). The file I downloaded was MSYS-1.0.11.exe.

    Download , zlib, SDL, MSYS coreutils into your MSYS home directory (e.g. c:\Msys\public\username). I

    downloaded zlib-1.2.3.tar.gz, SDL-1.2.14.tar.gz and coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2. MSYS

    coreutils is necessary because Qemu signrom.sh uses tools such as dd, od, expr, cp and printf which are

    included in coreutils.

    Download and install Winpcap Developer Pack: extract the contents of \lib and \include folders into \lib and

    \include folders of your MinGW installation location (should be C:\MinGW\lib and C:\MinGW\include)

    Start MSYS.

    Compile and install zlib:

    cd

    tar -xzvf zlib-1.2.3.tar.gz

    cd zlib-1.2.3

    ./configure --prefix=/mingw

    make

    make install

    Compile and install SDL

    tar -xzvf SDL-1.2.14.tar.gz

    cd SDL-1.2.14

    ./configure --prefix=/mingw

    make

    make install

    Install coreutils

    tar -xvjf coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2

    Copy the content of coreutils-5.97-MSYS-1.0.11-snapshot in the MinGW directory (e.g. C:\MinGW). You can also

    compile and install wget [http://sourceforge.net/projects/mingw/files/MinGW%20Utilities/wget/wget-1.9.1.tar.gz

    /download] in MSYS or simply use your preferred browser to download Qemu and the patch in the correct

    directories.

    wget http://download.savannah.gnu.org/releases/qemu/qemu-0.11.0.tar.gz

    tar -xvzf qemu-0.11.0.tar.gz

    cd qemu-0.11.0

    wget http://downloads.sourceforge.net/gns-3/qemu-0.11.0-olive.patch?download

    patch -p1 -i qemu-0.11.0-olive.patch

    ./configure --target-list=i386-softmmu

    make

    Olive reloaded or how to emulate Juniper routers ... http://blog.gns3.net/2009/10/olive-juniper/2/

    2 of 7 10/28/2011 10:26 PM

  • Pages: 1 2 3 4 5 6 7

    make install

    Qemu compilation and patching on Linux

    Compiling Qemu on Linux (Ubuntu) is quite simple.

    First install the dependencies: ncurses, zlib, libpcap-dev and SDL libraries. SDL is optional, you can still use

    Qemu in a console with the ncurses option. Then apply the patch and compile Qemu.

    sudo apt-get install libncurses5-dev zlib1g-dev libsdl-dev libpcap-dev

    wget http://download.savannah.gnu.org/releases/qemu/qemu-0.11.0.tar.gz

    tar xvzf qemu-0.11.0.tar.gz

    cd qemu-0.11.0

    wget http://downloads.sourceforge.net/gns-3/qemu-0.11.0-olive.patch?download

    patch -p1 -i qemu-0.11.0-olive.patch

    ./configure --target-list=i386-softmmu

    make

    sudo make install

    Qemu acceleration

    Qemu provides some ways to speed up the emulation, Ill talk about 2 of them: Kqemu and KVM. Kqemu can be

    used on both Windows and Linux. KVM is only for Linux. I do not know if something exists for Mac OS X.

    For more details about Kqemu, please have a look at the documentation [http://www.qemu.org/kqemu-doc.html]

    . For KVM, see the website [http://www.linux-kvm.org/] .

    The installation of Kqemu on Windows is relatively easy:

    Download Kqemu.1.

    Unzip it.2.

    Locate kqemu.inf and install it (right-click and select Install). In Windows Vista, install Kqemu using the CMD

    prompt and this command: rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 kqemu.inf

    3.

    Start Kqemu from the CMD prompt: net start kqemu4.

    Kqemu on Linux (Ubuntu):

    Install kqemu with: sudo apt-get install kqemu-source1.

    If you do not want to use sudo each time you start Qemu, give the permissions to /dev/qemu with the

    following command: sudo chmod o+rw /dev/kqemu

    2.

    For manual installation or other Linux distributions, please see the documentation [http://www.qemu.org

    /kqemu-doc.html] .

    KVM on Linux:

    Qemu requires your kernel version to be >= 2.6.29 to enable the KVM support. You have to ensure this is ok

    before you compile Qemu.

    Dont forget to add the -kernel-kqemu or -enable-kvm command line options when starting Qemu (I didnt do it

    in this tutorial). I would recommend to activate Kqemu only when you have your Olive image ready and

    working.

    Olive reloaded or how to emulate Juniper routers ... http://blog.gns3.net/2009/10/olive-juniper/2/

    3 of 7 10/28/2011 10:26 PM

  • Tag CloudTag Cloud

    Diet patches that Diet patches that

    133 comments133 comments

    Add your commentAdd your comment

    Older Comments Older Comments

    Next Entry: How to emulate Cisco ASA

    Posted in Juniper

    Tags: Dynamips Emulation GNS3 Juniper JunOS Olive Qemu

    You can follow any responses to this entry through the RSS 2.0 Feed . You can leave a response , or trackback from your own site.

    HakimK

    Ive 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 les in the Qemu folder.

    stderr notepad shows:

    qemu: could not open serial device mon:stdio

    stdout notepad shows:

    Unable to open driver: stdio

    Im trying to install olive in WinXP SP3 with qemu-0.11.0.patched.win32.

    did anyone have the same problem as me?

    October 6, 2010 at 15:39

    Philip

    Hi,

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

    Thanks

    October 12, 2010 at 18:43

    Brad

    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 les I dont need any more and made sure PKG_TMPDIR was pointing to /var/tmp. After clening out the les I

    had 1060060 K bytes free. So that should be enough. But kept getting same error.

    October 17, 2010 at 03:51

    Olive reloaded or how to emulate Juniper routers ... http://blog.gns3.net/2009/10/olive-juniper/2/

    4 of 7 10/28/2011 10:26 PM

  • juber

    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 dont 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 doesn start.

    Please help guys

    November 13, 2010 at 16:57

    arvind

    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.

    November 21, 2010 at 00:58

    Carlos M

    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.

    November 28, 2010 at 23:11

    Max

    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 doesnt work. Using the mount point doesnt work. I had this working on 10.5, but remember -cdrom didnt work.

    Any help is appreciated!

    Thanks!

    December 17, 2010 at 02:23

    Aamir Maqbool

    Hi, Ive installed the olive by following the above procedure. However Im 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. Im unable to find serial interfaces, ATM interfaces & Sonet interfaces.

    Can Anyone provide me the help regarding this.

    January 13, 2011 at 09:51

    Cristian Vnd

    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)

    March 2, 2011 at 02:35

    Olive reloaded or how to emulate Juniper routers ... http://blog.gns3.net/2009/10/olive-juniper/2/

    5 of 7 10/28/2011 10:26 PM

  • Older Comments Older Comments

    Trackbacks /Trackbacks /

    PingbacksPingbacksGNS3 0.7RC1 | El mundo de IMDGNS3 0.7RC1 | El mundo de IMD

    GNS3 Announcement: GNS3 Technical Blog | GNS3GNS3 Announcement: GNS3 Technical Blog | GNS3

    Labs :: Cisco Router Simulator Network TopologiesLabs :: Cisco Router Simulator Network Topologies

    GNS3 Announcement: GNS3 0.7RC1 Released! | GNS3GNS3 Announcement: GNS3 0.7RC1 Released! | GNS3

    Labs :: Cisco Router Simulator Network TopologiesLabs :: Cisco Router Simulator Network Topologies

    GNS3 0.7RC1 Released! ( nov 30 news! ). CCIE Quest.GNS3 0.7RC1 Released! ( nov 30 news! ). CCIE Quest.

    then

    sfttp [email protected]:jinstall-8.5R1.14-domestic-signed.tgz /var/tmp

    from your freebsd VM

    Ryan

    Im 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?

    March 26, 2011 at 12:52

    neor

    Where do I put this command

    qemu-img create -f qcow2 olive-base.img 4G

    July 16, 2011 at 22:47

    jomih

    Hi to all,

    Ive 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:

    cant add tap0 to bridge wlan0: operation not supported

    Ive tried to do it using the eth0 interface instead of wlan0, but I got the same results.

    can anyone tell me whats wrong??

    Thanks!!

    July 19, 2011 at 06:29

    josem

    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?

    September 23, 2011 at 21:09

    Olive reloaded or how to emulate Juniper routers ... http://blog.gns3.net/2009/10/olive-juniper/2/

    6 of 7 10/28/2011 10:26 PM

  • How to emulate Cisco ASA | GNS3How to emulate Cisco ASA | GNS3

    GNS3 supporte maintenant JunOS ! | Telecom-ReseauxGNS3 supporte maintenant JunOS ! | Telecom-Reseaux

    GNS3 0.7rc1 supports JUNOS Lets try it out (Part 1) GNS3 0.7rc1 supports JUNOS Lets try it out (Part 1)

    Technology, Computers, Networking, IT, Educational,Technology, Computers, Networking, IT, Educational,

    Plus stu that I likePlus stu that I like

    CCIE Sec Vracks - So Do You Want to be a CCIE? -CCIE Sec Vracks - So Do You Want to be a CCIE? -

    2bccie.com2bccie.com

    CCIE QuestCCIE Quest

    Gns3 0.7.1-2 on Ubuntu 10.04 LTS [the easy way] Gns3 0.7.1-2 on Ubuntu 10.04 LTS [the easy way]

    Technology, Computers, Networking, IT, Educational,Technology, Computers, Networking, IT, Educational,

    Plus stuff that I likePlus stuff that I like

    JNCIA-M/JNCIS-M sample exams & lab kit? -JNCIA-M/JNCIS-M sample exams & lab kit? -

    TechExams.net IT Certification ForumsTechExams.net IT Certification Forums

    Belajar mengemulate JUNOS di GNS3 Iwing's BlogBelajar mengemulate JUNOS di GNS3 Iwing's Blog

    @_@@_@

    Juniper router in GNS3 - TechExams.net IT CertificationJuniper router in GNS3 - TechExams.net IT Certification

    ForumsForums

    How to Emulate CISCO ASA Learning NetworkHow to Emulate CISCO ASA Learning Network

    How to Emulate CISCO ASA Just SharingHow to Emulate CISCO ASA Just Sharing

    How to install Vyatta 6.1 Core LiveCD on Qemu image inHow to install Vyatta 6.1 Core LiveCD on Qemu image in

    Linux Brezular's Technical BlogLinux Brezular's Technical Blog

    JUNOS in GNS3 Internet ProtocolsJUNOS in GNS3 Internet Protocols

    Cisco Dynamips and Juniper Olive: A little clarity onCisco Dynamips and Juniper Olive: A little clarity on

    router emulators, please - The Network Hubrouter emulators, please - The Network Hub

    How to setup Linux Microcore 3.x Router Qemu ImageHow to setup Linux Microcore 3.x Router Qemu Image

    in Fedora Linux part1 Brezular's Technical Blogin Fedora Linux part1 Brezular's Technical Blog

    GNS3 Qemu Troubleshooting Brezular's TechnicalGNS3 Qemu Troubleshooting Brezular's Technical

    BlogBlog

    Name (required)

    Mail (will not be published) (required)

    Website

    Submit Comment

    Back to Top

    Leave a Reply

    2011 GNS3 Proudly powered by WordPress & Green Park 2 by Cordobo

    Olive reloaded or how to emulate Juniper routers ... http://blog.gns3.net/2009/10/olive-juniper/2/

    7 of 7 10/28/2011 10:26 PM