轻松获得网通、电信、铁通IP地址分配段

  APNIC是管理亚太地区IP地址分配的机构 ,它有着丰富准确的IP地址分配库,同时这些信息也是对外公开的!下面就让我们看看如何在Linux下获得一些电信运营商的IP地址分配情况:

shell> wget http://ftp.apnic.net/apnic/dbase/tools/ripe-dbase-client-v3.tar.gz
shell> tar xzvf ripe-dbase-client-v3.tar.gz
shell> cd whois-3.1
shell> ./configure
shell> make

完成上述编译安装工作后,我们开始获取IP地址段;

  中国网通:shell> ./whois3 -h whois.apnic.net -l -i mb MAINT-CNCGROUP > /var/cnc

  中国电信:shell> ./whois3 -h whois.apnic.net -l -i mb MAINT-CHINANET > /var/chinanet

  中国铁通:shell> ./whois3 -h whois.apnic.net -l -i mb MAINT-CN-CRTC > /var/crtc

  打开获取后的文件可以看到里面的信息非常详细,甚至可以看到各个分公司的负责人、电话、电子邮件等等信息。如果想得到一份整齐干净的IP地址段文件,只要用grep和awk简单过滤就可以了。

Category: 其他技术
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
23 Responses
  1. Steven says:

    站长您好,我想请教您几个问题,搜房网\大众点评网,他们那种自动判断是地区用户,访问当地的二级域名是怎么做的噢?谢谢.假如通过ip来彼配是不是这种?

  2. Michael says:

    [Comment ID #5618 Will Be Quoted Here]

    一般来说这都是通过DNS来实现的,在不同运营商接入的用户会得到不同的DNS结果,然后自动导向不同的域名。这种方式实现的渠道有跟运营商合作,也有自己放置DNS服务器来实现。 对于前面的方式比较简单,后面的方式在详细的技术配置上我不是很清楚,我知道大概是通过类似我文中提到的IP段,加入到DNS的Zone配置文件acl段中来实现,你可以google一下文档,应该很多。

  3. Steven says:

    Michale我不晓得google用什么关键字,你能否指引一下.非常感谢.我刚刚接触这个.

  4. Michael says:

    [Comment ID #5638 Will Be Quoted Here]

    没有明白您说的意思,能补充说明白一点吗?

  5. Steven says:

    Michale不好意思,我指的是应该用什么关键字来搜索这方面的资料.

  6. Steven says:

    Michael您好,谢谢您的留言.到七号了,迟到祝您节日快乐.
    我想了一下搜房\大众点评网他们对不同地区跳转到不同的域名,我想他们是通过泛域名来解析实现的.你认为是否?我这几天写一个demo到时请你多指教:)

  7. Michael says:

    [Comment ID #6014 Will Be Quoted Here]

    通过范域名解析是可以测试出来的,你随便写个A记录dig或者nslookup看看,如果随便一个域名都能解析出来应该就是范域名,通过范域名然后自己用程序来进行判断和重定向也是一种解决办法,不过性能要差一些。

    谢谢你的祝福,欢迎多交流。

  8. Steven says:

    Michael您好:),有几天没来你这里了.:)今天上来好像没什么文章更新吗.上次的问题我原来想自己架一台DNS服务器,用BIND的方法来实现,但后来考虑BOSS的意思:”要让马跑的快,不想让马在吃草”的原则.我现在采用www.dnspod.com的方法解决电信与网通.至于区域,我通过泛域名来解析实现.:)
    目前又碰到一个问题,现在电信与网通的服务器都是独立的,但数据要保持同步,你认为有什么好的办法?提供提供指导性意见:)

  9. Michael says:

    运营商之间数据同步,甚至简单的跨机房数据同步都是比较不好处理的,主要是速度问题,对于频繁更新的数据来说,很难处理,一般都只能牺牲性能和速度,不同节点的应用都访问同一个相对速度较快的数据源,中间可以使用直接的tcp连接访问数据库,也可以使用基于webservice或者rpc的方式访问数据接口。
    对于这个问题,我也就只能知道这么多了,希望能有点帮助

  10. Steven says:

    Thank Michael:)

  11. lgs says:

    安装ripe-dbase-client-v3.tar.gz,在运行whois3时出现错误提示whois3:error 2 getting server address ,这是什么原因?怎么解决?在此先谢谢站长提供的资料

  12. Michael says:

    [Comment ID #9379 Will Be Quoted Here]
    可以检查一下本机上的dns配置是否正常,dig看看。
    别的也没有什么特别的建议了:)

  13. see says:

    runescape money
    [url=http://www.gamelee.com/rs2-gold-1.html]runescape money[/url]

  14. dzq says:

    Michael,想实现电子商务网站,其中有blog、bbs模块,并且每个入住的公司都有一个单独的域名。格式为:

    http://www.domain.com
    bbs.domain.com
    blog.domain.com

    公司1.domain.com
    公司2.domain.com
    ……….
    公司600.domain.com

    其中blog,bbs可以用虚拟主机实现,请问:公司n.domain.com怎么实现呢?类似www.3158.com这种方式。

    谢谢!

  15. zdx3578 says:

    我们网站现在就是网通电信双线路,可以试试在电信和网通分别解析域名试试,当然网站首页也有ip连接可以试试。

  16. 小火 says:

    我想请问具体从此文件(例如cnc)中获取路由表的命令是如何的?

  17. Michael says:

    [Comment ID #28672 Will Be Quoted Here]

    获取路由表? 我没有尝试过。

  18. CDN says:

    这个文章楼主好像是很久前写的了,不知道现在是否还能work,不过感觉还是不错。

  19. 三峡游船 says:

    仅仅是在Linux么?

    这文章很老了,现在应该还可以用不?

  20. Michael says:

    [Comment ID #31700 Will Be Quoted Here]

    这还真不知道了,等你验证 🙂

  21. 私家侦探 says:

    APNIC是管理亚太地区IP地址分配的机构

  22. Pingback: public relations job
  23. Amazing tһings here. I’m very glaԀ to look your artiϲle.
    Thanks ѕo much and I’m taking a look forward to ⅽontact you.
    Will you please drop me a e-mail?
    my site : Getting Ƭhe Best Encryption Sоftware & 10 Ways How To
    Encrypt A Paѕsword For Fгeeing Will Help You Reіnvent Yourself

  24. Yukiko says:

    То есть, предъявить неоспоримые факты, подтвержденные документально.

  25. Hello there! I know this is kind of off topic but
    I was wondering which blog platform are you using for
    this site? I’m getting tired of WordPress because I’ve had issues with hackers and I’m looking at options for another
    platform. I would be great if you could point me in the direction of a good platform.

  26. minecraft says:

    What a stuff of un-ambiguity and preserveness of valuable experience on the
    topic of unexpected emotions.

  27. minecraft says:

    I am not sure where you’re getting your information, but great topic.
    I needs to spend some time learning more or understanding more.
    Thanks for excellent info I was looking for this information for my mission.

  28. minecraft says:

    Appreciate the recommendation. Let me try it out.

  29. minecraft says:

    Awesome! Its really remarkable piece of writing, I have got much clear idea
    on the topic of from this piece of writing.

  30. Do you mind if I quote a couple of your posts as long as I provide
    credit and sources back to your webpage? My website is in the very
    same niche as yours and my users would definitely benefit
    from a lot of the information you present here.
    Please let me know if this ok with you. Thanks a
    lot!

  31. was obtained by simple but large quoins or projecting brick courses
    on the corners with the building. The Cathedral at Plaza de la Seu (near to
    subway Jaume I) was manufactured from 1317 till 1441.

    The architects were a father and son team – Giovanni and Bartolomeo Bon, who also, mind you, done the
    Doge’s Palace.

  32. This piece of writing is truly a pleasant one it helps
    new the web people, who are wishing for blogging.

  33. Coconut Oil says:

    I always spent my half an hour to read this webpage’s posts every day along with a mug of coffee.

  34. Coconut Oil says:

    It’s enormous that you are getting ideas from this paragraph as
    well as from our discussion made at this place.

  35. Coconut Oil says:

    I’m no longer positive the place you are getting your information, however good topic.
    I needs to spend some time studying more or working out more.
    Thanks for fantastic info I used to be in search of this info
    for my mission.

  36. It’s really a cool and helpful piece of information. I’m
    happy that you shared this helpful info with us.
    Please keep us up to date like this. Thank you for sharing.

  37. Admiring the time and effort you put into your blog and
    in depth information you present. It’s good to come across a blog every
    once in a while that isn’t the same old rehashed information. Fantastic read!

    I’ve bookmarked your site and I’m adding your RSS feeds to
    my Google account.

  38. Thanks for sharing your thoughts on What Equipment is Needed for Sling TV.
    Regards

  39. Sling TV says:

    What’s up, just wanted to mention, I enjoyed this post.
    It was funny. Keep on posting!

  40. Sweet blog! I found it while browsing on Yahoo News. Do you
    have any tips on how to get listed in Yahoo News? I’ve been trying for a while but I never seem to
    get there! Thanks

  41. I am regular visitor, how are you everybody?

    This article posted at this site is genuinely nice.

  42. Hello, I think your site could possibly be having web browser compatibility problems.
    When I take a look at your blog in Safari, it looks fine however, if opening in Internet
    Explorer, it has some overlapping issues. I merely wanted to
    give you a quick heads up! Aside from that, great website!

  43. Hey I know this is off topic but I was wondering if
    you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates.

    I’ve been looking for a plug-in like this for quite some time and was hoping
    maybe you would have some experience with something like this.

    Please let me know if you run into anything.
    I truly enjoy reading your blog and I look forward to
    your new updates.

  44. Pingback: career coaching
  45. After I initially left a comment I appear to have clicked the -Notify
    me when new comments are added- checkbox and from now on each time a comment is added
    I receive four emails with the exact same comment. Perhaps there is
    a way you can remove me from that service? Kudos!

  46. Gone include the times when people would queue at the casino doors to savor
    the slot games that have been one of the most preferred
    modes of entertainment. If memory is not adequate then your graphics along with the rest of your gaming experience will run slowly or may shut down. A variety of wedding games are for sale to online for free where you are able to
    you must do everything from plan a marriage simply to walk your character
    down the aisle and marry the man of her dreams – In the overall game of
    “Love Wedding,” you help Lisa and Henry, who have been madly in love for three years, finally get married.

  47. This is one of many awesome reasons for the games and mostly clothes up games, this can be helping to increase your
    personality and earn it more inviting and exquisite as
    opposed to earlier one. Buying cheap diablo III gold in the most reputable online store:–the most effective service to get diablo 3 gold.
    With over 9 million lively free people and a lot
    more when compared with 800,Thousand subscribed enjoying members, Runescape is here now to stay.

  48. Thank you for the good writeup. It in fact was a amusement
    account it. Look advanced to far added agreeable from you!
    By the way, how can we communicate?

  49. I all the time used to study piece of writing in news papers but now as I am a user of net
    so from now I am using net for articles, thanks to web.

  50. Thanks for the good writeup. It in truth was once a leisure account
    it. Look advanced to more brought agreeable from you! By the way, how could we
    communicate?

  51. I am regular reader, how are you everybody? This paragraph posted at this web site is actually good.

  52. This info iѕ invaluablе. Where can I find out morе?

  53. Today, ᴡhile I was at work, my sister stole my iPad and tested to
    see if it can surviѵe a 25 foot drop, juѕt so she
    can be a youtube sensation. My apple ipad is now destгoyeⅾ and she has 83 views.
    I know this is totally off topic but I had to share it with someone!

  54. Verу good site you have here but I was curious about if you knew
    of any forums that cover the same topics ⅾіscussed in this article?
    I’d really like to ƅe a part of group ᴡhere Ӏ can get comments from other experienced pеople that share the same interest.

    If you have any suggestions, please let me know. Bless you!

  55. Ηey very nice blog!

  56. air max says:

    I simply needed to say thanks once more. I am not sure what I could possibly have handled in the absence of the tips shared by you concerning my concern. It was before a very horrifying situation in my opinion, but seeing the specialised technique you processed the issue took me to jump with happiness. I am thankful for the help and as well , have high hopes you know what a great job you were carrying out teaching the rest with the aid of a web site. Most probably you have never got to know all of us.

  57. Thank you for the auspicious writeup. It in truth was
    a leisure account it. Glance complex to far brought agreeable from you!
    However, how can we keep up a correspondence?

  58. Thanks for your personal marvelous posting!
    I genuinely enjoyed reading it, you will
    be a great author.I will be sure to bookmark your blog
    and definitely will come back from now on. I want to encourage you to ultimately
    continue your great job, have a nice holiday weekend!

  59. If you would like to improve your know-how simply keep visiting this website and be updated with the newest news update posted
    here.

  60. 欧美色情 says:

    Hello, Neat post. There is a problem together with your site in internet explorer, would
    check this? IE nonetheless is the marketplace leader and a big component to people will leave out your magnificent
    writing due to this problem.

  61. Howdy! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community
    in the same niche. Your blog provided us useful information to work on. You have done
    a marvellous job!

  62. Outstanding story indeed. We’ve been awaiting for this update.

  63. Paragraph writing is also a fun, if you be familiar with then you can write otherwise it is
    complex to write.

  64. Pingback: air max
  65. Pingback: nike huarache
  66. minecraft says:

    I must thank you for the efforts you have put in writing this site.
    I’m hoping to view the same high-grade content by you in the future as well.
    In truth, your creative writing abilities has motivated me to get my own blog now 😉

  67. Pingback: jordan 4
  68. Pingback: retro jordans
  69. minecraft says:

    Hey there, You’ve done a great job. I will definitely digg it and personally recommend to my friends.
    I’m sure they’ll be benefited from this site.

  70. minecraft says:

    I needed to thank you for this excellent read!!
    I definitely enjoyed every bit of it. I have you book marked to look
    at new stuff you post…

  71. Wow that was unusual. I just wrote an very long comment but after I clicked submit my comment didn’t
    appear. Grrrr… well I’m not writing all that over again. Anyway, just
    wanted to say fantastic blog!

  72. Pingback: yeezy shoes
  73. Its such as you learn my thoughts! You appear to know so much about this, like you wrote the book in it or something.

    I feel that you can do with some % to force
    the message home a little bit, but other than that,
    that is excellent blog. A fantastic read. I’ll definitely be back.

  74. Pingback: nike cortez
  75. jordan 4 says:

    I want to show thanks to the writer for rescuing me from this type of problem. After exploring throughout the world-wide-web and seeing tips that were not pleasant, I was thinking my entire life was gone. Being alive without the presence of solutions to the difficulties you have solved by way of your guideline is a critical case, as well as ones that could have in a negative way affected my entire career if I had not encountered the blog. Your good understanding and kindness in touching everything was vital. I don’t know what I would’ve done if I had not come across such a point like this. I am able to at this time relish my future. Thank you so much for the professional and results-oriented help. I won’t be reluctant to suggest your web sites to anybody who requires assistance on this subject matter.

  76. Pingback: moncler
  77. Pingback: curry 4
  78. Have you ever considered writing an ebook or guest authoring on other
    websites? I have a blog based on the same topics you
    discuss and would really like to have you share some stories/information. I know my visitors would enjoy your work.
    If you are even remotely interested, feel free to
    shoot me an e-mail.

  79. Sadye says:

    Hey There. I found your blog using msn. This is an extremely well written article.
    I will make sure to bookmark it and come back to read more of your useful information. Thanks for the post.
    I’ll certainly comeback.

  80. Pingback: nike air max 90
  81. Everyone loves it when individuals get together and share thoughts.
    Great site, stick with it!

  82. I think what you posted was actually very reasonable. However, what about this?
    suppose you added a little content? I ain’t saying
    your content is not good., however what if you added something that makes people want more?
    I mean 轻松获得网通、电信、铁通IP地址分配段
    | 李俊麟的平凡生活 is kinda boring.
    You could look at Yahoo’s home page and see how they create article headlines to grab
    people to click. You might add a video or a related pic
    or two to grab people excited about everything’ve written. Just my opinion, it might
    bring your posts a little livelier.

  83. What’s up, I log on to your blog on a regular basis.
    Your writing style is awesome, keep it up!

  84. Pingback: kd 11 shoes
  85. minecraft says:

    I am extremely impressed with your writing skills and also with the layout on your weblog.
    Is this a paid theme or did you customize it yourself?
    Anyway keep up the excellent quality writing, it’s rare to see a nice blog
    like this one today.

  86. Pingback: nike huarache
  87. minecraft says:

    I know this if off topic but I’m looking into starting my own weblog and was
    wondering what all is required to get set up?
    I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very internet smart so I’m not 100% certain. Any suggestions or advice would be greatly appreciated.
    Thank you

  88. Pingback: kobe sneakers
  89. Pingback: irving shoes
  90. Pingback: curry 6 shoes
  91. Sokkia SET2X says:

    Paragraph writing is also a excitement, if you be
    acquainted with afterward you can write or else it is difficult
    to write.

  92. Pingback: balenciaga
  93. Awesome blog you have here but I was curious about if you knew of any forums that cover the same topics talked about in this article?
    I’d really love to be a part of group where I can get feed-back from other experienced people that share the same interest.
    If you have any recommendations, please let me know.
    Cheers!

  94. Pingback: yeezy 500
  95. 12bet says:

    Every weekend i used to go to see this website, because i wish
    for enjoyment, since this this web page conations actually good funny
    data too.

  96. m88 says:

    Wonderful blog! I found it while surfing around on Yahoo News.
    Do you have any tips on how to get listed in Yahoo
    News? I’ve been trying for a while but I never seem
    to get there! Cheers

  97. Pingback: nike react
  98. Pingback: air max 2018
  99. Pingback: reebok shoes
  100. Pingback: yeezy 500
  101. Hey there! I just wanted to ask if you ever have any
    problems with hackers? My last blog (wordpress) was hacked and I ended
    up losing a few months of hard work due to no backup.
    Do you have any solutions to stop hackers?

  102. I couldn’t refrain from commenting. Exceptionally well written!

  103. Pingback: jordan 4
  104. Pingback: yeezy boost
  105. Pingback: jordan 4
  106. Pingback: jordan shoes
  107. If you desire to grow your know-how simply keep visiting this website and be updated with the newest news update posted here.

  108. Pingback: birkin bag
  109. g says:

    Hey very nice blog!

  110. Pretty! This was a really wonderful post. Thanks for
    supplying these details.

  111. I blog frequently and I seriously thank you for your content.
    Your article has truly peaked my interest.
    I’m going to bookmark your site and keep checking for new information about once a week.
    I opted in for your Feed too.

  112. Have you ever considered creating an e-book or guest authoring
    on other websites? I have a blog based upon on the same subjects you discuss and would
    love to have you share some stories/information. I know my viewers would enjoy your work.

    If you’re even remotely interested, feel free to shoot me an e-mail.

  113. Hi there everyone, it’s my first pay a visit at this website, and post is actually fruitful in support
    of me, keep up posting these types of articles or
    reviews.

  114. Pingback: hermes belts
  115. DiNi Repair says:

    Quality posts is the important to attract the users to visit the
    site, that’s what this web site is providing.

  116. Good post. I learn something new and challenging on blogs I stumbleupon everyday.
    It’s always useful to read articles from other authors
    and use something from other web sites.

  117. 5603 says:

    Everything is very open with a precise explanation of the issues.

    It was really informative. Your site is very useful. Thank you for sharing!

  118. I was curious if you ever thought of changing the structure of your website?

    Its very well written; I love what youve got
    to say. But maybe you could a little more in the
    way of content so people could connect with it better. Youve got an awful lot of text for
    only having 1 or 2 pictures. Maybe you could
    space it out better?

  119. I just like the helpful info you supply in your articles.
    I’ll bookmark your blog and take a look at again here regularly.

    I am somewhat sure I will be informed plenty of new stuff right
    right here! Best of luck for the following!

  120. Rugby 320SG says:

    I enjoy looking through a post that will make men and women think.
    Also, many thanks for allowing for me to comment!

  121. Spot on with this write-up, I seriously feel this site needs a lot more attention. I’ll probably be returning
    to read more, thanks for the info!

  122. It’s awesome to visit this web site and reading the views of all
    mates on the topic of this piece of writing,
    while I am also eager of getting familiarity.

  123. I go to see each day some web sites and information sites to read
    posts, but this webpage offers quality based articles.

  124. I am now not certain where you are getting your info, however good topic.
    I needs to spend some time learning more or understanding more.
    Thank you for great information I was looking for this information for my mission.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image