OpenStack Networking により、ネットワーク、サブネット、ポートなどのネットワークオブジェクトを作成、管理でき、これらのネットワークオブジェクトは他の OpenStack サービスも利用できます。プラグインにより様々なネットワーク装置やネットワークソフトウェアを収容することができ、 自由度のある OpenStack アーキテクチャーやデプロイメントが実現できます。
Networking サービス、コード名 neutron、は、ユーザーがクラウドにおけるネットワーク接続性やアドレス割り当てを定義できる API を提供します。Networking サービスを使うと、オペレーターはクラウドネットワークを支えるネットワーク技術として様々な技術を活用できます。 Networking サービスは、 L3 転送や NAT から負荷分散、境界 ファイアウォール (perimeter firewall)、 仮想プライベートネットワーク (VPN) などまで様々なネットワークサービスを設定、管理するための API も提供しています。
以下のコンポーネントがあります。
OpenStack Networking API は、レイヤー 2 ネットワークと IP アドレス管理 (IPAM) をサポートしています。また、レイヤー 3 ルーター用の API 拡張もサポートしており、これによりレイヤー 2 ネットワーク間のルーティング、および外部ネットワークへのゲートウェイが提供されます。 OpenStack Networking に対応するプラグインは増え続けており、ルーター、スイッチ、仮想スイッチ、SDN コントローラーなどの様々な製品やオープンソースのネットワーク技術で相互運用性が実現されています。
ポートの接続と抜去、ネットワークとサブネットの作成、IP アドレスの割り当てを行います。選択したプラグインは、そのクラウドで使用されるベンダーや技術により異なります。大事なのは、同時には 1 つのプラグインしか使用できないことです。
API 操作を完了するためにエージェント間でやり取りされる RPC 要求を受信し宛先に届けます。 ML2 プラグインで Open vSwitch や Linux bridge の ML2 メカニズムドライバーを使う場合、 neutron サーバーと各ハイパーバイザー上で動作する neutron エージェント間の RPC にメッセージキューが使用されます。
様々なネットワークトポロジーを作るには、ネットワークやサブネットの作成、設定を行い、Compute などの他の OpenStack サービスに仮想デバイスをこれらのネットワークのポートに接続するように指示します。 OpenStack Networking の主要な利用者は OpenStack Compute で、 Networking を使ってインスタンスに対する接続性を提供します。特に、 OpenStack Networking では、各プロジェクトは複数のプライベートネットワークを所有でき、プロジェクト自身の IP アドレス割り当てスキームを使うことができます。他のプロジェクトが使用する IP アドレスと重複する IP アドレスも使用できます。プロジェクトネットワークとプロバイダーネットワークという 2 種類のネットワークがあります。ネットワーク作成時に指定すれば、どちらのネットワークもプロジェクト間で共有させることができます。
Provider networks offer layer-2 connectivity to instances with optional support for DHCP and metadata services. These networks connect, or map, to existing layer-2 networks in the data center, typically using VLAN (802.1q) tagging to identify and separate them.
Provider networks generally offer simplicity, performance, and reliability
at the cost of flexibility. By default only administrators can create or
update provider networks because they require configuration of physical
network infrastructure. It is possible to change the user who is allowed to
create or update provider networks with the following parameters of
policy.json
:
create_network:provider:physical_network
update_network:provider:physical_network
警告
The creation and modification of provider networks enables use of physical network resources, such as VLAN-s. Enable these changes only for trusted tenants.
Also, provider networks only handle layer-2 connectivity for instances, thus lacking support for features such as routers and floating IP addresses.
In many cases, operators who are already familiar with virtual networking architectures that rely on physical network infrastructure for layer-2, layer-3, or other services can seamlessly deploy the OpenStack Networking service. In particular, provider networks appeal to operators looking to migrate from the Compute networking service (nova-network) to the OpenStack Networking service. Over time, operators can build on this minimal architecture to enable more cloud networking features.
一般には、 レイヤー 3 操作を行う OpenStack Networking のソフトウェアコンポーネントは、最も性能と信頼性に影響を与えるコンポーネントです。性能と信頼性を向上させるため、プロバイダーネットワークでは、レイヤー 3 操作を物理ネットワーク基盤に移しています。
ある特定のユースケースでは、従来の仮想化とベアメタルホストが混在する、かなり大きな物理ネットワーク基盤を使った環境に、 OpenStack 環境があります。 OpenStack 環境内で動作するアプリケーションが OpenStack 環境外のアプリケーションに直接レイヤー 2 (通常は VLAN を使用) でのアクセスが必要な場合があります。
Routed provider networks offer layer-3 connectivity to instances. These networks map to existing layer-3 networks in the data center. More specifically, the network maps to multiple layer-2 segments, each of which is essentially a provider network. Each has a router gateway attached to it which routes traffic between them and externally. The Networking service does not provide the routing.
Routed provider networks offer performance at scale that is difficult to achieve with a plain provider network at the expense of guaranteed layer-2 connectivity.
See Routed provider networks for more information.
Self-service networks primarily enable general (non-privileged) projects to manage networks without involving administrators. These networks are entirely virtual and require virtual routers to interact with provider and external networks such as the Internet. Self-service networks also usually provide DHCP and metadata services to instances.
In most cases, self-service networks use overlay protocols such as VXLAN or GRE because they can support many more networks than layer-2 segmentation using VLAN tagging (802.1q). Furthermore, VLANs typically require additional configuration of physical network infrastructure.
IPv4 self-service networks typically use private IP address ranges (RFC1918) and interact with provider networks via source NAT on virtual routers. Floating IP addresses enable access to instances from provider networks via destination NAT on virtual routers. IPv6 self-service networks always use public IP address ranges and interact with provider networks via virtual routers with static routes.
The Networking service implements routers using a layer-3 agent that typically resides at least one network node. Contrary to provider networks that connect instances to the physical network infrastructure at layer-2, self-service networks must traverse a layer-3 agent. Thus, oversubscription or failure of a layer-3 agent or network node can impact a significant quantity of self-service networks and instances using them. Consider implementing one or more high-availability features to increase redundancy and performance of self-service networks.
Users create project networks for connectivity within projects. By default, they are fully isolated and are not shared with other projects. OpenStack Networking supports the following types of network isolation and overlay technologies.
すべてのインスタンスが同じネットワークにあります。これは、ホストとも共有できます。VLAN タギングや他のネットワーク分割が行われません。
VXLAN と GRE は、オーバーレイプロトコルで、オーバーレイネットワークを作成し、コンピュートインスタンス間の通信を実現します。 トラフィックが GRE や VXLAN のプロジェクトネットワーク外と通信するには、Networking ルーターが必要です。直接接続されたプロジェクトネットワークを、インターネットなどの外部ネットワークと接続するためにも、ルーターは必要です。ルーターは Floating IP を使って外部ネットワークから直接インスタンスに接続できるようにするためにも必要です。
IP アドレスブロックと関連する設定です。サブネットは、プロジェクトネットワークとプロバイダーネットワークの両方に networking サービスが提供する元々の IPAM (IP アドレス管理) として知られています。新しいポートがネットワークに作成された際に、 IP アドレスを割り当てるのにサブネットは使用されます。
通常、エンドユーザーは任意の有効な IP アドレスでサブネットを作成でき、他に何の制約もありません。しかしながら、場合によっては、管理者やプロジェクトが、アドレスプールをあらかじめ定義し、サブネット作成時にこのプールからアドレスを自動割り当てする方がよい場面があります。
サブネットプールを使うと、どのアドレスが使用できるかは、すべてのサブネットは定義されたプール内になければいけないという制約により決まります。また、同じプールから割り当てた 2 つのサブネットでアドレスの再利用や重複はできません。
詳しい情報は サブネットプール を参照してください。
ポートは、仮想サーバーの NIC などの 1 つのデバイスを、仮想ネットワークに接続する接続点です。ポートは、そのポートで使用される MAC アドレスや IP アドレスなどの関連するネットワーク設定の表現でもあります。
Routers provide virtual layer-3 services such as routing and NAT between self-service and provider networks or among self-service networks belonging to a project. The Networking service uses a layer-3 agent to manage routers via namespaces.
Security groups provide a container for virtual firewall rules that control
ingress (inbound to instances) and egress (outbound from instances) network
traffic at the port level. Security groups use a default deny policy and
only contain rules that allow specific traffic. Each port can reference one
or more security groups in an additive fashion. The firewall driver
translates security group rules to a configuration for the underlying packet
filtering technology such as iptables
.
Each project contains a default
security group that allows all egress
traffic and denies all ingress traffic. You can change the rules in the
default
security group. If you launch an instance without specifying a
security group, the default
security group automatically applies to it.
Similarly, if you create a port without specifying a security group, the
default
security group automatically applies to it.
注釈
メタデータサービスを使用する場合、デフォルトの出力ルールを削除すると、 169.254.169.254 の TCP ポート 80 へのアクセスが拒否され、その結果インスタンスがメタデータを取得できなくなります。
Security group rules are stateful. Thus, allowing ingress TCP port 22 for secure shell automatically creates rules that allow return egress traffic and ICMP error messages involving those TCP connections.
By default, all security groups contain a series of basic (sanity) and anti-spoofing rules that perform the following actions:
allowed-address-pairs
, or valid MAC address (port or
allowed-address-pairs
) and associated EUI64 link-local IPv6 address.allowed-address-pairs
on
the port for the instance.Although non-IP traffic, security groups do not implicitly allow all ARP traffic. Separate ARP filtering rules prevent instances from using ARP to intercept traffic for another instance. You cannot disable or remove these rules.
You can disable security groups including basic and anti-spoofing rules
by setting the port attribute port_security_enabled
to False
.
OpenStack Networking サービスは拡張性があります。API 拡張は 2 つの目的で使用されます。 API に新しい機能をバージョンの変更なしに追加できます。ベンダー固有の特定の機能を追加できます。アプリケーションは、 URI /extensions
に GET を行うことで、利用可能な API 拡張の一覧を取得できます。 API 拡張はバージョン毎であることに注意してください。ある API バージョンで利用できた API 拡張は別の API バージョンでは利用できないかもしれません。
The optional DHCP service manages IP addresses for instances on provider
and self-service networks. The Networking service implements the DHCP
service using an agent that manages qdhcp
namespaces and the
dnsmasq
service.
The optional metadata service provides an API for instances to obtain metadata such as SSH keys.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.