Está en la página 1de 25

Tng quan v giao thc qun l mng SNMP

MC LC
Contents
MC LC.......................................................................................................................................... 1 DANH SCH HNH V V BNG BIU..................................................................................... 2 LI M U .................................................................................................................................... 3 CHNG I: TNG QUAN V GIAO THC SNMP ...................................................................... 4 1.1.SNMP l g? .................................................................................................................................. 4 1.3. u im, nhc im ca SNMP ............................................................................................ 7 1.4.1 B phn qun l (manager)................................................................................................ 7 1.4.2. Agent ................................................................................................................................. 8 1.4.3 C s thng tin qun l - MIB ............................................................................................ 9 1.4.4. M hnh giao thc SNMP ................................................................................................ 10 CHNG II: CC C TNH GIAO SNMPv2 V SNMPv3 ...................................................... 13 2.1. SNMPv2 ................................................................................................................................. 13 2.1.1 Cc c tnh c bn ca giao thc SNMPV2 ................................................................... 13 2.1.2. Cu trc bn tin SNMPv2 ............................................................................................... 13 2.1.3 C s thng tin qun l MIB trong SNMPv2. ................................................................. 16 2.1.4 Nguyn tc hot ng ca giao thc SNMPV2 ............................................................... 18 2.2. SNMPv3 ................................................................................................................................. 19 3.2.1. Cc c tnh c bn ca giao thc SNMPv3 ................................................................... 19 2.2.2. Khun dng bn tin SNMPv3 ......................................................................................... 21 2.2.3. Nguyn tc hot ng ca giao thc SNMPv3 ............................................................... 22 KT LUN ...................................................................................................................................... 24 Ti liu tham kho............................................................................................................................. 25

Nhm 4 L11CQVT08 B

trang 1

Tng quan v giao thc qun l mng SNMP

DANH SCH HNH V V BNG BIU

Hnh 1.1. Mi quan h gia cc thnh phn SNMP Hnh 1.2.M hnh hot ng gia MNS v Agent Hnh 1.3.M hnh giao thc SNMP Hnh 2.1. Cu trc bn tin SNMPv2 Bng 2.1: Cu lnh v gi tr trong trng PDU Hnh 2.2. Minh ha phng thc ca SNMPv2 Hnh 2.3. Cu trc thc th ca SNMPv3 Hnh 2.4. Phn h x l bn tin Hnh 2.5. Khun dng bn tin SNMPv3

Nhm 4 L11CQVT08 B

trang 2

Tng quan v giao thc qun l mng SNMP

LI M U
Th gii ngy nay c nhiu tin b mnh m v cng ngh thng tin (CNTT) t mt tim nng thng tin tr thnh mt ti nguyn thc s, tr thnh sn phm hng ho trong x hi to ra mt s thay i to ln trong lc lng sn xut, c s h tng, cu trc kinh t, tnh cht lao ng v c cch thc qun l trong cc lnh vc ca x hi. Vi s pht trin nn cng ngh thng tin nh vy, vic ng dng CNTT vo i sng hng ngy tr nn qu quen thuc vi mi ngi. Vi s pht trin nh vy mng Internet pht trin mnh m, lm thay thay i nhng thi quen trong x hi, n mang li li ch to ln cho cho qu trnh pht trin kinh t x hi, thng tin lin lc ca con ngi. Internet pht trin nh v bo nh vy, vi hng trm triu my tnh trn mng so vi ch vi trm my ban u. Trong khi vic to ra mt h thng mng kh m vic qun l h thng mng li cng kh khn hn. gii quyt nhng vn ny phi s dng phn mm qun l h thng mng mt cch hp l hn. nhn thy c v hiu r hn s quan trng trong vic qun l mt h thng mng mt cch hp l th nhm chng tin hnh tm hiu v phn tch cc vn v Giao thc qun l mng n gin SNMP. Em xin chn thnh cm n c Nguyn Thanh Tr tn tnh hng dn. gip v to iu kin cho chng em hon thnh chuyn ny. Xin chn thnh cm n! H Ni, thng 04 nm 2013 Nhm sinh vin thc hin

Hong Th My Quch Hoi Nam Nguyn nh Tng Trn Vn Nng Nhm 4 L11CQVT08 B trang 3

Tng quan v giao thc qun l mng SNMP

1.

CHNG I: TNG QUAN V GIAO THC SNMP

Mc ch ca chng ny l cung cp cho chng ta nhng khi nim c bn nht v giao thc SNMP, cc thnh phn, chc nng cc thnh phn ca giao thc.

1.1.SNMP l g?
SNMP (Simple Network Management Protocol): l giao thc c s dng rt ph bin gim st v iu khin thit b mng nh switch, router, bridge... Vi nhng vn phng nh ch c vi thit b mng v t tp trung mt ni th c l bn khng thy c li ch ca SNMP. Nhng vi cc h thng mng ln, thit b phn tn nhiu ni v bn cn phi ngi mt ch m c th qun tt c thit b, bn mi thy c li ch ca SNMP.Microsoft Windows Server 2003 cung cp phn mm SNMP agent c th lm vic vi phn mm qun l SNMP t nh cung cp th 3 nhm gim st cc trng thi ca thit b qun l v cc ng dng. SNMP l giao thc qun l ph bin c nhng ngi dung Internet vi giao thc TCP/IP nh ngha. SNMP l mt giao thc truyn thng thu thp thng tin t nhng thit b trn mng. Mi thit b chy mt chng trnh con thu thp thng tin v cung cp thng tin cho b phn qun l. Cc i tng c qun l s nh nghi tng phn thng tin v mt thit b nh s gi tin m thit b ny nhn c. SNMP dng qun l mng, c ngha l c th theo di, ly thng tin v c th tc ng h thng hot ng nh mun. V d: Theo di tc ng truyn ca mt router, bit c tng s byte truyn/ nhn Ly thng tin my ch ang c bao nhiu cng, mi cng cn trng bao nhiu T ng nhn cnh bo khi switch c mt port b down iu khin tt cc port trn switch Nhm 4 L11CQVT08 B

trang 4

Tng quan v giao thc qun l mng SNMP

1.2.Lch s pht trin ca SNMP


Vo u nm 1988, T chc kin trc Internet IAB (Internet Architecture Board) nhn thy s cn thit ca b cng c qun l cho TCP/IP ra i FRC 1052. RFC 1052 l cc yu cu tiu chun ho qun l mng v tp trung vo cc vn qun l mng phi thc hin: m bo tnh m rng m bo tnh a dng pht trin m bo tnh a dng trong qun l u lp giao thc Da trn tng ca giao thc iu khin cng n gin SGMP (Simple Gateway Protocol) mt s RFC tip tc c ra i trong nm 1988. - Cu trc v nh n dng thng tin qun l cho TCP/IP da trn internet. - C s thng tin qun l cho qun l mng TCP/IP. Giao thc qun l mng n gin . Vo nm 1991, Phin bn SNMP V1 c vit li t RFC 1067 v b sung them mt s cc chc nng gm cc RFC sau: RFC 1155 u trc v nhn dng thng tin qun l cho TCP/IP da trn Internet. u trc v hng dn nhn dng thng tin thng tin qun l cho cc tn i tng. thng tin qun l theo cu trc hnh cy. Nhm 4 L11CQVT08 B trang 5

Tng quan v giao thc qun l mng SNMP


t ra mt s hn ch cho php giao thc n gin. t ng k tn cho cc i tng RFC 1212 nh ngha c s thng tin qun l v hon thin cc nh ngha ca 1155. RFC 1213 thng tin qun l cho qun l mng ca TCP/IP MIB-II. t k cc bin s dng trong m hnh q un l mng, trng thi ca cc h thng iu hnh mng. RFC 1157 nh ngha cc bn tin c th trao i gia h thng qun l vi cc thc th b qun l c hoc cp nht gi tr. nh ngha bn tin TRAP c gi i t h thng. nh ngha khun dng bn tin v chi tit giao thc truyn thng. Cc nhm lm vic khc cng pht trin v m rng cc giao thc h tr MIB cho cc kiu thit b mng ( Cu ni, chuyn mch, b nh tuyn, cc giao din WAN,DS1,DS3..) v cc giao thc qun l ring ca nh cu ng cp thit b. Thng 4 nm 1993, SNMPv2 tr thnh tiu chun qun l mng n gin thay th SNMP v1. SNMPv2 b sung mt s vn m SNMPv1 cn thiu nh nhn thc v bo mt. Tuy nhin, SNMPv2 kh phc tp v kh tng thch vi SNMPv1. Nm 1997, SNMPv3 ra i nhm tng thch vi cc giao thc a phng tin trong qun l mng, pht trin trn nn java v a ra kin trc v giao thc mi nh giao thc qun l a phng tin HMMP (Hypermedia Management Protocol). Thng 4 nm 1999 v thng 12 nm 2002, nhng ci tin, b sung nhm lm hon thin hn SNMPv3 c trnh by trong cc ti liu RFC2570 -RFC2576 (nm 1999)v RFC3410-RFC3418 (nm 2002). Cc ti liu t RFC3410 n RFC3418 trnh by mt cch chi tit v y nht v SNMPv3, c s thng tin qu n tr SNMPv3, cutrc thng tin qun tr SNMPv3, s tng thch gia SNMPv1, SNMPv2, SNMPv2cv SNMPv3... Nhm 4 L11CQVT08 B trang 6

Tng quan v giao thc qun l mng SNMP


Mc ch chnh ca SNMPv3 l h tr kin trc theo kiu module c th dd ng m rng. Theo cch ny, nu cc giao thc bo mt mi c m rng c hng c th c h tr bi SNMPv3 bng cc nh ngha nh l cc module ring. C s thng tin qun tr v cc dng bn tin s dng trong SNMPv3 cng hon ton tng t trong SNMPv2.

1.3. u im, nhc im ca SNMP


u im C th gim c chi ph cho vic trin khai phng thc i l dng giao thc SNMP Vic ci t SNMP vo thit b trong cu hnh mng n gin C th b xung thm mt cch khng hn ch thit b v cc nh cung cp v i tng qun l SNMP l mt phng php hiu qu cho vic qun l thit b nhiu nh cung cp Nhc im: SNMP lm tng lu lng ng k SNMP khng cho php phn b tc ng trc tip cho cc i l Khng c s iu khin tng hp ca nhiu ni qun l
1.4 Cc thnh phn trong SNMP

H thng qun l mng da trn SNMP gm ba thnh phn: b phn qun lmanager), i l (agent) v c s d liu gi l C s thng tin qun l (MIB). Mc d SNMP l mt giao thc qun l vic chuyn giao thng tin gia ba thc th trn, song n cng nh ngha mi quan h client-server (ch t). y, nhng chng trnh client l b phn qun l, trong khi client thc hin cc thit b t xa c thc coi l server. Khi , c s d liu do agent SNMP qun l l i din cho MIPca SNMP. 1.4.1 B phn qun l (manager) B phn qun l l mt chng trnh vn hnh trn mt hoc nhiu my tnh trm.Ty thuc vo cu hnh, mi b phn qun l c th c dng qun l mt mng con, hoc nhiu b phn qun l c th c dng qun l cng mt mng Nhm 4 L11CQVT08 B trang 7

Tng quan v giao thc qun l mng SNMP


con hay mt mng chung. Tng tc thc s gia mt ngi s dng cui (end-user) v b phn qun l c duy tr qua vic s dng mt hoc nhiu chng trnh ng dng m, cng vi b phn qun l, bin mt bng phn cng thnh Trm qun l mng(NMS). Ngy nay, trong thi k cc chng trnh giao din ngi s dng ha(GUI), hu ht nhng chng trnh ng dng cung cp mi trng ca s ch v click chut, thc hin lin vn hnh vi b phn qun l to ra nhng bn ha v biu cung cp nhng tng kt hot ng ca mng di dng thy c. Qua b phn qun l, nhng yu cu c chuyn ti mt hoc nhiu thit b chu s qun l. Ban u SNMP c pht trin s dng trn mng TCP/IP v nhng mng ny tip tc lm mng vn chuyn cho phn ln cc sn phm qun l mng da trn SNMP. Tuy nhin SNMP cng c th c chuyn qua NetWare IPX v nhng c cu vn chuyn khc.

Hnh 1.1. Mi quan h gia cc thnh phn SNMP 1.4.2. Agent Thit b chu s qun l l mt nt mng h tr giao thc SNMP v thuc v mng b qun l. Thit b c nhim v thu thp thng tin qun l v lu tr phc v cho h thng qun l mng. Nhng thit b chu s qun l, i khi c gi nhng phn t mng, c th l nhng b nh tuyn v my ch truy nhp -Access Nhm 4 L11CQVT08 B trang 8

Tng quan v giao thc qun l mng SNMP


Server, nhng switch v nhng bridge, nhng hub, my tnh hay l nhng my in trong mng. Mi thit b chu s qun l bao gm phn mm hoc phn sn (firmware) d idng m phin dch nhng yu cu SNMP v p ng ca nhng yu cu . Phn mm hoc phn sn ny c coi l mt agent. Mc d mi thit b bt buc bao gm mt agent chu qun l trc tip, nhng thit b tng thch khng theo SNMP cng c th qun l c nu nh chng h tr mt giao thc qun l c quyn. thc hin c iu ny, bn phi ginh c mt agent y nhim (proxy agent). Proxy agent ny c th c xt nh mt b chuyn i giao thc v n phin dch nhng yu cuSNMP thnh giao thc qun l c quyn ca thit b khng hot ng theo giao thc SNMP.Mc d SNMP ch yu l giao thc p ng thm d (poll -respond) vi nhng yu cu do b phn qun l to ra dn n nhng p ng trong agent, agent cng c kh nng xng ra mt p ng t nguyn. p ng t nguyn ny l iu kin cnh bo t vic gim st agent vi hot ng c nh ngha trc v ch ra rng ti ngng nh trc. Di s iu khin SNMP, vic truyn cnh bo ny c coi l ci by (trap).

Hnh 1.2.M hnh hot ng gia MNS v Agent 1.4.3 C s thng tin qun l - MIB Mi thit b chu s qun l c th c cu hnh, trng thi v thng tin thng k rt a dng, nh ngha chc nng v kh nng vn hnh ca thit b. Thng tin ny c th bao gm vic thit lp chuyn mch phn cng, nhng gi tr khc nhau lu tr trong cc bng ghi nh d liu, b h s ho c cc trng thng tin trong h s lu tr cc file v nhng bin hoc thnh phn d liu tng t. Nhn chung, nhng thnh phn d liu ny c coi l C s thng tin qun l ca thit b chu s qun l. Xt ring, mi thnh phn d liu bin i c coi l mt i tng b qun l v bao gm tn, mt hoc nhiu thuc tnh, v mt tp cc hat ng (operation) thc hin trn i tng . V vy MIB nh ngha loi thng tin c Nhm 4 L11CQVT08 B

trang 9

Tng quan v giao thc qun l mng SNMP


th khi phc t mt thit b chu s qun l v nhng b tr (settings) thit b m bn c th iu khin t h thng qun l. Mt agent c th thc hin nhiu MIB nhng tt c cc agent u thc hin MIB c bit l MIB-II (RFC 1213). Mc nh chnh ca MIB-II l cung cp thng tin qun l chung ca TCP/IP. N khng bao gm tt c cc thng tin c bit m nh sn xut thit b mun qun l. Ngi ta cn qun l rt nhiu thit b v mi thit b c sn xut c cc tnh nng ring. l l do ti sao cho php nh sn xut v c nhn c php nh ngha MIB ca ring h. V d nh sn xut bn router mi. Agent tch hp bn trong router s hi p cc yu cu t NMS m c nh ngha chung trong MIB-II. Thm vo router s c thm cc chc nng mi nhng khng c nh ngha trong bt k chun MIB no. Chnh v th nh sn xut phi nh ngha MIB ca ring h.

1.4.4. M hnh giao thc SNMP SNMP s dng cc dch v chuyn ti d liu c cung cp bi cc giao thc UDP/IP. Mt ng dng ca Manager phi nhn dng c Agent cn thng tin vi n. Mt ng dng ca Agent c nhn dng bi a ch IP ca n v mt cng UDP. Mt ng dng Manager ng gi yu cu SNMP trong mt UDP/IP, UDP/IP cha m nhn dng cng ngun, a ch IP ch v m nhn dng cng UDP ca n. Khung UDP s c gi i thng qua thc th IP ti h thng c qun l, ti khung UDP s c phn phi bi thc th UDP ti Agent. Tng t cc bn tin TRAP phi c nhn dng bi cc Manager. Cc bn tin s dng a ch IP v m nhn dng cng UDP ca Manager SNMP. SNMP s dng 3 lnh c bn l Read, Write, Trap v mt s lnh ty bin qun l thit b. Lnh Read: c SNMP dng c thng tin t thit b. Cc thng tin ny c cung cp qua cc bin SNMP lu tr trn thit b v c cp nht bithit b. Lnh Write: c SNMP dng ghi cc thng tin iu khin ln thit b bngcch thay i gi tr cc bin SNMP. Lnh Trap: Dng nhn cc s kin gi t thit b n SNMP. Mi khi cmt s kin xy ra trn thit b mt lnh Trap s c gi ti NMS

Nhm 4 L11CQVT08 B

trang 10

Tng quan v giao thc qun l mng SNMP

Hnh 1.3.M hnh giao thc SNMP

SNMP iu khin, theo di thit b bng cch thay i hoc thu thp thng tin qua cc bin gi tr lu trn thit b. Cc Agent ci t trn thit b tng tc vi nhng chip iu khin h tr SNMP ly ni dung hoc vit li ni dung. Qun l lin lc gia Manager vi cc Agent Nhn trn phng din truyn thng, Manager v cc Agent cng l nhng ngi s dng, s dng mt giao thc ng dng, Giao thc qun l yu cu cc c ch vn chuyn h tr tng tc gia cc Agent v Manager. Manager trc ht phi xc nh c cc Agent mun n lin lc. C th xc nh c ng dng Agent bng a ch IP ca n vo cng UPD c gn cho n. Cng UDP 161 c dnh ring chi cc Agent SNMP. Manager gi lnh SNMP vo mt tiu UDP/ IP. Tiu ny cha cng ngun, a ch IP ch v cng 161. Mt thc th ti ch s chuyn giao gi UDP ti h thng b qun l. Tip , mt thc th UDP ti ch s chuyn pht n ti cc Agent. Tng t nh vy, lnh

Nhm 4 L11CQVT08 B

trang 11

Tng quan v giao thc qun l mng SNMP


TRAP cng cn xc nh nhng Manager m n cn lin lc. Chng s dng a ch IP cng nh cng UDP dnh cho SNMP Manager l 162. Bo v truyn thng lin lc gia Manager v cc Agent khi s c SNMP s dng User Datagram Protocol (UDP) truyn ti d liu gia managers v agents lm cho giao thc SNMP khng ng tin cy v khng c kh nng pht hin khi d liu b mt. Do SNMP phi c cch pht hin d liu truyn c b mt khng:

Khi NMS gi yu cu n agent v ch hi bo Nu ht thi gian ch v NMS khng nhn c thng tin phn hi t agent n s gi li yu cu. Nhng li gp kh khn khi agent gi trap cho NMS, v khng c cch no NMS bit chuyn g xy ra khi agent gi TRAP m TRAP li khng n c NMS v agent cng khng bit c cn phi gi li TRAP khng, do NMS khng gi li hi bo cho agent khi nhn c TRAP

Vy yu cu t ra l lm sao khng mt bn tin ? Cho cc Agent gi li bn tin TRAP .Bin s MIB c th c s ln lp li theo yu cu lnh .Lnh SET c th t li cu hnh cho bin s ny s ln lp li c th khng m bo lin lc mt cch tin cy . Agent c th lp li lnh TRAP cho n khi manager t li bin s MIB chm dt s c. Nu c mt s c th hng lot bn tin TRAP b mt ty thuc vo tc m cc Agent to ra chng . Trong c 2 trng hp nu ta cn chuyn nhng bn tin TRAP ti nhiu Manager th c th xy ra tnh trng khng nht qun gia cc Manager hoc xy ra hin tng tht lc thng tin rt phc tp.

Nhm 4 L11CQVT08 B

trang 12

Tng quan v giao thc qun l mng SNMP


2.

CHNG II: CC C TNH GIAO SNMPv2 V SNMPv3

2.1. SNMPv2
2.1.1 Cc c tnh c bn ca giao thc SNMPV2 SNMPv2 tch hp kh nng lin iu hnh t manager ti manager v hai n v d liu giao thc mi. Kh nng lin kt iu h nh manager-manager cho php SNMP h tr qun l mng phn tn trong mt trm v gi bo co ti mt trm khc. h tr tng tc tt nht, SNMPv2 thm cc nhm cnh bo v s kin vo trong c s thng tin qun l MIB. Nhm cnh bo cho php t ngng thit lp cho cc bn tin cnh bo. Nhm s kin c a ra khi thng tin Trap xc nh cc gi tr phn t MIB. Hai n v d liu giao thc PDU (Protocol Data Unit) l GetbulkRequest v InformRequest. Cc PDU ny lin quan ti x l li v kh nng m ca SNMPv2. X l li trong SNMPv2 i km vi cc i tng yu cu cho php trm qun l lp trnh t cc phng php khi phc hoc dng truyn bn tin. Kh nng m trong SNMPv2 s dng b m 64 bit (hoc 32) duy tr trng thi ca cc lin kt v giao din. 2.1.2. Cu trc bn tin SNMPv2 Cc bn tin trao i trong SNMPv2 cha cc n v d l iu giao thc PDU. Cu trc chung cc bn tin ny gm cc trng nh hnh v 2.1. Trng phin bn th hin phin bn ca giao thc SNMPv2. Trng Community l mt chui xc nhn pasword cho c tin trnh ly v thay i d liu. SNMP PDU cha iu hnh gm: kiu iu hnh (get, set), yu cu p ng (cng s th t vi bn tin gi i) n cho php ngi iu hnh gi nhiu bn tin ng thi. Bin ghp gm cc thit b c c t trong RFC 2358 v cha c gi tr t ti i tng. Trng n v d liu giao thc gm c cc trng con: Kiu n v d liu giao thc, nhn dng cc yu cu, trng thi li, ch s li, cc gi tr v i tng. Nhm 4 L11CQVT08 B trang 13

Tng quan v giao thc qun l mng SNMP

Hnh 2.1. Cu trc bn tin SNMPv2 Cc kiu n v d liu giao thc PDU th hin cc bn tin s dng trong SNMPv2 gm c: GetRequest: Cu lnh GetRequest c s dng gia Manager ti Agent. Cu lnh ny c s dng c bin MIB n hoc danh sch cc bin MIB t cc Agent ch. GetRequest: yu cu s dng hai a ch, a ch u l a ch ca manger hoc agent, a ch th hai th hin v tr ca bin hoc i tng. GetNextRequest: Cu lnh GetNextRequest tng t nh cu lnh GetRequest, tuy nhin tu thucvo agent trong khon mc k tip ca MIB. Cc bin c lu trong thit b v ccoi nh i tng b qun l. V vy, cu lnh GetNextRequest m rng cc bin vc c theo tun t. SetRequest Cu lnh SetRequest l cu lnh c gi i t manger ti Agent nh hai cu lnhtrn. SetRequest tm kim cc thng tin m rng trong bng MIB v yu cu Agent t gi tr cho cc i tng qun l hoc cc i tng cha trong Nhm 4 L11CQVT08 B trang 14

Tng quan v giao thc qun l mng SNMP


cu lnh. S thnh cng ca cu lnh ny ph thuc vo mt s yu t gm s tn ti ca cc i tng b qun l v cc phng thc truy nhp. GetResponse Cu lnh GetResponse l cu lnh t Agent ti Manager . Cu lnh ny cung cp c ch p ng cho cc cu lnh GetRequest, GetNextRequest v SetRequest. Cc thng tin trong cu lnh GetResponse gm mt s trng chc nng cho php p ng cc cu lnh nhn trc . Trap Trap l cu lnh c lp, khng ph thuc vo p ng hoc yu cu t cc trm qun l hoc cc Agent. Trap a ra cc thng tin lin quan ti cc iu kin c nh ngha trc v c gi t cc Agent ti Manager. GetBulkRequest Chc nng ca cu lnh GetBulkRequest tng t nh cu lnh GetNextRequest ngoi tr mt vn lin quan ti s lng d liu c ly ra. GetBulkRequest cho php Agent gi li manager cc d liu lin quan ti cc gi tr ln thay v tng i tng b qun l. Nh vy, GetBulkRequest c th gim bt lu lng t ruyn dn v cc bn tin p ng thng bo v cc iu kin vi phm. InformRequest Cu lnh InformRequest cung cp kh nng h tr cc trm manger c b tr phn cp.Cu lnh ny cho php mt trm qun l trao i thng tin vi cc trmg qun l khc. Cc cnh bo v s kin c gi i trong cu lnh InformRequest pht hin v khi to li cc tuyn truyn bn tin. Mt trm qun l c th thng tin ti cc trm qun l ln cn bit cc iu kin quan trng trong vng qun l. Cc cu lnh c th hi n trong trng PDU Type, cc gi tr th hin nh sau:

Nhm 4 L11CQVT08 B

trang 15

Tng quan v giao thc qun l mng SNMP


Bng 2.1: Cu lnh v gi tr trong trng PDU

2.1.3 C s thng tin qun l MIB trong SNMPv2. MIB trong SNMPv2 nh ngha cc i tng m t tc ng ca mt phn t SNMpv2. MIB ny gm 3 nhm: thng (System group): l mt m rng ca nhm system trong MIB-II gc, bao gm mt nhm cc i tng cho php mt Agent SNMPv2 m t cc i tng ti nguyn ca n. t ci tin ca nhm snmp trong MIB-II gc,bao gm cc i tng cung cp cc cng c c bn cho hot ng giao thc. i tng MIB (MIB objects group): mt tp hp cc i tng lin quan n cc SNMPV2-Trap PDU v cho php mt vi phn t SNMP 2 cng hot ng, thc hin nh trm qun tr, phi hp vic s dng ca chng trong ton t Set ca SNMPv2. Nhm h thng: Nhm system nh ngha trong SNMPv2 ging trong MIB-II v b sung mt vi i tng mi. Cc i tng mi ny c tn bt u bng sysOR, chng lin quan n ti nguyn h thng v c s dng bi mt Agent SNMPv2 m t cc i tng ti nguyn m vic iu khin chng tu thuc vo cu hnh ng bi mt qun tr.

Nhm 4 L11CQVT08 B

trang 16

Tng quan v giao thc qun l mng SNMP


Nhm SNMP: Nhm ny gn ging nh nhm SNMP c nh ngha trong MIB-II nhng c thm mt s i tng mi v loi b mt s i tng ban u. Nhm SNMP cha mt vi thng tin lu lng c bn lin quan n ton t SNMPv2 v ch c mt trong cc i tng l b m ch c 32-bit. Nhm cc i tng MIB: Nhm cc i tng MIB cha cc i tng thch hp thm vo vic iu khin cc i tng MIB. Phn u ca nhm ny l mt nhm con, snmpTrap, bao gm hai i tng lin quan n Trap: n dng i tng ca Trap hoc thng bo c gi hin thi. Gi tr ca i tng ny xut hin nh mt varbind th hai trong mi SNMPv2-Trap PDU v InformRequest PDU. SNMP TrapEnterprise: l nhn dng i tng ca t chc lin quan n Trap c gi hin thi. Khi mt Agent u quyn SNMPv2 nh x mt Trap PDU sang mt SNMPv2-Trap PDU, bin ny xut hin nh mt varbind cui cng. Phn th hai ca nhm ny l mt nhm con, snmpSet, bao gm mt i tng n snmpSerialNo. i tng ny c s dng gii quyt hai vn c th xut hin khi s dng ton t Set: Th nht l mt qun tr c th s dng nhiu ton t Set trn cng mt i tng MIB. Cc ton t ny cn thc hin theo mt trt t c a ra thm ch khi chng c truyn khng theo th t. Th hai l vic s dng ng thi cc ton t Set trn cng mt i tng MIB bi nhiu qun tr c th gy ra mt s mu thun hoc c s d liu sai. i tng SNMPS Set c s dng theo cch sau: Khi mt qun tr mun t mt hay nhiu gi tr i tng trong mt Agent, u tin n nhn gi tr ca i tng SNMP Set. Sau n gi SetRequest PDU c danh sch bin lin kt bao gm c i tng SNMP Set vi gi tr nhn c ca n. Nu nhiu qun tr gi cc setRequestPDU s dng cng mt gi tr ca snmpSet, ci n Agent trc s c thc hin (gi s khng c li) kt qu lm tng snmpSet; cc ton t set cn li s b li v khng ph hp vi gi tr snmpSet. Hn na, nu mt qun tr mun gi mt chui cc ton t set v m bo rng chng c thc hin theo mt trt t nht nh th i tng snmpSet phi c gp vo trong mi ton t.

Nhm 4 L11CQVT08 B

trang 17

Tng quan v giao thc qun l mng SNMP

Hnh 2.2. Minh ha phng thc ca SNMPv2 2.1.4 Nguyn tc hot ng ca giao thc SNMPV2 a. Truyn mt bn tin SNMPv2 Qui tc gi v nhn bn tin ca Manager v Ag ent c th hin trong bng 2.2 Bng 2.2 Quy tc truyn v nhn mt bn tin trong SNMPv2

Nhm 4 L11CQVT08 B

trang 18

Tng quan v giao thc qun l mng SNMP


Mt phn t SNMPv2 thc hin cc hnh ng sau truyn mt PDU cho mt phn t SNMPv2 khc: S dng ASN.1 m t mt PDU. PDU ny c chuyn sang dch v xc nhn cng vi cc a ch ngun v ch ca truyn thng v mt tn truyn thng. Dch v xc nhn sau thc hin nhng bin i bt k theo yu cu cho s trao i ny nh m ho hoc thm m xc nhn v tr li kt qu. Phn t giao thc sau lp nn bn tin, gm trng s hiu phin bn, tn truyn thng vo kt qu ca bc trn. i tng ASN. 1 mi ny sau c m ho s dng BER v gi n dch v giao vn. b. Nhn mt bn tin SNMPv2 Mt phn t SNMPv2 thc hin cc hnh ng sau nhn mt bn tin SNMPv2: Kim tra c php c bn ca bn tin v loi b bn tin nu c php sai. Kim tra s hiu phin bn v loi b bn tin nu khng tng hp. Phn t giao thc sau chuyn trn ngi s dng, phn PDU ca bn tin v cc a ch ngun v ch ca bn tin ti dch v xc nhn. Nu xc nhn b sai, dch v xc nhn bn tin cho phn t giao thc SNMPv2 ni to ra Trap v loi b bn tin. Nu xc nhn hon thnh dch v xc nhn tr li mt PDU theo dng ca mt i tng ASN.1. Phn t giao thc thc hin kim tra c php c bn ca bn tin v loi b bn tin nu c php sai. Ngc li dng truyn thng theo tn, chnh sch truy cp SNMPv2 tng ng s c chn v PDU c x l tip theo.

2.2. SNMPv3
3.2.1. Cc c tnh c bn ca giao thc SNMPv3 SNMPv3 da trn vic thc hin giao thc, loi d liu v u quyn nh SNMPv2 v ci tin phn an ton. SNMPv3 cung cp an ton truy cp cc thit b bng cch kt hp s xc nhn v m ho cc gi tin trn mng. Nhng c im bo mt cung cp trong SNMPv3 l: Tnh ton vn thng bo : m bo cc gi tin khng b sa trong khi truyn. S xc nhn: Xc nhn ngun ca thng bo gi n. M ho: o ni dung ca gi tin ngn cn vic gi thng bo t ngun khng c xc nhn. Nhm 4 L11CQVT08 B trang 19

Tng quan v giao thc qun l mng SNMP


SNMPv3 cung cp c m hnh an ton v cc mc an ton. M hnh an ton l thc hin vic xc nhn c thit lp cho ngi s dng v nhm cc ngi s dng hin c. Mc an ton l mc bo m an ton trong m hnh an ton. S kt hp ca m hnh an ton v mc an ton s xc nh c ch an ton khi gi mt gi tin. Tuy nhin vic s dng SNMPv3 rt phc tp v cng knh. Tuy y l s la chn tt nht cho vn bo mt ca mng. Nhng vic s dng s tn rt nhiu tinguyn do trong mi bn tin truyn i s c phn m ha BER. N s chim mt phn bng thng ng truyn do lm tng ph tn mng. Mc d c coi l phin bn ngh cui cng v c coi l y nht nhng SNMPv3 vn ch l tiu chun d tho v vn ang c nghin cu hon thin.

Hnh 2.3. Cu trc thc th ca SNMPv3 Cc thnh phn ca c cu SNMPv3 gm c: iu phi (Dispatcher). Phn h x l bn tin (Message Processing Subsystem). Phn h bo mt (Security Subsystem). Phn h iu khin truy nhp (Access Control Subsystem).

Phn h iu phi bn tin x l bn tin gi v nhn, khi n nhn c bn tin n s xc nhn phin bn ca SNMP v gi bn tin ti phn h x l bn tin tng ng. Phn h x l bn tin chia thnh 3 module nh sau: Nhm 4 L11CQVT08 B trang 20

Tng quan v giao thc qun l mng SNMP

Hnh 2.4. Phn h x l bn tin SNMPv3 tng thch hon ton vi SNMPv1 v SNMPv2, n gm m hnh bo mt da trn ngi dng v m hnh bo mt chung x l SNMPv1, SNMPv2. Cu trc module n gin khi thm vo cc module bo mt dng khc trong qu trnh pht trin. Khi s liu tch ra khi PDU v c gi ti ng dng thch hp qua phn h iu khin truy nhp. Phn h iu khin truy nhp chu trch nhim xc nh i tng b qun l v cch thc truy nhp ti n. Hin nay ch c mt m hnh iu khin truy nhp nhng n c th m rng trong tng lai. 2.2.2. Khun dng bn tin SNMPv3

Hnh 2.5. Khun dng bn tin SNMPv3 D liu chung (Common data)- Trng ny xut hin trong tt c cc bn tin SNMPv3. Bo mt m hnh d liu (Security model data)- Vng ny c ba mc: mt chung, mt cho s chng thc v mt cho d liu ring. Context Hai trng c dng cung cp context cho PDU no s phi xl. PDU Vng ny cha mt SNMPv2c PDU. Nhm 4 L11CQVT08 B

trang 21

Tng quan v giao thc qun l mng SNMP


2.2.3. Nguyn tc hot ng ca giao thc SNMPv3 a. Gi mt bn tin hoc mt yu cu Qu trnh gi mt bn tin hoc mt yu cu gm cc bc sau: To ra cc yu cu ng dng Nu gi tr messageProcessingModel khng miu t mt m hnh x l bn tin c bit ti t b iu vn th gi tr errorIndication c tr li chong dng gi ti v khng c hnh ng no c x l na. B iu vn to ra sendPduHandle cho qu trnh x l tip theo. B iu vn bn tin gi yu cu ti module x l bn tin phin bn c trng v c xc nh bi messageProcessingModel Nu statusInformation biu th li, th gi tr error Indication c tr li cho ng dng gi ti v khng c hnh ng no c x l na. Nu statusInformation biu th s chp thun, th sendPduHandle c tr v ng dng v outgoingMessage c gi i. Truyn thng c s dng gi outgoingMessage c tr v qua destTransportDomain v a ch m n gi c tr v qua destTransportAddress. Qu trnh x l mt bn tin gi i hon tt. b. Gi mt p ng ti mng Qu trnh gi mt p ng mt bn tin din ra nh sau: To ra mt ng dng cha yu cu s dng B iu vn bn tin s gi yu cu ti m hnh x l bn tin thch hp c nhn bit qua gi tr messageProcessingModel. Khi mt p ng chun b c gi i Nu result l errorIndication th errorIndication s tr li ng dng gi ti vkhng c hnh ng no c x l na. Nu result c chp nhn th outgoingMessage c gi i.Truynthng c s dng gi outgoingMessage c tr v qua destTransportDomain v a ch m n gi c tr v qua destTransportAddress

Nhm 4 L11CQVT08 B

trang 22

Tng quan v giao thc qun l mng SNMP


c. Qu trnh iu phi bn tin ca bn tin SNMP nhn c Gi tr snmpInPkts c tng ln. Nu gi tin khng phn tch c y phin bn ca bn tin SNMP hoc nu phin bn khng c h tr th gi tr snmpInASNParseErrs c tng ln v bn tin nhn c b loi b v khng x l na. Ngun gc ca transportDomain v transportAddress c xc nh. Bn tin chuyn qua m hnh x l bn tin v thnh phn d liu tru tng c tr v bi b iu vn: Nu result l errorIndication khng thch hp th bn tin b hu b v qu trnh x l kt thc. Tip theo, tu vo gi tr ca sendPduHandle l rng hay khng rng ta c hai hng x l tip. d. iu phi PDU ca bn tin SNMP nhn c Nu sendPduHandle l rng th bn tin nhn c l mt yu cu hoc mt bn tin. Qu trnh x l nh sau: Gi tr ca contextEngineID v pduType c phi hp quyt nh xem ng dng ng k cho mt bn tin hay mt yu cu. Nu khng c ng dng no c ng k: snmpUnknownPDUHandlers c tng ln. Mt p ng c chun b to ra Nu result l thnh cng th bn tin chun b c gi i. Qu trnh x lkt thc. Trng hp cn li: Pdu c x l Bn tin n l mt p ng: Gi tr sendpduHandle c xc nh. ng dng ang i p ng ny c xc nh thng quan sendpduHandle. Nu khng c ng dng no i , bn tin b hu b v qu trnh x l kt thc. stateReference c gii phng. nmpUnknownPDUHandlers c tng ln. Qu trnh x l kt thc. Nhm 4 L11CQVT08 B trang 23

Tng quan v giao thc qun l mng SNMP


Nu xut hin ng dng ang i th p ng c tr v.

KT LUN
Vi ti Tng quan v giao thc SNMP chuyn ny a ra c ci nhn tng quan v SNMP , cc phin bn v phng thc hot ng ca chng. SNMP l mt giao thc qun l mng n gin, c s dng ph bin hin nay. Trong phm vi bi ny chng ti ch a ra ci nhn tng qut nht v cu trc v phng thc hot ng ca SNMP. Trong qu trnh lm chuyn do ti liu v thi gian c hn, ni dung bi vit kh trnh khi nhng sai xt. Rt mong c s ng gp ca c v cc bn. Xin chn thnh cm n!

Nhm 4 L11CQVT08 B

trang 24

Tng quan v giao thc qun l mng SNMP

3.

Ti liu tham kho

Gio trnh qun l mng vin thng- Hc Vin Cng Ngh Bu Chnh Vin Thng http://vi.wikipedia.org/wiki/SNMP https://sites.google.com/site/snmptoantap/ http://www.netone.com.vn/Trangch%E1%BB%A7/H%E1%BB%97tr%E1%BB%A3k %E1%BB%B9thu%E1%BA%ADt/Ki%E1%BA%BFnth%E1%BB%A9cc%C4%83nb %E1%BA%A3n/tabid/366/arid/1119/Default.aspx http://tailieu.vn/xem-tai-lieu/giao-thuc-quan-ly-mang-snmp-va-phat-trien-ungdung.7140.html

Nhm 4 L11CQVT08 B

trang 25