{"id":1795,"date":"2016-03-20T01:47:43","date_gmt":"2016-03-19T16:47:43","guid":{"rendered":"http:\/\/1bed.allright.life\/?p=1795"},"modified":"2020-04-18T22:55:40","modified_gmt":"2020-04-18T13:55:40","slug":"post-1795","status":"publish","type":"post","link":"https:\/\/1bed.allright.life\/?p=1795","title":{"rendered":"\u3010Hyper-V\u3011 \u4eee\u60f3\u30b9\u30a4\u30c3\u30c1(NAPT)\u3092\u4f5c\u6210\u30fb\u524a\u9664\u3059\u308b"},"content":{"rendered":"<ul>\n<li>2016\/03\/18 \u73fe\u5728\u3001NAT(NAPT) \u306e\u4eee\u60f3\u30b9\u30a4\u30c3\u30c1\u306f\u624b\u52d5\u3067\u306f\u4f5c\u308c\u306a\u3044\u3088\u3046\u3060<\/li>\n<li>\u691c\u8a3c\u74b0\u5883\u306f Windows 10 Pro<\/li>\n<li>PowerShell \u306f\u7ba1\u7406\u8005\u3067\u5b9f\u884c\u3059\u308b(New-NetNat \u304c\u7ba1\u7406\u8005\u6a29\u9650\u304c\u5fc5\u8981\u306a\u305f\u3081)<\/li>\n<\/ul>\n<h2>\u4f5c\u6210<\/h2>\n<h3>\u4eee\u60f3\u30b9\u30a4\u30c3\u30c1\u306e\u4f5c\u6210<\/h3>\n<p>\u4eee\u60f3\u30b9\u30a4\u30c3\u30c1\u306e\u4f5c\u6210<\/p>\n<pre><code class=\"language-powershell\">New-VMSwitch [-Name] &lt;String&gt; -SwitchType NAT -NatSubnetAddress &lt;System.String&gt;<\/code><\/pre>\n<p>\u4eee\u60f3\u30b9\u30a4\u30c3\u30c1\u306e\u4f5c\u6210\u4f8b<\/p>\n<pre><code class=\"language-powershell\">PS&gt; New-VMSwitch &quot;vSwich NAPT&quot; -SwitchType NAT -NatSubnetAddress &quot;10.0.1.0\/24&quot;\n\nName        SwitchType NetAdapterInterfaceDescription\n----        ---------- ------------------------------\nvSwich NAPT NAT<\/code><\/pre>\n<h3>NAT \u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210<\/h3>\n<p>NAT \u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210<\/p>\n<pre><code class=\"language-powershell\">New-NetNat [-Name] &lt;String&gt; -InternalIPInterfaceAddressPrefix &lt;System.String&gt;<\/code><\/pre>\n<p>NAT \u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210\u4f8b<\/p>\n<pre><code class=\"language-powershell\">PS&gt; New-NetNat &quot;VmNAPT&quot; -InternalIPInterfaceAddressPrefix &quot;10.0.1.0\/24&quot;\n\nName                             : VmNAPT\nExternalIPInterfaceAddressPrefix :\nInternalIPInterfaceAddressPrefix : 10.0.1.0\/24\nIcmpQueryTimeout                 : 30\nTcpEstablishedConnectionTimeout  : 1800\nTcpTransientConnectionTimeout    : 120\nTcpFilteringBehavior             : AddressDependentFiltering\nUdpFilteringBehavior             : AddressDependentFiltering\nUdpIdleSessionTimeout            : 120\nUdpInboundRefresh                : False\nStore                            : Local\nActive                           : True<\/code><\/pre>\n<h3>\u78ba\u8a8d<\/h3>\n<p>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u63a5\u7d9a\u306b\u6307\u5b9a\u3057\u305f\u540d\u524d\u3067\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u3066\u3001<br \/>\nIP \u30a2\u30c9\u30ec\u30b9\u304c\u632f\u3089\u308c\u3066\u3044\u305f\u3089 OK<\/p>\n<p><a href=\"http:\/\/1bed.allright.life\/wp-content\/uploads\/2016\/03\/make_success.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" src=\"http:\/\/1bed.allright.life\/wp-content\/uploads\/2016\/03\/make_success-300x149.png\" alt=\"\" \/><\/a><\/p>\n<h2>\u524a\u9664<\/h2>\n<p>\u4eee\u60f3\u30b9\u30a4\u30c3\u30c1\u306e\u524a\u9664\u306f 3 \u30b9\u30c6\u30c3\u30d7<br \/>\n<strong>\u4eee\u60f3\u30b9\u30a4\u30c3\u30c1\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u305f\u56fa\u5b9a IP \u3082\u524a\u9664\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b<\/strong><\/p>\n<h3>NAT \u30c6\u30fc\u30d6\u30eb\u306e\u524a\u9664<\/h3>\n<pre><code class=\"language-powershell\">Remove-NetNat [-Name] &lt;String&gt;<\/code><\/pre>\n<p>NAT \u30c6\u30fc\u30d6\u30eb\u306e\u524a\u9664\u4f8b<\/p>\n<pre><code class=\"language-powershell\">PS&gt; Remove-NetNat &quot;VmNAPT&quot;<\/code><\/pre>\n<h3>\u4eee\u60f3\u30b9\u30a4\u30c3\u30c1\u306e\u524a\u9664<\/h3>\n<pre><code class=\"language-powershell\">Remove-VMSwitch [-Name] &lt;String&gt;<\/code><\/pre>\n<p>\u4eee\u60f3\u30b9\u30a4\u30c3\u30c1\u306e\u524a\u9664\u4f8b<\/p>\n<pre><code class=\"language-powershell\">PS&gt; Remove-VMSwitch &quot;vSwich NAPT&quot;<\/code><\/pre>\n<h3>\u56fa\u5b9a IP \u306e\u524a\u9664<\/h3>\n<h4>\u5272\u308a\u5f53\u3066\u3092\u78ba\u8a8d\u3059\u308b<\/h4>\n<pre><code class=\"language-powershell\">PS&gt; netsh interface ipv4 dump\n# ----------------------------------\n# IPv4 \u69cb\u6210\n# ----------------------------------\npushd interface ipv4\n\nreset\nset global\nset interface interface=&quot;\u30ed\u30fc\u30ab\u30eb \u30a8\u30ea\u30a2\u63a5\u7d9a* 1&quot; forwarding=enabled advertise=enabled nud=enabled ignoredefaultroutes=disabled\nset interface interface=&quot;Wi-Fi&quot; forwarding=enabled advertise=enabled nud=enabled ignoredefaultroutes=disabled\nset interface interface=&quot;\u30ed\u30fc\u30ab\u30eb \u30a8\u30ea\u30a2\u63a5\u7d9a* 2&quot; forwarding=enabled advertise=enabled nud=enabled ignoredefaultroutes=disabled\nset interface interface=&quot;Bluetooth \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u63a5\u7d9a&quot; forwarding=enabled advertise=enabled nud=enabled ignoredefaultroutes=disabled\nadd address name=&quot;ethernet_32771&quot; address=10.0.1.1 mask=255.255.255.0<\/code><\/pre>\n<p>\u3053\u306e ethernet_32771 \u304c 10.0.1.1 \u3092\u5272\u308a\u5f53\u3066\u3066\u3044\u308b\u6a21\u69d8<\/p>\n<h4>\u5272\u308a\u5f53\u3066\u3092\u524a\u9664\u3059\u308b<\/h4>\n<pre><code class=\"language-powershell\">PS&gt; netsh interface ipv4 delete address name=&quot;ethernet_32771&quot; address=10.0.1.1<\/code><\/pre>\n<h2>\u53c2\u8003<\/h2>\n<ul>\n<li><a href=\"http:\/\/www.vwnet.jp\/Windows\/w10\/NAPT\/NAPTvSwich.htm\">Windows 10 Insider Preview Hyper-V \u306e NAPT \u4eee\u60f3\u30b9\u30a4\u30c3\u30c1<\/a><\/li>\n<li><a href=\"https:\/\/social.technet.microsoft.com\/Forums\/windows\/ja-JP\/60c9ad58-78e8-47e2-b58d-d62450528f44\/cannot-recreate-a-vmswitch-with-nat-for-earlier-used-subnet?forum=win10itprovirt\">Cannot recreate a VMSwitch with NAT for earlier used subnet<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>2016\/03\/18 \u73fe\u5728\u3001NAT(NAPT) \u306e\u4eee\u60f3\u30b9\u30a4\u30c3\u30c1\u306f\u624b\u52d5\u3067\u306f\u4f5c\u308c\u306a\u3044\u3088\u3046\u3060 \u691c\u8a3c\u74b0\u5883\u306f Windows 10 Pro PowerShell \u306f\u7ba1\u7406\u8005\u3067\u5b9f\u884c\u3059\u308b(New-NetNat \u304c\u7ba1\u7406\u8005\u6a29\u9650\u304c\u5fc5\u8981\u306a\u305f\u3081) [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[87,62],"class_list":["post-1795","post","type-post","status-publish","format-standard","hentry","category-virtualization","tag-hyper-v","tag-powershell"],"_links":{"self":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts\/1795","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1795"}],"version-history":[{"count":8,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts\/1795\/revisions"}],"predecessor-version":[{"id":3177,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts\/1795\/revisions\/3177"}],"wp:attachment":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}