<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[wsl2中解决桥接问题]]></title><description><![CDATA[<p dir="auto">问题：使用wsl2，要如何桥接，否则wsl中的ip与小车ip的子域不同。<br />
首先我的windows wifi ipv4 192.168.50.139  wls2中eth0是172.20.36.33然后小车IP是192.168.50.108，sip是172.20.36.33：8888<br />
很明显小车ip 192.xxxxxx与wsl2中172.xxxxx是不匹配的，需要将wsl2中的也改为192.xxxxxx。</p>
<p dir="auto">解决方案：<br />
1.首先你要确保电脑是win11专业版，如果是家庭版淘宝搜win11专业版去激活。参考https://zhuanlan.zhihu.com/p/617357186到1.3为止，如果网络无法连接了把（4）搜索查看网络连接并配置网桥连接的网络适配器的那个bridge√去掉然后确定。</p>
<p dir="auto">2.然后用管理员打开powershell记住一定要是管理员模式！！！！！！<br />
输入 Get-VMSwitch -SwitchType External看看有没有VM，可以去问问ai。</p>
<p dir="auto">3.依然是在这个管理员：powershell中<br />
cd $env:USERPROFILE</p>
<h1>使用记事本创建/编辑文件</h1>
<p dir="auto">notepad .wslconfig<br />
提示没有则点击是</p>
<p dir="auto">4.在这个记事本中粘贴下面代码<br />
[wsl2]<br />
networkingMode=bridged<br />
vmSwitch=WSL2Bridge<br />
ipv6=true<br />
dhcp=true<br />
memory=4GB<br />
processors=4</p>
<p dir="auto">5.回到管理员powershell</p>
<h1>关闭 WSL2</h1>
<p dir="auto">wsl --shutdown</p>
<h1>等待几秒</h1>
<p dir="auto">Start-Sleep -Seconds 5</p>
<h1>重新启动 WSL2（你新开一个powershell不用管理员）</h1>
<p dir="auto">wsl2</p>
<p dir="auto">6.检验<br />
输入ip addr show eth0<br />
显示192.xxxxxx成功！！！！！！</p>
<p dir="auto">7.确认<br />
输入小鱼的sudo docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host <a href="http://registry.cn-hangzhou.aliyuncs.com/fishros/micro-ros-agent:$ROS_DISTRO" target="_blank" rel="noopener noreferrer nofollow ugc">registry.cn-hangzhou.aliyuncs.com/fishros/micro-ros-agent:$ROS_DISTRO</a> udp4 --port 8888 -v6<br />
奇迹出现了！</p>
<p dir="auto">另一个解决方案也是更本：去搞个双系统直接运行ros2吧，会省去其他奇奇怪怪的问题，我感觉wsl2的用户比较少。什么东西都是稳定比较好。</p>
]]></description><link>https://fishros.org.cn/forum/topic/4703/wsl2中解决桥接问题</link><generator>RSS for Node</generator><lastBuildDate>Wed, 26 Aug 2026 22:29:13 GMT</lastBuildDate><atom:link href="https://fishros.org.cn/forum/topic/4703.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 18 Jan 2026 11:19:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to wsl2中解决桥接问题 on Mon, 19 Jan 2026 13:55:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fishros.org.cn/forum/uid/27856">@sxjj</a> [wsl2]<br />
删掉<br />
ipv6=true<br />
dhcp=true</p>
<p dir="auto">此外如果node list没有，不是很稳定检查网络，不要用热点，去用路由器</p>
]]></description><link>https://fishros.org.cn/forum/post/19441</link><guid isPermaLink="true">https://fishros.org.cn/forum/post/19441</guid><dc:creator><![CDATA[sxjj]]></dc:creator><pubDate>Mon, 19 Jan 2026 13:55:26 GMT</pubDate></item><item><title><![CDATA[Reply to wsl2中解决桥接问题 on Sun, 18 Jan 2026 11:21:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fishros.org.cn/forum/uid/27856">@sxjj</a> 傻了，忘记说了小车sip要改啊，改成192那个</p>
]]></description><link>https://fishros.org.cn/forum/post/19437</link><guid isPermaLink="true">https://fishros.org.cn/forum/post/19437</guid><dc:creator><![CDATA[sxjj]]></dc:creator><pubDate>Sun, 18 Jan 2026 11:21:33 GMT</pubDate></item></channel></rss>