分类目录归档:互联网上

双网卡 同时访问两个网络,内网与外网同时能上的方法

想同时访问内网,外网遇到个问题,就是当访问内网的时候,外面就没法访问,反之亦然。经过研究终于找到,同时访问两个网络的方法。

比如

一个网络的地址:192.168.1.110,子网掩码:255.255.255.0,网关:192.168.1.1

另一个网络的地址:192.168.128.130,子网掩码:255.255.255.0,网关:192.168.128.2

第一步:route delete 0.0.0.0     “删除所有0.0.0.0的路由”

第二步:route add 0.0.0.0 mask 0.0.0.0    192.168.1.1 “添加0.0.0.0网络路由”

第三步:route add 0.0.0.0 mask 255.0.0.0 192.168.128.2 “添加10.0.0.0网络路由”

使用上述命令添加的路由在系统重新启动后会自动丢失,route add -p 添加静态路由,注意使用前要在tcp/ip设置里去掉接网卡的网关。

我用这个就是虚拟机上用的,一个是让虚拟机能够访问本机的共享资源,而虚拟机又能通过另外一个无线网卡同时访问外部网络,而不是通过本机网络访问外网。
 

route命令

route命令可以在CMD DOS窗口中执行,主要看看route delete 和 route add。

route参数说明:

Manipulates network routing tables.

ROUTE [-f] [-p] [command [destination]
[MASK netmask] [gateway] [METRIC metric] [IF interface]

-f Clears the routing tables of all gateway entries. If this is
used in conjunction with one of the commands, the tables are
cleared prior to running the command.
-p When used with the ADD command, makes a route persistent across
boots of the system. By default, routes are not preserved
when the system is restarted. Ignored for all other commands,
which always affect the appropriate persistent routes. This
option is not supported in Windows 95.
command One of these:
PRINT Prints a route
ADD Adds a route
DELETE Deletes a route
CHANGE Modifies an existing route
destination Specifies the host.
MASK Specifies that the next parameter is the ‘netmask’ value.
netmask Specifies a subnet mask value for this route entry.
If not specified, it defaults to 255.255.255.255.
gateway Specifies gateway.
interface the interface number for the specified route.
METRIC specifies the metric, ie. cost for the destination.

All symbolic names used for destination are looked up in the network database
file NETWORKS. The symbolic names for gateway are looked up in the host name
database file HOSTS.

If the command is PRINT or DELETE. Destination or gateway can be a wildcard,
(wildcard is specified as a star ‘*’), or the gateway argument may be omitted.

If Dest contains a * or ?, it is treated as a shell pattern, and only
matching destination routes are printed. The ‘*’ matches any string,
and ‘?’ matches any one char. Examples: 157.*.1, 157.*, 127.*, *224*.
Diagnostic Notes:
Invalid MASK generates an error, that is when (DEST & MASK) != DEST.
Example> route ADD 157.0.0.0 MASK 155.0.0.0 157.55.80.1 IF 1
The route addition failed: The specified mask parameter is invalid.
(Destination & Mask) != Destination.

Examples:

> route PRINT
> route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2
destination^ ^mask ^gateway metric^ ^
Interface^
If IF is not given, it tries to find the best interface for a given
gateway.
> route PRINT
> route PRINT 157* …. Only prints those matching 157*
> route CHANGE 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2

CHANGE is used to modify gateway and/or metric only.
> route PRINT
> route DELETE 157.0.0.0
> route PRINT

普通路由器限制网速,限制人家BT, P2P的方法

     很大部分路由器没有QOS功能,也不能刷 DD-WRT,但是很多共用宽带的,经常出现人家开个BT 或者 P2P,迅雷等下载,慢的要死,影响自己上网。其实只要你有路由权限,当然也可以限制到BT,P2P等这些占用大的带宽的东西。

     一般路由都有防火墙功能,只要开启防火墙,就开几个常用端口就行,比如80,8080,21,443等,可以正常上网,开网页,聊QQ,但是BT,P2P等软件使用没法抢带宽了。呵呵。

HTML表格边框颜色 CSS定义方法

<style type="text/">
.Tab{ border-collapse:collapse; width:300px; height:300px;}
.Tab td{ border:solid 1px #f00}
</style>

<table cellspacing="0" class="Tab">
  <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
  </tr>
</table>

腾讯QQ游戏 玫瑰园

    现在腾讯又出了这个东西,基本和QQ农场也就是开心农场差不多的,基本整套模仿过来,再其他的东西改了下,比如说这边种的是玫瑰,但是形式等都还是一样的。这个应该主要和现在的QQ小游戏结合的,就是QQ游戏大厅登陆进去,上面可以看到一个玫瑰花,点进去就是了,种东西可以领取游戏道具。

腾讯真会模仿。

IIS站点采用独立应用程序池的好处

   每一个站点分配一个应用程序池,在站点启动以后会在系统中创建一个独立的进程(w3wp.exe),这样即使一个站点因为某些原因“挂了”,而其他站点丝毫不受影响。

       我们经常会看到网站访问时出现:”Service Unavailable”,这个一般就是由于网站空间所在的应用程序池发生错误或者进行回收造成的。

使用这种方法也是要付出代价的,因为他增加了额外的服务器开销,需要分配更多的内存,更多的CPU使用率。

双wan tomato 固件 无线蹭网/中继AP的设置方法

    买了个 磊科的那个可以刷 ,和 DD-WRT的无线路由,今天拿到了,叫卖的那边刷的是  ,不过好像想用这个链接无线信号, tomato的固件不太好用,网上找了方法,终于找到一个可以对 tomato固件的路由作为中继。需要自己做一些设置就可以。具体方法见下图。不过对于加密,而又知道密码的无线怎么设置 tomato那边好像没地方输入密码。

双wan的,对两个WAN口都设为DHCP就行了。

1_8uhipa8ombur.jpg  大小: 56.9 K 尺寸: 500 x 438 浏览: 56 次 点击打开新窗口浏览全图

2_yblbfrw5po4p.jpg  大小: 50.51 K 尺寸: 500 x 283 浏览: 72 次 点击打开新窗口浏览全图

4.jpg  大小: 62.95 K 尺寸: 500 x 300 浏览: 68 次 点击打开新窗口浏览全图

日本xrea商业空间演示

    前几天买了个日本的xrea 3g的商业空间,安装了个网站上去,发现流量速度,反正我这边电信访问是还可以接受,和网通电信互访差不多的速度,不是很快,但是还可以。

演示地址:http://www.jiujiuyouxi.com

我这边PING过去值发现缺还不错呢。

Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>ping www.jiujiuyouxi.com

Pinging www.jiujiuyouxi.com [210.251.253.237] with 32 bytes of data:

Reply from 210.251.253.237: bytes=32 time=140ms TTL=43
Reply from 210.251.253.237: bytes=32 time=137ms TTL=43
Reply from 210.251.253.237: bytes=32 time=348ms TTL=43
Reply from 210.251.253.237: bytes=32 time=135ms TTL=43

Ping statistics for 210.251.253.237:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 135ms, Maximum = 348ms, Average = 190ms

C:\Documents and Settings\Administrator>

腾讯是最大的模仿赢家

    对于我也可以算是一个老网鸟了,自从我刚开始第一次申请QQ号的时候,腾讯也就还没什么知名度,其实当初我最早申请的是ICQ,后来就有了OICQ,也是腾讯通过模仿ICQ来的即时通信软件,后来用的人多了么,也就注册了个号,一直用到现在。这是腾讯的第一个模仿,接下来腾讯的产品基本是在模仿中成长起来的。

    他的成功源于他已经拥有庞大的用户群,有原来的QQ只有单一的即时通话功能,现在变成了一个庞大的软件,由安装的几M变为几百M。他的产品也现在发展成为无数个。原来的联众边锋,现在基本也要被腾讯的QQ游戏所代替,原来的浩方,又被现在的QQ对战平台所争取,因为就我个人而言,现在也基本转向腾讯的了,主要是由于账号的连通性,只要一个QQ号就可以登录他的全部产品,及其方便,还有现在的QQ邮箱等,只要登录QQ客户端,有新邮件就可以马上发现,现在邮箱都很多转用QQ邮箱了。还有QQTV,QQ旋风,QQ拼音…..等等等,哪一个不是模仿而来的呢?

    其中不免还有模仿很多个流行的游戏等等。。。。。腾讯的成功就在于它的QQ用户的巨大,也源于他账户平台的统一性。由此感慨。。。。。

PHP has encountered an Access Violation[转]

改PHP.INI

1.将;upload_tmp_dir该行的注释符,即前面的分号“;”去掉,使该行在php.ini文档中起作用。upload_tmp_dir是用来定义上传文件存放的临时路径,在这里你还可以给其定义一个绝对路径,例如:upload_tmp_dir = d:upload  当然,此时你的d:upload目录必须有读写权限。

2.出现这样的错误语句一般是因为你的php.ini中关于session.save_path一项没有设置好,解决的方法是将session.save_path和session.cookie_path 设置置为
  session_save_path = c:\temp
  session.cookie_path = c:\temp
  然后在c:\目录下建立一个temp目录,

 
下面是其他的处理方法
 
第一种可能:

 

去掉 php中 eaccelerator 的扩展
这样做能够解决您的问题,不过可能会加重系统负担
因为eaccelerator主要是为了节省系统资源的东西

 

具体做法是找到php.ini
如果是我帮您配置的,一般在c://php.ini或者 c:/winnt/.ini 或者c:/windows/.ini

 

去掉

 

zend_extension_ts="C:\php\extensions\eaccelerator_win_xxx.dll"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="c:\temp"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9" 字串8

ea主要是在unix环境下开发的,但是作者忽略到windows实际上不像u主机那样,是没有u主机的那种内存共享机制的
这个bug已经提交给他们了,希望0.9.5能够解决 字串7

当然,如果您的机器这个问题不严重,建议还是保留,ea是一块非常优秀的Php缓存+加速软件
配合zo使用,将会降低系统负担 50%-80%左右,提高负载能力、速度和效率 200%左右 字串2

  字串2

第二种可能 字串2

session_save_path 需要设定一个实际的物理路径,并且该目录需要everyone的所有权限,类似U主机的0777

  字串6

第三种可能
c:/winnt/temp 或者 c:/windows/temp
也需要everyone的所有权限,类似U主机的0777

第四种可能
您的内存严重不足,查看一下,如果有问题,请加内存,最好是一次加两条
比如加1G内存,最好是加2条一模一样的512M。否则没有启用双通道,效果也很一般

  字串2

第五种可能
ZendOptimizer和php的搭配不是很好
换个版本试试看
目前比较稳定的搭配是
php4.3.11+zo 2.5.10a
或者php4.4.1+zo 3.0 beta2 字串7

 

第六种可能

这种多属于用win2003的用户
他们在应用池中设定了限制
比如多长时间回收,最大使用内存多少等等
这些设置势必造成这个经典的php错误
木头经过数以百计的测试,敢担保问题会出现在这里。 字串