IT関連資格の勉強記録と備忘録

Ping、拡張Ping、Telnet、policy-map、IP SLAや
ip http serverへのcopy http://IOSイメージ null: で対応する。

RTP疑似トラフィック生成

IP SLAのUDP jitterでは
UDPポートが16384等のパケットを生成するだけでRTPヘッダもRTPペイロードも付かない。
よって、分類の際にNBARで match protocol rtp audio としても認識出来ないので
match ip rtp 16384 16383で指定すること。

1. IP SLAのUDP jitterでいくつか同時実行する。

conf t
ip sla monitor 1
type jitter dest-ipaddr 相手側IP dest-port 16384 codec g711ulaw codec-interval 4
timeout 800
frequency 1
※上記の手順で2〜7くらいまで ip sla monitorを作る(dest-portは16386, 16388 ..とする)

2. 相手側で以下の設定も忘れずに

conf t
ip sla monitor responder

3. 発信側でIP SLAを実行して結果を確認

conf t
ip sla monitor schedule 1 life forever start-time now
※略
ip sla monitor schedule 7 life forever start-time now
end
sh ip sla monitor statistics 1
※略
sh ip sla monitor statistics 7

HTTPトラフィック生成

GNS3でプロジェクトを作成するときにNVRAM、仮想ディスク(flash)を保存するようにする。
以下でも対応できるが、console画面を占有してしまうので複数セッション生成できない。
copy http://HTTPサーバ側IP/ファイル名 null:

1. http server側で

conf t
ip sla monitor responder
ip http server
ip http path flash:
end
sh tech-support | redirect flash:important.txt
sh tech-support | redirect flash:not_so.txt
dir flash: ファイルサイズも確認しておく

2. http client側で

ip http client password 0 HTTPサーバ側のenableパスワード
※copy http://HTTPサーバ側IP/ファイル名 null: で使用する
ip sla monitor 8
type http operation get url http://HTTPサーバ側IP/important.txt
ip sla monitor 9
type http operation get url http://HTTPサーバ側IP/not_so.txt

3. http client側でIP SLAを実行して結果を確認

conf t
ip sla monitor schedule 8 life forever start-time now
ip sla monitor schedule 9 life forever start-time now
end
sh ip sla monitor statistics 8
sh ip sla monitor statistics 9
一見、成功(Success)しているように見えるが、パケットをキャプチャしたら
401エラーで認証が必要だったのでダウンロードは出来ていない。
どうりでRTTが小さい訳だ。
やはり、type http operation raw でやるしかないか。
ちなみに、urlの指定で http://ユーザ名:パスワード@HTTPサーバ側IP/ファイル名としても
Bad URLで弾かれてしまう。※ type ftp get の場合はこのURI表記が可能。

4. http client側でIP SLAを設定しなおす

Authorization: Basic OmNpc2Nv= の OmNpc2Nv= はBASIC認証で使用する
ユーザ名(今回は未使用)とパスワード cisco をBASE64エンコードしたもの。
一度、copy http://HTTPサーバ側IP/ファイル名 null: のパケットを
キャプチャしてみて HTTPヘッダのValueをコピーすればよい。
conf t
no ip sla monitor schedule 8 life forever start-time now
no ip sla monitor schedule 9 life forever start-time now
no ip sla monitor 8
no ip sla monitor 9

ip sla monitor 8
type http operation raw url http://HTTPサーバ側IP
http-raw-request
GET /important.txt HTTP/1.0\r\n
Authorization: Basic OmNpc2Nv=\r\n
\r\n
exit

end
conf t

ip sla monitor 9
type http operation raw url http://HTTPサーバ側IP
http-raw-request
GET /not_so.txt HTTP/1.0\r\n
Authorization: Basic OmNpc2Nv=\r\n
\r\n
exit
end

conf t
ip sla monitor schedule 8 life forever start-time now
ip sla monitor schedule 9 life forever start-time now
end
一見、失敗(Fail)しているように見えるが、パケットをキャプチャしたら
エラーもなく分割されたTCPセグメントが送信されてきていることが確認できる。
RTTも相応の時間になっている。return codeが Over threshold になっているが
気にしない。

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

管理人/副管理人のみ編集できます