{"id":14091,"date":"2013-01-21T13:25:00","date_gmt":"2013-01-21T13:25:00","guid":{"rendered":"https:\/\/aidanfinn.com\/?p=14091"},"modified":"2013-01-21T13:25:00","modified_gmt":"2013-01-21T13:25:00","slug":"kb2804678cannot-exceed-256-dynamic-mac-addresses-by-default-on-hyper-v-host","status":"publish","type":"post","link":"https:\/\/aidanfinn.com\/?p=14091","title":{"rendered":"KB2804678\u2013Cannot Exceed 256 Dynamic MAC Addresses By Default On Hyper-V Host"},"content":{"rendered":"<p>This is not a scenario I\u2019ve encountered \u2026 not too many of us will ever have more than 256 virtual NICs\u00a0<em>on <\/em>a single host.\u00a0 Microsoft has posted a <a href=\"http:\/\/support.microsoft.com\/kb\/2804678\/\" target=\"_blank\">support article<\/a> on this scenario:<\/p>\n<p>Windows Hyper-V server has a default limit of 256 dynamic MAC addresses.\u00a0 You have a Windows Server 2012 (WS2012) host which is configured with the Hyper-V role. The Hyper-V server is configured to provide dynamic MAC addresses to the guest machines:<\/p>\n<blockquote><p>When you start a guest virtual machine, you may encounter the following error message:<\/p>\n<p>The application encountered an error while attempting to change the state of &#8216;&lt;Virtual machine name&gt;&#8217;<\/p>\n<p>Synthetic Ethernet Port (Instance ID CCE417C5-BDD9-4216-85CA-248620EE75C6): Failed to power on with Error &#8216;Attempt to access invalid address&#8217;.<\/p>\n<p>On a Windows Server 2008 or Windows Server 2008 R2 Hyper-V host, an Event ID 12565 from source &#8220;Microsoft-Windows-Hyper-V-Worker&#8221; is logged.<\/p><\/blockquote>\n<p>Here\u2019s how this issue is caused.\u00a0 Each host has a default dynamic pool of MAC addresses.\u00a0 This pool is generated as follows:<\/p>\n<ol>\n<li>The first three octets of the MAC address pool are 00:15:5D.\u00a0 This is unique to all Microsoft \u201cdevices\u201d, complying with IEEE standards.<\/li>\n<li>The next two octets (4 and 5) in the MAC address pool are derived from the IP address of the host (the last 2 octets of the IP address to be precise).\u00a0 This gives the pool some uniqueness in your server farm.\u00a0 We now have 5 of the 6 required octets for a MAC address.<\/li>\n<li>Finally, the last octet in the MAC address pool is the range 0x0-0xFF.\u00a0 Each instance of this range is used once per virtual NIC (assuming that it\u2019s using a dynamic MAC) on this host<\/li>\n<\/ol>\n<p>Octets 1 to 3 are unique to Microsoft \u201cdevices\u201d.\u00a0 Octets 4 and 5 are for giving the MAC address pool uniqueness for the pool range.\u00a0 And octet number 6 is used to make each dynamic MAC address unique on the network.<\/p>\n<p>If you want to break out a scientific calculator or if you know your computer science, the clue to the cause is in that last piece of the puzzle.\u00a0 We only have octet 6 for each dynamic MAC address instance that can be allocated.\u00a0 An octet is 8 bits, from 00000000 to 11111111.\u00a0 That is 00 to FF in hex.\u00a0 Which is 0 to 255, or 256 numbers.\u00a0 And that means each host can have 256 MAC addresses, by default.<\/p>\n<p>There are workarounds to this, if you are in the <em>very rare<\/em> situation where you need more than 256 MAC addresses on a single host.<\/p>\n<p><strong><span style=\"text-decoration: underline;\">Use Static MAC Addresses<\/span><\/strong><\/p>\n<p>Turn off (shut down) the VM and assign static MAC addresses.\u00a0 System Center VMM makes this easy with centrally human managed pool of MAC addresses, something like with DHCP.<\/p>\n<p><strong><span style=\"text-decoration: underline;\">Manually Modify The Per-Host Dynamic MAC Address Pool<\/span><\/strong><\/p>\n<p>Be very careful with this!\u00a0 You don\u2019t want to create overlapping pools of MAC addresses to confuse ARP on your network.\u00a0 The MAC address range is defined by two registry values in HKLMSoftwareMicrosoftWindows NTCurrentVersionVirtualization:<\/p>\n<ul>\n<li>MinimumMacAddress<\/li>\n<li>MaximumMacAddress<\/li>\n<\/ul>\n<p><a href=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2013\/01\/image28.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;\" title=\"image\" src=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2013\/01\/image_thumb27.png\" border=\"0\" alt=\"image\" width=\"504\" height=\"231\" \/><\/a><\/p>\n<p>In my example (above), you can see the range runs from 00:15:5d:01:86:ff.\u00a0 00:15:5d is the manufacturer unique 3 octets for Microsoft \u201cdevices\u201d.\u00a0 01:86 is unique to the range on this host.\u00a0 And 00 to ff is the default range that limits us to 256 MAC addresses.<\/p>\n<p><em>An interesting thought that came to me after posting this: you might want to be careful if using DHCP for your hosts \u2013 seriously, you should not do this!\u00a0 I can imagine how two hosts could end up accidentally with the same default range if HostA has Address1 when it is initialised, and then Address1 is allocated to HostB when it is initialised.<\/em><\/p>\n<p>Microsoft <a href=\"http:\/\/support.microsoft.com\/kb\/2804678\/\" target=\"_blank\">says<\/a> that you can modify this range \u2026 but as I warned before: be careful not to overlap over ranges or devices on your network!\u00a0 You can do this by modifying the <em>fifth<\/em> and or <em>sixth <\/em>octet of the default calculated dynamic MAC address range.\u00a0 Changing the <em>fifth <\/em>octet is the risky one \u2026 remember that the 4th and 5th octets are unique per host.<\/p>\n<p>&#8212;<\/p>\n<p>If you don\u2019t have this massive environment then don\u2019t touch these dynamic MAC address ranges unless you have to.\u00a0 If you do have to, then (in my opinion) you should be using System Center.\u00a0 A SQL whiz might be able to run a query in ConfigMgr to report on existing MAC addresses from physical devices.\u00a0 PowerShell will come in handy if you want to get the details exiting MAC ranges on your Hyper-V hosts.\u00a0 Stack Overflow has a <a href=\"http:\/\/stackoverflow.com\/questions\/9012207\/extract-registry-value-from-multiple-computers-using-powershell\" target=\"_blank\">script example<\/a> to query lots of servers that you could tweak.\u00a0 <a href=\"http:\/\/4sysops.com\/archives\/retrieve-the-registry-keys-from-remote-computers-via-powershell\/\" target=\"_blank\">4sysops<\/a> has another script example.\u00a0 I haven\u2019t tested them, but you can play to your heart\u2019s content <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" style=\"border-style: none;\" src=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2013\/01\/wlEmoticon-smile7.png\" alt=\"Smile\" \/><\/p>\n<div id=\"scid:0767317B-992E-4b12-91E0-4F059A8CECA8:de981f01-7479-48b3-8dd0-da4c2de98c42\" class=\"wlWriterEditableSmartContent\" style=\"float: none; margin: 0px; display: inline; padding: 0px;\">Technorati Tags: <a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/Windows+Server+2008+R2\">Windows Server 2008 R2<\/a>,<a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/Windows+8\">Windows 8<\/a>,<a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/Windows+Server+2012\">Windows Server 2012<\/a>,<a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/Hyper-V\">Hyper-V<\/a>,<a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/Virtualisation\">Virtualisation<\/a>,<a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/Networking\">Networking<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This is not a scenario I\u2019ve encountered \u2026 not too many of us will ever have more than 256 virtual NICs\u00a0on a single host.\u00a0 Microsoft has posted a support article on this scenario: Windows Hyper-V server has a default limit of 256 dynamic MAC addresses.\u00a0 You have a Windows Server 2012 (WS2012) host which is &hellip; <a href=\"https:\/\/aidanfinn.com\/?p=14091\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;KB2804678\u2013Cannot Exceed 256 Dynamic MAC Addresses By Default On Hyper-V Host&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[20],"tags":[181,80,195,109,117,118],"class_list":["post-14091","post","type-post","status-publish","format-standard","hentry","category-hyper-v","tag-hyper-v","tag-networking","tag-virtualisation","tag-windows-8","tag-windows-server-2008-r2","tag-windows-server-2012"],"aioseo_notices":[],"jetpack_featured_media_url":"","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/14091","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14091"}],"version-history":[{"count":0,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/14091\/revisions"}],"wp:attachment":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}