DynagenでCCIEを目指す
QoS 検証環境構築例
最終更新:
it_certification
-
view
1. 履歴
- 2010/08/01 初稿
2. はじめに
- coLinuxとDynamipsを用いて、QoSの検証環境を構築する例を記します。
- 前提条件
- coLinux上にFedoraが構築されているものとします。
- バーチャルホストが設定されたApache HTTP Serverが構築されているものとします。
- Loopback Adaputerがインストールされているものとします。
- ホストOS, ゲストOSの静的なルーティングやファイアウォールの設定は完了しているものとします。
3. 構成の説明
3.1. 構成図
下記構成図の通りの仮想環境を構築します。構築方法はトップページ/手順書 ネットワーク系/DynamipsとcoLinuxの接続設定例を参考にして下さい。

Dynagenで使用するnetファイルは以下の通りになります。デバイスの値は適宜変更して下さい。
model = 3620 [localhost] [[3620]] image = C:\Program Files\Dynamips\images\c3620-j1s3-mz.123-18.bin ram = 128 [[ROUTER R1]] e0/0 = NIO_gen_eth:\Device\NPF_{<Loopback Adapter>} e0/1 = NIO_gen_eth:\Device\NPF_{<TAP Adapter>}
3.2. ルータの設定
ルータが疎通できるよう設定を投入します。設定はIPアドレスのみで、特別な設定は投入しません。
! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! no ip domain lookup ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Ethernet0/0 ip address 192.168.200.1 255.255.255.0 full-duplex ! interface Ethernet0/1 ip address 192.168.201.1 255.255.255.0 full-duplex ! interface Ethernet0/2 no ip address shutdown half-duplex ! interface Ethernet0/3 no ip address shutdown half-duplex ! ip http server ip classless ! ! no cdp run ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 login ! ! end
3.3. Apache構成
ホストOSにApacheをインストールし、ポートベースのバーチャルホストを定義します。構築方法はトップページ/手順書 サーバ系/Apache HTTP Server バーチャルホストの設定を参考にして下さい。
この検証例で実際に使用したhttpd.confの要所となる部分を以下に記載します。
この検証例で実際に使用したhttpd.confの要所となる部分を以下に記載します。
Listen 10880 Listen 10881 Listen 10882 NameVirtualHost *:10880 NameVirtualHost *:10881 NameVirtualHost *:10882 <VirtualHost *:10880> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" </VirtualHost> <VirtualHost *:10881> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs10881" </VirtualHost> <VirtualHost *:10882> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs10882" </VirtualHost>
3.4. 疎通確認
ゲストOSからホストOSのApacheに接続できる事を確認します。wgetコマンドを使用してステータスコード200が返される事を確認します。
[hoge@localhost ~]$ wget -O /dev/null http://192.168.200.100:10880/ --2010-08-01 08:52:11-- http://192.168.200.100:10880/ Connecting to 192.168.200.100:10880... connected. HTTP request sent, awaiting response... 200 OK Length: 44 [text/html] Saving to: `/dev/null' 100%[================================================>] 44 --.-K/s in 0s 2010-08-01 08:52:11 (8.59 KB/s) - `/dev/null' saved [44/44] [hoge@localhost ~]$
4. QoS 未設定時の挙動
4.1. ダウンロード速度の比較
各バーチャルホストにファイルサイズの大きいHTMLファイルを配置します。10880, 10881で待ち受けているそれぞれのバーチャルホストに対して、ゲストOSから同時にwgetコマンドを実行します。
QoSが設定されていない状態では、両方とも約12K/sでダウンロード速度に殆ど差異がない事が読み取れます。
QoSが設定されていない状態では、両方とも約12K/sでダウンロード速度に殆ど差異がない事が読み取れます。
[hoge@localhost ~]$ wget -O /dev/null http://192.168.200.100:10880/large.html --2010-08-01 06:06:40-- http://192.168.200.100:10880/large.html Connecting to 192.168.200.100:10880... connected. HTTP request sent, awaiting response... 200 OK Length: 23016000 (22M) [text/html] Saving to: `/dev/null' 1% [ ] 316,964 12.3K/s eta 24m 29s [hoge@localhost ~]$ wget -O /dev/null http://192.168.200.100:10881/large.html --2010-08-01 06:04:22-- http://192.168.200.100:10881/large.html Connecting to 192.168.200.100:10881... connected. HTTP request sent, awaiting response... 200 OK Length: 23016000 (22M) [text/html] Saving to: `/dev/null' 3% [> ] 696,844 12.0K/s eta 25m 35s
5. QoS 設定時の挙動
5.1. QoSの設定
Router R1のe0/1に対し、priority queueの設定を投入します。tcp10880はmediam queueに入れる事で優先的に送信させるように設定します。
投入するconfigは以下の通りです。
投入するconfigは以下の通りです。
priority-list 1 protocol ip high tcp 22 priority-list 1 protocol ip medium tcp 10880 interface Ethernet 0/1 priority-group 1
5.2. ダウンロード速度の比較
10880, 10881で待ち受けているそれぞれのバーチャルホストに対して、ゲストOSから同時にwgetコマンドを実行します。
10880のバーチャルホストの方が優先的にダウンロードできている様子が読み取れます。
10880のバーチャルホストの方が優先的にダウンロードできている様子が読み取れます。
[hoge@localhost ~]$ wget -O /dev/null http://192.168.200.100:10880/large.html --2010-08-01 07:30:57-- http://192.168.200.100:10880/large.html Connecting to 192.168.200.100:10880... connected. HTTP request sent, awaiting response... 200 OK Length: 23016000 (22M) [text/html] Saving to: `/dev/null' 10% [===> ] 2,339,340 21.1K/s eta 16m 2s [hoge@localhost ~]$ wget -O /dev/null http://192.168.200.100:10881/large.html --2010-08-01 07:30:50-- http://192.168.200.100:10881/large.html Connecting to 192.168.200.100:10881... connected. HTTP request sent, awaiting response... 200 OK Length: 23016000 (22M) [text/html] Saving to: `/dev/null' 3% [> ] 885,260 4.82K/s eta 52m 37s
添付ファイル