何时使用可路由与不可路由的IP地址

据我所知,有几个“ 不可路由 ”IP范围:

  • 类保留空间10.0.0.0/8
  • B级保留空间172.16.0.0/12
  • C类保留空间192.168.0.0/16
  • E级保留研究240.0.0.0

但是我想我并没有从根本上理解“可路由”和“不可路由”之间的区别。 何时可路由期望通过不可路由,反之亦然?

您列出的这些范围在本RFC 1918 – “专用Internet的地址分配”中进行了描述

标题提供了他们的使用案例: “…为私有内联网”

所有IP地址范围在技术上都是可路由的,包括在RFC中列出的范围。 但是它们通常被称为不可路由的。 这是因为它们并不意味着可以从公共互联网进行路由或访问。 即在这些范围内没有在互联网上的路线。

他们保留给私人networking。 RFC 1918 IP范围的专用networking可以在不需要在Internet上发布这些专用networking路由的情况下到达公共互联网的方式是通过位于专用Intranet和互联网之间进行networking地址转换或NAT的路由器。 但这是另一个话题。

至于你为什么想要不可路由的地址呢? 从RFC中提取解释它。

One challenge is a concern within the community that globally unique address space will be exhausted. A separate and far more pressing concern is that the amount of routing overhead will grow beyond the capabilities of Internet Service Providers. Efforts are in progress within the community to find long term solutions to both of these problems. Meanwhile it is necessary to revisit address allocation procedures, and their impact on the Internet routing system. 

我想我会成为这一方的逆stream者。 国际海事组织(IMO)中,有太多的人在讨论完全IP地址的时候,就试图纠正人们。 RFC 1918的保留地址是从当时完全地址空间中分离出来的。 实际上,我曾经阅读过有关RFC 1918地址的每一个文档,都是指他们在全部指定的类中。 我认为将RFC 1918地址称为A类,B类等是完全可以接受的。

至于路由/不可路由的辩论,我会发布这个(直接从RFC 1918):

  Because private addresses have no global meaning, routing information about private networks shall not be propagated on inter-enterprise links, and packets with private source or destination addresses should not be forwarded across such links. Routers in networks not using private address space, especially those of Internet service providers, are expected to be configured to reject (filter out) routing information about private networks. If such a router receives such information the rejection shall not be treated as a routing protocol error. 

该描述完美而简洁地描述了RFC 1918地址的“不可路由”性质,因此,将它们称为不可路由的IMO是完全可以接受的。

我觉得花太多的时间讨论这个问题。 如果某人将RFC 1918地址空间称为A类,B类等,并将其称为不可路由,那么我完全可以。 我知道他们这样说的意思,其他人也应该如此。 即使对于networking“noob”,理解class-full寻址,RFC 1918地址空间以及CIDR也是开发networking强大理解的关键。

此外:

RFC 1918引用了这些使用CIDR和类满的术语的私有地址范围,如下例所示:

 We will refer to the first block as "24-bit block", the second as "20-bit block", and to the third as "16-bit" block. Note that (in pre-CIDR notation) the first block is nothing but a single class A network number, while the second block is a set of 16 contiguous class B network numbers, and third block is a set of 256 contiguous class C network numbers. 

 If a suitable subnetting scheme can be designed and is supported by the equipment concerned, it is advisable to use the 24-bit block (class A network) of private address space and make an addressing plan with a good growth path. If subnetting is a problem, the 16-bit block (class C networks), or the 20-bit block (class B networks) of private address space can be used. 

在RFC 1918中,我没有发现比其他的术语更好的陈述,也许如果RFC 1918对这两个术语的用法不那么模棱两可,那就更好了,但事实就是如此。 我唯一要指出的是,我认为当我们引用这些IP地址范围时,当他们使用“class”或“class-full”这些术语时,我们应该停止让人头痛。 如果一个人理解ip地址,那么当他们在讨论中或者在文献/文档中遇到任何一个(或两个)时,他们理解这两个术语的用法。 对于刚学习ip地址的人来说,我认为对class-full寻址有一个很好的理解,对于理解ip寻址有一个很大的帮助,并为理解无类寻址奠定了基础。

私有IPv4地址空间是可路由的,公司正在将它们用于内部networking。 您可以使用OSPF,BGP等路由协议。 有时候,人们会公开地(BGP)公布它们。

所有现代设备都使用CIDR。 即使MS-DOS支持CIDR。 networking类和术语已经过时。 应该考虑考古的原因。

私有IPv4地址空间和公共私有地址空间之间唯一的区别在于私有IPv4地址空间在互联网上并不是唯一的,它们打算在内部使用。 但是这并不能阻止你与邻居AS达成协议,而是在你和邻居之间使用它们。 在这种情况下,“内部”意味着你们两个之间。 是的,这是不好的做法,但这是可能的。