局域网跨网段访问文件求助 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
glouhao
V2EX    问与答

局域网跨网段访问文件求助

  •  
  •   glouhao 2018-06-27 10:52:52 +08:00 via Android 1830 次点击
    这是一个创建于 2715 天前的主题,其中的信息可能已经有所发展或是发生改变。

    电信网关(带路由功能那种)带个 USB 口,我插了个硬盘,从路由上连的设备和主路由不一个网段。主路由是 192.168.1.X,从路由是 192.168.2.X,设备都连在从路由上。俩笔记本都可以\192.168.1.1 访问电信网关上的硬盘,一个台式机死活访问不了,但是可以访问主路由网页。导入 lmhosts.sam 方法也试了,不管用。求泥潭大佬帮忙。下面是 lmhosts.sam 文件内容,我加的一行红色,比较靠下:

    Copyright (c) 1993-1999 Microsoft Corp.

    This is a sample LMHOSTS file used by the Microsoft TCP/IP for Windows.

    This file contains the mappings of IP addresses to computernames

    (NetBIOS) names. Each entry should be kept on an individual line.

    The IP address should be placed in the first column followed by the

    corresponding computername. The address and the computername

    should be separated by at least one space or tab. The "#" character

    is generally used to denote the start of a comment (see the exceptions

    below).

    This file is compatible with Microsoft LAN Manager 2.x TCP/IP lmhosts

    files and offers the following extensions:

    #PRE

    #DOM:<domain>

    #INCLUDE <filename>

    #BEGIN_ALTERNATE

    #END_ALTERNATE

    \0xnn (non-printing character support)

    Following any entry in the file with the characters "#PRE" will cause

    the entry to be preloaded into the name cache. By default, entries are

    not preloaded, but are parsed only after dynamic name resolution fails.

    Following an entry with the "#DOM:<domain>" tag will associate the

    entry with the domain specified by <domain>. This affects how the

    browser and logon services behave in TCP/IP environments. To preload

    the host name associated with #DOM entry, it is necessary to also add a

    #PRE to the line. The <domain> is always preloaded although it will not

    be shown when the name cache is viewed.

    Specifying "#INCLUDE <filename>" will force the RFC NetBIOS (NBT)

    software to seek the specified <filename> and parse it as if it were

    local. <filename> is generally a UNC-based name, allowing a

    centralized lmhosts file to be maintained on a server.

    It is ALWAYS necessary to provide a mapping for the IP address of the

    server prior to the #INCLUDE. This mapping must use the #PRE directive.

    In addtion the share "public" in the example below must be in the

    LanManServer list of "NullSessionShares" in order for client machines to

    be able to read the lmhosts file successfully. This key is under

    \machine\system\currentcontrolset\services\lanmanserver\parameters\nullsessionshares

    in the registry. Simply add "public" to the list found there.

    The #BEGIN_ and #END_ALTERNATE keywords allow multiple #INCLUDE

    statements to be grouped together. Any single successful include

    will cause the group to succeed.

    Finally, non-printing characters can be embedded in mappings by

    first surrounding the NetBIOS name in quotations, then using the

    \0xnn notation to specify a hex value for a non-printing character.

    The following example illustrates all of these extensions:

    102.54.94.97 rhino #PRE #DOM:networking #net group's DC

    102.54.94.102 "appname \0x14" #special app server

    102.54.94.123 popular #PRE #source server

    102.54.94.117 localsrv #PRE #needed for the include

    192.168.1.1 luyou

    #BEGIN_ALTERNATE

    #INCLUDE \localsrv\public\lmhosts

    #INCLUDE \rhino\public\lmhosts

    #END_ALTERNATE

    In the above example, the "appname" server contains a special

    character in its name, the "popular" and "localsrv" server names are

    preloaded, and the "rhino" server name is specified so it can be used

    to later #INCLUDE a centrally maintained lmhosts file if the "localsrv"

    system is unavailable.

    Note that the whole file is parsed including comments on each lookup,

    so keeping the number of comments to a minimum will improve performance.

    Therefore it is not advisable to simply add lmhosts file entries onto the

    end of this file.

    2 条回复    2018-06-27 16:06:51 +08:00
    mmd1989
        1
    mmd1989  
       2018-06-27 11:16:58 +08:00
    要在主路由上写静态路由表吧
    LGA1150
        2
    LGA1150  
       2018-06-27 16:06:51 +08:00 via Android
    程序和功能-打开 SMB 1.0
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     913 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 24ms UTC 21:50 PVG 05:50 LAX 13:50 JFK 16:50
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86