tobot 发表于 2021-8-14 02:10

【米尔MYS-8MMX】米尔MYS-8MMQ6-8E2D-180-C开箱报告四——远程连接和网络应用

<div class='showpostmsg'><p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">在上一份报告《米尔</font>MYS-8MMQ6-8E2D-180-C<font face="宋体">开箱报告三&mdash;&mdash;网络》(</font><font face="Calibri">https://bbs.eeworld.com.cn/thread-1175378-1-1.html</font><font face="宋体">)中,我们尝试了将板卡做成</font><font face="Calibri">station</font><font face="宋体">模式,通过家用的</font><font face="Calibri">AP</font><font face="宋体">和电脑互通,但如文中所述,通过命令配置</font><font face="Calibri">wifi</font><font face="宋体">接口只是临时使用,还不能永久生效。而且没有缺省路由,无法访问</font><font face="Calibri">Internet</font><font face="宋体">。在这份报告里面,我们将进一步研究,如何将板卡与</font><font face="Calibri">Internet</font><font face="宋体">网络连接,并支持远程管理。</font></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">一、使能网络连接</font></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">依然使用</font>SecureCRT<font face="宋体">连接板卡,使能</font><font face="Calibri">wlan</font><font face="宋体">接口,使用</font><font face="Calibri">wpa_supplicant.conf</font><font face="宋体">配置连接网络,再增加地址,然后配置:</font></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体">route add default gw 192.168.1.1</span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">查看路由表</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">接下来尝试修改启动文件,使其能重启生效。</font></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">将上述命令加入</font>/etc/rc.local<font face="宋体">中:</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">重启验证,启动后,板卡自动连接连接到网络。</font></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">二、网络连通性测试</font></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">使用</font>ping<font face="宋体">命令测试一个确定可用的地址,应当能够正常响应。例如北京</font><font face="Calibri">DNS</font><font face="宋体">:</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">可以用</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体">ctrl-c<font face="宋体">停下</font><font face="Calibri">ping</font><font face="宋体">命令。</font></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">使用</font>nslookup<font face="宋体">测试域名,可以成功获取。</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">事实上可以通过</font>cat /etc/resolv.conf<font face="宋体">查看到板卡缺省就设置了</font><font face="Calibri">1.1.1.1</font><font face="宋体">、</font><font face="Calibri">8.8.8.8</font><font face="宋体">等域名服务器,而且已经测试过可以正常解析,这里就不修改了。</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">继续使用</font>ping<font face="宋体">测试</font><font face="Calibri">baidu</font><font face="宋体">等域名的连通性,正常。</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">在这一步操作中,如果</font>ping<font face="宋体">长时间无响应,也不一定是网络异常,也许是网址或是路径中的某一跳不响应</font><font face="Calibri">icmp</font><font face="宋体">。例如</font><font face="Calibri">ping</font><font face="宋体">北京大学的域名</font><font face="Calibri">www.pku.edu.cn</font><font face="宋体">,可以得到解析出的</font><font face="Calibri">ipv6</font><font face="宋体">地址</font><font face="Calibri">2001:da8:201:1512::a269:83a0</font><font face="宋体">,但</font><font face="Calibri">ping</font><font face="宋体">没有响应。</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">在这里,我们禁用</font>ipv6<font face="宋体">,效果也是一样的。</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">可以使用</font>traceroute<font face="宋体">尝试连接其域名查看。</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">发现从第</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体">13<font face="宋体">跳开始,就无法向后追寻路径了。</font></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">但事实上,这个域名是肯定可用的。</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<ul>
        <li style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">网络应用</font></span></span></span></span></li>
</ul>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">在上一小节,我们使用</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体">wget<font face="宋体">来获取一个网页,但事实上,</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">米尔</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体">MYS-8MMQ6-8E2D-180-C<font face="宋体">缺省可以支持更多网络应用,例如:</font></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体">3.1 </span></span><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">网络时间</font></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体">NTP<font face="宋体">协议通常用来对时,将客户端的网络时钟与服务器时钟设置相同。在板卡上缺省开启了</font><font face="Calibri">ntpd</font><font face="宋体">(事实上,它连</font><font face="Calibri">RTC</font><font face="宋体">电池都没有,开</font><font face="Calibri">server</font><font face="宋体">毫无意义)。在将其作为</font><font face="Calibri">client</font><font face="宋体">之前,应先关闭,关闭</font><font face="Calibri">ntpd</font><font face="宋体">进程的方法很简单,使用</font><font face="Calibri">ps -e |grep ntpd</font><font face="宋体">找到</font><font face="Calibri">pid</font><font face="宋体">值,再</font><font face="Calibri">kill</font><font face="宋体">即可。</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">看看时区设置,从板卡上看,它只能支持</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体">UTC<font face="宋体">。</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">尝试将板卡与阿里云的时钟连接,从阿里云时钟服务器上获取时钟:</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">再调整一下时区</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">从上图可以看到,时钟已经矫正。</font></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体">3.2 <font face="宋体">游戏客户端</font></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">米尔</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体">MYS-8MMQ6-8E2D-180-C<font face="宋体">缺省支持</font><font face="Calibri">telnet clinet</font><font face="宋体">,我们可以将其作为游戏客户端,访问</font><font face="Calibri">mud</font><font face="宋体">服务器,例如北大侠客行,这是当年我们在大学时候建立的一个</font><font face="Calibri">mud</font><font face="宋体">服务器,已经稳定运行了二十多年。</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">可以看到,已正常连接入游戏。</font></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体">3.3 <font face="宋体">支持远程管理板卡</font></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">根据手册介绍,板卡缺省使能了</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体">SSH<font face="宋体">功能,尝试直接用</font><font face="Calibri">SecureCRT</font><font face="宋体">连接,发现被拒,原因是&ldquo;密钥交换&rdquo;失败。</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">从回显可以知道,服务器(板卡)支持的模式有:</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体">curve25519-sha256<font face="宋体">、</font><font face="Calibri">curve25519-sha256@libssh.org</font><font face="宋体">、</font><font face="Calibri">ecdh-sha2-nistp521</font><font face="宋体">、</font><font face="Calibri">ecdh-sha2-nistp384</font><font face="宋体">、</font><font face="Calibri">ecdh-sha2-nistp256</font><font face="宋体">、</font><font face="Calibri">diffie-hellman-group14-sha256</font><font face="宋体">、</font><font face="Calibri">kexguess2@matt.ucc.asn.au</font><font face="宋体">。但再看看</font><font face="Calibri">SecureCRT</font><font face="宋体">支持的模式只有:</font></span></span></span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">于是换一个终端工具,比如</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体">PuTTY<font face="宋体">,可以正常连接:</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>
</div><script>                                        var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;"   style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
                                       
                                        if(parseInt(discuz_uid)==0){
                                                                                                (function($){
                                                        var postHeight = getTextHeight(400);
                                                        $(".showpostmsg").html($(".showpostmsg").html());
                                                        $(".showpostmsg").after(loginstr);
                                                        $(".showpostmsg").css({height:postHeight,overflow:"hidden"});
                                                })(jQuery);
                                        }                </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script>

freebsder 发表于 2021-8-20 16:00

<p>还有mud,牛,还是我上学那会流行的东西</p>
页: [1]
查看完整版本: 【米尔MYS-8MMX】米尔MYS-8MMQ6-8E2D-180-C开箱报告四——远程连接和网络应用