오픈스택 네트워크 qos

| 2021년 3월 30일 | 0 Comments

오픈스택에 네트워크 프로젝트인 neutron에서 룰을 만들어 대역폭관련 qos 설정하여 운영할수 있습니다.

대역폭 설정은 port, floating ip , 네트워크에 할당 가능하며 이번에는 qos 설정 부분과 대역폭 policy, rule 생성하여 fixed ip 포트에 적용까지 해보겠습니다.

테스트 버전은 neutron 12.1.0 버전 입니다.

 

  • controller 노드 설정

    # vi /etc/neutron/neutron.conf
    [DEFAULT]
    ..
    ..
    service_plugins = router,neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2,metering,qos
    ..
    ..

    # vi /etc/neutron/plugins/ml2/ml2_conf.ini
    [ml2]
    ..
    ..
    extension_drivers = port_security,qos
    ..
    ..

    # service neutron-server restart

    # diff /etc/neutron/policy.json /etc/neutron/policy.json_ori
    190,192c190,192
    < “create_policy”: “rule:regular_user”,
    < “update_policy”: “rule:regular_user”,
    < “delete_policy”: “rule:regular_user”,

    > “create_policy”: “rule:admin_only”,
    > “update_policy”: “rule:admin_only”,
    > “delete_policy”: “rule:admin_only”,
    194,196c194,196
    < “create_policy_bandwidth_limit_rule”: “rule:regular_user”,
    < “delete_policy_bandwidth_limit_rule”: “rule:regular_user”,
    < “update_policy_bandwidth_limit_rule”: “rule:regular_user”,

    > “create_policy_bandwidth_limit_rule”: “rule:admin_only”,
    > “delete_policy_bandwidth_limit_rule”: “rule:admin_only”,
    > “update_policy_bandwidth_limit_rule”: “rule:admin_only”,
    203,205c203,205
    < “create_policy_minimum_bandwidth_rule”: “rule:regular_user”,
    < “delete_policy_minimum_bandwidth_rule”: “rule:regular_user”,
    < “update_policy_minimum_bandwidth_rule”: “rule:regular_user”,

    > “create_policy_minimum_bandwidth_rule”: “rule:admin_only”,
    > “delete_policy_minimum_bandwidth_rule”: “rule:admin_only”,
    > “update_policy_minimum_bandwidth_rule”: “rule:admin_only”,

  • 네트워크 노드

    # vi /etc/neutron/neutron.conf
    [DEFAULT]
    ..
    ..
    service_plugins = router,neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2,metering,qos
    ..
    ..

    # vi /etc/neutron/plugins/ml2/openvswitch_agent.ini
    [agent]
    ..
    ..
    extensions = qos
    ..
    ..

    # vi /etc/neutron/l3_agent.ini
    ..
    ..
    [agent]
    extensions = fip_qos
    ..
    ..

    # systemctl restart neutron-l3-agent.service neutron-openvswitch-agent.service

  • compute 노드 설정

    # vi /etc/neutron/plugins/ml2/openvswitch_agent.ini
    [agent]
    ..
    ..
    extensions = qos
    ..
    ..

    # vi /etc/neutron/l3_agent.ini
    ..
    ..
    [agent]
    extensions = fip_qos
    ..
    ..

    # systemctl restart neutron-l3-agent.service neutron-openvswitch-agent.service

  • policy, rule 생성

    # openstack network qos policy create bw-limiter
    +————-+————————————–+
    | Field | Value |
    +————-+————————————–+
    | description | |
    | id | 015ac1ce-421a-4db7-b17d-44acd06826a4 |
    | is_default | False |
    | name | bw-limiter |
    | project_id | f40a17398b774a85a43a16372dddfad7 |
    | rules | [] |
    | shared | False |
    +————-+————————————–+

    # openstack network qos rule create –type bandwidth-limit –max-kbps 3000 \
    > –max-burst-kbits 2400 –egress bw-limiter
    +—————-+————————————–+
    | Field | Value |
    +—————-+————————————–+
    | direction | egress |
    | id | 9cd94f75-1197-451d-a212-c70afa7ee839 |
    | max_burst_kbps | 2400 |
    | max_kbps | 3000 |
    | name | None |
    | project_id | |
    +—————-+————————————–+
    # –max-kbps 최대 대역폭을 의미 하며 단위는 kbit/s이다.

    –max-burst-kbits는 한번에 보낼수 있는 최대양이라고 한다.초당 bit 아님….

    10Mbit로 설정후 –max-burst-kbits 값을 2000~10000 조정하며 테스트 햇을때 ftp 속도 값은 차이가 없었다.

  • port에 대역폭 적용

    # neutron port-create jyh
    ..
    ..
    | fixed_ips | {“subnet_id”: “fec26664-5d54-4d6d-89bb-5a8f91ba9552”, “ip_address”: “10.6.0.6”} |
    | id | 369b52c0-1024-4e86-958b-d4ea850b5ff2 |
    ..
    ..

    # openstack server create –image ubuntu20 –flavor network –nic port-id=369b52c0-1024-4e86-958b-d4ea850b5ff2 speed-test

    # openstack port set –qos-policy bw-limiter 369b52c0-1024-4e86-958b-d4ea850b5ff2

    # openstack port show 369b52c0-1024-4e86-958b-d4ea850b5ff2
    ..
    ..
    | qos_policy_id | 015ac1ce-421a-4db7-b17d-44acd06826a4 |
    ..
    ..

Category: 가상화/클라우드

Jang Smile

About the Author ()