Archive for the ‘Net’ Category

IPv6 在全球铺设的一些有趣新进展

09.04.2010 by drivel - 0 Comment
Posted in Net

根据今天 HE 的邮件

  • 全球 Alexa 的前 100 万的网站中,有 2143 个网站将其主站点跑在了 IPv6 模式下(默认支持)
  • 全球目前有 BGP 网络 35684 个,其中 2487 都在跑着 IPv6,约占 7%
  • 全球 IPv6 的路由表修正约有 3000 条

以下是邮件部分原文

* IPv6 Deployment Growth

The global IPv6 routing table has passed 3000 IPv6 prefixes
(approximately 3200 prefixes after filtering out bogons and prefixes
longer than /48s, approximately 3400 raw prefixes seen).

There are now over 3046 IPv6 glue records in the TLD zone files. The
addition of IPv6 glue records at the TLD level is a good gauge of
hosting infrastructure IPv6 growth, since it indicates operational
commitment on the part of individual nameserver operators.

Of the Alexa top 1 million most popular websites on the Internet, the
number running IPv6 for their main website has increased to 2143.

Of the 35684 networks in the world running BGP, the number running IPv6
has increased to 2487, or 7 percent.

Source: http://bgp.he.net/ipv6-progress-report.cgi

* IANA IPv4 Address Run Out

There are now an estimated 274 days left until IANA IPv4 address run out
and the depletion rate appears to have accelerated slightly.

Get our IPv6 statistics and IPv4 exhaustion widget here (it’s free!):

http://ipv6.he.net/statistics/

* Hurricane Electric Updated Network Map

Updated Network Map: http://he.net/HurricaneElectricNetworkMap.pdf

Hurricane Electric now has over 6000 BGP sessions with over 1500 IPv4
and IPv6 networks at 45 different exchange points in North America,
Europe, and Asia.

Linux 流量分析的命令

09.02.2010 by drivel - 6 Comments
Posted in GNU/Linux, Net

唔,直接做成一个 alias 吧

适用于 RHEL:
列出所有 ESTABLISHED 状态的连接

  1. netstat -nta | fgrep "ESTABLISHED" | cut -b 49-75 | cut -d ':' -f1 | sort | uniq -c | sort -n -r --key=1,7 | head -25

列出所有连接状态的统计

  1. netstat -nta | fgrep ":" | cut -b 77-90 | sort | uniq -c

适用于 Debian:
列出所有 ESTABLISHED 状态的连接

  1. netstat -nta | fgrep "ESTABLISHED" | cut -b 45-75 | cut -d ':' -f1 | sort | uniq -c | sort -n -r --key=1,7 | head -25

列出所有连接状态的统计

  1. netstat -nta | fgrep ":" | cut -b 69-90 | sort | uniq -c

列出所有 ESTABLISHED 状态的连接对 IPv6 不友好

HE.net 的一些路由数据

09.02.2010 by drivel - 0 Comment
Posted in Net

C:\Users\Botu Sun>tracert -6 anylinux.net

Tracing route to anylinux.net [2001:470:1f04:10ad::2]
over a maximum of 30 hops:

1 38 ms 1 ms <1 ms 2001:da8:208:139::1
2 2 ms 1 ms 1 ms 2001:da8:208:2020::1
3 <1 ms <1 ms <1 ms 2001:da8:208::11
4 2 ms 1 ms 1 ms cernet2.net [2001:da8:ad:3211::1]
5 <1 ms <1 ms <1 ms 2001:da8:1:40e::1
6 3 ms <1 ms <1 ms bj-bupt-v6.cernet2.net [2001:da8:1:1e::1]
7 8 ms 6 ms 5 ms 2001:252:0:1::101
8 39 ms * 39 ms 2001:252:0:101::2
9 42 ms 41 ms 42 ms hurricaneelectric-RGE.hkix.net [2001:7fa:0:1::ca28:a19e]
10 193 ms 199 ms 202 ms gige-g3-7.core1.lax1.he.net [2001:470:0:16b::1]
11 200 ms 201 ms 200 ms 10gigabitethernet2-2.core1.fmt2.he.net [2001:470:0:18d::1]
12 206 ms 206 ms 206 ms gige-gbge0.tserv3.fmt2.ipv6.he.net [2001:470:0:45::2]
13 200 ms 200 ms 200 ms drivel-1-pt.tunnel.tserv3.fmt2.ipv6.he.net [2001:470:1f04:10ad::2]

Trace complete.

C:\Users\Botu Sun>ping -6 anylinux.net

Pinging anylinux.net [2001:470:1f04:10ad::2] with 32 bytes of data:
Reply from 2001:470:1f04:10ad::2: time=201ms
Reply from 2001:470:1f04:10ad::2: time=202ms
Reply from 2001:470:1f04:10ad::2: time=201ms
Reply from 2001:470:1f04:10ad::2: time=201ms

Ping statistics for 2001:470:1f04:10ad::2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 201ms, Maximum = 202ms, Average = 201ms

HowTo: lubuntu and Ubuntu 10.04 华为3G 连接

06.02.2010 by drivel - 2 Comments
Posted in 0pen Source, GNU/Linux, Net

  原来在 Ubuntu 9.10 上用的好好的华为 EC169 终端,发现在 lubuntu 10.04 中无法自动抓取到了,后来发现,Ubuntu 10.04 这个本尊上原来也有这个问题 @@。anyway,搜索了一下 UbuntuForums.org 发现了一个解决方法如下:

  • http://www.draisberghof.de/usb_modeswitch/#download 下载三个文件
  • 执行 sudo apt-get install libusb-dev
  • 解压缩三个下载到的文件中的两个
    1. tar xvf usb-modeswitch-1.1.2.tar.bz2
      tar xvf usb-modeswitch-data-20100418.tar.bz2
  • 进入usb-modeswitch-1.1.2的目录,安装之
    1. cd usb-modeswitch-1.1.2/
      sudo make install
  • 进入usb-modeswitch-data-20100418的目录,安装之(注意,我这里的数据文件是2010年04月18日的,如果以后作者有更新,请自行替换中间的数字部分)
    1. cd usb-modeswitch-data-20100418
      sudo make install
  • 拷贝数据文件并且编辑
    1. sudo mv usb_modeswitch.setup /etc/
      sudo vim /etc/usb_modeswitch.setup

小弟这里用的是华为 EC169,那么就将 EC169 的部分前面的注释符号 “;” 删除即可,示例如下

  1. ########################################################
  2. # Huawei E169
  3. #
  4. # Contributor: Dale Lane
  5.  
  6. DefaultVendor=  0x12d1
  7. DefaultProduct= 0x1001
  8.  
  9. TargetClass=    0xff
  10.  
  11. # choose one of these:
  12. DetachStorageOnly=1
  13. HuaweiMode=1
  14.  
  15.  
  16. ########################################################

完成之后,执行

  • sudo usb_modeswitch -c /etc/usb_modeswitch.setup
  • sudo usb_modeswitch -W

至此,系统应该就已经可以认出来我们的 3G 数据卡了

  • dmesg|grep tty

看看是不是有类似的返回

[ 621.533371] usb 2-2: GSM modem (1-port) converter now attached to ttyUSB0
[ 621.535879] usb 2-2: GSM modem (1-port) converter now attached to ttyUSB1
[ 621.540106] usb 2-2: GSM modem (1-port) converter now attached to ttyUSB2

如果没有任何问题,请继续看下去

  • 安装拨号软件 wvdial
    1. sudo apt-get install wvdial
  • 使用 wvdial 附带的工具,进行自动配置
    1. sudo wvdialconf
  • 修改配置文件
    1. sudo vim /etc/wvdial.conf

我们可以看到,wvdial 已经自动为用户配置了一些,但是还不完整,我们需要自己去完成他

  1. [Dialer cdma1x]
  2. Init1 = ATZ
  3. Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
  4. Modem Type = Analog Modem
  5. Baud = 460800
  6. New PPPD = yes
  7. Modem = /dev/ttyUSB_utps_modem
  8. ISDN = 0
  9. Phone = #777
  10. Password = CARD
  11. Username = CARD
  12.  
  13. [Dialer cdma3g]
  14. Init1 = ATZ
  15. Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
  16. Modem Type = Analog Modem
  17. Baud = 4608000
  18. New PPPD = yes
  19. Modem = /dev/ttyUSB_utps_modem
  20. ISDN = 0
  21. Phone = #777
  22. Password = ctnet@mycdma.cn
  23. Username = vnet.mobi

以上是我的配置文件,大家可以参考一下,或者直接拷贝进去

  • 最后执行 wvdial 拨号上网啦
    1. sudo wvdial cdma3g

Enjoy surfing the Internet!

See ya, Google

03.24.2010 by drivel - 0 Comment
Posted in Net

与其说谷歌是退出中国,不如说是获得了新生

为了信仰,为了自由

前方啊没有方向
身上啊没有了衣裳
鲜血啊渗出了翅膀
我的眼泪湿透了胸膛
飞翔着强忍着伤
逃离了猎人的枪
我的双脚没有了知觉
我的心情下冰冷的雪
亲爱的母亲挚爱的朋友
我会坚定好好的活
沉默的大地沉默的天空
红色的血继续的流
纵然带着永远的伤口
至少我还拥有自由

飞翔吧飞在天空
用力吹吧无情的风
我不会害怕也无须懦弱
流浪的路我自己走
那是种骄傲阳光的洒脱
白云从我脚下掠过
干枯的身影憔悴的面容
挥着翅膀不再回头
纵然带着永远的伤口
至少我还拥有自由

– 伍佰 《白鸽》