0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

久しぶりにGNS3(その24:QoS Part2)

Posted at

VLAN下でのQoS

久しぶりにGNS3(その16:QoS Part1)の続き。VLAN下でのQoSにトライ。

参考URL

ネットワークトポロジーおよび前提

トポロジー.png
ルータの左側にVLAN10とVLAN20とが存在し、"Ethernet 0/0"がサブインターフェース化している。サブインターフェースごとに帯域を制限し、ここでは、VLAN10へのOutputを"2Mbps"、VLAN20へのOutputを"500Kbps"とした。

設定

ルーター

参考URLをもとに設定。関連する部分のみ記載。

ip dhcp excluded-address 192.168.10.1 192.168.10.10
ip dhcp excluded-address 192.168.20.1 192.168.20.10
ip dhcp excluded-address 172.16.0.1 172.16.0.10
!
ip dhcp pool P10
 network 192.168.10.0 255.255.255.0
 default-router 192.168.10.1 
!
ip dhcp pool P20
 network 192.168.20.0 255.255.255.0
 default-router 192.168.20.1 
!
ip dhcp pool P17
 network 172.16.0.0 255.255.255.0
 default-router 172.16.0.1 
!
!
class-map match-all CMAP20
 match vlan  20
class-map match-all CMAP10
 match vlan  10
!
policy-map PMAP10
 class CMAP10
policy-map pm10
 class class-default
  shape average 2000000   
   service-policy PMAP10
policy-map PMAP20
 class CMAP20
policy-map pm20
 class class-default
  shape average 500000   
   service-policy PMAP20
!
interface Ethernet0/0
 no ip address
!
interface Ethernet0/0.10
 encapsulation dot1Q 10
 ip address 192.168.10.1 255.255.255.0
 service-policy output pm10
!
interface Ethernet0/0.20
 encapsulation dot1Q 20
 ip address 192.168.20.1 255.255.255.0
 service-policy output pm20
!
interface Ethernet0/1
 ip address 172.16.0.1 255.255.255.0
  • DHCPサーバーの設定
  • VLANごとのQoSポリシー設定
    • VLAN10:2Mbps
    • VLAN10:500Kbps
  • サブインターフェースの設定
    • 802.1Q設定
    • VLAN設定
    • QoSポリシーの適用

スイッチ(左)

SW1Configuration.png

  • トランクポート(802.1Q)設定
  • アクセスポートおよびVLANの設定

検証

iperfを利用。

帯域制限なしのケース

サブインターフェースへの"service-policy"が適用されていないときの結果である。上図のBdog3-1からBdog1-1(VLAN10)へのiperfを実施。

iperf -c 192.168.10.11 -u -b 3M -t 20 -i 1

同じく、Bdog4-1からBdog2-1(VLAN20)へのiperfを実施。

iperf -c 192.168.20.11 -u -b 3M -t 20 -i 1

このときのiperf Server側の結果は下記となる。

<Bdog1-1:VLAN10>

iperf -s -u -i 1

途中のアウトプット省略

[  4]  0.0-20.0 sec  7.49 MBytes  3.14 Mbits/sec   0.205 ms    6/ 5350 (0.11%)
<Bdog2-1:VLAN20>

iperf -s -u -i 1

途中のアウトプット省略

[  3]  0.0-20.0 sec  7.50 MBytes  3.14 Mbits/sec   0.283 ms    3/ 5350 (0.056%)

帯域制限なし時には、VLAN10でもVLAN20でも、iperf Clientで指定した帯域3Mbps(オプション:"-b 3M")どおりの結果が得られている。

VLAN10:2Mbps, VLAN20:500Kbps

本稿で意図した帯域制限を実施したときの結果である。iperf Clientの帯域値を変化させる。それ以外のオプションは先ほどと同様。

-b 3M

<Bdog1-1:VLAN10>

[  4]  0.0-20.4 sec  4.71 MBytes  1.94 Mbits/sec   2.436 ms 1990/ 5349 (37%)
[  4] 0.00-20.40 sec  1 datagrams received out-of-order

VLAN10に帯域制限2Mbpsを指定しているため、3Mbpsを指定しても、ほぼ制限値どおりの結果が得られている。また、順番どおりに受信しなかったデータがあり(out-of-order)、制限値(2Mbps)と指定値(3Mpbs)との比相当のパケットロス((1-2/3=0.33 -> 結果では37%)が発生している。

<Bdog2-1:VLAN20>

[  3]  0.0-21.6 sec  1.25 MBytes   485 Kbits/sec   3.524 ms 4461/ 5350 (83%)

VLAN20に指定した帯域制限500Kbpsとおりの結果となっている。当然ながら、パケットロスは多い((1-0.5/3=0.83 -> 結果では83%)。

-b 2M

<Bdog1-1:VLAN10>

[  3]  0.0-20.7 sec  4.70 MBytes  1.90 Mbits/sec   7.238 ms  215/ 3567 (6%)

帯域制限値とほぼ同じ結果。

<Bdog2-1:VLAN20>

[  4]  0.0-21.6 sec  1.25 MBytes   485 Kbits/sec   4.930 ms 2678/ 3567 (75%)

こちらも、VLAN20に指定した帯域制限500Kbpsとおりの結果となっている。パケットロスの値も相当となっている((1-0.5/2=0.75 -> 75%)。

-b 500K

<Bdog1-1:VLAN10>

[  3]  0.0-20.0 sec  1.22 MBytes   512 Kbits/sec   0.775 ms    0/  871 (0%)

帯域制限値より小さい値。指定したどおりの結果、パケットロスなし。

<Bdog2-1:VLAN20>

[  4]  0.0-21.1 sec  1.22 MBytes   484 Kbits/sec   3.156 ms    0/  871 (0%)

帯域制限値とほぼ同じ結果。パケットロスなし。

-b 400K

<Bdog1-1:VLAN10>

[  4]  0.0-20.0 sec  1001 KBytes   410 Kbits/sec   0.703 ms    0/  697 (0%)

帯域制限値より小さい値。指定したどおりの結果、パケットロスなし。

<Bdog2-1:VLAN20>

[  3]  0.0-20.0 sec  1001 KBytes   410 Kbits/sec   3.237 ms    0/  697 (0%)

帯域制限値より小さい値。指定したどおりの結果、パケットロスなし。

最後に

ほぼ、期待どおりの結果がえられた。

試行錯誤中のメモ

  • サブインターフェースへの"service-policy"設定で、"input"への適用は不可
  • VLANへの"service-policy"設定不可(interface VLAN xx)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?