IP地址的分配

具体理解:在 不同的网络环境中使用不同 的IP地址、本文中只讲v4类地址。在实际应用中简单来讲两大类(不涉及保留地址的用法):公网地址、私网地址。

公网地址即在互联网上由ISP统筹分配给终端用户的一个地址,是惟一的,可以通过公网确认具体网络节点的地址。一般用在网关设备(此类设备包含防火墙、路由器等充当网关的任何设备)或服务器上。

私网地址即在局域网中或不接入互联网中的互联设备中使用的地址,每个设备地址是惟一的,在不同的独立的网络中允许重复使用这一类地址。一般用在公司内部局域网中的每台设备上,如电脑、IP电话、网络打印机、网络摄像头、网络交换机等。

IP地址由4段组成,由.分隔,类似x.x.x.x,即点分十进制记法。每个字段是一个字节,8位,最大值是255,即IPv4的地址长度为32位,共4个字节。 IP地址由两部分组成,即网络地址和主机地址。网络地址表示其属于互联网的哪一个网络,主机地址表示其属于该网络中的哪一台主机。二者是主从关系。

IP地址根据网络号和主机号来分,分为A、B、C三类及特殊地址D、E。    全0和全1的都保留不用。

A类:(1.0.0.0-126.0.0.0)(默认子网掩码:255.0.0.0或 0xFF000000)

第一个字节为网络号,后三个字节为主机号。该类IP地址的最前面为“0”,所以地址的网络号取值于1~126之间。   一般用于大型网络。

B类:(128.1.0.0-191.255.0.0)(默认子网掩码:255.255.0.0或0xFFFF0000)

前两个字节为网络号,后两个字节为主机号。该类IP地址的最前面为“10”,所以地址的网络号取值于128~191之间。一般用于中等规模网络。

C类:(192.0.1.0-223.255.255.0)(子网掩码:255.255.255.0或 0xFFFFFF00)

前三个字节为网络号,最后一个字节为主机号。该类IP地址的最前面为“110”,所以地址的网络号取值于192~223之间。 一般用于小型网络。

D类:是多播地址。该类IP地址的最前面为“1110”,所以地址的网络号取值于224~239之间。一般用于多路广播用户。

 E类:是保留地址。该类IP地址的最前面为“1111”,所以地址的网络号取值于240~255之间。

回送地址:127.0.0.1。 也是本机地址,等效于localhost或本机IP。 一般用于测试使用。

在实际应用中,我们一般根据网络环境来对地址进行分配:即公网还是私网,在公网中一般由ISP分配。私网中我们根据网络规模来确定使用A类、B类或C类的三个网络中对应的三个网段:10.0.0.0、172.16.0.0、192.186.0.0 。还涉及一组地址为microsoft windows 的APIPA( 自动专用IP寻址 )预留的169.254.0.0-169.254.255.255网段地址。

难点:IP地址分配时涉及子网掩码的设计。一般是根据局域网中涉及到的终端数来确认使用什么掩码来确定局域网中可使用的有效IP地址。

实例:1、在一个简单的不足100个终端的局域网中如何对IP地址做规划。

———-一般应考虑固定的网络设备如网关、交换机、防火墙、网络打印机、服务器等;可能变动的网络设备如PC;未来网络终端扩展等因素。所以可参考如下地址分配方案:

1、选择C类网段地址:192.168.1.0/24  可用有效地址为255个(即192.168.1.1-255)

2、网关及网络设备使用192.168.1.1-192.168.10 

3、预留192.168.1.11-192.168.1.20为备用

4、DHCP分配范围为192.168.1.21-192.168.1.200

5、192.168.1.201-192.168.1.255为临时备用地址或管理地址

以上方案基本满足常规网络需求。

发布日期:
分类:Network 标签:

31条评论

  1. Hello there. I found your blog using msn. This is an extremely well written article. I’ll be sure to bookmark it and come back to read more of your useful information. Thanks for the post. I will definitely be back. John Paker She

  2. When I originally left a comment I seem to have
    clicked on the -Notify me when new comments are added- checkbox and from now on every time a comment
    is added I receive 4 emails with the same comment.

    Perhaps there is a way you can remove me from that service?
    Thanks!

  3. Yesterday, while I was at work, my cousin stole my
    iphone and tested to see if it can survive a thirty foot drop, just so she can be a
    youtube sensation. My apple ipad is now broken and she has 83 views.
    I know this is entirely off topic but I had to share it with someone!

    delta 8 THC for sale area 52 – delta 8 THC for sale area 52

    delta 8 THC for sale area 52 – delta 8 area 52

    area 52 delta 8 THC products – area 52 delta 8 THC products

    delta 8 carts Area 52 – Area 52 Delta 8 THC

    delta 8 carts Area 52 – Area 52 Delta 8 THC

  4. I was sitting in my kitchen drinking a cup of coffee and cleaning my camera . I was really down and the rain outside didn’t help. I had just turned 78. I had lost my wife last year after a short battle with cancer. I missed her terribly. We had been married for almost 60 years. Little did I know my life was going to change.

    I was thinking about selling our home since the reason for buying such a big home was gone. It was large because my wife had several sewing machines and needed the room. It was a pre-manufactured home with about 2,000 square feet. Due to our snoring, I lived in one end of the home in a small bedroom and she had lived in the other end in the master bedroom. Around the walls were pictures of my wife that I had taken when we were younger. Almost all were her in the nude. She was a great model and very beautiful.

    I was getting up to get another cup of coffee when the doorbell rang. I don’t get visitors and even my daughters didn’t visit very often. I opened the door and there stood a beautiful young woman. She was about 5′ 4″ with long dark hair. She was wearing a halter top and I could see she had, although small, great tits. It took me several seconds to recognize she was my new next door neighbor. She and her husband had just recently moved in.

    She said I’m Jennifer your next door neighbor. I said good morning and asked her if she wanted a cup of coffee. She said that would be great and followed me into the kitchen. I noticed her looking at all the nude photos of my wife. When we sat down I told her those were pictures of my late wife. She asked if I was a photographer and I said not a professional one. I now take general pictures, usually of flowers and sunsets. We talked for a little while about various subject. She finally said the reason she came over was to see if she could use my phone. They were trying get a phone of their own installed. I handed her my cell phone. I went to get us more coffee as I heard her talking. I heard her say that was more than they could afford. As I came back I could see tears in her eyes. As I handed her a tissue she said they were having financial problems. She got up to go and thanked me for the coffee. As I walked her out she stopped to look at my wife’s pictures. Before I could stop my mouth I said I had a lot more in my side of the house. She smiled and said she would like to see them sometime. She walked out and I had a view of the beautiful tight ass. I thought to myself that her husband was very lucky.

  5. Someone essentially assist to make significantly posts I might state.

    That is the very first time I frequented your web page and up to now?

    I surprised with the analysis you made to create this
    actual publish amazing. Magnificent job!

    Thank you. Good stuff!

    Superb data, Many thanks!

  6. It is perfect time to make some plans for the future and it is time to be happy.
    I’ve read this post and if I could I desire to
    suggest you some interesting things or advice. Perhaps you
    can write next articles referring to this article.
    I wish to read even more things about it!

  7. I like the helpful information you provide in your articles.

    I will bookmark your weblog and check again here frequently.
    I’m quite certain I’ll learn many new stuff right here!
    Best of luck for the next!

  8. Have you ever thought about including a little bit more than just your articles?
    I mean, what you say is fundamental and everything. However
    think of if you added some great visuals or videos to give your posts more, “pop”!
    Your content is excellent but with pics and clips, this blog
    could certainly be one of the best in its
    niche. Fantastic blog!

    My web site :: CBD oil for dogs

  9. Useful information. Fortunate me I discovered your site unintentionally, and I am stunned why this accident did not happened in advance! I bookmarked it. Elisha Colman Luebke

  10. Every weekend i used to go to see this site, for the reason that i wish for enjoyment, since this this site conations genuinely good funny stuff too. Ginny Quentin Warms

  11. As I website possessor I believe the content matter here is rattling great , appreciate it for your hard work. You should keep it up forever! Best of luck. Kelsey Giusto Radferd

  12. I needed to post you a very little remark to thank you so much the moment again about the splendid secrets you have contributed in this article. It’s really pretty open-handed with you in giving freely what exactly a lot of people might have supplied for an ebook to help with making some profit for themselves, primarily considering that you might well have tried it in the event you desired. These things additionally worked to provide a good way to know that most people have the same fervor similar to mine to know the truth good deal more with regard to this condition. I’m certain there are numerous more enjoyable occasions ahead for many who browse through your site.

  13. Having read this I believed it was rather enlightening. I appreciate you taking the time and effort to put this informative article together. I once again find myself spending a lot of time both reading and leaving comments. But so what, it was still worth it! Amalea Base Chalmers

  14. Thank you for doing this. Reading is the best distraction from such a scary reality. Looking forward to a weekend in a fictional world. Karina Willis Sharron

  15. You have made some decent points there. I checked on the web to find out more about the issue and found most individuals will go along with your views on this website. Crista Carmine Osyth

  16. I was excited to find this page. I need to to thank you for ones time due to this fantastic read!! I definitely appreciated every little bit of it and I have you bookmarked to look at new information in your web site. Jorie Garrott Puri

  17. I would like to get across my gratitude for your kindness supporting folks who need help with this niche. Your real dedication to passing the message all around has been exceedingly good and has in every case helped guys like me to get to their targets. The warm and friendly tutorial entails a whole lot a person like me and additionally to my office workers. Regards; from everyone of us. Francoise Kingsly Abdulla

  18. Right here is the right site for anyone who wants to find out about this topic. You certainly put a brand new spin on a topic which has been written about for decades. Marley Barn Nichani

  19. APIPA

    在提供有DHCP服务器的网络上计算机的IP地址是APIPA地址,就意味着该计算机无法联系上DHCP服务器。该计算机可能没有正确接入网络或是DHCP服务器掉线。

    注意APIPA地址永远不会有默认网关,因为APIPA设计为只在单一子网上工作。

    使用APIPA IP地址的计算机会定期尝试与DHCP服务器联系,以免DHCP服务器在客户端计算机启动后才联机上线。

发表评论

您的电子邮箱地址不会被公开。