{"id":717,"date":"2019-04-01T00:11:10","date_gmt":"2019-04-01T00:11:10","guid":{"rendered":"http:\/\/fluentreports.com\/blog\/?p=717"},"modified":"2023-04-14T21:18:42","modified_gmt":"2023-04-14T21:18:42","slug":"vmware-network-hickups-sent-link-down-event","status":"publish","type":"post","link":"http:\/\/fluentreports.com\/blog\/?p=717","title":{"rendered":"VMWare Network Hickups ( sent link down event. )"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I ran into this because I went to a hotel that had DHCP renew every 300 seconds, trying to download something inside the VM was getting clobbered...<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you check your syslog or kern.log and see the following entries; then I might have the solution for you:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> kernel: [235397.022939] userif-3: sent link down event.<br> kernel: [235397.022943] userif-3: sent link up event.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then the issue is one that when your DHCP renews it calls into the kernel with the new information; unfortunately this causes VMWare Workstation &amp; Player (might effect other VMWare products?) to reset its network stack, even though nothing changed...  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The solution after a lot of time googling different terms and trying to figure out what exactly was going on.   I finally found it here (by Jan Just Keijer): <s>https:\/\/www.nikhef.nl\/~janjust\/vmnet\/<\/s> (The original link is now dead, you can read it on Wayback machine <a href=\"https:\/\/web.archive.org\/web\/20210301012537\/https:\/\/www.nikhef.nl\/~janjust\/vmnet\/\">here<\/a>) it was for an much older version of VMWare Player; but the solution still applies to VMWare workstation 16 &amp; 17...<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To make sure the information doesn't just disappear in the future (and so I can easily find it myself) I'm going to quote the relevant code and\/or modifications I did..<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Extract the  <code>\/usr\/lib\/vmware\/modules\/source\/vmnet-only.tar<\/code> tar file, you need to modify the <code>userif.c<\/code> file.   Search it for <code>VNetUserIfSetUplinkState<\/code> function and right after the variable declaration add <code>if (!linkUp) return 0;<\/code><\/p>\n\n\n\n<pre>\/\/ Around line 966\nVNetUserIfSetUplinkState(VNetPort *port, uint8 linkUp)\n {\n&nbsp;&nbsp;&nbsp;&nbsp;VNetUserIF *userIf;\n&nbsp;&nbsp;&nbsp;&nbsp;VNetJack *hubJack;\n&nbsp;&nbsp;&nbsp;&nbsp;VNet_LinkStateEvent event;\n&nbsp;&nbsp;&nbsp;&nbsp;int retval;\n\n&nbsp;&nbsp;&nbsp;&nbsp;\/* ADD: never send link down events *\/&nbsp;&nbsp; \n&nbsp;&nbsp;&nbsp;&nbsp;if (!linkUp) return 0;\n&nbsp;&nbsp;&nbsp;&nbsp;\/* END Added code *\/\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;... rest of code ...\n\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will eliminate the linkdown events; which disconnect the internet from the VMWare network driver...  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After you do that; recreate the vmnet-only.tar and replace the original.  Then you can run: <code>\/usr\/bin\/vmware-modconfig --console --install-all<\/code> <br><br>And then either<br><strong>systemctl restart vmware<\/strong>  <br>or <br><strong>service vmware restart<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you still see \" sent link down event.\" in your logs; then the patch wasn't applied properly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There is also a <a href=\"https:\/\/github.com\/mkubecek\/vmware-host-modules\/issues\/129\">GitHub issue<\/a> for this issue, that has been sitting open since early 2022.  It is unlikely this issue will be fixed unless there is a lot of people thumb upping that they run into this...<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, you can also clone the latest vmware network modules source code (you still have to apply this patch) from <a href=\"https:\/\/github.com\/mkubecek\/vmware-host-modules.git\">https:\/\/github.com\/mkubecek\/vmware-host-modules<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I ran into this because I went to a hotel that had DHCP renew every 300 seconds, trying to download something inside the VM was getting clobbered... If you check your syslog or kern.log and see the following entries; then I might have the solution for you: kernel: [235397.022939] userif-3: sent link down event. kernel:&hellip; <a class=\"more-link\" href=\"http:\/\/fluentreports.com\/blog\/?p=717\">Continue reading <span class=\"screen-reader-text\">VMWare Network Hickups ( sent link down event. )<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[39],"tags":[130,128,129],"class_list":["post-717","post","type-post","status-publish","format-standard","hentry","category-tips","tag-network","tag-vmware","tag-workstation","entry"],"_links":{"self":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=717"}],"version-history":[{"count":5,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/717\/revisions"}],"predecessor-version":[{"id":1510,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/717\/revisions\/1510"}],"wp:attachment":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=717"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}