{"id":232,"date":"2014-12-18T08:47:06","date_gmt":"2014-12-18T15:47:06","guid":{"rendered":"http:\/\/blog.ioflood.com\/?p=232"},"modified":"2023-08-11T17:16:04","modified_gmt":"2023-08-12T00:16:04","slug":"dell-c6100-bmc-ipmi-mac-address-all-zeros-after-update-000000000000-script-fix-solution","status":"publish","type":"post","link":"https:\/\/ioflood.com\/blog\/dell-c6100-bmc-ipmi-mac-address-all-zeros-after-update-000000000000-script-fix-solution\/","title":{"rendered":"Dell C6100 BMC \/ IPMI Mac address all zeros after update? 00:00:00:00:00:00 &#8212; Script fix solution"},"content":{"rendered":"<div style=\"width: 369px\" class=\"wp-caption alignright\"><img decoding=\"async\" class=\"alignright\" title=\"Servers by JohnSeb\" src=\"https:\/\/ioflood.com\/blog\/wp-content\/uploads\/2014\/12\/3425464_068a1e6124_dell-server.jpg\" alt=\"dell server photo\" width=\"359\" height=\"269\" \/><p class=\"wp-caption-text\"><small>Photo by <a href=\"http:\/\/www.flickr.com\/photos\/69875617@N00\/3425464\" target=\"_blank\" rel=\"noopener\">JohnSeb<\/a> <a title=\"Attribution-ShareAlike License\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/\" target=\"_blank\" rel=\"nofollow noopener\"><img decoding=\"async\" src=\"https:\/\/ioflood.com\/blog\/wp-content\/plugins\/wp-inject\/images\/cc.png\" alt=\"Creative Commons Logo\" title=\"\"><\/a><\/small><\/p><\/div>\n<p>Some of you may have noticed the Dell C6100 on ebay for a pretty cheap price. 4 servers in a single 2u chassis for as little as $800. Great deal right?<\/p>\n<p>I had a lot of trouble getting the IPMI \/ BMC firmware updated on these in the first place. After getting it upgraded, the mac address read all zeroes on the IPMI. Obviously this is a big problem as multiple servers will each have the same mac address. I was tearing my hair out trying to solve this problem, but did come up with a solution.<\/p>\n<p>Step 1:<\/p>\n<p>Install ipmitool<\/p>\n<p>Step 2:<\/p>\n<p>copy the following script to a text file (I saved the file to macgen.py) and then chmod 755 the file, and then run it. Please bear in mind this will only work with Dell C6100 servers!<\/p>\n<pre>#!\u00a0\/usr\/bin\/python\n#\n#\u00a0macgen.py\u00a0script\u00a0generates\u00a0a\u00a0MAC\u00a0address\u00a0for\u00a0Dell\u00a0C6100\u00a0BMC\u00a0controllers\n#\u00a0it\u00a0runs\u00a0a\u00a0command\u00a0that\u00a0reprograms\u00a0the\u00a0IPMI\u00a0\/\u00a0BMC\u00a0mac\u00a0address\u00a0to\u00a0a\u00a0randomized\u00a0mac\u00a0address\n#\u00a0this\u00a0is\u00a0useful\u00a0since\u00a0the\u00a0flash\u00a0upgrade\u00a0process\u00a0for\u00a0the\u00a0BMC\u00a0on\u00a0the\u00a0Dell\u00a0C6100\u00a0will\n#\u00a0typically\u00a0\"zero\u00a0out\"\u00a0the\u00a0mac\u00a0address,\u00a0which\u00a0causes\u00a0serious\u00a0problems\u00a0and\u00a0conflicts\u00a0on\u00a0the\u00a0network\n#\nprint\u00a0\"\u00a0\"\nprint\u00a0\"Created\u00a0by\u00a0and\u00a0Copyright\u00a02013\u00a0Input\u00a0Output\u00a0Flood,\u00a0LLC\"\nprint\u00a0\"www.IOFLOOD.com\u00a0--\u00a0We\u00a0Love\u00a0Servers\"\nprint\u00a0\"\u00a0\"\nprint\u00a0\"This\u00a0script\u00a0may\u00a0be\u00a0freely\u00a0distributed\"\nprint\u00a0\"so\u00a0long\u00a0as\u00a0this\u00a0copyright\u00a0notice\u00a0is\u00a0not\u00a0edited\"\n#\nprint\u00a0\"\u00a0\"\nprint\u00a0\"This\u00a0script\u00a0is\u00a0provided\u00a0with\u00a0no\u00a0warranty.\u00a0Use\u00a0at\u00a0your\u00a0own\u00a0risk.\"\n#\n#\u00a0This\u00a0script\u00a0has\u00a0been\u00a0tested\u00a0as\u00a0working\u00a0on\u00a0a\u00a0Dell\u00a0DCS\u00a0C6100\u00a0using\u00a0IPMI\u00a0\/\u00a0BMC\u00a0firmware\u00a0versions\u00a01.25\u00a0and\u00a01.30.\n#\u00a0We\u00a0have\u00a0not\u00a0tested\u00a0any\u00a0other\u00a0versions,\u00a0though\u00a0we\u00a0do\u00a0expect\u00a0it\u00a0would\u00a0work\u00a0with\u00a0other\u00a0versions.\n#\n#\u00a0This\u00a0script\u00a0requires\u00a0\"ipmitool\"\u00a0be\u00a0installed.\u00a0In\u00a0centos\u00a0you\u00a0may\u00a0install\u00a0ipmitool\u00a0with\u00a0the\u00a0following\u00a0commands:\n#\n#\u00a0yum\u00a0-y\u00a0install\u00a0OpenIPMI\u00a0OpenIPMI-devel\u00a0OpenIPMI-libs\u00a0OpenIPMI-tools\u00a0kernel-devel\u00a0gcc\u00a0gcc-c++\u00a0make\n#\n#\u00a0chkconfig\u00a0ipmi\u00a0on\n#\u00a0service\u00a0ipmi\u00a0start\n#\n#\u00a0wget\u00a0\"http:\/\/downloads.sourceforge.net\/project\/ipmitool\/ipmitool\/1.8.11\/ipmitool-1.8.11.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fipmitool%2Ffiles%2Fipmitool%2F1.8.9%2F&ts=1311648838&use_mirror=cdnetworks-us-2\"\n#\u00a0tar\u00a0-zxf\u00a0ipmitool-1.8.11.tar.gz\n#\u00a0cd\u00a0ipmitool-1.8.11\n#\u00a0.\/configure\u00a0&&\u00a0make\u00a0&&\u00a0make\u00a0install\n#\n#\u00a0This\u00a0script\u00a0was\u00a0tested\u00a0with\u00a0the\u00a0BMC\u00a0controller\u00a0NIC\u00a0set\u00a0to\u00a0\"dedicated\".\n#\u00a0The\u00a0first\u00a0command\u00a0output\u00a0will\u00a0work\u00a0for\u00a0that\u00a0setting.\n#\u00a0The\u00a0second\u00a0command\u00a0output\u00a0is\u00a0expected\u00a0to\u00a0work\u00a0when\u00a0the\u00a0NIC\u00a0is\u00a0set\u00a0to\u00a0\"shared\",\u00a0but\u00a0this\u00a0has\u00a0not\u00a0been\u00a0tested.\n#\nimport\u00a0random\n\n#\u00a0the\u00a0first\u00a0half\u00a0of\u00a0the\u00a0mac\u00a0address\u00a0will\u00a0always\u00a0be\u00a000:16:3e,\u00a0because\u00a0that's\u00a0worked\u00a0for\u00a0us.\u00a0If\u00a0you\u00a0want\u00a0something\u00a0random\u00a0or\u00a0something\u00a0different,\u00a0edit\u00a0the\u00a0next\u00a06\u00a0lines:\n\nmac1=\u00a0\"%1x\"\u00a0%\u00a0random.randint(0x0,\u00a00x0)\nmac2=\u00a0\"%1x\"\u00a0%\u00a0random.randint(0x0,\u00a00x0)\nmac3=\u00a0\"%1x\"\u00a0%\u00a0random.randint(0x1,\u00a00x1)\nmac4=\u00a0\"%1x\"\u00a0%\u00a0random.randint(0x6,\u00a00x6)\nmac5=\u00a0\"%1x\"\u00a0%\u00a0random.randint(0x3,\u00a00x3)\nmac6=\u00a0\"%1x\"\u00a0%\u00a0random.randint(0xe,\u00a00xe)\n\n#\u00a0the\u00a0second\u00a0half\u00a0of\u00a0the\u00a0mac\u00a0address\u00a0is\u00a0random\n\nmac7=\u00a0\"%1x\"\u00a0%\u00a0random.randint(0x0,\u00a00xf)\nmac8=\u00a0\"%1x\"\u00a0%\u00a0random.randint(0x0,\u00a00xf)\nmac9=\u00a0\"%1x\"\u00a0%\u00a0random.randint(0x0,\u00a00xf)\nmac10=\u00a0\"%1x\"\u00a0%\u00a0random.randint(0x0,\u00a00xf)\nmac11=\u00a0\"%1x\"\u00a0%\u00a0random.randint(0x0,\u00a00xf)\nmac12=\u00a0\"%1x\"\u00a0%\u00a0random.randint(0x0,\u00a00xf)\n\nprint\u00a0\"\u00a0\"\nprint\u00a0\"Updating\u00a0Dell\u00a0C6100\u00a0BMC\u00a0Mac\u00a0address\u00a0to:\u00a0\"\u00a0+\u00a0mac1\u00a0+\u00a0mac2\u00a0+\u00a0':'\u00a0+\u00a0mac3\u00a0+\u00a0mac4\u00a0+\u00a0':'\u00a0+\u00a0mac5\u00a0+\u00a0mac6\u00a0+\u00a0':'\u00a0+\u00a0mac7\u00a0+\u00a0mac8\u00a0+\u00a0\":\"\u00a0+\u00a0mac9\u00a0+\u00a0mac10\u00a0+\u00a0\":\"\u00a0+\u00a0mac11\u00a0+\u00a0mac12\n\nmac1\u00a0=\u00a0hex(ord(mac1))\nmac2\u00a0=\u00a0hex(ord(mac2))\nmac3\u00a0=\u00a0hex(ord(mac3))\nmac4\u00a0=\u00a0hex(ord(mac4))\nmac5\u00a0=\u00a0hex(ord(mac5))\nmac6\u00a0=\u00a0hex(ord(mac6))\nmac7\u00a0=\u00a0hex(ord(mac7))\nmac8\u00a0=\u00a0hex(ord(mac8))\nmac9\u00a0=\u00a0hex(ord(mac9))\nmac10\u00a0=\u00a0hex(ord(mac10))\nmac11\u00a0=\u00a0hex(ord(mac11))\nmac12\u00a0=\u00a0hex(ord(mac12))\n\nexecutioner1\u00a0=\u00a0'ipmitool\u00a0raw\u00a00x2e\u00a00x21\u00a0'\u00a0+\u00a0mac1\u00a0+\u00a0'\u00a0'\u00a0+\u00a0mac2\u00a0+\u00a0'\u00a00x3a\u00a0'\u00a0+\u00a0mac3\u00a0+\u00a0'\u00a0'\u00a0+\u00a0mac4\u00a0+\u00a0'\u00a00x3a\u00a0'\u00a0+\u00a0mac5\u00a0+\u00a0'\u00a0'\u00a0+\u00a0mac6\u00a0+\u00a0'\u00a00x3a\u00a0'\u00a0+\u00a0mac7\u00a0+\u00a0'\u00a0'\u00a0+\u00a0mac8\u00a0+\u00a0'\u00a00x3a\u00a0'\u00a0+\u00a0mac9\u00a0+\u00a0'\u00a0'\u00a0+\u00a0mac10\u00a0+\u00a0'\u00a00x3a\u00a0'\u00a0+\u00a0mac11\u00a0+\u00a0'\u00a0'\u00a0+\u00a0mac12\u00a0+\u00a0'\u00a00x00'\nexecutioner2\u00a0=\u00a0'ipmitool\u00a0raw\u00a00x2e\u00a00x23\u00a0'\u00a0+\u00a0mac1\u00a0+\u00a0'\u00a0'\u00a0+\u00a0mac2\u00a0+\u00a0'\u00a00x3a\u00a0'\u00a0+\u00a0mac3\u00a0+\u00a0'\u00a0'\u00a0+\u00a0mac4\u00a0+\u00a0'\u00a00x3a\u00a0'\u00a0+\u00a0mac5\u00a0+\u00a0'\u00a0'\u00a0+\u00a0mac6\u00a0+\u00a0'\u00a00x3a\u00a0'\u00a0+\u00a0mac7\u00a0+\u00a0'\u00a0'\u00a0+\u00a0mac8\u00a0+\u00a0'\u00a00x3a\u00a0'\u00a0+\u00a0mac9\u00a0+\u00a0'\u00a0'\u00a0+\u00a0mac10\u00a0+\u00a0'\u00a00x3a\u00a0'\u00a0+\u00a0mac11\u00a0+\u00a0'\u00a0'\u00a0+\u00a0mac12\u00a0+\u00a0'\u00a00x00'\n\nimport\u00a0subprocess\nimport\u00a0shlex\nexecutioner1\u00a0=\u00a0shlex.split(executioner1)\nexecutioner2\u00a0=\u00a0shlex.split(executioner2)\nsubprocess.call(executioner1)\nsubprocess.call(executioner2)\n\nprint\u00a0\"Update\u00a0Complete.\u00a0Restarting\u00a0IPMI\u00a0module\"\n\nreset\u00a0=\u00a0shlex.split(\"ipmitool\u00a0mc\u00a0reset\u00a0cold\")\nsubprocess.call(reset)\nprint\u00a0\"\u00a0\"\nprint\u00a0\"Wait\u00a030\u00a0seconds,\u00a0then\u00a0run\u00a0'ipmitool\u00a0lan\u00a0print\u00a01'\u00a0to\u00a0verify\u00a0mac\u00a0address\"<\/pre>\n<p>After running this, you should be in good shape. The script will prompt you with instructions for what to do to verify it worked.<\/p>\n<p>If you enjoy it, feel free to use it \/ spread it around.<\/p>\n<p>If you have any questions about the above solution, or want any information about ioflood.com dedicated servers, feel free to email us at <strong>sales [at] ioflood.com<\/strong><\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some of you may have noticed the Dell C6100 on ebay for a pretty cheap price. 4 servers in a single 2u chassis for as little as $800. Great deal right? I had a lot of trouble getting the IPMI \/ BMC firmware updated on these in the first place. After getting it upgraded, the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":428,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,33,9,10],"tags":[],"class_list":["post-232","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ipmi","category-server-hardware","category-sysadmin","category-troubleshooting","cat-21-id","cat-33-id","cat-9-id","cat-10-id","has_thumb"],"_links":{"self":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/comments?post=232"}],"version-history":[{"count":8,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/232\/revisions"}],"predecessor-version":[{"id":3094,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/232\/revisions\/3094"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/media\/428"}],"wp:attachment":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/media?parent=232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/categories?post=232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/tags?post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}