이 콘텐츠는 선택한 언어로 제공되지 않습니다.

7.6. Configure the L3 Agent


Configure the Layer 3 agent. All steps in this procedure must be performed on the server hosting OpenStack Networking, while logged in as the root user.

Procedure 7.13. Configuring the L3 Agent

  1. Configure the L3 agent to use the Identity service for authentication.
    1. Set the authentication strategy to keystone:
      # openstack-config --set /etc/neutron/metadata_agent.ini \
         DEFAULT auth_strategy keystone
      Copy to Clipboard Toggle word wrap
    2. Set the Identity service host that the L3 agent must use:
      # openstack-config --set /etc/neutron/metadata_agent.ini \
         keystone_authtoken auth_host IP
      Copy to Clipboard Toggle word wrap
      Replace IP with the IP address or host name of the server hosting the Identity service.
    3. Set the L3 agent to authenticate as the correct tenant:
      # openstack-config --set /etc/neutron/metadata_agent.ini \
         keystone_authtoken admin_tenant_name services
      Copy to Clipboard Toggle word wrap
      Replace services with the name of the tenant created for the use of OpenStack Networking. Examples in this guide use services.
    4. Set the L3 agent to authenticate using the neutron administrative user account:
      # openstack-config --set /etc/neutron/metadata_agent.ini \
         keystone_authtoken admin_user neutron
      Copy to Clipboard Toggle word wrap
    5. Set the L3 agent to use the correct neutron administrative user account password:
      # openstack-config --set /etc/neutron/metadata_agent.ini \
         keystone_authtoken admin_password PASSWORD
      Copy to Clipboard Toggle word wrap
      Replace PASSWORD with the password set when the neutron user was created.
    6. If the neutron-metadata-agent service and the nova-metadata-api service are not installed on the same server, set the address of the nova-metadata-api service:
      # openstack-config --set /etc/neutron/metadata_agent.ini \
         DEFAULT nova_metadata_ip IP
      Copy to Clipboard Toggle word wrap
      Replace IP with the IP address of the server hosting the nova-metadata-api service.
  2. Set the interface driver in the /etc/neutron/l3_agent.ini file based on the OpenStack Networking plug-in being used. Use the command the applies to the plug-in used in your environment:
    • Open vSwitch Interface Driver

      # openstack-config --set /etc/neutron/l3_agent.ini \
         DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver
      Copy to Clipboard Toggle word wrap
    • Linux Bridge Interface Driver

      # openstack-config --set /etc/neutron/l3_agent.ini \
         DEFAULT interface_driver neutron.agent.linux.interface.BridgeInterfaceDriver
      Copy to Clipboard Toggle word wrap
  3. The L3 agent connects to external networks using either an external bridge or an external provider network. When using the Open vSwitch plug-in, either approach is supported. When using the Linux Bridge plug-in, only the use of an external provider network is supported. Set up the option that is most appropriate for your environment.
    • Using an External Bridge

      Create and configure an external bridge and configure OpenStack Networking to use it. Perform these steps on each system hosting an instance of the L3 agent.
      1. Create the external bridge, br-ex:
        # ovs-vsctl add-br br-ex
        Copy to Clipboard Toggle word wrap
      2. Ensure that the br-ex device persists on reboot by creating a /etc/sysconfig/network-scripts/ifcfg-br-ex file, and adding the following lines:
        DEVICE=br-ex
        DEVICETYPE=ovs
        TYPE=OVSBridge
        ONBOOT=yes
        BOOTPROTO=none
        Copy to Clipboard Toggle word wrap
      3. Ensure that the L3 agent will use the external bridge:
        # openstack-config --set /etc/neutron/l3_agent.ini \
           DEFAULT external_network_bridge br-ex
        Copy to Clipboard Toggle word wrap
    • Using a Provider Network

      To connect the L3 agent to external networks using a provider network, you must first have created the provider network. You must also have created a subnet and router to associate with it. The unique identifier of the router is required to complete these steps.
      Set the value of the external_network_bridge configuration to be blank. This ensures that the L3 agent does not attempt to use an external bridge:
      # openstack-config --set /etc/neutron/l3_agent.ini \
         DEFAULT external_network_bridge ""
      Copy to Clipboard Toggle word wrap
  4. Start the neutron-l3-agent service and configure it to start at boot time:
    # systemctl start neutron-l3-agent.service
    # systemctl enable neutron-l3-agent.service
    Copy to Clipboard Toggle word wrap
  5. The OpenStack Networking metadata agent allows virtual machine instances to communicate with the Compute metadata service. It runs on the same hosts as the L3 agent. Start the neutron-metadata-agent service and configure it to start at boot time:
    # systemctl start neutron-metadata-agent.service
    # systemctl enable neutron-metadata-agent.service
    Copy to Clipboard Toggle word wrap
  6. The leastrouter scheduler enumerates L3 Agent router assignment, and consequently schedules the router to the L3 Agent with the fewest routers. This differs from the ChanceScheduler behavior, which randomly selects from the candidate pool of L3 Agents.
    1. Enable the leastrouter scheduler:
      # openstack-config --set /etc/neutron/neutron.conf \
         DEFAULT router_scheduler_driver neutron.scheduler.l3_agent_scheduler.LeastRoutersScheduler
      Copy to Clipboard Toggle word wrap
    2. Set up the shell to access keystone as the administrative user:
      # source ~/keystonerc_admin
      Copy to Clipboard Toggle word wrap
    3. The router is scheduled once connected to a network. Unschedule the router:
      [(keystone_admin)]# neutron l3-agent-router-remove L3_NODE_ID ROUTER_ID
      Copy to Clipboard Toggle word wrap
      Replace L3_NODE_ID with the unique identifier of the agent on which the router is currently hosted, and replace ROUTER_ID with the unique identifier of the router.
    4. Assign the router:
      [(keystone_admin)]# neutron l3-agent-router-add L3_NODE_ID ROUTER_ID
      Copy to Clipboard Toggle word wrap
      Replace L3_NODE_ID with the unique identifier of the agent on which the router is to be assigned, and replace ROUTER_ID with the unique identifier of the router.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat