{"id":593,"date":"2013-11-27T13:56:37","date_gmt":"2013-11-27T12:56:37","guid":{"rendered":""},"modified":"2019-05-13T10:35:32","modified_gmt":"2019-05-13T08:35:32","slug":"how-run-junos-inside-gns3-step-step","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/how-run-junos-inside-gns3-step-step\/","title":{"rendered":"How to run JunOS inside of GNS3 &#8211; step by step"},"content":{"rendered":"<p>Actually there are several ways how to emulate JunOS routers using GNS3 and make to usable them for advanced networking topologies. So, be able to make and run JunOS inside of GNS3 we could use:<\/p>\n<ul>\n<li>qemu<\/li>\n<li>virtualbox<\/li>\n<li>vmware<\/li>\n<\/ul>\n<p>as the cost effective variance we prefer use open and free software, therefore we are focusing on the qemu and Vitrualbox. Here again we have several oportunities, how to prepare virtual junos router, all of them require preinstalled FreeBSD OS. Preparing FreeBSD virtualized VM we are able install a junos package than. I, as a newbie, have been tested some of mentioned opportunities. So, first of them, I&#8217;m using qemu.<\/p>\n<h2>Using qemu to run Junos router inside of GNS3<\/h2>\n<h3><strong>Prerequisities and environment<\/strong><\/h3>\n<p>All components are running inside of my Win 7 64 bit OS:<\/p>\n<ul>\n<li>Installed GNS3. I prefer to install version for win 64 bit. <span style=\"text-decoration: line-through;\">Download <a href=\"http:\/\/sourceforge.net\/projects\/gns-3\/files\/GNS3\/0.8.6\/GNS3-0.8.6-Standalone-64-bit.zip\/download\">here<\/a>. I&#8217;m using version 0.8.6.\u00a0 <\/span>I&#8217;m using GNS3 version 1.2.3 now.<\/li>\n<li>Installed Qemu, <span style=\"text-decoration: line-through;\">0.11. Win 32 version in my case. You can download <a href=\"http:\/\/sourceforge.net\/projects\/gns-3\/files\/Qemu\/Windows\/\">it here<\/a><\/span>. I&#8217;m using the one provided and installed together within GNS3 install package. We need the qemu as the virtualization technology used to make and run FreeBSD VM. The FreeBSD VM is then used as the platform where we install the main JunOS.<\/li>\n<\/ul>\n<h3><strong>Steps<\/strong><\/h3>\n<p>We have to, in general, follow the same steps:<\/p>\n<ul>\n<li>Create a qemu virtual machine<\/li>\n<li>Install the FreeBSD operating system on it (4.11).<\/li>\n<li>Install a Junos package\n<ul>\n<li>the one which is preprepared. Usually named OLIVE.<\/li>\n<li>the one which we have to modify and which is based on the domestic-signed JunOS package.<\/li>\n<\/ul>\n<\/li>\n<li>Import the junos qemu machine into GNS3 and build and run an example of topology.<\/li>\n<\/ul>\n<h3>Creating and installing a qemu machine with the FreeBSD OS<\/h3>\n<p>As the first step we have to create a qemu virtual machine. Inside of it we will install FreeBSD. The tutorial\u00a0<a style=\"font-style: italic; line-height: 1em;\" title=\"Installing FreeBSD for JunOS Olive using Qemu under Win 7 64bit\" href=\"https:\/\/nil.uniza.sk\/en\/network-simulation-and-modelling\/gns3\/installing-freebsd-junos-olive-using-qemu-under-win-7-64bit\/\">Installing FreeBSD for JunOS Olive using Qemu under Win 7 64bit<\/a>\u00a0is describing how to do it. For newer versions of junos OS we need to enlarge the disk size and its logical partitions. For Junos versions of 9, 10 and 11 is 4G enough, for versions 12 and higher should enlarge this up to 10G\/12G.<\/p>\n<h3>Installing a main junos system<\/h3>\n<p>Now we will install a junos system inside of qemu FreeBSd virtual machine. Here again we have several ways available, all of them require junos installation package. On the net we may found different packages and tutorials how to do it.<\/p>\n<h4>Using an olive package<\/h4>\n<p>We may found Junos packages which are already preprepared to run inside of FreeBSD, all running inside of PC (real or virtual). This kind of Junos packages are so called <em>OLIVE<\/em>. The olive package we may usually install directly inside of FreeBsD machine. The tutorial<\/p>\n<p>&#8220;<\/p>\n<p><a style=\"font-style: italic; line-height: 1em;\" title=\"Making qemu JunOS router installing JunOS 10.1 OLIVE package inside of qemu FreeBSD under Win 7 64bit\" href=\"https:\/\/nil.uniza.sk\/en\/network-simulation-and-modelling\/gns3\/making-qemu-junos-router-installing-junos-101-olive-package-inside-qemu-freebsd-under-win\/\">Making qemu JunOS router installing JunOS 10.1 OLIVE package inside of qemu FreeBSD under Win 7 64bit<\/a><\/p>\n<p>&#8220;<\/p>\n<p>is describing how to do it.<\/p>\n<p>&nbsp;<\/p>\n<h4>Using a domestic-signed package<\/h4>\n<p>As the second possibility, we may on the net find original Junos packages, which are preprepared to run inside of real junos HW, all are signed with hash keys. These packages have to be modified before we may install them into a qemu FreeBSD machine. Here again many tutorials are available, however in my case there are not straightforwardly applicable as I always found kind of installing problem.<\/p>\n<p>In general, many of them run GNS3\/qemu inside of linux OS, i&#8217;m using windows, where at least ftp\/scp\/sftp service have to be supplied. Then we have to modify original domestic signed junos package and make them usable for a qemu machine to install. All tutorials proposes to change the resolving of checkpic binary of the pkgtool package.<\/p>\n<p>One perfect tutorial, as &#8222;<a href=\"http:\/\/brezular.wordpress.com\/2012\/07\/03\/installing-olive-12-1r1-9-under-qemu\/\">Installing Olive 12.1R1.9 under Qemu<\/a>&#8222;, sugest omitt the usage of signed packages (it remove all keys and does not making tgz package with them) and also remove hardware platform checking. The steps described there sugest to modify two files (+INSTALL and +REQUIRED) and modify part of the\u00a0check_arch_compatibility()\u00a0function.\u00a0I found required function only inside of junos packages version 10 and above, so the tutorial is not applicable for junos version 9 (for example 9.6 as I had access to).<\/p>\n<p>Once I obtained a Junos package of such version I&#8217;ve made a tutorial (march, 2015), as the usual tutorials again did not precisely work for me. My working solution i&#8217;m describing here<\/p>\n<p>&#8220;<\/p>\n<p><a href=\"https:\/\/nil.uniza.sk\/en\/network-simulation-and-modelling\/gns3\/making-qemu-junos-router-installing-junos-123r66-domestic-signed-package-inside-qemu-freeb\/\">Making a qemu JunOS router installing JunOS 12.3R6.6 DOMESTIC-signed package inside of qemu FreeBSD under Win 7 64bit<\/a><\/p>\n<p>&#8220;<\/p>\n<p>&nbsp;<\/p>\n<p>Another excellent tutorial\u00a0<a style=\"line-height: 13.199999809265137px;\" href=\"http:\/\/blog.gns3.net\/2009\/10\/olive-juniper\/\">Olive reloaded or how to emulate Juniper routers<\/a>\u00a0describe how to modify package and generate new keys, thus making complete junos signed olive package. Personally for older versions of Junos <strong>I have used this tutorial, <\/strong>but I\u00a0found there some unclear parts, especially inside of backward steps used to tar a new junos olive package. My working solutions i&#8217;m describing here<\/p>\n<p>&#8220;<\/p>\n<p><a style=\"font-style: italic; line-height: 1em;\" title=\"Making qemu JunOS router installing JunOS 9.6 DOMESTIC-signed package inside of qemu FreeBSD under Win 7 64bit\" href=\"https:\/\/nil.uniza.sk\/en\/network-simulation-and-modelling\/gns3\/making-qemu-junos-router-installing-junos-96-domestic-signed-package-inside-qemu-freebsd\/\">Making qemu JunOS router installing JunOS 9.6 DOMESTIC-signed package inside of qemu FreeBSD under Win 7 64bit<\/a><\/p>\n<p><span style=\"font-size: 11px;\">&#8220; <\/span><\/p>\n<p>Note: Within my tutorials I&#8217;ve used freebsd 4.11 and junos domestic signed packages.<\/p>\n<p>&nbsp;<\/p>\n<h2>Making GNS3 tolopology of juniper routers using GNS3<\/h2>\n<h3>Version GNS3 1.x<\/h3>\n<h4>Adding a junos router (image)<\/h4>\n<p>For version GNS3 1.x open a new project. Then go to:<\/p>\n<pre><span style=\"font-size: 11px;\">Edit--&gt;Preference--&gt;qemu--&gt; Qemu VMs<\/span><\/pre>\n<p>where you click on the <em>New <\/em>button<\/p>\n<p><img decoding=\"async\" style=\"width: 500px; height: 425px;\" src=\"\/wp-content\/uploads\/files\/image\/netsim\/gns3\/junos\/qemu-v1_x-pic1.png\" alt=\"gns3.v1.x-pic1\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>The window for adding a new Qemu machine will open, type a machine name which identify your router (here Junos-12.3R6.6)<\/p>\n<p><img decoding=\"async\" style=\"width: 400px; height: 308px;\" src=\"\/wp-content\/uploads\/files\/image\/netsim\/gns3\/junos\/qemu-v1_x-pic2.png\" alt=\"gns3-v1-qemu-junos-pic2\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>click Next. Then assign RAM memory, here 512MB, and check if GNS3 locates Qemu binaries correctly. If not, open a drop down menu and choose correct Qemu binaries. Click Next<\/p>\n<p><img decoding=\"async\" style=\"width: 400px; height: 308px;\" src=\"\/wp-content\/uploads\/files\/image\/netsim\/gns3\/junos\/qemu-v1_x-pic3.png\" alt=\"gns3-v1-qemu-junos-pic3\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Then select correct junos qemu image file (hard drive).<\/p>\n<p><img decoding=\"async\" style=\"width: 400px; height: 308px;\" src=\"\/wp-content\/uploads\/files\/image\/netsim\/gns3\/junos\/qemu-v1_x-pic4.png\" alt=\"gns3-v1-qemu-junos-pic4\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>and finish adding a router clicking on the <strong>Finish <\/strong>button. The router is added.<\/p>\n<p>Additonaly you may select it from the list and clicking on the edit button change the settings just we set (adding the number of adapters, -nographic options and so on.).<\/p>\n<p><img decoding=\"async\" style=\"width: 500px; height: 425px;\" src=\"\/wp-content\/uploads\/files\/image\/netsim\/gns3\/junos\/qemu-v1_x-pic5.png\" alt=\"gns3-v1-qemu-junos-pic5\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>All is finished clicking on the Apply and Ok button.<\/p>\n<p>&nbsp;<\/p>\n<h4>Creating a topology<\/h4>\n<p>Now we are able drag the junos router from the left panel and drop them into working place. Choose interconnection type (eth0 to eth0) and start routers as we usually do:<\/p>\n<p>1) click on the Browse all devices icon (red number 1)<\/p>\n<p>2) select correct router, Junos-12.3R6.6 here<\/p>\n<p>3) drop the devices on the workspace<\/p>\n<p>4) select Add link icon (4)<\/p>\n<p>5) interconnect routers (5)<\/p>\n<p><img decoding=\"async\" style=\"width: 600px; height: 451px;\" src=\"\/wp-content\/uploads\/files\/image\/netsim\/gns3\/junos\/qemu-v1_x-pic7.png\" alt=\"gns3-v1-junos-pic7\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Then click on the start icon (green triangle). The router will boot up, be patient, comparing to cisco ios it takes time. Access the router simply do a left double click on a selected device, putty window should immediatelly appears. Or use a context menu which is accessible afte right click on a desired router.<\/p>\n<p><img decoding=\"async\" style=\"width: 600px; height: 475px;\" src=\"\/wp-content\/uploads\/files\/image\/netsim\/gns3\/junos\/qemu-v1_x-pic8.png\" alt=\"pic-8\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>That is all. Now we may start to work and learn!<\/p>\n<p>&nbsp;<\/p>\n<h3>Version GNS3 0.x<\/h3>\n<p>Following quide is for an older versions of GNS3. However even works for a newer one, version of 1.xx<\/p>\n<h4>Qemu checking<\/h4>\n<p>First of all we shoud check if our GNS3 may correctly call qemu exe files, so go:<\/p>\n<pre>Edit--&gt;Preference--&gt;qemu--&gt; General settings<\/pre>\n<p>&nbsp;<\/p>\n<p>and check if there are correct paths to the qemu.exe and qemu-img.exe. Finally, test the settings clicking on the Test settings button. If everything is OK, the green message should appear telling us that all components have correctly started. If there is some error message, correct the settings:<\/p>\n<p><img decoding=\"async\" style=\"width: 500px; height: 500px;\" src=\"\/wp-content\/uploads\/files\/image\/Virtualization\/gns3-qemu-testing.png\" alt=\"\" \/><\/p>\n<h4><\/h4>\n<h4>Adding Junos image<\/h4>\n<p>Now we may start to build a topology using our qemu build junos router running inside of our GNs3 topologies. So, first add the junos router into the qemu junos router list. To do that go inside of GNS3 to the menu with Qemu preferences<\/p>\n<pre>Edit--&gt;Preference--&gt;quemu--&gt;junos--&gt;add the juniper image<\/pre>\n<p><img decoding=\"async\" style=\"width: 500px; height: 513px;\" src=\"\/wp-content\/uploads\/files\/image\/Virtualization\/gns3-qemu-add.png\" alt=\"\" \/><\/p>\n<p>and fullfill required fileds:<\/p>\n<p>Identifier name: put your router name (here junos),<\/p>\n<p>binary image: setup correct path to the junos image file,<\/p>\n<p>RAM: assign required menory size, may leave blank, GNS3 assign, as in my case, 512MB<\/p>\n<p>Number of NICs: default 6<\/p>\n<p>NIC model: e1000<\/p>\n<p>&nbsp;<\/p>\n<p>Then click <strong>Save <\/strong>and close the window with <strong>Apply<\/strong>. Now we are able drag the junos router from the left panel and drop them into working place. Choose interconnection type (em0 to em0) and start routers as we usually do (choose device and click on the start icon)<\/p>\n<p><img decoding=\"async\" style=\"width: 500px; height: 380px;\" src=\"\/wp-content\/uploads\/files\/image\/Virtualization\/junos-gns3-006.png\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Immediatelly qemu window (-s) will open. Now we shoud wait for a time till the Junos router image will boot, and then the login prompt will be available:<\/p>\n<p><img decoding=\"async\" style=\"width: 500px; height: 300px;\" src=\"\/wp-content\/uploads\/files\/image\/Virtualization\/junos-gns3-003.png\" alt=\"\" \/><\/p>\n<p>using our install login name (here root) we will log in into the junos router<\/p>\n<p><img decoding=\"async\" style=\"width: 500px; height: 300px;\" src=\"\/wp-content\/uploads\/files\/image\/Virtualization\/junos-gns3-005.png\" alt=\"\" \/><\/p>\n<p>or we may observe booting and login using telnet window, so do ricght click on the device and choose console,<\/p>\n<p><span style=\"font-size: 11px;\"><img decoding=\"async\" style=\"width: 500px; height: 379px;\" src=\"\/wp-content\/uploads\/files\/image\/Virtualization\/junos-gns3-007.png\" alt=\"\" \/><\/span><\/p>\n<p>immediatelly window with telnet open and we may observe there booting process and at the end, we are able to login<\/p>\n<p><img decoding=\"async\" style=\"width: 500px; height: 316px;\" src=\"\/wp-content\/uploads\/files\/image\/Virtualization\/junos-gns3-002.png\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Now we may start to configure our router boxes.<\/p>\n<p>&nbsp;<\/p>\n<h2>Using VirtualBox to run Junos router inside of GNS3<\/h2>\n<h3><strong>Prerequisities and environments<\/strong><\/h3>\n<ul>\n<li>All is running inside of my Win 7 64 bit OS.<\/li>\n<li>Installed GNS3. I prefer install version for win 64 bit. Download <a href=\"http:\/\/sourceforge.net\/projects\/gns-3\/files\/GNS3\/0.8.6\/GNS3-0.8.6-Standalone-64-bit.zip\/download\">here<\/a>. I&#8217;m using version 0.8.6.<\/li>\n<li>Installed virtualbox, download <a href=\"https:\/\/www.virtualbox.org\/\">here<\/a>.<\/li>\n<li>Some virtualbox machine with installed Junos router<\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>\n\tActually there are several ways how to emulate JunOS routers using GNS3 and make to usable them for advanced networking topologies. So, be able to make and run JunOS inside of GNS3 we could use:<\/p>","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[685],"tags":[945,949,947,951],"class_list":["post-593","post","type-post","status-publish","format-standard","hentry","category-linux_-_howto-en","tag-gns3","tag-how-to","tag-junos","tag-olive"],"taxonomy_info":{"category":[{"value":685,"label":"Linux - HOWTO"}],"post_tag":[{"value":945,"label":"gns3"},{"value":949,"label":"how to"},{"value":947,"label":"junos"},{"value":951,"label":"olive"}]},"featured_image_src_large":false,"author_info":{"display_name":"admin","author_link":"https:\/\/nil.uniza.sk\/en\/author\/admin\/"},"comment_info":16,"category_info":[{"term_id":685,"name":"Linux - HOWTO","slug":"linux_-_howto-en","term_group":0,"term_taxonomy_id":683,"taxonomy":"category","description":"","parent":0,"count":71,"filter":"raw","cat_ID":685,"category_count":71,"category_description":"","cat_name":"Linux - HOWTO","category_nicename":"linux_-_howto-en","category_parent":0}],"tag_info":[{"term_id":945,"name":"gns3","slug":"gns3","term_group":0,"term_taxonomy_id":943,"taxonomy":"post_tag","description":"","parent":0,"count":5,"filter":"raw"},{"term_id":949,"name":"how to","slug":"how-to","term_group":0,"term_taxonomy_id":947,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":947,"name":"junos","slug":"junos","term_group":0,"term_taxonomy_id":945,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":951,"name":"olive","slug":"olive","term_group":0,"term_taxonomy_id":949,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/593","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=593"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/593\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}