« CCIE info update: new info about CCIE written exam: | main | Coffee break: »

February 13, 2005

CCIE Study memo: SNMPv3

Japanese follows English

In the cramsession boards, there was a comment about SNMPv3. I am not comfonfident about this subject, either.

So I quickly review the basic feastures of SNMPv3. I didn't think that SNMPv3 was being used that much, though. And I never heard that it was getting popular.

If anyone out there reading this blog knows about the current status of SNMPv3 and thinks "R u idiot? SNMPv3 is now all over the place " pls correct me. I honestly don't know much about it now.

Anyway I'll review it for just in case.

The biggest enhancement made on SNMPv3 is of course:

the security feature

As many should arelady know, SNMP is an industry standard designed to facilitate the exchange of management information between various network devices of multiple vendors.

For those can read Japanese, pls refer to Gene-san's network tutorials for SNMP basic.

For those read English, This may be useful to review SNMP basics.

The problem with SNMPv1 and SNMPv2 is its community string, I think.

The term "community string" was pretty confusing to me at first because I was not sure how it was used.

But simply put it, it is just a password.

It is a password used by SNMP managers (usually an application on the server like Openview of HP) and agents (deviced manged by an application like routers, switches and so forth) to communicate each other.

There is a password for Read-Only(RO) access and Read-Write(RW) access. And default password is usually "public" for RO and "private" for RW.

Often people won't even change this default password. That's is one problem. Someone could actually change your rouer's configuration!

The other problem is those passwords called "community strings" are sent over the network as plain texts. The community string is encoded in SNMP messages.

So they can be caputured and stolen easily.

Here is SNMP version 3 comes into the picture.

In SNMPv3 you can choose from three different security modes.

1.No authentication / No privacy
->No security
2.Authentication / No privacy
->message is authenticated
3.Authentication / Privacy
->message is authenticated and encrypted.

It seems there is no combination of No athenticatin / Privacy.

So the key functions for the SNMPv3 feature are:

1. Authentication
2. Encryption

I will look at each one of the three security modes.

1. No authentication / No privacy

There is no security in place with this mode.
In fact, manager has to know the agent's engine ID and also has to insert valid username into its messages.

What is engine id and username?

Engine ID is a new concept introduced from SNMPv3 and it is a unique identifier for SNMP entity. It can be configured by administrators or it is configured by default on some equipment.

To configure engineID on cisco routers, the following command can be used.

Router#(config)snmp-server engineID local [engineID]

But this engineID can be obtained automatically from the agents. So the use of engineID itself will not provide any security feature.

As for username, it is pretty much the same as any user ID authentication. You have to have a valid username to receive/retrieve information from SNMP agents. You could also create a usergroup and grant access previlge to the group and then add users to it.

To configure SNMP groupname;

Router#(config)snmp-server group [groupname] v3 noauth

This tells router to use version3 without authentication, which also implies no encryption.

To add users to SNMP group

snmp-server user [username] [groupname] v3

This is it.

Even if you configure username, it will be sent over the network as clear texts and won't be secure at all.

So in this No authentication / No privary mode, there will be no security feature.

Hmm. I've been writing a lot and my wrist is getting sore. I will continue with Authentication/No privacy mode at my next entry.

I will be going onto a biz trip this week so I probably won't be able to update the blog for a while...

SNMP related usefull links.

SNMP Basics:
Network Tutorial by a CCIE holder Gene-san(japanese)
SNMP articles in @IT (Japanese)

(English)

SNMPv3 related specs and RFCs(English)
http://www.snmp.com/snmpv3/
http://www.snmplink.org/SNMPv3.html

SNMPv3 at cisco web(English)
http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120t/120t3/snmp3.htm
http://www.cisco.com/warp/public/759/ipj_1-3/ipj_1-3_snmpv3.html

http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/ffun_c/fcfprt3/fcf014.htm

SNMP at protocol dictionary(English)
http://www.javvin.com/protocolSNMPv3.html

ちょっと こっから日本語

まず第一に
トップページにcyber volunteer linkをつけたました。皆さんでクリックしましょうー

さて、このサイトを始めてから丁度2週間ほどになるんですが、日本の方からのアクセスがやはり9割を占めるみたいです(読みずらいところにきて頂いて、本当に有難うございます)。ちょっと実験的なのですが、来ている方のほとんどが日本の方であれば、時間の許す限り日本語でも書いてみよっかと思います。

この点については、Geneさんのご協力もいただいて読者の皆さんの意見も聞いてみたいと思っています。それについては今準備中ですー。

英語を読む練習したい方は、一度日本語で読んで、英語版を読むと「俺けっこう英語読めるジャーん」となる 

・・・かもしれません。

まぁ私も成人してから英語を本気で学んだ口なので、かなり間違いはあると思いますが、完璧な英語は目指していませんので、そこは指摘せず見逃してやってください。というか一緒に勉強させてくださいね。

よくGroup StudyとかForumで発言しているエンジニアの英語を見ると、文法的に滅茶苦茶なものも多いんです。本当にシャイで控えめな日本人は、英語で発信しないことで損していると思います(そこがまた謙虚さという日本人の美徳からきているので一概に批判ばかりできないのが悩ましいんですが)。

でもホントにエンジニアなんか多くがアジア系(日本人は少ないけど)とか中東系とかもうNonネイティブばっかですから、基本的に文法的に間違った英語を理解してコミュニケーション取れないと英語のサイバースペースでは戦えないのです(別に誰も戦おうなんていってないって?)

話が超ズレました。


ここからが今日の本題です:
SNMPv3についての問題がCCIE筆記で出るというコメントがあって、僕も確かにSNMPv3については全然勉強してなかったんで、これを良い機会にとSNMPv3の機能について軽くまとめてみました。

ただSNMPv3なんてほとんど普及していないと思ってるんですが・・・違うのかな?

「アホかお前は?もうメチャメチャ普及してるでー」という場合は教えてください。より一所懸命勉強しまっす。

SNMPv3での変更点は、一言で言えば、

セキュリティの強化

ですよね

多分知ってる人がほとんどと思うんですけど、SNMPv1,2ではマネージャー(管理アプリ)とエージェント(監視される側・ルータとか)の間で装置情報をやりとりしたりします。知らない方で日本語解説が欲しい方はGeneさんの解説読んでください(すごく分かり易いです)。

SNMPではマネージャ(管理用のアプリですね。Openviewとか)とエージェント(管理される側の機器ですね)に分かれます。

でこの場合にエージェント側でマネージャーからの要求が正しいことをどのように確認しているかなんですが、通常はマネージャーのIPアドレスとCommunity Stringという事前に設定した文字列を使用します。

community stringとかいってわかりにくいけど、っていうか私は最初全然意味わかんなかったんですが、まぁ言ってみればSNMP情報(MIB)にアクセスするためのパスワードと同一と言って良いでしょう。

でたとえばマネージャ側がエージェントにアクセスするときにこのcommunity string = passwordを使うわけですね。

当然マネージャから送るSNMPパケットにはこのcommunity stringが含まれます

ところがこのパケット、クリアテキストで送られちゃいます。ってことはちょっとフリーのキャプチャソフトでも使えば簡単に取得して悪用されちゃう可能性があるわけです。ぜんぜんsecureじゃないですよね。

というわけでSNMPv3が出てきたわけです。

でやっとSNMPv3の話ができるわけですが、
SNMPv3では三つのセキュリティモードが選択できるようになっています。

1.非認証・非暗号化
2.認証・非暗号化
3.認証・暗号化
非認証・暗号化って組み合わせはないようです。

ポイントはこの二つの機能ですね。

1.認証
2.暗号化

先にあげた三つのパターンそれぞれの機能について概要を見てみます。

1.非認証・非暗号化
どちらの機能も使いません。
ただし、SNMPv3では二つの項目がデフォルトで入るようになっています。
-> Engine ID
-> username

Engine IDというのはSNMPv3で導入された概念で、SNMPv3のエージェントを識別する固有の番号です。マネージャーは情報を問い合わせる相手のエージェントが持つEngine IDと同じものをRequestメッセージに含める必要があります。あとuernameも同様ですね。

それでCiscoルータでEngine IDを設定するコマンドは

Router#(config)snmp-server engineID local [engineID]

です。

でもEnginer IDはエージェントに問い合わせをすれば正しいEngineID(例えば上の例で設定したIDなど)を応答するようになっています。だからこれ自体はセキュリティにはならないんですよね。

Usernameの方は一般的なユーザーIDと仕組みは同様です。グループを作成してそのグループにアクセス権を付与し、各ユーザーを追加する、という形式もとれます。マネージャー側はデバイス側に設定されたユーザーIDを使ってアクセスする必要があります。

これもコンフィグとしては

Router#(config)snmp-server group [groupname] v3 noauth

グループの名前を指定します。SNMP version3を使用することを明示的に指定、でもauthenticationを使わないという意味です。よってencryptionもなしです。

このグループにユーザーを追加するには

snmp-server user [username] [groupname] v3

これでOKです。

でもこれもusernameが暗号化されるわけではなく普通のテキストで流れてしまうので、簡単にキャプチャされてしまいます。

というわけで、非認証・非暗号化ではセキュリティが全然確保されませんよーという説明でした。

ってここまで書いたらすっげー長くなってる・・・。時間使い過ぎ。

認証・非暗号化について以降はまた次回書きます。

日本語・英語併記より言語別エントリにした方が良いかなぁと思いながらとりあえず同じエントリに入れてみました。

一応自分なりに多くの資料にあたって調べてるつもりなんですが、上記の解説に間違いがありそうだったら指摘してくださいねー。私も勉強中なので。
コメントは日本語でも英語でもどっちでも好きな方で。

今週は忙しくなる予定でちょっと更新滞るかもしれません・・・そろそろ本格的にCCIE筆記対策に時間使わないとまずいです。


SNMP関連お役立ちサイト
Geneさんの解説(japanese)

SNMP articles in @IT (Japanese)


http://www.dpstele.com/layers/l2/snmp_l2_tut_part1.html
(English)
SNMPv3 related specs and RFCs(English)
http://www.snmp.com/snmpv3/
http://www.snmplink.org/SNMPv3.html

SNMPv3 at cisco web(English)
http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120t/120t3/snmp3.htm
http://www.cisco.com/warp/public/759/ipj_1-3/ipj_1-3_snmpv3.html


http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/ffun_c/fcfprt3/fcf014.htm

SNMP at protocol dictionary(English)
http://www.javvin.com/protocolSNMPv3.html


author aglogin : February 13, 2005 10:33 PM

post a comment

The Cisco Web document you reference [ http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120t/120t3/snmp3.htm ] is really out of date (it was last updated 2000 March 7). Users might want to see the 12.2 Configuration Guide instead:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/ffun_c/fcfprt3/fcf014.htm

author Liberty : March 26, 2005 12:18 PM

Welcome and thank you very much for pointing it out.

I added the link to the list.

Are u pursuing CCIE as well?

author AG : March 27, 2005 11:56 PM

comment




Do you want to save?