{"id":6177,"date":"2026-11-06T00:00:00","date_gmt":"2026-11-05T19:00:00","guid":{"rendered":"https:\/\/zilleali.com\/mikrotik-routeros-virtualbox-chr-lab\/"},"modified":"2026-11-20T21:19:19","modified_gmt":"2026-11-20T16:19:19","slug":"mikrotik-routeros-virtualbox-chr-lab","status":"publish","type":"post","link":"https:\/\/zilleali.com\/zh\/mikrotik-routeros-virtualbox-chr-lab\/","title":{"rendered":"MikroTik RouterOS \u5728 VirtualBox \u4e2d\uff1a\u5b8c\u6574 CHR \u8bbe\u7f6e"},"content":{"rendered":"<p>\u8fd0\u884c <strong>VirtualBox \u4e2d\u7684 MikroTik RouterOS<\/strong> \u4e3a\u60a8\u63d0\u4f9b\u4e00\u4e2a\u514d\u8d39\u7684\u5b9e\u9a8c\u5ba4\uff0c\u7528\u4e8e PPPoE\u3001VLAN\u3001\u961f\u5217\u3001\u9632\u706b\u5899\u548c\u8def\u7531\u5b9e\u8df5\uff0c\u65e0\u9700\u8d2d\u4e70\u786c\u4ef6\u3002\u5b8c\u6210\u6b64\u4efb\u52a1\u7684\u5de5\u5177\u662f\u4e91\u6258\u7ba1\u8def\u7531\u5668\uff08CHR\uff09\uff0c\u5373 MikroTik \u4e3a\u865a\u62df\u5316\u5e73\u53f0\u6784\u5efa\u7684 x86 \u955c\u50cf\u3002\u672c\u6307\u5357\u6db5\u76d6\u865a\u62df\u673a\u7684\u8bbe\u7f6e\u3001\u5b9e\u9645\u53ef\u7528\u7684\u9002\u914d\u5668\u8bbe\u7f6e\u3001\u4f7f\u7528 Winbox \u7684\u9996\u6b21\u8bbf\u95ee\uff0c\u4ee5\u53ca\u4e00\u4e2a\u53ef\u6269\u5c55\u7528\u4e8e MTCNA \u548c MTCRE \u5b9e\u8df5\u7684\u53cc\u8def\u7531\u5668\u5b9e\u9a8c\u3002<\/p>\n<h2 id=\"why-use-chr-for-a-mikrotik-routeros-virtualbox-lab\">\u4e3a\u4ec0\u4e48\u5728 MikroTik RouterOS VirtualBox \u5b9e\u9a8c\u4e2d\u4f7f\u7528 CHR<\/h2>\n<ul>\n<li>\u4e0e CCR \u548c hAP \u8bbe\u5907\u4e0a\u76f8\u540c\u7684 RouterOS v7\uff0c\u547d\u4ee4\u53ef\u76f4\u63a5\u8fc1\u79fb\u5230\u751f\u4ea7\u73af\u5883\u3002<\/li>\n<li>\u5feb\u7167\u8ba9\u60a8\u53ef\u4ee5\u5728\u51e0\u79d2\u949f\u5185\u7834\u574f\u914d\u7f6e\u5e76\u56de\u6eda\u3002<\/li>\n<li>\u514b\u9686\u4e00\u53f0\u865a\u62df\u673a\uff0c\u5373\u53ef\u83b7\u5f97\u7b2c\u4e8c\u53f0\u7528\u4e8e\u8def\u7531\u6216 PPPoE \u5ba2\u6237\u7aef\/\u670d\u52a1\u5668\u5b9e\u9a8c\u7684\u8def\u7531\u5668\u3002<\/li>\n<\/ul>\n<p>\u514d\u8d39\u8bb8\u53ef\u8bc1\u5c06\u6bcf\u4e2a\u63a5\u53e3\u7684\u4e0a\u4f20\u901f\u7387\u9650\u5236\u4e3a 1 Mbps\uff0c\u8fd9\u5bf9\u914d\u7f6e\u7ec3\u4e60\u800c\u8a00\u5e76\u4e0d\u91cd\u8981\u3002<\/p>\n<h2 id=\"prerequisites\">\u5148\u51b3\u6761\u4ef6<\/h2>\n<ul>\n<li>Windows\u3001Linux \u6216 macOS\uff08Intel\uff09\u4e0a\u7684 VirtualBox 7.x<\/li>\n<li>\u6bcf\u53f0\u8def\u7531\u5668 256 MB RAM \u548c 1 \u4e2a vCPU<\/li>\n<li>\u4e3b\u673a\u4e0a\u7684 Winbox 4<\/li>\n<li>CHR \u672c\u4f53 <strong>VDI<\/strong> \u6765\u81ea mikrotik.com\/download \u7684\u955c\u50cf\uff08\u7a33\u5b9a\u901a\u9053\uff09<\/li>\n<\/ul>\n<h2 id=\"create-the-virtual-machine\">\u521b\u5efa\u865a\u62df\u673a<\/h2>\n<ol>\n<li>\u89e3\u538b\u4e0b\u8f7d\u7684 zip \u4ee5\u83b7\u53d6 <code>chr-7.x.vdi<\/code>.<\/li>\n<li>\u65b0\u865a\u62df\u673a\uff1a\u7c7b\u578b <strong>\u5176\u4ed6<\/strong>\uff0c\u7248\u672c <strong>\u5176\u4ed6\/\u672a\u77e5\uff0864 \u4f4d\uff09<\/strong>\uff0c256 MB RAM\u3002<\/li>\n<li>\u9009\u62e9 <strong>\u4f7f\u7528\u73b0\u6709\u7684\u865a\u62df\u786c\u76d8<\/strong> \u5e76\u9009\u62e9\u8be5 VDI\u3002<\/li>\n<li>\u5728\u201c\u7cfb\u7edf\u201d\u8bbe\u7f6e\u4e2d\uff0c\u7981\u7528\u542f\u52a8\u987a\u5e8f\u4e2d\u7684\u8f6f\u76d8\u3002\u5173\u95ed EFI\u3002<\/li>\n<\/ol>\n<p>\u5728\u6302\u8f7d\u4e4b\u524d\u4e3a\u6bcf\u4e2a\u8def\u7531\u5668\u590d\u5236\u4e00\u6b21 VDI\uff0c\u6216\u4f7f\u7528 VirtualBox \u514b\u9686\uff0c\u8fd9\u6837\u6bcf\u4e2a\u865a\u62df\u673a\u90fd\u6709\u72ec\u7acb\u7684\u78c1\u76d8\u3002<\/p>\n<h2 id=\"best-network-adapter-settings-for-the-lab\">\u5b9e\u9a8c\u7684\u6700\u4f73\u7f51\u7edc\u9002\u914d\u5668\u8bbe\u7f6e<\/h2>\n<p>\u6b64\u90e8\u5206\u51b3\u5b9a\u5b9e\u9a8c\u662f\u5426\u80fd\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u9002\u914d\u5668<\/th>\n<th>\u8fde\u63a5\u5230<\/th>\n<th>\u7528\u9014<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u9002\u914d\u5668 1<\/td>\n<td>NAT<\/td>\n<td>\u8def\u7531\u5668\u7684\u4e92\u8054\u7f51\u8bbf\u95ee\uff08ether1\uff0cWAN\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u9002\u914d\u5668 2<\/td>\n<td>\u4ec5\u4e3b\u673a<\/td>\n<td>\u4ece\u60a8\u7684\u7535\u8111\u4f7f\u7528 Winbox \u548c SSH\uff08ether2\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u9002\u914d\u5668 3<\/td>\n<td>\u5185\u90e8\u7f51\u7edc <code>lab-link1<\/code><\/td>\n<td>\u94fe\u63a5\u5230\u5176\u4ed6\u5b9e\u9a8c\u5ba4\u8def\u7531\u5668\uff08ether3\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4f7f\u7528 <strong>Intel PRO\\\/1000 MT Desktop<\/strong> \u6216 <strong>\u51c6\u865a\u62df\u5316\uff08virtio-net\uff09<\/strong> \u4f5c\u4e3a\u9002\u914d\u5668\u7c7b\u578b\u3002\u5c06\u6df7\u6742\u6a21\u5f0f\u8bbe\u7f6e\u4e3a <strong>\u5168\u90e8\u5141\u8bb8<\/strong> \u5728 Host-Only \u548c Internal \u9002\u914d\u5668\u4e0a\uff0c\u5982\u679c\u60a8\u8ba1\u5212\u6865\u63a5\u6216\u8fd0\u884c VLAN\u3002<\/p>\n<p>\u4ec5\u5f53\u60a8\u5e0c\u671b\u8def\u7531\u5668\u4f4d\u4e8e\u771f\u5b9e\u5c40\u57df\u7f51\u65f6\uff0c\u624d\u4f7f\u7528\u6865\u63a5\u800c\u975e NAT\u3002<\/p>\n<h2 id=\"first-boot-and-accessing-routeros\">\u9996\u6b21\u542f\u52a8\u5e76\u8bbf\u95ee RouterOS<\/h2>\n<p>\u5728\u63a7\u5236\u53f0\u767b\u5f55\u4e3a <code>admin<\/code> \u4f7f\u7528\u7a7a\u5bc6\u7801\u3002RouterOS v7 \u4f1a\u5f3a\u5236\u60a8\u7acb\u5373\u8bbe\u7f6e\u65b0\u5bc6\u7801\u3002<\/p>\n<p>\u83b7\u53d6 WAN \u5730\u5740\u5e76\u68c0\u67e5\u63a5\u53e3\u5217\u8868\uff1a<\/p>\n<pre><code class=\"language-routeros\">\\\/ip dhcp-client add interface=ether1\\n\\\/interface print\\n\\\/ip address print\n<\/code><\/pre>\n<p>\u5728\u4e3b\u673a\u4e0a\u6253\u5f00 Winbox\u3002\u865a\u62df\u673a\u51fa\u73b0\u5728 <strong>\u90bb\u5c45<\/strong> \u901a\u8fc7 Host-Only \u9002\u914d\u5668\u3002\u5148\u901a\u8fc7 MAC \u8fde\u63a5\uff0c\u7136\u540e\u5206\u914d\u7ba1\u7406 IP\uff1a<\/p>\n<pre><code class=\"language-routeros\">\\\/ip address add address=192.168.56.10\\\/24 interface=ether2\n<\/code><\/pre>\n<h2 id=\"first-hour-config\">\u9996\u5c0f\u65f6\u914d\u7f6e<\/h2>\n<pre><code class=\"language-routeros\">\\\/system identity set name=lab-r1\\n\\\/user add name=zill group=full password=\\\"change-me\\\"\\n\\\/ip service disable telnet,ftp,api,api-ssl\\n\\\/ip dns set servers=1.1.1.1,8.8.8.8 allow-remote-requests=no\\n\\\/system ntp client set enabled=yes servers=pool.ntp.org\\n\\\/ip firewall nat add chain=srcnat out-interface=ether1 action=masquerade\n<\/code><\/pre>\n<p>\u7acb\u5373\u521b\u5efa\u5feb\u7167\u3002\u8fd9\u662f\u60a8\u7684\u5e72\u51c0\u57fa\u7ebf\u3002<\/p>\n<h2 id=\"building-a-simple-two-router-lab\">\u6784\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u53cc\u8def\u7531\u5668\u5b9e\u9a8c\u5ba4<\/h2>\n<p><picture><source srcset=\"https:\/\/zilleali.com\/wp-content\/uploads\/2026\/11\/mikrotik-routeros-virtualbox-chr-lab-supporting-1.webp\" type=\"image\/webp\"><img decoding=\"async\" src=\"https:\/\/zilleali.com\/wp-content\/uploads\/2026\/11\/mikrotik-routeros-virtualbox-chr-lab-supporting-1.webp\" alt=\"Mikrotik RouterOS VirtualBox CHR lab topology: NAT connects to Router 1, Host-Only provides Winbox management, and an Internal Network links both routers.\"><\/picture><\/p>\n<p>\u514b\u9686 lab-r1 \u4e3a lab-r2 \u5e76\u9009\u62e9 <strong>\u4e3a\u6240\u6709\u7f51\u7edc\u9002\u914d\u5668\u751f\u6210\u65b0\u7684 MAC \u5730\u5740<\/strong>. \u5982\u679c\u4e0d\u8fd9\u6837\u505a\uff0c\u4e24\u53f0\u8def\u7531\u5668\u4f1a\u5171\u4eab MAC\uff0c\u5bfc\u81f4\u94fe\u8def\u5f02\u5e38\u3002<\/p>\n<p>\u5728 r1 \u4e0a\uff1a<\/p>\n<pre><code class=\"language-routeros\">\\\/ip address add address=10.0.12.1\\\/30 interface=ether3\n<\/code><\/pre>\n<p>\u5728 r2 \u4e0a\uff1a<\/p>\n<pre><code class=\"language-routeros\">\\\/system identity set name=lab-r2\\n\\\/ip address add address=10.0.12.2\\\/30 interface=ether3\\n\\\/ip route add dst-address=0.0.0.0\\\/0 gateway=10.0.12.1\\n\\\/ping 10.0.12.1 count=3\n<\/code><\/pre>\n<p>\u4ece\u8fd9\u91cc\uff0c\u5c06 r1 \u8f6c\u4e3a PPPoE \u670d\u52a1\u5668\uff0cr2 \u8f6c\u4e3a\u5ba2\u6237\u7aef\uff0c\u4ee5\u6f14\u7ec3\u4ee5\u4e0b\u8bbe\u7f6e <a href=\"\/zh\/blog\/mikrotik-pppoe-freeradius-isp\/\">\u4f7f\u7528 FreeRADIUS \u7684 PPPoE<\/a>, \u6216\u4f7f\u7528 <a href=\"\/zh\/blog\/mikrotik-hotspot-bridge-mode\/\">\u70ed\u70b9\u6865\u63a5\u6a21\u5f0f\u6307\u5357<\/a>.<\/p>\n<h2 id=\"common-mistakes-and-fixes\">\u5e38\u89c1\u9519\u8bef\u53ca\u4fee\u590d<\/h2>\n<ul>\n<li><strong>Winbox \u672a\u663e\u793a\u90bb\u5c45\uff1a<\/strong> \u7ba1\u7406\u9002\u914d\u5668\u4e3a NAT\u3002\u8bf7\u5207\u6362\u4e3a Host-Only\u3002<\/li>\n<li><strong>\u4e24\u53f0\u8def\u7531\u5668\u65e0\u6cd5 ping\uff1a<\/strong> \u5185\u90e8\u7f51\u7edc\u540d\u79f0\u4e0d\u540c\uff0c\u6216\u514b\u9686\u7684 MAC \u672a\u91cd\u65b0\u751f\u6210\u3002<\/li>\n<li><strong>No internet from the router:<\/strong> ether1 has no DHCP client, or the default route is missing.<\/li>\n<li><strong>VLANs do not pass:<\/strong> set Promiscuous Mode to Allow All on the adapter.<\/li>\n<li><strong>VM does not boot:<\/strong> EFI is enabled or the disk was attached as the wrong controller. Use SATA or IDE with EFI off.<\/li>\n<\/ul>\n<h2 id=\"conclusion\">\u7ed3\u8bba<\/h2>\n<p>A MikroTik RouterOS VirtualBox lab costs nothing and takes about fifteen minutes to build. CHR gives you real RouterOS v7, NAT gives it internet, Host-Only gives you Winbox, and Internal Networks link routers together. Snapshot the clean baseline, then break things freely. Once the two-router lab works, add a third router for OSPF, or move the same topology into Proxmox as described in the <a href=\"\/zh\/blog\/proxmox-isp-monitoring-stack\/\">ISP monitoring stack guide<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>\u5728 VirtualBox \u4e2d\u4f7f\u7528 CHR \u6784\u5efa\u4e00\u4e2a\u514d\u8d39\u7684 MikroTik RouterOS \u5b9e\u9a8c\u5ba4\u3002\u7f51\u7edc\u9002\u914d\u5668\u9009\u62e9\u3001Winbox \u8bbf\u95ee\u3001\u9996\u5c0f\u65f6\u914d\u7f6e\uff0c\u4ee5\u53ca\u53ef\u8fd0\u884c\u7684\u53cc\u8def\u7531\u5668\u62d3\u6251\u3002<\/p>","protected":false},"author":1,"featured_media":6183,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAow6N_ODA:productID":"","_chatbot_visible":"yes","_zea_seo_title":"#post_title #separator_sa #site_title","_zea_seo_description":"Mikrotik RouterOS VirtualBox lab guide: CHR setup, adapter settings that actually work, Winbox access, and a working two-router topology.","_zea_seo_focus_keyphrase":"Mikrotik RouterOS VirtualBox","_zea_seo_canonical":"https:\/\/zilleali.com\/mikrotik-routeros-virtualbox-chr-lab\/","_zea_seo_robots_noindex":false,"_zea_seo_robots_nofollow":false,"_zea_seo_sitemap_exclude":false,"_zea_seo_cornerstone":false,"_zea_seo_sitemap_priority":"","_zea_seo_og_title":"#post_title #separator_sa #site_title","_zea_seo_og_description":"#post_excerpt","_zea_seo_og_image":"https:\/\/zilleali.com\/wp-content\/uploads\/2026\/11\/mikrotik-routeros-virtualbox-chr-lab-cover.png","_zea_seo_twitter_title":"","_zea_seo_twitter_description":"","_zea_seo_analysis_score":62,"_zea_ai_pending":false,"_zea_ai_notes":"","_zea_ai_keyword":"","footnotes":""},"categories":[207],"tags":[227,229,197,202,228],"class_list":["post-6177","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-chr","tag-lab","tag-mikrotik","tag-routeros","tag-virtualbox"],"_links":{"self":[{"href":"https:\/\/zilleali.com\/zh\/wp-json\/wp\/v2\/posts\/6177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zilleali.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zilleali.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zilleali.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zilleali.com\/zh\/wp-json\/wp\/v2\/comments?post=6177"}],"version-history":[{"count":4,"href":"https:\/\/zilleali.com\/zh\/wp-json\/wp\/v2\/posts\/6177\/revisions"}],"predecessor-version":[{"id":6359,"href":"https:\/\/zilleali.com\/zh\/wp-json\/wp\/v2\/posts\/6177\/revisions\/6359"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zilleali.com\/zh\/wp-json\/wp\/v2\/media\/6183"}],"wp:attachment":[{"href":"https:\/\/zilleali.com\/zh\/wp-json\/wp\/v2\/media?parent=6177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zilleali.com\/zh\/wp-json\/wp\/v2\/categories?post=6177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zilleali.com\/zh\/wp-json\/wp\/v2\/tags?post=6177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}