官术网_书友最值得收藏!

Network namespaces

OpenStack was designed with multitenancy in mind and provides users with the ability to create and manage their own compute and network resources. Neutron supports each tenant having multiple private networks, routers, firewalls, load balancers, and other networking resources. It is able to isolate many of those objects through the use of network namespaces.

A network namespace is defined as a logical copy of the network stack with its own routes, firewall rules, and network interface devices. When using the open source reference plugins and drivers, every network, router, and load balancer that is created by a user is represented by a network namespace. When network namespaces are enabled, Neutron is able to provide isolated DHCP and routing services to each network. These services allow users to create overlapping networks with other users in other projects and even other networks in the same project.

The following naming convention for network namespaces should be observed:

  • DHCP namespace: qdhcp-<network UUID>
  • Router namespace: qrouter-<router UUID>
  • Load Balancer namespace: qlbaas-<load balancer UUID>

A qdhcp namespace contains a DHCP service that provides IP addresses to instances using the DHCP protocol. In a reference implementation, dnsmasq is the process that services DHCP requests. The qdhcp namespace has an interface plugged into the virtual switch and is able to communicate with instances and other devices in the same network or subnet. A qdhcp namespace is created for every network where the associated subnet(s) have DHCP enabled.

A qrouter namespace represents a virtual router and is responsible for routing traffic to and from instances in the subnets it is connected to. Like the qdhcp namespace, the qrouter namespace is connected to one or more virtual switches depending on the configuration.

A qlbaas namespace represents a virtual load balancer and may run a service such as HAProxy that load balances traffic to instances. The qlbaas namespace is connected to a virtual switch and can communicate with instances and other devices in the same network or subnet.

Note

The leading q in the name of the network namespaces stands for Quantum, the original name for the OpenStack Networking service.

Network namespaces will only be seen on nodes running the Neutron DHCP, L3, and LBaaS agents. These services are typically configured only on controllers or dedicated network nodes. The ip netns list command can be used to list available namespaces, and commands can be executed within the namespace using the following syntax:

ip netns exec NAMESPACE_NAME <command>

Commands that can be executed in the namespace include ip, route, iptables, and more. The output of these commands corresponds to data specific to the namespace they are executed in.

For more information on network namespaces, see the man page for ip netns at http://man7.org/linux/man-pages/man8/ip-netns.8.html.

主站蜘蛛池模板: 鄢陵县| 山阳县| 新源县| 宁夏| 赞皇县| 巧家县| 永定县| 丰镇市| 莎车县| 栾川县| 墨江| 巴塘县| 华安县| 格尔木市| 安阳县| 贵南县| 广昌县| 溆浦县| 洛南县| 时尚| 新巴尔虎右旗| 平塘县| 叶城县| 临漳县| 望江县| 三台县| 玉龙| 东乌珠穆沁旗| 长泰县| 黑山县| 滦南县| 临西县| 桓仁| 邮箱| 西乡县| 镇巴县| 镇平县| 板桥市| 革吉县| 温宿县| 定安县|