In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Why to use namespace packaging router, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
Today we discuss why we want to use namespace to encapsulate router.
We need to discuss a deep question: why not just configure Gateway IP on tape17162c5-00 and tapd568ba1a-74, but instead introduce a namespace and configure Gateway IP in namespace?
First of all, consider another question: if you do not use namespace, directly configure Gareway IP to tape17162c5-00 and tapd568ba1a-74, can you connect subnet_172_16_100_0 and subnet_172_16_101_0?
The answer is yes, as long as a route similar to the following is configured on the control node.
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.100.0 * 255.255.255.0 U 00 tapd568ba1a-74
172.16.101.0 * 255.255.255.0 U 00 tape17162c5-00
Since you don't need namespace to route, why add a layer of namespace to add complexity? The fundamental reason is: in order to support network overlap.
In the cloud environment, tenants can create networks according to their own plans, and the networks of different tenants may overlap. By putting the routing function into namespace, you can isolate the networks of different tenants, thus supporting network overlap.
The following is further explained by examples.
Tenant A vlan100 subnet Amuri 1: 10.10.1.0 take 24 {"start": "10.10.1.1", "end": "10.10.1.254"}
Tenant A vlan101 subnet A Murray 2: 10.10.2.0 Universe 24 {"start": "10.10.2.1", "end": "10.10.2.254"}
Tenant B vlan102 subnet Bmuri 1: 10.10.1.0 take 24 {"start": "10.10.1.1", "end": "10.10.1.254"}
Tenant B vlan103 subnet Bmuri 2: 10.10.2.0 shock 24 {"start": "10.10.2.1", "end": "10.10.2.254"}
Two tenants define exactly the same two subnet and the network completely overlaps.
Scenarios that do not use namespace
If you do not use namespace:
Its characteristic is that the gateway IP is configured on the TAP interface. Because there is no namespace isolation, route entries for both router_100_101 and router_102_103 can only be recorded in the routing table of the control node operating system (root namespace), as follows:
Destination Gateway Genmask Flags Metric Ref Use Iface
10.10.1.0 * 255.255.255.0 U 000 tap1
10.10.2.0 * 255.255.255.0 U 0 0 tap2
10.10.1.0 * 255.255.255.0 U 000 tap3
10.10.2.0 * 255.255.255.0 U 0 0 tap4
Such a routing table does not work. According to the principle of routing table first matching, packets of Tenant B are always mistakenly routed by router of Tenant A. For example, there are packets on vlan102 to be sent to vlan103. When a route is selected, the second entry in the routing table is matched, and the resulting data is incorrectly sent to vlan101.
Scenarios using namespace
If you use namespace:
It is characterized in that the gateway IP is configured on the veth interface in the namespace. Each namespace has its own routing table.
The routing table of router_100_101 is as follows:
Destination Gateway Genmask Flags Metric Ref Use Iface
10.10.1.0 * 255.255.255.0 U 000 qr-1
10.10.2.0 * 255.255.255.0 U 0 0 qr-2
The routing table of router_102_103 is as follows:
Destination Gateway Genmask Flags Metric Ref Use Iface
10.10.1.0 * 255.255.255.0 U 000 qr-3
10.10.2.0 * 255.255.255.0 U 0 0 qr-4
Such a routing table works.
For example, there are packets on vlan102 to be sent to vlan103. When selecting a route, the routing table of router_102_103 is checked to match the second entry, and the data is correctly sent to vlan103 through qr-4.
Similarly, when there is a packet on vlan100 to be sent to vlan101, it matches the second entry in the router_100_101 routing table, and the data is correctly sent to vlan101 through qr-2.
It can be seen that namespace makes each router have its own routing table and does not conflict with other router, so it can well support network overlap.
Well, now we've figured out how subnet communicates within Neutron.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.