{"id":124,"date":"2012-07-13T06:43:36","date_gmt":"2012-07-13T06:43:36","guid":{"rendered":"http:\/\/rtechblog.psg.com\/?p=124"},"modified":"2012-07-13T06:46:07","modified_gmt":"2012-07-13T06:46:07","slug":"dynamips-on-freebsd-on-vmware-esxi","status":"publish","type":"post","link":"https:\/\/rtechblog.rg.net\/?p=124","title":{"rendered":"DynaMIPS on FreeBSD on VMware ESXi"},"content":{"rendered":"<p>The simple approach to running DynaMIPS on FreeBSD guest under VMware did not work at all. No packets from the LAN reached the DynaMIPS ether interface.<\/p>\n<p>24 hours later, and with the help of Iain and Rob, it was sorted.<\/p>\n<p>It required two hacks as follows:<\/p>\n<p>The first hack was running em1, the interface dynamips was using, through a custom vswitch that had promiscuous mode enabled.<\/p>\n<p>The problem here was that this let packets through so well that it looped and multiplied them. Pings from the same ether LAN had TTLs as low as 220, delays of many seconds, and massive duplication of packets.<\/p>\n<p>The second hack was running it through a bridge\/tap interface on FreeBSD. In \/etc\/rc.conf lingo, that&#8217;s<\/p>\n<pre>\r\n   cloned_interfaces=\"bridge0 tap0\"\r\n   ifconfig_bridge0=\"addm em1 addm tap0\"\r\n   ifconfig_em1=up\r\n   ifconfig_tap0=up\r\n<\/pre>\n<p>and then the dynagen conf file used<\/p>\n<pre>\r\n   fa0\/0 = NIO_tap:\/dev\/tap0\r\n<\/pre>\n<p>Either hack alone did not work. It took both and one or more rubber chickens. The result looked like the following:<\/p>\n<pre> \r\n    .--------------------------.\r\n    |                          |\r\n    | .----------------------. |\r\n    | |                      | |\r\n    | | .------------------. | |\r\n    | | |                  | | |\r\n    | | |     DynaMIPS     | | |\r\n    | | |                  | | |\r\n    | | |                  | | |\r\n    | | |           fa 0\/0 | | |\r\n    | | `--------------|---' | |\r\n    | |                |     | |\r\n    | |              tap0    | |\r\n    | |  FreeBSD       |     | |\r\n    | |             bridge0  | |\r\n    | |                |     | |\r\n    | |  em0          em1    | |\r\n    | `---|------------|-----' |\r\n    |     |            |       |\r\n    |  vswitch      vswitch    |\r\n    |     |            |       |\r\n    |     `------------'       |\r\n    |            |             |\r\n    |  ESXi      |             |\r\n    `------------|-------------'\r\n                 |\r\n        \/--~~-----------~~--\/\r\n                LAN\r\n<\/pre>\n<p>The DynaGen configuration then looked like<\/p>\n<pre>\r\n  [localhost]\r\n    [[7200]]\r\n      model = 7200\r\n      image = images\/c7200-adventk9-mz-rpki26-v152_1_s_xe35_tr-bl30.unzip\r\n      ram = 2048\r\n      npe = npe-400\r\n      idlepc = 0x6204bd2c\r\n      ghostios = True\r\n    [[router r0]]\r\n      console = 2001\r\n      aux = 3001\r\n      fa0\/0 = NIO_tap:\/dev\/tap0\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The simple approach to running DynaMIPS on FreeBSD guest under VMware did not work at all. No packets from the LAN reached the DynaMIPS ether interface. 24 hours later, and with the help of Iain and Rob, it was sorted. It required two hacks as follows: The first hack was running em1, the interface dynamips [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,9],"tags":[],"class_list":["post-124","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-routers"],"_links":{"self":[{"href":"https:\/\/rtechblog.rg.net\/index.php?rest_route=\/wp\/v2\/posts\/124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rtechblog.rg.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rtechblog.rg.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rtechblog.rg.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rtechblog.rg.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=124"}],"version-history":[{"count":5,"href":"https:\/\/rtechblog.rg.net\/index.php?rest_route=\/wp\/v2\/posts\/124\/revisions"}],"predecessor-version":[{"id":129,"href":"https:\/\/rtechblog.rg.net\/index.php?rest_route=\/wp\/v2\/posts\/124\/revisions\/129"}],"wp:attachment":[{"href":"https:\/\/rtechblog.rg.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rtechblog.rg.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rtechblog.rg.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}