Está en la página 1de 119

B gio dc v o to Trng i hc bch khoa H ni ------------------------

Lun Vn Thc s khoa hc

Qun tr mng tp trung trn nn WEB s dng cng ngh SNMP, CGI v CORBA cho h thng cung cp dch v Digital Subscriber Line (DSL) ca Bu in H ni

Ngnh: X l thng tin v truyn thng M s: TRN VNH THANH Ngi hng dn khoa hc: TS. H QUC TRUNG

H ni 2006

-1

LI CM N
Trc ht, xin c gi li cm n n thy gio hng dn ti l tin s H Quc Trung, ngi gip ti trong qu trnh nghin cu hon thnh lun vn ny. Cho php ti gi li cm n n Trung tm tin hc Bu in H ni, c bit l cc anh ch em ng nghip ti i iu Hnh Mng VNN, ni ti ang cng tc tch cc cng tc, tham gia vo cc th nghim, tm hiu h thng v to iu kin ti c th nghim cc gii php lin quan n ti. Ti cng xin gi li cm n n cc bn cng hc trong kha o to thc s chuyn ngnh X L Thng Tin V Truyn Thng 2004-2006 cung cp cc ti liu cn thit trong qu trnh nghin cu v gip ti rt nhiu trong qu trnh hc tp, chun b lun n. Cui cng cho php ti cm n cc bn b, gia nh gip , ng h ti rt nhiu trong ton b qu trnh hc tp cng nh nghin cu hon thnh lun vn ny.

Lun vn thc s X l thng tin v truyn thng

-1

LI CAM OAN
Ti xin cam oan lun vn ny l cng trnh nghin cu ca chnh bn thn. Cc nghin cu trong lun vn ny da trn nhng tng hp l thuyt v hiu bit thc t, khng sao chp. Tc gi

Trn Vnh Thanh

Lun vn thc s X l thng tin v truyn thng

Mc lc
Mc lc ..................................................................................................................................1 Danh sch cc thut ng v t vit tt ...................................................................................3 Danh mc hnh v ..................................................................................................................5 Danh mc cc bng................................................................................................................6 Li ni u.............................................................................................................................7 Chng I. TNG QUAN................................................................................................8 I.1. Mt s vn c bn .............................................................................................8 I.2. L do chn ti ...................................................................................................9 I.3. Cu trc ca lun n.............................................................................................13 Chng II. Giao thc SNMP..........................................................................................15 II.1. Mt s vn c bn v SNMP ..........................................................................15 II.1.1. S ra i v pht trin ca SNMP ...............................................................16 II.1.2. M hnh SNMP............................................................................................18 II.1.3. Cng dch v v dch v truyn ti phi hi p ...........................................22 II.1.4. SNMP community .......................................................................................24 II.2. Cu trc thng tin qun tr (SMI) v c s thng tin qun tr (MIB) ..................27 II.2.1. Nhm h thng trong MIB II.......................................................................29 II.2.2. Nhm cc t chc trong MIB-II ..................................................................31 II.2.3. Nhm giao din (interface trong MIB-II) ....................................................32 II.3. c t SNMP .......................................................................................................33 II.3.1. Khun dng ca SNMP ...............................................................................34 II.3.2. Cc lnh SNMP v trnh t thc hin..........................................................35 II.3.3. Kin trc qun tr mng ...............................................................................36 II.3.4. Nhng hn ch ca SNMP...........................................................................37 Chng III. Qun tr mng trn web vi CGI v CORBA..............................................39 III.1. Chun CGI .......................................................................................................39 III.1.1. CGI - s m rng ca HTTP ......................................................................39 III.1.2. Cc c trng ca CGI.................................................................................40 III.1.3. M hnh quan h Client/Server s dng CGI ..............................................41 III.1.4. Cch thc v phng php truyn d liu trong CGI..................................42 III.1.5. Lp trnh CGI...............................................................................................44 III.1.6. Ci t cc chng trnh CGI ......................................................................45 III.1.7. M hnh qun tr mng ba bn s dng Web - CGI ....................................46 III.2. Chun CORBA ................................................................................................47 III.2.1. Gii thiu chun CORBA............................................................................47 III.2.2. S lc v lch s CORBA..........................................................................48 III.2.3. Tng quan v kin trc CORBA..................................................................50 III.2.4. B phn trung gian x l yu cu trn i tng (ORB) ............................51 III.2.5. Ngn ng nh ngha giao din (IDL) .........................................................58 III.2.6. M hnh bn bn gia Web client v server vi CORBA ...........................60 III.3. Tm tt v CGI v CORBA.............................................................................62 Chng IV. Xy dng h thng qun tr DSLAM qua web ............................................65 IV.1. Kho st h thng mng cung cp dch v ADSL...........................................65 IV.1.1. Gii thiu h thng mng cung cp dch v ADSL ca Bu in H ni...65

IV.1.2. C bn v thit b DSLAM..........................................................................66 IV.1.3. H thng qun l mng xDSL .....................................................................67 IV.1.4. Cng vic qun l mng ..............................................................................71 IV.1.5. Chc nng qun l phn t mng ................................................................71 IV.1.6. Mng qun l truy cp .................................................................................75 IV.1.7. Cu hnh Client Server NMS .......................................................................76 IV.1.8. Kho st quy trnh cung cp dch v ADSL ................................................79 IV.2. Qun tr mng tp trung qua WEB s dng CGI.............................................85 IV.2.1. Xy dng chng trnh trn CGI.................................................................90 IV.2.2. Xy dng chng trnh gi nhn SNMP .....................................................94 IV.3. Qun tr mng tp trung qua WEB s dng CORBA....................................101 IV.3.1. Xy dng ng dng vi VisiBroker ..........................................................102 IV.3.2. Xy dng cng c qun tr mng xDSL s dng CORBA........................103 Chng V. Kt lun v hng pht trin .....................................................................110 V.1. Cc kt qu t c.....................................................................................110 V.2. Kt lun..............................................................................................................110 V.3. Kh nng m rng: ............................................................................................111 V.3.1. Kt lun......................................................................................................112 Ti liu tham kho .............................................................................................................115

Danh sch cc thut ng v t vit tt


ADSL API ASN.1 ATM BOA BGP CCITT CGI CSDL DII DNS DSI FTP HTML HTTP IANA IDL IETF IIOP IOR IOS IOS IP Asymmetric Digital Subscriber Line Application Program Interfaces Abstract Syntax Notation 1 Asynchronous Transfer Mode Basic Object Adapter Border Gateway Protocol International Telegraph and Telephone Consultative Comittee Common Gateway Interface C S D Liu Dynamic Invocation Interface Domain Name Service Dynarnic Skeleton Invocation File Transfer Protocol HyperText Markup Language HyperText Transfer Protocol Internet Assigned Numbers Authority Interface Definition Language Intemet Engineering Task Force Intemet Inter-ORB protocol Interoperable Object Reference International Organization for Standardization Internetworking Operating System Internet Protocol

CORBA Common Object Request Broker Architecture

JAR MTU NMS NNM MIME OID OMG PDU PPP

Java ARchive Maxium Transfer Unit Network Management System Network Node Manager Multipurpose Internet Mail Extensions Object Identifier Object Management Group Protocol Data Unit Point-to-Point Protocol

RADIUS Remote Authentication Dial In User Service RDBMS Relational database management system RFC RMON SGMP SHA SMB SHDSL SMI SNMP STDIN TCP UDP URL USM WWW Request For Comment Remote Monitoring Simple Gateway Monitor Protocol Secure Hash Algorithm Server Message Block Symmetric High-speed Digital Subscriber Line Structure of Management Information Simple Network Management Protocol Standard Input Transmission Control Protocol User Datagram Protocol Uniform Resource Locator User-based Security Model World Wide Web

STDOUT Standard Output

Danh mc hnh v
Hnh Hnh Hnh Hnh Hnh Hnh Hnh Hnh Hnh Hnh Hnh Hnh Hnh Hnh Hnh Hnh II-1 Cu trc nhm cc giao din trong MIB-II.........................................................33 III-1 Chu trnh thc hin mt CGI request ................................................................41 III-2 M hnh web Client/Server ba bn s dng CGI ..............................................46 III-3 M hnh gi yu cu qua Object Request Broker .............................................56 III-4 M hnh client/server 4 bn trong ng dng CORBA SNMP...........................61 IV-1 Cu trc qun l mng .....................................................................................68 IV-2 M hnh tham chiu qun l mng....................................................................69 IV-3M hnh h thng qun l DSLAM ca HUAWEI ti Bu in H ni ...........70 IV-4 M hnh h thng NMS Client/Server ..............................................................76 IV-5 Giao din ha phn mm qun l thit b SIEMENS (ACI)........................77 IV-6 Giao din ha phn mm qun l thit b HUAWEI (iManager N2000) ....78 IV-7 Giao din ha phn mm qun l thit b UMAP (UltrAccess GUI) ..........78 IV-8 Giao din ha phn mm qun l thit b ZTE ............................................79 IV-9 Cu trc phn lp ca SnmpVar .......................................................................88 IV-10 Giao din ca DSLAMnet.............................................................................100 IV-11 Lu xy dng h thng qun tr mng DSLAM vi VisiBroker .............103

Danh mc cc bng
Bng II-1 Khun dng mt s i tng ............................. Error! Bookmark not defined. Bng II-2 Tn ca cc t chc v OlD ................................ Error! Bookmark not defined. Bng II-3 Mt s nh ngha ca cc OID........................... Error! Bookmark not defined. Bng II-4 M t cc trng ca SNMP ............................... Error! Bookmark not defined. Bng III-1 Cc bin mi trng chun.......................... Error! Bookmark not defined.

Li ni u
Cuc cch mng Internet trong nhng nm gn y v s ln t ca cc dch v truy nhp internet qua ADSL trc cc dch v truy nhp truyn thng qua Dial-up t ra nhiu bi ton ln cho cc nh cung cp dch v (ISP) trong vic xy dng qun l mt s lng khng l cc thit b DSLAM phc v lp t khp ni trong a bn cung cp. Bn cnh , s bng n mnh m ca cc dch v Web v kh nng s dng c web mi ni, mi lc, vo mi thi im m khng ph thuc vo h thng nn hay khong cch a l to ra mt tro lu web ha cc loi hnh dch v, k c cc loi dch v c tnh cht chuyn mn cao, xa nay vn gi gn trong cc phng th nghim hay cc trung tm my tnh ln nh quan trc v qun l cc dch v mng. Trong lun vn ny, chng ti s cp n vn s dng cng ngh web (CGI, CORBA) v cng ngh qun tr mng truyn thng (SNMP) theo di v qun tr cc thit b cung cp dch v DSLAM vi mc ch xy dng mt cng giao tip trn nn WEB phc v cng tc qun tr cc thit b DSLAM ca cc nh sn xut khc nhau hin ang c khai thc ti Bu in H ni. V phng din l thuyt, lun n ny s i vo tm hiu giao thc qun tr mng SNMP v m hnh qun tr mng da trn giao thc ny; cng ngh cng giao tip chung CGI trn WWW v CORBA cng s c gii thiu cc kha cnh chnh, c lin quan n vic pht trin ng dng qun tr mng trn nn web.

Lun vn thc s X l thng tin v truyn thng

Chng I. TNG QUAN


I.1. Mt s vn c bn Giao thc qun tr mng SNMP c a ra t nhng nm 80 ca th k trc nhng n nay vn c s dng rng ri trong lnh vc qun tr ca cc mng TCP/IP. Mc d khi mi c a ra, SNMP ch c thit k nh mt gii php tm thi qun tr mng TCP/IP nhng do TCP/IP qu ph bin v thnh chun giao tip de-factor ca th gii, SNMP cng tr thnh mt chun ng vai tr cc k quan trng trong vic thit k cc phn mm qun tr mng ca cc thit b cung cp dch v. Common Object Request Broker Architecture (CORBA) c OMG (Object Management Group) a ra nh l mt b khung kin trc chun cho cc ng dng hng i tng trn mng. CORBA a ra nhiu xc lp quan trng nh l trong sut ha tnh a phng ca cc i tng, gn kt ngn ng bc cao cng nh a ra cc phng thc gi hm ng. Nh chng ta bit, cc trang web tnh s khng kh nng cung cp cc thng tin cn c cht cp nht thng xuyn nh cc ng dng da trn GUI (Graphical User Interface) ca windows. Cng ngh s dng JavaApplet nhng trong cc trnh duyt khc phc c im yu ny, v c kh nng cung cp y cc thng tin cp nht thi gian thc, k c thng tin di dng ha. S dng Java trong cc trnh duyt trn thc t m rng kh nng ca web ln nhiu ln, khin cho web tr thnh mt mi trng vn nng truyn ti thng tin khng b gii hn v khong cch hay s khc bit v cu hnh h nn.

8/116

Lun vn thc s X l thng tin v truyn thng

I.2. L do chn ti Dch v truy nhp Internet bng thng rng s dng cng ngh ADSL ln u tin c Tp on Bu chnh Vin thng Vit nam (VNPT) th nghim vo nm 2001 v c trin khai rng ri t thng 7 nm 2003 vi tn thng hiu l MegaVNN. Dch v ny t khi ra i n nay c nhng bc pht trin nhy vt, p ng c yu cu ca ngi dng v bng rng, v dn dn thay th dch v truy cp Internet gin tip (Dial-up) qua ng dy in thoi truyn thng. L mt thnh vin ca VNPT, hin nay trn a bn thnh ph, Bu in TP H ni ang cung cp 2 dch v chnh s dng cng ngh xDSL l dch v truy nhp Internet bng rng qua ADSL v dch v dch v mng ring o MegaWan trn c 2 loi ng truyn ADSL v SHDSL. c th cung cp dch v xDSL trn a bn thnh ph H ni, hin nay Bu in H ni ang qun l mt h tng mng li bao gm mt h thng phc v truy nhp hin i vi cc thit b DSLAM (Digital Subscriber Line Access Multiplexer) phn b khp ni trn a bn thnh ph (hn 140 im lp t, gn 200 DSLAM ) ca nhiu nh cung cp thit b ni ting. Nhu cu s dng xDSL trn a bn vn ang tip tc pht trin rt nhanh, s lng cc thit b DSLAM khai thc trn mng lin tc c u t mi nhm p ng c nhu cu ca khch hng, mng li c m rng v phc tp tng ln. n nay, trn a bn H ni hin c 8 chng loi thit b ca 4 nh sn xut khc nhau Siemens, Huawei, Tailyn, ZTE vi cc cng ngh khc nhau nh ATM DSLAM, IP DSLAM H thng cc DSLAM thuc 4 hng sn xut ny c qun tr, gim st, khai thc mng t xa bi 04 h thng qun l NMS (Network Management System) tp trung do tng hng sn xut thit b cung cp. Cc h thng

9/116

Lun vn thc s X l thng tin v truyn thng

NMS ny u l mi trng ng, c thit k hng ti i tng l cc k thut vin vn hnh mng nn khng cung cp giao din ra bn ngoi v khng c mi lin h vi nhau. Vi nhng hn ch trn, cng vi s pht trin ca mng li xDSL c v s lng v chng loi thit b t ra mt thch thc ln i vi Bu in H ni trong vic vn hnh, khai thc h thng; cng nh nh hng n cht lng cc quy trnh cung cp dch v ca n v, c th nh sau: Khng c chc nng cho php cc h thng h tr bn ngoi giao tip vi phn qun l mng Do khng c chc nng giao tip vi cc h thng h tr bn ngoi (v d h thng qun l khch hng, h thng h tr dch v.), qu trnh cung cp dch v (ng m cng dch v, khi to dch v, tho hy dch v) u phi chuyn n k thut vin khai thc mng thc hin bng nhn cng thng qua h thng NMS ca mi hng; khng cho php kt ni, thc hin t ng ha dy chuyn sn xut, cng nh khng th xy dng v pht trin thnh mt gii php tng th. iu dn n cc h qu tt yu sau: S lng thao tc hng ngy tng ln theo s lng thu bao v dch v: Mt ngy phi thc hin nhiu yu cu ng/m cng (khi c khch hng mi ha mng, hu hp ng, n, tr n cc, vv). C nhng ngy, s lng yu cu ln n hn 300; thi gian thc hin trong t 7:00 cho n 21:00 vi cc quy nh cht ch v thi gian hn ch ti a vic mt lin lc ca khch hng; To mt sc p khng nh i vi qu trnh vn hnh v khai thc h thng do phi s dng nhiu loi phn mm qun l NMS i vi nhng cng vic hng ngy (kim tra thng s cng, ng, m, reset

10/116

Lun vn thc s X l thng tin v truyn thng

cng) . Thc t l c lc, cn b qun l mng phi ngi trc 04 mn hnh NMS v phi thao tc qua li gia 4 NMS ny; Cng tc h tr v chm sc khch hng gp nhiu kh khn: V l do an ninh, bo mt nn phn qun l mng NMS nn k thut vin ti b phn h tr khng c thng tin v trng thi thit b tr li v h tr khch hng m phi hi thng tin t b phn qun l mng NMS, nh hng khng tt n cht lng chm sc khch hng, tn nhiu nhn lc v mt nhiu thi gian ch i.. Kh khn trong vic tch hp ng dng, nng cao cht lng, ty bin ca dch v: Cc phn mm qun l thit b DLSAM c thit k cho cc nhu cu qun l chung nn c nhiu im khng ph hp vi nhu cu s dng ca Bu in H ni; khng tch hp vi cc CSDL hin c ca Bu in H ni, do vy gp nhiu kh khn trong vic tch hp ng dng, nng cao cht lng ca dch v. Khng c mt gii php tng th cho ton h thng: Khng c mt hng cung cp thit b DSLAM no c kh nng cung cp mt gii php tng th tha mn cc yu cu trn, do gii php thit b ca mi hng u khc nhau, cc hng ch c th c kh nng cung cp gii php i vi thit b ca h khi c yu cu, m khng quan tm n thit b ca cc hng sn xut khc. Thc t ti mng do Bu in H ni qun l tn ti thit b ca 4 hng sn xut, trong khi s hng cung cp thit b trn th trng Vit nam c tnh ln hn 10 hng.

11/116

Lun vn thc s X l thng tin v truyn thng

S pht trin ngy cng mnh m ca dch v xDSL vi xu hng nng cao cht lng dch v m vn tit kim ngun nhn lc k thut cao i hi phi c mt gii php gii quyt trit cc vn nu trn. L mt cn b k thut ang cng tc ti mt n v cung cp dch v ln vi, ti c c hi c tip xc vi nhng cng ngh tin tin ca th gii cng nh c va chm nhiu vi cc vn ny sinh m mt nh cung cp dch v phi i mt khi tin hnh cung cp dch v mng trn quy m rng, c bit l vn qun tr mng v nhng rc ri ny sinh trong thc t khi phi phi hp hot ng gia nhiu n v, s dng nhiu loi thit b ca nhiu nh cung cp khc nhau. La chn ti Qun tr mng tp trung trn nn WEB s dng cng ngh SNMP, CGI v CORBA cho h thng cung cp dch v Digital Subscriber Line (DSL) ca Bu in H ni, chng ti ang hng ti mc tiu tm hiu cng ngh qun tr mng da trn WEB v xy dng mt gii php phn mm ng dng trong thc t ph hp vi m hnh khai thc, qun l ni ti ang cng tc ni ring v c th p dng cho cc nh nh cung cp dch v khc. Phn mm cn phi p ng cc yu cu t ra vi cc kh nng: Cho php t ng ha cc thao tc khai thc hng ngy; Cung cp giao tip cho php cc ng dng/dch v h tr bn ngoi c giao tip vi cc thit b DSLAM. C th theo di trng thi thit b t xa, tu theo phn quyn ca cc n v tham gia khai thc ph hp vi quy trnh qun l dch v ca nh cung cp dch v, to tin tin ti thc hin cc chc nng qun l phc tp hn Nht th ha giao din qun l, gip ngi s dng trnh vic phi thao tc vi nhiu phn mm qun l khc nhau;

12/116

Lun vn thc s X l thng tin v truyn thng

Nhn thc c ngha quan trng ca vic tin hc ha, t ng ha dn cc thao tc n gin, gii phng ngun nhn lc c trnh cao khi cc thao tc n iu, cng nh nng cao cht lng cung cp dch v, nhm thc hin ti s c gng hon thnh ti hng ti kh nng p dng vo thc t khng ch i vi n v mnh, m c th p dng vo cc n v khc. I.3. Cu trc ca lun n Lun n c chia thnh 5 chng vi cc ni dung chnh sau: Chng 1: Tng quan, trnh by nhng vn c bn s c trnh by trong ti, l do la chn ti v trnh by s qua v cu trc lun n Chng 2 s trnh by nhng vn c bn ca giao thc qun tr mng SNMP v m hnh qun tr mng thng thng, s ra i v pht trin ca ; cc vn lin quan n SNMP nh SMI, MIB, OID cng nh cc chun c bn ca SNMP, cc hn ch ca SNMP v khc phc Chng 3 s trnh by nhng vn c bn ca CGI v CORBA. Cc vn s c trnh by y l chun CGI, cc c trng ca CGI, m hnh quan h Client/Server ba bn s dng CGI, m hnh qun tr mng qua web, c bn v lp trnh CGI . Chng 3 cng s khi lc v CORBA, gii php s dng CORBA lm mi trng xy dng ng dng qun tr mng qua web. Cc vn s c trnh by y l chun CORBA, tng quan v kin trc CORBA, b phn trung gian x l cc yu cu trn i tng (Object Request Broker

13/116

Lun vn thc s X l thng tin v truyn thng

ORB), m hnh bn bn gia Web client, Web server, NMS Agent v DSLAM trn CORBA. Chng 4 p dng thc t h thng qun tr h thng cung cp dch v xDSL ca Bu in H ni. Gii thiu h thng qun l mng cung cp dch v xDSL ca Bu in H ni ang c trin khai thc t v cc gii php xy dng cng c qun tr cc thit b DSLAM thng qua giao thc SNMP da trn trn nn web bng CGI v CORBA. Chng ny s trnh by nhng phn c bn lin quan n xy dng gii php qun tr mng tp trung qua WEB s dng CGI cng nh CORBA, gii thiu s b v gi phn mm VisiBroker v trnh by c th phng php xy dng cng c qun tr mng DSLAM s dng CORBA Chng 5 Kt qu thc tin v p dng, trnh by nhng kt qu t c ca ti, mt s so snh gia hai cng c qun tr mng da trn CGI v CORBA. Chng 5 cng s trnh by nhng kh nng pht trin, m rng ca ti, c th ng dng c nhiu hn trong thc t trong vic, c bit l p dng vo h thng qun tr mng DSL ca Bu in H ni.

14/116

Lun vn thc s X l thng tin v truyn thng

Chng II. Giao thc SNMP


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... Vi nhng vn phng nh ch c vi thit b mng v t tp trung mt ni th c l ta khng thy c li ch ca SNMP; Nhng vi cc h thng mng ln, thit b phn tn nhiu ni, c bit l trong cc h thng mng ca cc nh cung cp dch v vi m hnh qun l tp trung th vic s dng SNMP dng nh l bt buc. Giao thc SNMP c thit k cung cp mt phng thc n gin qun l tp trung mng TCP/IP. Nu mun qun l cc thit b t 1 v tr tp trung, giao thc SNMP s vn chuyn d liu t client (thit b m ang gim st) n server ni m d liu c lu trong log file nhm phn tch d dng hn. Cc phn mm ng dng da trn giao thc SNMP nh: MOM ca Microsft v HP Openview vv II.1. Mt s vn c bn v SNMP Bn cht ca SNMP l tp hp mt s lnh n gin v cc thng tin m lnh cn thu thp gip ngi qun tr thu thp d liu v thay i cu hnh ca cc thit b tng thch vi SNMP. V d, SNMP c th dng kim tra tc hay ra lnh shutdown mt cng Ethernet, theo di nhit ca switch v cnh bo khi n ln qu cao. SNMP c th qun tr rt nhiu thit b, t phn cng n phn mm nh Web server hay c s d liu, t thit b t tin nh router n mt s hub r tin, hay cc h thng Unix, Window, cc my in, ngun in min l cc thit b h tr SNMP. Cc thit b c gi l h tr hay tng thch

15/116

Lun vn thc s X l thng tin v truyn thng

SNMP tc l n c ci t mt phn mm c th thu thp mt s thng tin v tr li cc yu cu ca ngi qun tr. II.1.1. S ra i v pht trin ca SNMP

Giao thc Simple Netwok Management Protocol (SNMP) ra i vo nm 1988 p ng i hi cp bch v mt chun chung cho qun tr mng Internet. SNMP cung cp cho ngi dng mt tp cc lnh n gin nht c th qun tr c cc thit b t xa. c pht trin t giao thc Simple Gateway Monitoring Protocol (SGMP), SNMP c m rng cho ph hp vi cc yu cu ca mt h thng qun tr mng a dng. Ban u, SNMP ch c xem nh l mt gii php tm thi cho vic qun tr cc mng my tnh da trn nn TCP/IP trong khi ch i chuyn hn sang mt giao thc da trn kin trc mng ca OSI. Tuy nhin, do s pht trin mnh m ca cc ng dng trn nn TCP/IP, nht l t nm 1990, khin cho TCP/IP tr thnh mt giao thc truy nhp mng de factor ca th gii. iu cng khin cho SNMP tr thnh giao thc qun tr mng c s dng chnh v khng cn b xem l mt gii php tm thi na [Stallings 96]. Cc hot ng v quy cch d liu ca SNMP c ch nh da trn cc tiu chun c a ra trong cc b RFC (Request For Comment) v hin chng vn ang c pht trin. Trong s cc RFC xy dng nn chun SNMP, c ba b tiu chun quan trng c dng lm c s cho SNMP. Chng l: RFC 1156 - Cu trc v nh danh ca cc thng tin qun tr ca internet trn nn TCP/IP (Structure and Identification of Management Information for TCP/IP based internets).

16/116

Lun vn thc s X l thng tin v truyn thng

RFC 1157 - A Simple Network Management Protocol (SNMP). RFC 1213 C s thng tin qun tr mng cho Internet trn nn TCP/IP (Management Information Base for Network Management of TCP/IP-based internets: MIB-II) Phin bn u tin ca SNMP (SNMPv1) ra i nm 1988 c quy nh trong RFC 1157. phin bn u tin ny, tiu ch ca SNMP ng nh tn gi ca n, l s n gin trong thc thi [Stallings 96] . l l do chnh khin cho tnh bo mt trong SNMPv1 rt lng lo, ph thuc vo mt xu chia s tng t nh mt khu dng thun vn bn gi l commutitiy string. iu ny cho php tt c cc ng dng SNMP nu bit xu ny c th truy cp thng tin qun tr trn thit b. Mc d chun SNMPv1 thuc v qu kh (historical standard) nhng hin nay n vn l phin bn m rt nhiu cc nh sn xut h tr. Phin bn tip theo ca SNMP l SNMPv2 hay SNMPv2c. c quy nh trong RFC 3416, RFC 3417 v RFC 3418, SNMPv2 thm cc khun dng d liu, cc MIB v PDU mi, lm tng kh nng cho giao thc. Tuy nhin hai phin bn u tin ny ca SNMP vn thiu cc tnh nng bo mt, xc thc cn thit nn vn c th d dng b khai thc [Stallings 96] . SNMPv3 l phin bn cui cng, ch yu tng cng bo mt trong qun tr mng [Stallings 98] . Phin bn ny h tr giao thc xc thc mnh v knh giao tip c m ha gia cc thc th c qun tr. Nm 2002, phin bn ny c chuyn t bn tho sang thnh chun, bao gm cc RFC 3410, RFC 3411, RFC 3412, RFC 3413, RFC 3414, RFC 3415, RFC 3416, RFC 3417, RFC 3418, v RFC 2576. V SNMPv3 l chun mi c cng b, do vy ch c mt s hng ln nh Cisco mi h tr SNMPv3. Tuy nhin vi

17/116

Lun vn thc s X l thng tin v truyn thng

nhu cu ngy cng cao ca bo mt trong qun tr mng, s c thm ngy cng nhiu cc hng h tr SNMPv3 trong cc sn phm ca mnh. II.1.2. M hnh SNMP

Chun SNMP a ra mt m hnh c s cho cc nh ngha d liu thng qun tr v chun cho cc giao thc trao i thng tin . Trong kin trc ca SNMP c hai loi thc th l manager v agent. Manager l server chy mt phn mm c kh nng iu khin cc cng vic qun tr cho mt mng. Manager thng c gi l trm qun tr - Network Management Station (NMS). Trong mt mng, trm qun tr chu trch nhim thm d (polling) v nhn cc trap t agent. Thm d l hnh ng truy vn mt agent (router, switch, server Unix) yu cu mt s thng tin. Cc thng tin ny c trm qun tr lu tr, phn tch v hin th. Trap cho php agent thng bo cho trm qun tr nu c iu g vt khi phm vi cho php xy ra. Khi nhn c trap, ty theo thng tin m trap cung cp, trm qun tr s thc hin mt s thao tc c cu hnh t trc. Chng hn, nu ng T1 kt ni ra Internet c s s, ngay lp tc router gi trap cho trm qun tr, khi trm qun tr c th thc hin hnh ng nh thng bo li cho ngi qun tr. Thc th th hai l agent, l mt phn mm nh chy trn thit b c qun tr [SnmpFAQ]. N c th l mt chng trnh c lp nh mt tin trnh daemon trong Unix, c th l thnh phn tch hp bn trong h iu hnh nh IOS ca router Cisco hay l h iu hnh cp thp iu khin UPS. Agent cung cp thng tin v rt nhiu hot ng ca thit b. V d, agent trong router c th theo di trng thi up/down ca cc interface. Trm qun tr c th truy vn trng thi ca cc interface ny v thc hin cc hnh ng tng ng nu interface down. Hoc l nu agent c cu hnh c
18/116

Lun vn thc s X l thng tin v truyn thng

kh nng nhn bit mt s s kin xu, agent c th gi trap n trm qun tr, ni m cc tc v tng ng s c thc hin. Mt vi thit b. Hnh II.1 minh ha mi quan h gia trm qun tr v agent.

Hnh II.1 Mi quan h gia manager v agent

Ch l trap v thm d c th xy ra ng thi. Khng c hn ch g v thi im trm qun tr c th thm d agent v thi im agent gi trap M hnh SNMP ca mt h thng qun tr mng bao gm b thnh phn trng yu (cc thnh phn ny c m t Hnh II.2): Trm qun tr; Thc th b qun tr (node hay Network Element - NE) C s thng tin qun tr giao thc qun tr. Vic qun tr mng c thc hin bi cc trm my tnh qun tr. Cc my tnh ny s dng cc phn mm qun tr c nhim v qun l mt phn hoc ton b cu hnh ca mng theo yu cu ca cc ng dng qun tr hoc cc nh qun tr mng. Cc phn mm ny c th c giao din hc cho php cc nh qun tr theo di trng thi ca mng v thc hin cc thao tc cn thit khi c yu cu. Cc im qun tr (NE) c th l cc trm lm vic, cc thit b nh tuyn, cu hoc chuyn mch hoc l bt k mt thit b no c kh nng

19/116

Lun vn thc s X l thng tin v truyn thng

trao i d liu v trng thi ca mnh vi th gii bn ngoi. c th thc hin c cc chc nng b qun l, cc NE phi c c cc tnh nng c bn ca mt SNMP agent, thc cht l mt modul phn mm c chc nng lu tr v cp nht cc thng tin qun tr ca thit b cng nh c kh nng gi cc thng tin n cho trm qun tr khi c yu cu. Cu trc ca cc thng tin c xc nh bi thnh phn C s thng tin qun tr (Management Information Base - MIB). Mi mt h thng trn mng duy tr mt MIB phn nh cc trng thi ca cc ti nguyn cn qun tr trong h thng .

Hnh II.2 Cc thnh phn c bn ca SNMP

Vic trao i d liu gia Manager v Agent c thc hin trn giao thc SNMP [ietf]. Giao thc ny cho php cc thc th qun tr gi cc n Agent cc truy vn v trng thi cc ti nguyn (cn gi l cc i tng). Cc i tng ny c nh ngha trong MIB ca cc agent v c th c thay i khi c yu cu. SNMP cung cp ba tc v c bn nh sau:

20/116

Lun vn thc s X l thng tin v truyn thng

Get: Trm qun l yu cu nhn gi tr ca mt hoc nhiu i tng qun l (MO) t trm b qun l; Set: Trm qun l yu cu thay i gi tr ca mt hoc nhiu i tng qun l (MO) ti trm b qun l; Trap: Trm b qun l gi thng tin v trng thi ca mt i tng qun l khi c mt bin c c nh ngha trc xy ra Theo quy nh ca giao thc SNMP, Get bao gm 2 tc v GetRequest v GetNextRequest, trong : GetRequest: ly gi tr ca mt hoc nhiu bin GetNextRequest: ly gi tr ca bin k tip T phin bn SNMP v2, c thm mt tu chn na c a vo, l GetBulkRequest. Cu lnh ny c su dng chnh ly mt lng ln d liu dng ma trn Bn cnh , SNMP cn nh ngha cc tc v khc nh: GetResponse: tr v gi tr ca mt hoc nhiu bin sau khi pht lnh GetRequest hoc GetNextRequest, hoc SetRequest. InformRequest: Cho php cc trm qun tr gi thng tin dng trap n cc trm qun l khc (t SNMP v2) Trong mng TCP/IP, SNMP l mt giao thc hot ng tng ng dng v s dng giao thc UDP. Do , SNMP l mt giao thc phi kt ni, tc l gia manager v agent khng c s duy tr kt ni trong sut qu trnh trao i d liu.

21/116

Lun vn thc s X l thng tin v truyn thng

Hnh II.3 l mt minh ha ca giao thc SNMP v cc ng dng SNMP trong kin trc mng, trong , network-dependent protocols c th l Ethemet, FDDI hay X.25, vv

Hnh II.3 SNMP trong m hnh mng

II.1.3.

Cng dch v v dch v truyn ti phi hi p

SNMP c thit k d dng trn cc dch v phi kt ni [SnmpFAQ]. Nguyn nhn dn n quyt nh ny l do SNMP c thit k c th duy tr c lin lc trong cc trng hp xut hin li thit b hoc li mng. Nu SNMP s dng cc loi dch v hng kt ni (connection-oriented), vic mt kt ni s gim hiu nng trao i d liu ca SNMP. Chnh v l do , SNMP s dng giao thc UDP (User Datagram Protocol) trong kin trc TCP/IP. Trong m hnh OSI, SNMP cng c c h tr bi dch v truyn vn phi kt ni (Comectioless Transport Service). Cc phn on
22/116

Lun vn thc s X l thng tin v truyn thng

UDP c truyn i trong cc gi tin IP. UDP header c bao gm c a ch ngun v a ch ch, cho php cc thc th SNMP nh danh a ch ca nhau. Cc thc th SNMP tip nhn cc gi tin n trn cng UDP 116 ngoi tr cc gi tin TRAP. Trm qun l nghe cc gi tin TRAP trn cng 162. Trong mi trng SNPM, cc gi tin khng nn c di vt qu 484 byte
[ietf]. Tuy nhin, cc thc th vn nn chp nhn cc gi d liu ln hn nu

nh h thng cho php.SNMP s dng User Datagram Protocol (UDP) lm giao thc tng giao vn truyn d liu gia manager v agent v rt nhiu l do. Th nht v UDP l giao thc n gin, khng lin kt nn : Gi tin c kch thc header nh, thch hp vi truyn thng tin qun tr; Khng tn thi gian v cng sc thit lp, duy tr v ngt lin kt; Khng tn bng thng ca mng; Nhiu thit b c qun tr c ti nguyn CPU, b nh rt hn ch, nn ch c th ci t UDP lm giao thc tng giao vn. Ngoi ra, UDP khng i hi tin cy. SNMP c thit k thng bo khi c li xy ra v nu mng khng bao gi li th ta cng khng cn thit phi gim st. S l mt tng ti trong trng hp mng xy ra tc nghn hay b li, ta li c gng truyn i truyn li m bo tnh tin cy nh ca TCP. iu ny ch lm cho mng cng tc nghn hn. Tuy nhin khng tin cy cng l mt vn ca UDP. iu ny i hi cc ng dng SNMP phi x l trng hp gi tin b mt v truyn li nu cn. Cng vic ny thng c thc hin mt cc n gin vi timeout. Trm qun tr gi mt gi tin yu cu ti agent v ch i tr li trong mt khong
23/116

Lun vn thc s X l thng tin v truyn thng

thi gian c thit lp trc gi l timeout. Nu sau thi gian timeout, trm qun tr khng nhn c gi tin tr li t agent, n c th gi s rng gi tin ny b mt v truyn li yu cu nu cn. S ln truyn li cng c th c cu hnh trc. Ta c th thy rng khng tin cy khng phi l vn thc s ca UDP. Trong trng hp ti nht trm qun tr gi i mt yu cu v khng bao gi nhn c tr li. Tng t vi trap, nu agent gi i mt trap v n khng n ni nhn, trm qun tr cng khng c cch no bit c trap c gi i hay cha v agent cng khng th bit c trap c n ch hay khng. Do vy thm ch agent cng khng cn truyn li trap. SNMP s dng cng UDP 161 truyn v nhn yu cu v cng 162 nhn trap t thit b c qun tr. Cc cng ny l mc nh, cc sn phm SNMP thng cho php ngi s dng thay i cng v l do an ninh. V d cng nhn trap ca manager c th i thnh 1999, khi agent cng phi c cu hnh gi trap n ng cng ny. II.1.4. SNMP community

SNMP s dng khi nim community l mt xu dng chung thit lp mi quan h tin cy gia manager v agent. C ba loi community l : readonly, read-write v trap. Nh tn gi ch ra, ba community ny cho php gii hn thc hin ba cng vic. Read-only ch cho php c m khng c thay i ni dng, chng hn ta c th c s lng gi tin truyn qua mt cng ca router nhng khng c php thay i gi tr ny. Read-write cho php c v thay i gi tr, do vy c th c gi tr mt bin m, thit lp li gi tr ny, thm ch thay i bin trng thi ca mt interface hay thay i cc cu hnh ca router. Community trap cho php manager nhn trap t agent.

24/116

Lun vn thc s X l thng tin v truyn thng

V bn cht community chnh l mt khu, c manager v agent u s dng ba xu ging nhau t tn cho 3 loi community ny. Hu ht cc hng u s dng xu mc nh l public cho community read-only, private cho community read-write. Theo gi tr mc nh ny, khi manager mun c gi tr ca mt bin, manager trnh xu public trong gi tin yu cu. Agent s kim tra xu public v xc nh l trng vi community read-only, nh vy manager c community cho php c gi tr. Tuy nhin agent cn phi thc hin xc thc manager v xt n kh nng cho php truy cp da trn MIB ca bin mi quyt nh l manager c th c gi tr ca bin hay khng. V community c bn cht l mt khu nn cn thay i gi tr mc nh. Khi cu hnh SNMP agent, ta phi cu hnh a ch ni nhn trap. Thm vo , v SNMP community c gi i di dng thun vn bn, ta nn cu hnh agent gi trap authentication-failure khi ai c gng truy vn thit b vi mt community khng chnh xc. Do s dng community nh l mt khu nn SNMPv1 l giao thc rt yu v bo mt. Cc gi tin c gi i di dng thun vn bn nn khng chng c kiu tn cng bng cch nghe ln sniffer. SNMPv2 c gng gii quyt vn ny da trn cc cch tit cn cht ch hn. Mt phin bn gi l SNMPv2 party-based tip cn theo hng: tuy tng yu cu v xc thc v tnh mt m c th s dng cc knh khc nhau trao i thng tin. Hnh 2.3. minh ha 3 knh vi cc yu cu v bo mt khc nhau bng cch thay th community (chia s dng chung gia tt c cc bn tham gia) bng party (chia thnh nhiu nhm, mi nhm trao i theo cch thc ring). Knh th nht s dng truyn s liu khng quan trng gia A v B, do vy s dng cp Party 1.A v Party 1.B c tnh cht m - open. Knh th hai c v thay i cu hnh thng thng, yu cu

25/116

Lun vn thc s X l thng tin v truyn thng

c xc thc nn s dng cp Party 2.A v Party 2.B c tnh cht xc thc authenticated. Knh th ba truyn cu hnh rt quan trng, yu cu phi bo mt nn s dng cp Party 3.A v Party 3.B c tnh mt. Tuy nhin, vi nhiu n lc tng cng bo mt trong SNMP dn ti ba phin bn khng tng thch vi nhau l: SNMPv2p hay SNMPv2 party-based, SNMPv2u hay SNMPv2 user-based v SNMPv2*. Cc phin bn ny tht bi trong vic tm c s h tr ca cc nh sn xut v dng li bn tho, ri chuyn sang qu kh. Cui cng, mt s tha hip c thc hin v kt qu l chun SNMPv2c hay SNMP community-string-based. y l mt bc tt li khi quay li s dng community nh SNMPv1, tuy nhin chun ny li c h tr ca IETF cng nh cch nh sn xut. Trong ti liu ny, khi ni n SNMPv2 l m ch SNMPv2c. Vn v bo mt ch c gii quyt trit ch khi xut hin phin bn SNMPv3. SMNPv3 ra i ch yu gii quyt vn bc xc v bo mt trong hai phin bn trc [Stallings 98]. Phin bn ny khng c s thay i v giao thc, khng c thm PDU mi, ch c mt vi quy chun mi, khi nim v thut ng mi, cng khng nm ngoi vic lm tng tnh chnh xc
[Stallings 98]. Thay i quan trng nht trong SNMPv3 ny l s dng khi

nim SNMP entity thay cho c manager v agent. Mi SNMP entity gm mt SNMP engine v mt hoc nhiu SNMP application. S thay i v khi nim ny quan trng ch thay i v kin trc, tch bit hai phn ca h thng SNMP, gip cho vic thc hin cc chnh sch bo mt. im quan trng l SNMPv3 vn tng thch ngc vi cc phin bn trc.

26/116

Lun vn thc s X l thng tin v truyn thng

II.2. Cu trc thng tin qun tr (SMI) v c s thng tin qun tr (MIB) manager v agent c th trao i thng tin cho nhau th gia manager v agent phi c nh ngha v khun dng d liu trao i chung. Cu trc thng tin qun tr (Structure of Management Information-SMI) c nh ngha trong RFC 1155 xc nh phng php c bn nh danh cc i tng c qun tr v hnh vi ca chng [perkins]. Agent s hu danh sch cc i tng n gim st. Cc i tng ny c th l trng thi hot ng (up/down/testing) ca mt interface ca router, s gi tin truyn/nhn ca interface Danh sch ny cng cung cp thng tin m trm qun tr c th s dng xc nh trng thi ca thit b cha agent. Lu l SMI ch l c php nh ngha cc i tng c qun tr, cn cc i tng c qun tr nh ngha bng SMI gi l C s thng tin qun tr (Management Information Base-MIB. MIB c th c coi l c s d liu v cc i tng c qun tr m agent gim st. Tt c trng thi hay thng tin thng k c th truy nhp bi trm qun tr u c nh ngha trong MIB. Phin bn u tin ca SNMP a ra MIB-I nh ngha trong RFC 1066, Phin bn tip theo (MIB II) c a ra vo nm 1991 (RFC 1213 ) cng vi SNMPv2 b sung thm danh sch cc cc thng tin c bn, bt buc phi c i v c chun ha trn mi thit b tng thch SNMP. MIB c cu trc dng hnh cy [perkins]. Trong cu trc ny, tt c cc bin SNMP hay cc i tng c m t di dng cnh v l v c t tn theo kiu OBJECT IDENTIFIER (OID) ca ASN.1. Cc i tng qun l c tp hp li thnh cc nhm lin h logic vi nhau tnh t gc (root). T im root, ta s c cc cnh tip theo mc 1: iso (l), ccitt (0) and joint-

27/116

Lun vn thc s X l thng tin v truyn thng

iso-ccitt (2), trong , iso nhnh theo quy nh ca t chc International Organization for Standardization, ccitt l ca Intemational Telegraph and Telephone Consultative Cornmittee, v joint-iso-ccitt ginh cho cc quy nh c qun l bi c hai t chc ISO v CCITT [ietf]. Mt agent c th ci t nhiu MIB, nhng tt c cc agent u phi ci t mt MIB c bit gi l MIB-II (RFC 1213). Chun ny nh ngha nhng rt nhiu thng tin chung v h thng (v tr ca thit b, ngi lin h), v s liu thng k ca interface ( tc , MTU, lng octet gi, lng octet nhn). Mc ch ca MIB-II l cung cp cc thng tin qun tr chung v TCP/IP. MIB-I l phin bn u tin nhng t khi MIB-II pht trin n, n khng cn c s dng na. c th gim st c nhng vn c th lin quan n cc cng ngh mng khc nhau, cc tnh nng c bit ca cc hng khc nhau th agent v manager phi c ci t cc MIB tng ng. Chng hn, mt s bn tho v ngh c a ra qun tr cc cng ngh nh Frame Relay, ATM, FDDI v cc dch v nh email, DNS : ATM MIB (RFC 2515) Frame Relay DTE Interface Type MIB (RFC 2115) BGP Version 4 MIB (RFC 1657) RDBMS MIB (RFC 1697) RADIUS Authentication Server MIB (RFC 2619) Mail Monitoring MIB (RFC 2789) DNS Server MIB (RFC 1611)

28/116

Lun vn thc s X l thng tin v truyn thng

Ngoi ra, mt im rt m na ca SNMP l cc hng sn sut v c nhn u c th nh ngha cc MIB cho ring mnh. V d, mt agent trong mt router c ci t MIB-II (bt buc) v cc MIB cho cc loi interface m n c (nh RFC 2515 cho ATM v RFC 2115 cho Frame Relay). Ngoi ra, router ny cn c thm mt s chc nng mi rt hu ch trong qun tr m cha c cp n trong cc MIB chun no, do vy nh sn xut nh ngha MIB ca ring mnh, ci t cc i tng c qun tr cho cc chc nng mi ny. C rt nhiu cc li MIB, nhng mi agent ch c h tr mt s MIB, do vy trm qun tr ta cng ch cn ci t cc MIB cn thit. II.2.1. Nhm h thng trong MIB II

Thng tin trong nhm h thng c ngha rt quan trng trong qu tr mng. Nh m t trong RFC 1213, nhm h thng a ra cc thng tin v h thng qun tr. Nhm ny bao gm by i tng (xem Hnh II.4 NhmCu trc ca MIB). Nu khng c cu hnh cha cc thng tin ny th agnt s tr v gi tr di bng 0.

29/116

Lun vn thc s X l thng tin v truyn thng

Hnh II.4 NhmCu trc ca MIB Bng II-1 Khun dng mt s i tng
i tng SysDescr SysObjectID sysUpTime syscontact SysName SysLocation SysServices Khun dng Displaystring (size 0 ... 255) OBJECT IDENTlFIER TimeTicks Displaystring (size 0 ... 255) Displaystring (size 0 ... 255) Displaystring (size (0 ... 255) INTEGER (0 127) Truy nhp RO RO RO RW RW RW RO M t Tn, phin bn ca h thng Tn nh sn xut, hoc nh danh ca nh qun tr phn on mng Thi gian tnh t khi phn qun tr mng c khi ng Thng tin v ngi qun tr thit b Tn ca ngi qun tr V tr, ni t thit b M t cc dch v m thit b cung cp

* RW - c/Ghi (Read & Write) RO Ch c (Read Only)

30/116

Lun vn thc s X l thng tin v truyn thng

II.2.2.

Nhm cc t chc trong MIB-II

Trong hnh trn, chng ta thy nhm cc i tng t chc - enterprise c xp di nhnh Private. Nhm Enterrprise c s dng cho php cc t chc (nh sn xut) cung cc cc h thng mng c th ng k cho cc sn phm ca mnh v cng b cc nh qun tr mng c th s dng chng trong t chc mng ca mnh. Cc cnh trong nhm enterrprise c s dng cho cc t chc ng k cc OID theo mc ch ring ca t chc . Nhiu t chc t to lp cho ring mnh mt MIB nh l Proteion, IBM, CMU, Cisco vv
Bng II-2 Tn ca cc t chc v OlD Tn ca t chc D phng Proteon Cisco NSC Novell Sun Microsystems OID 1.3.6.1.4.1.0 1.3.6.1.4.1.1 1.3.6.1.4.1.9 1.3.6.1.4.1.10 1.3.6.1.4.1 23 1.3.6.1.4.1.42

Mi mt MIB ca cc t chc cng c nh ngha theo chun SMI v ASN.1. V d: file nh dng CISCO-SMI.my ca hng Cisco System Inc c dng nh sau:
ciscoProducts OBJECT IDENTIFIER ::= { cisco 1 ) -- OBJECT-IDENTIY Status: mandatory Descr: ciscoProducts is the root OBJECT IDENTIFIER from which sysObjectID values are assigned. Actual values are defined in CISCO-PRODUCTS-MIB. local OBJECT IDENTIFIER ::= { cisco 2 )

31/116

Lun vn thc s X l thng tin v truyn thng

-- OBJECT-IDENTITY Status: mandatory Descr: Subtree beneath which pre-10.2 MIBS were built.

II.2.3.

Nhm giao din (interface trong MIB-II)

Cc thng tin quan trong c cha trong nhm giao din (interface) nh l s lng cc giao din vt l, kiu, loi giao din c lp t trong thit b cng nh s lng cc giao din ang hot ng (up) cng nh s lng cc giao din ang tt (down). Hnh II-1 minh ha cy OID bn di nhm giao din v cc nhnh, l bn di
Bng II-3 Mt s nh ngha ca cc OID i tng IfNumber IfTable Iflndex IfOutOctets khung dng INTEGER sequence of ifEntry SEQUENCE Counter truy nhp RO NA NA RO M t S lng cc giao din mng Danh sch cc im vo ca giao din im vo ca mt giao din c cha cc i tng l cc giao din lp di Tng s octes c chuyn qua giao din, k c cc k t khung

32/116

Lun vn thc s X l thng tin v truyn thng

Hnh II-1 Cu trc nhm cc giao din trong MIB-II

II.3. c t SNMP Theo RFC 1157, giao thc qun tr mng c nh ngha l mt giao tip tng ng dng, thng qua theo di hoc thay i cc bin (i tng iu khin) trong MIB ca cc Agent. SNMP cung cp 03 tc v c bn l: GET, SET v TRAP, thng qua , cc thit b qun l mng c th yu cu nhn, thay i cc ci cc gi tr iu khin ca Agent cng nh c thng bo v cc s kin bt thng xy ra ti thit b iu khin.

33/116

Lun vn thc s X l thng tin v truyn thng

II.3.1.

Khun dng ca SNMP

Trong khun kh ca SNMP, lin lc gia cc thc th c thc hin thng qua vic trao i cc thng ip SNMP c biu din di dng cc gi tin UDP trn nguyn tc m ha c bn ca ASN.1. Cc thng ip mang theo mnh thng tin v phin bn SNMP hin ang s dng, community name c s dng xc thc v mt trong nm kiu d liu (GetRequestPDU, GetNextRequestPDU, SetRequestPDU, GetResponsePDU, TrapPDU) (1) SNMP message:
Version Community SNMP PDU

(2) GetRequest PDU, GetNextRequest PDU, v SetRequest PDU:


PDUtype RequestID 0 0 variable-bindings

(3) GetResponse PDU:


PDUtype RequestID ErrorStatus Errorindex variable-bindings

(4) Trap PDU


PDUtype Enterprise AgentAddr GenericTrap specific Trap time stamp Variable-bindings

Bng II-4 M t cc trng ca SNMP Tn Community ErrorStatus M t c s dng nh l mt dng mt khu xc thc cc gi tin SNMP. t kha public thng c s dng mc nh Gi tr nguyn c s dng thng bo v trng thi li xut hin khi x l mt yu cu. Cc gi tr c th l: noError (0) tooBig (l) noSuchName (2) badVaIue (3) readOnly (4) genEn(5) Gi tr c s dng khi ErrorStatus khc khng m t b sung cc

ErrorIndex

34/116

Lun vn thc s X l thng tin v truyn thng

GenericTrap

thng tin v li Gi tr nguyn m t s kin xy ra thit b. Chng c th l: ColdStart(0); WarmStart(1) LinkDown(2) LinkUp(3); AuthenticationFailure(4) EgpNeighborLoss(5) EnterpriseSpecific(6) SpecificTrap S kin xy ra khng nm trong quy nh ca nh sn xut

II.3.2.

Cc lnh SNMP v trnh t thc hin

Nh chng ta bit, SNMP c 5 lnh c bn l: Get, Get-Next, GetResponse, Set v Trap. Tng ng vi nm lnh l nm gi tin: GetRequestPDU, GetNexRequestPDU, GetResponsePDU, SetRequestPDU v TrapPDU. Khun dng ca chng nh c m t trong phn trc. Phng thc vn hnh ca chng c m t hnh sau:

35/116

Lun vn thc s X l thng tin v truyn thng

Hnh II.5 Chu trnh SNMP

II.3.3.

Kin trc qun tr mng

Hnh II.2 a ra mt m hnh n gin trong qun l mng ni b. Tham gia vo m hnh ch c hai thc th n gin l Trm qun l v thit b c qun l (Agent). Tt nhin l c hai thc th u phi dng giao thc qun tr mng lin lc vi nhau (SNMP) v thng tin cn gi l cc gi tr ca

36/116

Lun vn thc s X l thng tin v truyn thng

cc bin trong MIB. S thng th ca m hnh tnh ton phn tn ko theo phong tro phn tn ha vic qun tr mng [Mazumdar]. Mt h thng qun tr mng phn tn thng thng s c mt s trm lm vic tng tc vi nhau thng qua lin mng, trong , cc trm lm vic ny s ng vai tr qun tr mng ca phn on mng , hoc ca n v (thc th) . Trong m hnh ny, chng ta ta cng s thy c mt trm qun tr chnh lm nhim v tng tc vi trm qun tr a phng v trch nhim qun tr chnh s c giao cho cc trm qun tr a phng ny. Tuy theo cu hnh v yu cu c th m Trm qun l trung tm c th lm vic trc tip vi cc Agent mc thp hn.

Hnh II.6 Kin trc qun tr h thng phn tn thng thng

II.3.4.

Nhng hn ch ca SNMP

SNMP c thit k theo hng n gin ha cc tc v nn c mt s cc im hn ch: Ch c mt gi thng tin i vi tng yu cu, khng ph hp vi cc mng phc tp, c nhiu s liu cn phi kim tra [Stallings 96]
37/116

Lun vn thc s X l thng tin v truyn thng

SNMP l giao thc phi hi p, ngha l agent khng th chc chn l cc gi tin trap do mnh gi i n c ch. Bn trong nm thng ip ca SNMP l cc nghi thc hi-p n gin (my trm gi yu cu, my agent phn hi kt qu) nn SNMP s dng giao thc UDP. iu ny ngha l mt yu cu t my trm c th khng n c my agent v hi p t my agent c th khng tr v cho my trm. V vy my trm cn ci t thi gian ht hn (timeout) v c ch pht li [Stallings 96]. Tnh bo mt km, tn cng ng (community) c s dng nh l mt khu xc thc cc thng ip SNMP [Stallings 98]. Qun l mng da trn SNMP c mc bo mt thp. V d liu khng m ha v khng c thit lp c th ngng bt k truy nhp mng tri php no khi tn community name v a ch IP b s dng gi yu cu gi mo ti agent. Do , SNMP ph hp vi m hnh quan trc hn l vi m hnh iu khin. Ch c cc cu d liu n gin. Khng ph hp vi cc yu cu v gi tr hay kiu ca i tng Khng h tr giao tip t trm qun l n trm qun l Khng h tr cc lnh thc thi tc thi. Qun l mng da trn SNMP c mc kh chuyn thp gia cc kin trc khc nhau. V cu trc thng tin qun l ca SNMP ch h tr gii hn cc kiu d liu. Khng thn thin. Nhiu nhc im ny c khc phc hoc gii quyt trong cc phin bn tip theo ca SNMP (version 2, 3)
38/116

Lun vn thc s X l thng tin v truyn thng

Chng III.Qun tr mng trn web vi CGI v CORBA


III.1. Chun CGI CGI l vit tt ca t ting anh Common Gateway Interface. CGI l mt giao din chun cho php trao i thng tin gia phn mm Web Server vi cc chng trnh (ng dng) bn ngoi [Weinman]. Nguyn thu, Web server ch l mt phn mm x l cc yu cu http n thun nhn c v tr v cc trang html vi cc ni dung tnh. Do s pht trin ca mng v nhu cu tng tc cao ca ngi s dng i vi cc ngun thng tin trn web, thng tin c tnh cht ng nh truy vn c s d liu III.1.1. CGI - s m rng ca HTTP

Chun CGI c a ra v m t bi cc tc gi chnh ca HTTP server: Tony Sander, Ari Luotonen, George Phillips v John Franks. Ban u dch v ca cc HTTP server kh b gii hn v chng ch c th tr v cho cc tnh duyt web cc ti liu HTML c nh (tnh). p ng cc yu cu ngy cng tng v cc tnh nng ca web nh l cung cp cc thng tin cp nht (ng) cho trnh duyt client, cc tc gi nu trn a ra mt phng php mi, m rng cc dch v v nng lc t gc r ca cc Web server. chnh l chun CGI [Weinman]. CGI l mt giao din n gin ginh cho vic chy cc chng trnh bn ngoi (CGI script - cc kch bn CGI) bn di nn HTTP server. Khi c mt yu cu ca khch hng c gi n n Web Server thng qua trnh duyt Web, Web Server s gi ti CGI gateway. CGI s thc hin cng vic

39/116

Lun vn thc s X l thng tin v truyn thng

ca mnh v chuyn thng tin v cho Web Server di dng chun HTML v Web server s gi tip cc thng tin ny v cho khch hng [Tittel96]. Sau y l tm lc bn bc x l ca CGI: Bc 1: X l d liu c truyn t Client ti Server. Bc 2: Server s hng cc yu cu m Client gi ti n cc chng trnh CGI thc hin. Bc 3: Gi li cc d liu v kt qu m chng trnh CGI thc hin tr li cho Server. Bc 4: Server gi li d liu m n nhn t chng trnh CGI cho Client. III.1.2. Cc c trng ca CGI

CGI cho php bn m rng cc chc nng ca Web server, l mt phng thc cho HTTP server trao i thng tin vi chng trnh ngi dng. Trn quan im l thuyt: CGI s x l d liu a vo thng qua browser v tr li thng tin cho ngi s dng [Tittel96]. Trn quan im thc hnh: CGI l trnh giao din cho php ngi lp trnh vit chng trnh thc hin truyn thng vi Server [CGI201]. CGI cung cp cch gii quyt vn mt cch d dng v n gin. Giao thc CGI c nh ngha theo mt chun, n cung cp cch truyn thng vi Web server. S dng CGI bn khng cn dng nhiu tri thc c bit, c th vit chng trnh vi bt k ngn ng my tnh no thc hin giao tip v truyn thng vi Web server [CGI201].

40/116

Lun vn thc s X l thng tin v truyn thng

S truyn t ca CGI l da trn cc chun vo ra. III.1.3. M hnh quan h Client/Server s dng CGI

Thng thng, mt h thng khch/phc v c gi l h thng quan h cp 2. Trong h thng ny, giao din ngi dng v cc quan h logic nm v bn th nht. Cc chc nng phc v cng vic v d liu trn server thuc v bn th hai. c th c xem l cc h nn (platform) v cc h thng mng phn cng cng nh phn mm lin kt khch/phc v c gi l cc trung gian.
Yu cu Yu cu

Client
Tr li

Server Internet
Tr li Tr li Yu cu

Operating System
Tr li Yu cu

External program

Hnh III-1 Chu trnh thc hin mt CGI request

CGI to ra cu ni gia web server v cc dch v internet khc nh l cp nht s liu cho cc server mng back-end hoc qun l my tnh khc trong mng ng sau web server. Trong trng hp ny, CGI hot ng nh mt trung gian (middleware) gia web server v c s d liu bn ngoi hoc cc dch v thng tin khc [CGIPerl]. Vi s tham gia ca CGI, chng ta c quan h tay ba trong kin trc Client/Server c cu thnh bi c s d liu bn ngoi v cc h thng dch v thng tin. Hnh III-2 m t kin trc ba lp mi ny. Thng thng, lp u tin l mn hnh ca ngi s dng.
41/116

Lun vn thc s X l thng tin v truyn thng

Lp gia c to thnh bi cc i tng server, l cc d liu c nh v cc khi logic thc thi. Lp th ba l cc dch v truyn thng thng thng. Trong Hnh III-2 , lp gia l web server c tng cng thm bi dch v ng dng CGI . Cc nh cung cp dch v mng thng s dng cng ngh ny kt ni cc trnh duyt web ca h n cc thc th qun tr theo di tnh trng ca cc thit b. Cng ngh ny c ng dng trong web site ca Bay, cho php cc trnh duyt c truy nhp vo cc ng dng qun l Optiviti. III.1.4. Cch thc v phng php truyn d liu trong CGI

Vi vic s dng nhiu k thut khc nhau client c th truyn i s hoc d liu ti chng trnh gateway thng qua HTTP server. Chng trnh gateway thay v phi bt u vi mt chng trnh tnh (static program) thi im hin ti th n s c thay th vi mt thc th ng (dynamic entity) tin hnh tr li ti ngi s dng cui cng. C bn phng php ch yu server lin lc vi cc CGI script. Ba phng php u tin l cch cc CGI script nhn c thng tin t server v cch cui cng l cc CGI script gi thng tin cho server. Sau y, chng ta s ln lt xem xt cc phng php : phng php bin mi trng (Enviroment variables), tham s dng lnh (Command Line) bng hoc bng dng nhp chun (Standard input). III.1.4.1 Phng php th nht - Bin mi trng

Cc bin mi trng l cc bin c thit lp bi phn mm server v c th c truy nhp t cc chng trnh bn ngoi. Cc bin ny cha ng cc thng tin v server, chng trnh bn ngoi v yu cu ca khch hng. Xem bng

42/116

Lun vn thc s X l thng tin v truyn thng

Bng III-1 Tn bin AUTH_TYPE CONTENT-LENGTH CONTENT-TYPE GATEWAYINTERFACE HTTP_(string) PATH-INFO PATH-TRANSLATED QUERY-STRING REMOTEADDR REMOTEHOST REMOTEINDENT REMOTE-USER REQUEST_METHOD SCRIPT-NAME SERVER-NAME SERVER-PORT SERVERPROTOCOL SERVER-SOFWARE

Cc bin mi trng chun

M t kiu xc thc truy nhp ln ca cc d liu (thc th) tnh theo byte nh kiu MIME ca thc th: application/octet-stream, text/pain, Phin bn CGI ca server D liu header ca khch ng dn m rng cc CGI scrript bin dch nh x t o n ng dn thc trong h thng file Xu tm kim c vit di dng chun URL a ch IP ca pha a ra yu cu Tn min y ca pha a ra yu cu D liu phn bit v pha kt ni n server nh danh ngi dng do pha client gi Yu cu ca pha client (GET hay l POST) Univeral Resource Identifier (URI) - ng dn nhn bit mt CGI script. Tn server, phn tn my ch trong URI hoc DSN Cng dch v nhn yu cu Tn v phin bn ca giao thc yu cu Tn v phin bn ca phn mm phc v tr li yu cu

III.1.4.2

Phng php th hai Dng lnh

Phng php ny thng c s dng cho cc truy vn HTML ISINDEX. Thng tin c th c chuyn cho cc chng trnh bn ngoi thng qua cc tham s dng lnh khi chng trnh c gi ( chy). III.1.4.3 Phng php ba dng d liu vo chun (standard input)

Khi pha client s dng phng php POST hoc PUT gi cc yu cu n cc chng trnh bn ngoi, thng tin s c server chuyn cho cc chng trnh bn ngoi thng qua dng nhp chun (standard input). Nu s dng GET, d liu s c a vo bin mi trng QUERY_STRING. Server cng s thit lp bin CONTENT_TYPE v CONTENT_LENGTH

43/116

Lun vn thc s X l thng tin v truyn thng

tng ng v nh dng kiu d liu MIME v ln ca d liu (tnh bng byte). III.1.4.4 Phng php dng d liu ra chun (standard input)

Khi chng trnh bn ngoi sau khi thc hin yu cu, thng tin s gi d liu ngc li cho web server ( web server chuyn tip cho trnh duyt client) thng qua dng d liu ra chun (standard output). Cc d liu ny phi c vit khun dng HTML. III.1.5. Lp trnh CGI

Chng trnh CGI gateway c th vit bng mt ngn ng lp trnh no , chng hn nh C/C++, Visual Basic, Perl y l mt chng trnh thc hin c (executable). Mi khi c yu cu thc hin CGI t pha khch hng th my ch (server) s to mt tin trnh (process) mi cho gateway v truyn thng tin t khch hng cho tin trnh ny. Khi lp trnh CGI, c hai nguyn tc sau cn phi c tun th: 1. Kt qu tr v cho Client (d liu hay text) phi c ghi ra dng d liu ra chun (Standard output, STDOUT); 2. Cc d liu ra cn phi c bt u bng chui Content-type v mt dng trng Sau y l mt v d v mt on m chng trnh CGI bng C:
#include <stdlib.h> void main(void) { printf(Content-type: text/html\n\n); printf(Hello World!); }

44/116

Lun vn thc s X l thng tin v truyn thng

Nh cp phn trc, chng trnh ch n gin gi thng ip ra STDOUT theo ng yu cu ca CGI: mt dng nh kiu MIME type: text/html v tip theo l mt dng trng. III.1.6. Ci t cc chng trnh CGI

Sau y l mt s bc c bn ci t mt chng trnh CGI trn server v cch thc hin chng Yu cu u tin l ngi s dng phi c quyn truy nhp web server v c quyn ghi vo th mc c tn l cgi-bin, ni t cc chng trnh cgi. Cc chng trnh CGI s c web server gi ra thc hin t ng khi web server nhn c yu cu t pha ngi s dng. Th hai, chng trnh CGI cn phi chy c v c th truy nhp t pha ngi dng bnh thng. i vi cc chng trnh dng ngn ng Perl, phn mm Perl cng phi c ci t trong mng [Tittel96]. i vi cc chng trnh s dng Java, trong th mc cgi_bin cn phi c mt file thc thi vi dng lnh:
java ProgramFileName

trong ProgramFileName l tn ca java class. Trong cc h thng unix, file ny c th c vit di dng ngn ng kch bn (shell script). i vi h windows, file ni trn c th l mt file batch. Trong mi trng hp, phn mm h tr java phi c ci t trong cng mt th mc [CGI2]. Trn y l cc bc cn thit ci t cc chng trnh CGI. Sau cc bc ci t cn thit, cc chng trnh CGI s c gi ngay khi c yu cu t cc applet code trong trnh duyt client.

45/116

Lun vn thc s X l thng tin v truyn thng

III.1.7.

M hnh qun tr mng ba bn s dng Web - CGI

Trn Hnh III-2 l s tng tc ca mt h thng qun tr mng qua web s dng CGI. Nh cp phn trc, web server s chuyn cc thng tin cho cc chng trnh CGI back-end thng qua cc bin mi trng, dng nhp d liu chun v s yu cu thc hin cc chng trnh (thng l cc chng trnh SNMP server) ny ty theo yu cu c th. Cc chng trnh ny c khi chy v s c cc d liu t dng nhp d liu chun. Sau , chng trnh ny s lin h vi cc SNMP agent ly cc thng tin cn thit. Sau khi hon thnh, chng trnh s tr thng tin li cho web server di dng m HTML thng qua giao din STDOUT. Cui cng, web server s tr li file HTML ny cho Client.

Hnh III-2 M hnh web Client/Server ba bn s dng CGI

46/116

Lun vn thc s X l thng tin v truyn thng

III.2. Chun CORBA CORBA l vit tt ca cm t Common Object Request Broker Architecture - c a ra bi t chc qun l i tng (Object Management Group OMG) vi mc ch to ra mt mi trng (khung) lm vic chung cho cc ng dng hng i tng [Rosenberger]. Chun ny nhm ti mt mi trng tnh ton phn tn khng ng nht v to ra mt c ch lin lc chun gia cc i tng trong mi trng khng ng nht [Rosenberger]. III.2.1. Gii thiu chun CORBA

CORBA c a ra nhm gii quyt hai vn c bn nht m ngnh cng nghip phn mm phi i mt ngy hm nay, l nhng kh khn trong vic pht trin cc ng dng Client/Server v cch thc tch hp cc h thng sn c (k tha chng) cng nh yu cu tng thch ngc ca cc h thng s pht trin . Tng t nh cc RFC (Request For Comments) ca IETF (Intemet Engineering Task Force, OMG cng a ra cc yu cu kin ngh (Request For Proposals - RFP) i vi CORBA. T "Common" trong COBRA th hin s hp nht ca hai kin ngh API quan trng. Mt kin ngh n t HyperDesk and Digital, h tr API ng; kin ngh khc do Sun v HP (Hewlett Packard) h tr APIS tnh. Kt qu l CORBA c tinh chnh v tha hng c hai tnh nng ca hai kin ngh nu trn [CORBA14] . Theo OMG, CORBA l gii php cho vic phi c c kh nng tng tc gia cc h thng phn cng phn mm ang ngy cng pht trin c v s lng v chng loi ngy nay ("to the need for interoperability among the rapidly proliferating number of hardware and software products available today" [OMG].
47/116

Lun vn thc s X l thng tin v truyn thng

III.2.2.

S lc v lch s CORBA

OMG l mt t chc chuyn ngnh v v li, do 8 cng ty quc t thnh lp thng 5 nm 1989, trong ng k l Hewlett-Packard v SUN. OMG p ng ng nhu cu chung v c mt phng php lm vic kh khch quan, nn c hng ng mnh m. T ch ch c tm thnh vin ban u, n nay OMG pht trin ln ti hn 800 thnh vin chnh thc. Hot ng ca OMG nhm mc ch cung cp mt khung lm vic chung cho cc ng dng hng i tng nhm thit lp mt khung cnh khi nim chung v hng tip cn s vt phn tn, c th cho php cc h p dng hng s vt, v s c pht trin trn nhng h iu hnh v thit b khc nhau, c th trao i vi nhau. Thnh tu ln nht ca OMG l thit lp c kin trc qun l i tng (Object Management Architecture - OMA) m CORBA l mt phn trong . Ni mt cch ngn gn, OMA bao gm cc b phn trung gia x l yu cu trn i tng (Object Request Broker - ORB), cc dch v v i tng (cn gi l cc dch v CORBA), cc tin ch chung, cc giao din min (domain Interface) v cc i tng ng dng. Vai tr ca CORBA trong OMA l qun l vic thc hin cc chc nng ca ORB [OMG]. Ra i t thng 5/1989, CORBA c nhiu bc pht trin mnh m, trong ng ch nht l hai phin bn 1.0 v 2.0 vi cc tnh nng t ph. CORBA 1.0 y l phin bn u tin ca CORBA, c gii thiu vo thng 12/1990, tc l ngay sau khi t chc OMG c thnh lp. u nm 1991, phin bn 1.1 ra i, trong c a ra khi nim v ngn ng nh ngha giao din (Interface Definition Language - IDL) v cc cng c API gip cho cc ng
48/116

Lun vn thc s X l thng tin v truyn thng

dng c th giao tip c vi cc ORB. Mt thi gian ngn sau, OMG cng b phin bn 1.2 vi mt s c tnh b sung so vi cc phin bn trc . C th coi cc phin bn 1.x l bc khi im quan trng cho kh nng tng tc gia cc thnh phn i tng, cho php cc i tng trn nhiu my c kin trc khc nhau, c vit bng cc ngn ng khc nhau c th trao i c vi nhau. CORBA 2.0 Cc phin bn 1.x cn thiu hon chnh v cha a ra c nhng quy nh y v s tng tc gia cc thnh phn i tng. Mc d chng cng a ra c cc chun cho ngn ng IDL v cho vic truy nhp ORB thng qua mt ng dng nhng chng li mc phi mt hn ch c bn l cha quy nh c cc giao thc chun cc ORB c th trao i c vi nhau [TL_CORBA].Chnh v c hn ch ny m CORBA ORB ca mt nh cung cp ny khng th trao i c vi CORBA ORB ca mt nh cung cp khc, t thu hp kh nng tng tc gia cc i tng trong mi trng phn tn. khc phc hn ch trn, thng 12/1994, phin bn CORBA 2.0 ra i. Trong phin bn ny, OMG a ra Giao thc chung gia cc ORB (Internet Inter-ORB Protocol - IIOP) - y l giao thc chun gip cho cc ORB ca cc nh cung cp khc nhau c th trao i c vi nhau. Chun mi ny c ng dng trn cc mng c s dng giao thc TCP/IP. OMG cng quy nh r rng tt c cc nh cung cp mun sn phm ca mnh hot ng c trong kin trc CORBA u phi ci t giao thc IIOP. Tip sau phin bn 2.0, OMG tip tc cng b mt s phin bn k tip: CORBA 2.1 (12/1997), CORBA 2.2 v 2.3 (1998). Cc phin bn sau ny tng bc pht trin v m rng cc u im ca phin bn 2.0 trc .
49/116

Lun vn thc s X l thng tin v truyn thng

CORBA 3.0 Corba 3.0 c chnh thc ra mt vo thng 10/2002. Mc d c thit k khc gn nh, CORBA 3.x khng phi l mt tiu chun n m thc cht l mt h cc tiu chun c thm vo chun 2.x [CORBA3.0] V c bn, CORBA l mt cng ngh tch hp cc ng dng tnh ton phn tn. Ht nhn ca cc h thng CORBA ORB che du cc chi tit thnh phn mc di v h thng nh platform, mng, cho php cc nh lp trnh tp trung chnh vo gii quyt cc vn ca mnh thay v vic phi pht trin mt h thng h tng tnh ton phn tn [CORBA3.0]. Cng nh cc tiu chun cng ngh khc, CORBA cng phi t mnh pht trin p ng c cc yu cu ngy cng cao ca nhu cu. Vic b sung thm ba tnh nng chnh ca CORBA trong phin bn 3.0 nh Portable Object Adapter - POA, CORBA Messaging, v Objects By Value cho php p dng CORBA cho nhng lnh vc m trc y cn cha ph hp. III.2.3. Tng quan v kin trc CORBA

Trong phn ny, chng ta s cp n cc thnh phn chnh ca CORBA: B phn trung gian x l cc yu cu trn i tng (Object Request Broker ORB): cu trc ca phn ct li ca kin trc CORBA. Ngn ng nh ngha Giao din (Interface Definition Language IDL) thnh phn c bn ca kin trc CORBA. M hnh truyn thng trong kin trc CORBA (CORBA communication model) l gii cch thc hot ng ca cc i tng CORBA trong kin trc mng my tnh.

50/116

Lun vn thc s X l thng tin v truyn thng

M hnh i tng trong kin trc CORBA, bao gm cc tham chiu i tng v cc B iu hp i tng c bn (Basic Object Adapters BOAs). Khi nim v vai tr ca cc thc th Client v Server trong kin trc CORBA. Khi nim v vai tr ca cc client stubs v server skeletons trong vic xy dng cc ng dng trong kin trc CORBA. III.2.4. B phn trung gian x l yu cu trn i tng (ORB)

B phn trung gian x l cc yu cu trn i tng (Object Request Broker ORB) chnh l b phn cn bn cu thnh kin trc CORBA, cn c bit n nh l object bus hoc th vin cc i tng o (main object library) [OMG_ARCH] Sau khi c ORB, cc thnh phn khc khi mun trao i thng tin vi nhau th khng cn phi kt ni trc tip. Thay vo , chng ch cn giao tip vi ORB thng qua cc hm API ca CORBA. Cc giao tc tip theo s do CORBA m nhn. C th, khi mt thnh phn ng dng mun s dng mt dch v c cung cp bi mt thnh phn ng dng khc, trc tin n cn c c mt s tham chiu ti i tng cung cp dch v . Sau khi c c s tham chiu ny, n c quyn gi cc phng thc ca i tng c tham chiu n v c th truy cp vo cc dch v m n mong mun do i tng cung cp. Chc nng u tin ca CORBA l gii quyt cc yu cu v tham chiu i tng, cho php cc thnh phn i tng c th thit lp kt ni vi nhau (Hnh III.1) [OMG_ARCH]

51/116

Lun vn thc s X l thng tin v truyn thng

Hnh III.1 ORB gii quyt cc yu cu v i tng

d theo di, t y tr v sau chng ta s quy c gi thnh phn ng dng c yu cu s dng dch v l Client, cn pha cung cp dch v c gi l Server. Sau khi c c s tham chiu ti i tng cung cp dch v cn s dng, Client c th bt u gi cc phng thc trn i tng ny. Thng thng, cc phng thc trn i tng u cn c cc tham s u vo v tr v cc k qu u ra nn chc nng tip theo ca ORB l nhn cc tham s u vo t pha Client, i chng sang mt khun dng ph hp c th truyn ti c i tng c tham chiu xa thng qua mng my tnh. Qu trnh ny c gi l tp hp (marshal). Sau , ORB li c trch nhim thc hin mt s chuyn i ngc: n nhn cc gi tr tham s u ra c tr v v chuyn chng sang mt khun dng m pha Client c th hiu c. Qu trnh ny c gi l phn tch (unmarshal). Xem Hnh III.2.

52/116

Lun vn thc s X l thng tin v truyn thng

Hnh III.2 Qu trnh marshal v unmarshal

Ton b qu trnh marshal v unmarshal c thc hin m khng cn c s can thip ca ngi lp trnh. Pha Client ch vic a ra yu cu v mt phng thc t xa v s nhn c cc kt qu tr v ging nh khi thc hin cc phng thc trong lng n vy. Tt c cc cng vic u do ORB m trch v trong sut i vi pha Client [OMG]. Nh vy, cc qu trnh marshal v unmarshal gip cho vic giao tip gia cc thnh phn ng dng trong mng tr nn c lp i vi mi trng (platform-independent). iu c ngha l mt ng dng chy trn h Macintosh c th gi cc phng thc trn mt ng dng khc chy trn h UNIX. Khng ch c vy, nhng s khc bit v phn cng cng khng gy tr ngi g bi l ORB s t ng thc hin cc s chuyn i nu thy cn thit. C th ni mi s khc nhau v mi trng ca cc ng dng u c ORB x l v gii quyt [CORBA].

53/116

Lun vn thc s X l thng tin v truyn thng

Mt ln na xin c nhc li rng ton b qu trnh marshal v unmarshal u hon ton c thc hin bi ORB v hon ton trong sut i vi c pha Client v pha cung cp dch v (Server). Ngi lp trnh cng tuyt i khng c lin quan g ti cc qu trnh trn. Nh vy, c th thng k tm tt cc chc nng ca ORB nh sau: Nhn mt tham chiu i tng t pha Client, thay mt Client xc nh v tr ca Server tng ng l ni s thi hnh dch v m Client yu cu. (Lu rng vic lm th no c c tham chiu i tng l thuc trch nhim ca pha Client). Khi xc nh c v tr ca Server, ORB phi m bo rng pha Server sn sng nhn yu cu. B phn ORB pha Client c trch nhim nhn cc tham s u vo t Client, sau thc hin qu trnh marshal. B phn ORB pha Server thc hin qu trnh unmarshal cc tham s v chuyn chng cho Server x l. Trong trng hp c cc tham s tr v, ORB li tin hnh cc qu trnh marshal v unmarshal ging nh trn. Vai tr trung gian ca ORB c th c minh ha bng hnh v di y:

Hnh III.3 Vai tr trung gian ca ORB

54/116

Lun vn thc s X l thng tin v truyn thng

thy c li ch c c khi s dng ORB, chng ta hy xem xt trng hp c N thnh phn Client/Server trong mi trng ng dng. Nu khng s dng ORB, ta s cn phi nh ngha N2 giao din chng c th lm vic c vi nhau (hnh a). Trong khi , s dng ORB, s giao din cn phi nh ngha ch l N. Cha k l khi khng c ORB, cc giao din phi c ng b v ngn ng cng nh v h nn (platform)

Hnh III.4 Tng tc gia cc thnh phn qua ORB v khng qua ORB

Bn cht ca ORB l mt thnh phn phn mm chy gia cc my tnh Client Server v cung cp c ch lin lc gia chng [CORBA14]. ORB c 02 chc nng chnh: Cung cp tham chiu n cc i tng m client yu cu marshals v unmarshals cc tham s i/n cc i tng Trong CORBA, chng ta s dng tham chiu i tng xc nh i tng trong ORB. C th xem ORB hot ng nh mt b su tp cc i tng v ti nguyn mng, lin quan n cc phn mm ng dng, cho php cc ng dng ny nh v v s dng chng trong mi trng ORB.

55/116

Lun vn thc s X l thng tin v truyn thng

Hnh III-3 M hnh gi yu cu qua Object Request Broker

Hnh III-3 minh ha mt yu cu c gi bimt client n mt i tng thc thi thng qua mt ORB. Thc th Client gi mt yu cu thc hin mt tc v trn i tng m khng cn phi bit n v tr ca i tng cng nh cch thc thc hin tc v . ORB s c nhim v tm i tng s thc hin yu cu, tp hp cc tham s cn gi n i tng cng nh phn tch cc kt qu gi v t i tng . Nh trnh by trn, marshalling l qu trnh dch cc tham s t pha Client thnh khun dng ca d liu s c truyn i trong mng. Unmarshalling l qu trnh ngc li ca marshall: chuyn i s liu t mng sang khun dng m pha client c th hiu c [Rosenberger 98]. Trong CORBA, Client c th gi yu cu n server qua nhiu con ng: thng qua IDL (Interface Definition Language) tnh hoc qua DII (Dynamic Invocation Interface) Giao din yu cu ng. Ngoi ra, client cn c th gi yu cu trc tip n ORB nh m t chi tit Hnh III.5

56/116

Lun vn thc s X l thng tin v truyn thng

Hnh III.5 Cu trc ca ORB

Cc IDL stub cung cp cc giao din tnh cho cc i tng phc v v ph thuc vo i tng (tu theo loi i tng c th). Ni mt cch n gin, IDL stub l mt on m nh c bin dch cng vi phn mm client to cho client kh nng truy cp server. Dynamic Invocation Interface (DII) cung cp phng thc pht hin ng cc giao din server v c th yu cu truy cp cc i tng m thm ch client cn cha c bit n (hoc cha tn ti) ngay t khi bin dch phn mm client. Gi phi tr cho c tnh ny l mc phc tp b tng ln ng k. V pha server, ni cha cc i tng thc thi, cng c cc thnh phn (c gi l b khung - skeleton) tng ng vi hai giao din trn. l static IDL skeletons v Dynamic Skeleton Invocation (DSI) tng ng vi IDL stub v DII ca pha client. Cc server skeleton ny cng l cc on m lnh nh c sinh ra khi bin dch cc c t giao din IDL. Chng cung cp cc giao din tnh cho tng dch v, c server cung cp (export). x l mt yu cu, on m thc thi i tng c th gi cc Object Adapter v giao din ORB cho cc dch v thng qua ORB. Object Adapter

57/116

Lun vn thc s X l thng tin v truyn thng

qun l cc lo hnh dch v nh l sinh ra v thng dch cc tham chiu i tng cng nh cc phng php yu cu [OMG_ARCH] . qun l c cc i tng thc thi, server c th truy cp vo hai c s d liu: interface repository (kho cha giao din) v implementation repository (kho cha cc phng thc). Interface repository cung cp cc i tng bn vng (persistent) c c t y v chnh l cc thng tin IDL trong ton b tin trnh (run-time). Implementation repository cha cc thng tin cho php ORB nh v v kch hot cc phng thc ca i tng. III.2.5. Ngn ng nh ngha giao din (IDL)

Ngn ng nh ngha giao din IDL (Interface Definition Language) l mt thnh phn khc ca CORBA v c s dng nh ngha kiu ca cc i tng bng cch c tc cc giao din ca n. L ngn ng c s dng m t cc giao din gia cc i tng CORBA nhng IDL khng phi l 1 ngn ng lp trnh theo ng ngha ca n m ch t gii hn mc nh ngha cc giao din. IDL khng phi l ngn ng th tc, n ch c th nh ngha cc giao tip khng c phn ci t. N tng t nh phn header ca cc class trong C++, phn header khng cha bt k ci t ca lp no nhng m t c lp v giao din ca lp. IDL hon ton khng ph thuc vo ngn ng s dng, ni cch khc IDL c th c thc thi trong mt s ngn ng c tn ti nh x ngn ng n n, v d nh Java, C, C++ v mt s ngn ng khc. IDL hon ton ch l ngn ng m t nn cc chng trnh pha Client khng nht thit phi vit bng IDL m c th c vit bng ngn ng bt

58/116

Lun vn thc s X l thng tin v truyn thng

k, nhng ngn ng phi c nh x vo IDL. IDL s c trch nhim chuyn i d liu, kiu d liu mt cch tng thch gia cc ngn ng khc nhau [TL_CORBA] . Mt giao din bao gm mt nhm cc tc v c t tn (cc hm hoc l phng thc) v nh , cc client c th yu cu chng c phc v. IDL l mt loi ngn ng c t, n h tr chnh t C++ cho khai bo hng, kiu bin v tc v. Tuy nhin nh ni trn, IDL khng c cu trc th tc v bin, t , n khng c cc cu lnh iu khin r nhnh nh if-else, while IDL c vit theo phong cch ca C++, h tr naming space, tin x l, tha k n v a tha k (multiple inheritance) v tt nhin l c thm mt s t kha h tr m hnh tnh ton phn tn. module tng t nh cc Java package interface giao din ca CORBA, tng t nh Java interface exception - tng t nh Java exception attribute Cc bin thnh vin c to t ng khi to(get i vi cc thuc tnh ch c (readonly attributes), get v set cho cc thuc tnh bnh thng) operations - tng t nh method trong cc ngn ng lp trnh khc Cc kiu d liu n gin nh l short, unsigned short, char, ... Cc kiu d liu c cu trc nh mng, array, sequence, struct, enum Sequence l kiu d liu tng t nh mng nhn cc thnh vin ca n c kch thc khng ging nhau v c th thay i c trong qu trnh thc
59/116

Lun vn thc s X l thng tin v truyn thng

thi. Nh vy, seqquense c th xem l tng t nh bin kiu vector ca Java, c mt s khc bit l cc thnh vin phi l cng c mt kiu, trong khi Java cho php thnh vin l cc i tng c kiu khc nhau. Sau khi khai bo xong file IDL, ngi s dng c th da vo b tin x l (precompiler) bin dch cc file IDL sang ngn ng c s dng hon thnh qu trnh thc hin. on m sau y minh ha mt v d v file IDL
module Bank { interface Account{ float balance(); }; interface AccountManager { Account open( in string name); }; };

V d trn a ra mt nh ngha v giao din Account v AccountManager. T kha trong phng thc open c ngha l bin name s phi c chuyn t pha client n server. Theo nh ngha ca IDL, cc tham s trong cc phng thc phi c m t y l chng c chuyn t ph client n server (in) hay l ngc li (out) hay l theo c hai hng (inout). l mt s khc bit so vi C v Java. III.2.6. M hnh bn bn gia Web client v server vi CORBA

Chng ta tham kho vai tr ca CGI trong m hnh ba bn Client/Server s dng CGI v thy c cc nhc im ca CGI: ng vi mi mt yu cu t pha client, web server phi to ra mt tin trnh hon ton mi bt k yu cu l g.

60/116

Lun vn thc s X l thng tin v truyn thng

phn trc, chng ta cng bit ORB ca CORBA cng cp cc tham chiu n cc i tng v chuyn i, tr li cc tham s t client n cc i tng. Trong phn ny, chng ta s tm hiu cch thc thc hin ca CORBA trong mi trng client/server ba bn.

Hnh III-4 M hnh client/server 4 bn trong ng dng CORBA SNMP

Hnh III-4 minh ha mt ng dng quan trc mng s dng kin trc Clent/server ba bn s dng CORBA ca VisiBroker. (1) Trn hnh minh ha, ta thy pha web client gi yu cu n web server thng qua HTTP; (2) Web client dowwnload trang html (trong c mt Java applet v mt file Jar). Vic ny cng c thc hin qua HTTP; (3) Web browser ti applet v file Jar vo b nh ca my client v bt u chy applet; (4) Sau khi ngi s dng click vo 1 nt bm trong ca s ca applet yu cu nhn thng tin v mng, yu cu c gi n gatekeeper (chy trn web server thng qua ORB/IIOP)

61/116

Lun vn thc s X l thng tin v truyn thng

(5) VisiBroker Gatekeeper cho php applet c lin lc vi SNMP server thng qua mi trng mng nh l mt cng giao tip t pha client n i tng server nm pha bn kia ca mng (6) SNMP server s giao tip vi cc Agent trong mng ni b thc hin cc yu cu ly thng tin (7) SNMP server gi tr kt qu v cho Gatekeeper trn web server (8) Gatekeeper t ng chuyn tip kt qu v pha Web client thng qua ORB/IIOP. (9) Kt qu c np v trnh by cho ngi s dng trnh duyt web. III.3. Tm tt v CGI v CORBA Chun CGI cho php Web server lin lc vi cc chng trnh bn ngoi, tin hnh thc hin cc nhim v ring bit. S khc nhau chnh gia cc chng trnh ng dng l h iu hnh n m bo yu cu v tc hot ng ca chng trnh. Trong mi trng Unix, d liu t cc from gi ti chng trnh bn ngoi thng qua chun vo. Mt vi tham s c th c dng yu cu cc tham s truyn qua cc bin mi trng. Server s gi cc d liu ra ca chng trnh bn ngoi hng ti client. Do i hi cc chng trnh bn ngoi phi sinh ra thng tin header cho client. Mt trong cc thnh phn ht sc qua trng ca header l trng Content-type. Chnh nh n m client s bit x l nh th no vi d liu. Trong mi trng Window, file-base truyn ti chng trnh bn ngoi , tng t, d liu ca chng trnh c a vo trong file cho server c. Tt c d liu c lu vo trong file ring profile.

62/116

Lun vn thc s X l thng tin v truyn thng

T nhng xem xt trn, chng ta thy rng cc chng trnh CGI s c gi thc hin mi khi c yu cu t pha khch hng. Mi ln nh vy, my ch (server) s to mt tin trnh (process) mi cho gateway v truyn thng tin t khch hng cho tin trnh ny thng qua cc bin mi trng v dng nhp d liu chun. Sau khi chng trnh CGI c thc hin xong, kt qu s c gi ngc li cho phn mm web server thng qua dng d liu ra chun. Nh vy, i vi mi mt yu cu t pha Client, my ch web server s phi to ra mt tin trnh (process) hon ton mi, tiu tn kh nhiu ti nguyn h thng. Cng c nhiu yu cu ca khch hng, cng c nhiu tin trnh CGI do my ch to ra; iu dn n s chim dng ti nguyn, gy chm tr cho h thng. Mt khc, kh nng tng tc vi ngi s dng ca CGI cng c nhng hn ch [Mazumdar]. Tuy nhin, CGI cng c u im l c th ci t trn cc h iu hnh v cc Web server khc nhau, giao din c chun ha v p ng c cc yu cu c bn. T nhng phn tch trn, chng ta c th tm rt ra mt s nhn xt v s khc nhau gia cc ng dng CORBA v cc ng dng da trn CGI nh sau: (1) Trong ng dng CGI, web server phi to mt tin trnh hon ton mi ng vi mi mt yu cu, tiu tn nhiu ti nguyn h thng cng nh thi gian thc hin. Ngoi ra, ton b thng ip gi gia client v server c thc hin trn HTTP, dn n phi c c nhiu bc x l (overhead) (2) Trong ng dng CORBA, web server v HTTP ch c s dng truyn trang HTML v Java applet vo lc bt u ca tin trnh. Sau th client v i tng server thit lp v trao i thng tin vi
63/116

Lun vn thc s X l thng tin v truyn thng

nhau thng qua IIOP, nh , gim c khc nhiu overhead so vi HTTP [Mazumdar] . (3) i vi cc ng dng CORBA, server i tng ch chy bn trong trong (ng sau) web server v ch cung cp cc dch v thng qua cc giao din c quy nh cho cc client. Phin lm vic gia applet v server i tng s c s gi trong ton b tin trnh v ton b cc thng tin trng thi s c gi cho n khi mt trong hai pha ngt kt ni. (4) CORBA bo m s trong sut v v tr (ni b hay xa) i vi cc phng thc truy vn dch v, ngha l i vi client, cng vic c thc hin nh nhau d server i tng nm mng khc, trn cng mt mng hay trong cng mt my tnh [CORRBA14]. (5) Vi m hnh h tng kin trc phn tn cc i tng, CORBA cho php cc Java applet lin lc vi cc i tng c vit bng cc ngn ng lp trnh khc thng qua mng.

64/116

Lun vn thc s X l thng tin v truyn thng

Chng IV. Xy dng h thng qun tr DSLAM qua web


IV.1.Kho st h thng mng cung cp dch v ADSL IV.1.1. Gii thiu h thng mng cung cp dch v ADSL ca Bu in H ni T thng 7-2003, mt dch v mi c trin khai rng khp trn mng VNN l dch v truy cp qua ng dy thu bao s xDSL, bao gm cc cng ngh ADSL, SHDSL v VDSL (gi tt l xDSL). Cc dch v xDSL ra i mang li kh nng truy cp Internet bng rng gi r cho khch hng. Ti thi im hin ti ch tnh ring ti a bn H ni c khong trn 35.000 khch hng (cng truy cp) s dng dch v xDSL. c th cung cp dch v xDSL trn a bn thnh ph H ni, hin nay Bu in H ni ang qun l mt h tng mng li bao gm mt h thng phc v truy nhp hin i vi cc thit b DSLAM (Digital Subscriber Line Access Multiplexer) phn b khp ni trn a bn thnh ph (hn 140 im lp t, gn 200 DSLAM ) ca nhiu nh cung cp thit b ni ting. n nay, trn a bn H ni hin c 8 chng loi thit b ca 4 nh sn xut khc nhau Siemens, Huawei, Tailyn, ZTE vi cc cng ngh khc nhau nh ATM DSLAM, IP DSLAM H thng cc DSLAM thuc 4 hng sn xut ny c qun tr, gim st, khai thc mng t xa bi 04 h thng qun l NMS (Network Management System) tp trung do tng hng sn xut thit b cung cp. Cc h thng NMS ny u l mi trng ng, c thit k hng ti i tng l cc k thut vin vn hnh mng nn khng cung cp giao din ra bn ngoi v khng c mi lin h vi nhau.

65/116

Lun vn thc s X l thng tin v truyn thng

Tuy khc nhau v chng loi thit b, nh sn xut, phn mm qun l, nhng tt c cc h thng NMS u c thit k vi cc thnh phn chnh nh sau: 1. H thng DSLAM: Thit b ca hng Siemens: XpressLink Standard, XpressLink Mini, XpressLink M200 v M1200 (IP DSLAM) Thit b ca hng Huawei: MA5100 v MA5600V3 (IP DSLAM) Thit b ca hng Tailyn: UMAP 2100 Thit b ca hng ZTE: ZTE 8203 2. H thng BRAS (BoardBand Remote Access System): ERX 1410 ca hng Juniper 3. H thng my ch phc v vn hnh khai thc v qun l: ACI server, FTP server, DHCP server, NMC-RX Server, SDx server, 4. H thng my ch cung cp dch v: Radius, Billing server, VoD server, Catching server, TV server, 5. H thng bo v Firewall, log server, 6. Mng truyn dn: truyn dn STM-1 v E1 7. Mng truy cp c s: s dng i dy cp ng in thoi sn c t nh thu bao n cc tng i in thoi. IV.1.2. C bn v thit b DSLAM H thng ghp knh truy nhp ng thu bao s DSLAM (Digital Subscriber Line Access Multiplexer) l im giao tip gia ngi s dng u cui v nh cung cp dch v bng rng.

66/116

Lun vn thc s X l thng tin v truyn thng

Trong mng qun l DSLAM, chng ta c th phn bit theo vai tr ca chng trong mng: DSLAM-HUB v DSLAM (stanalone, sub-DSLAM): DSLAM-HUB th c hot ng vi vai tr l thit b ghp knh cp 1, kt ni ln BRAS bng lung STM-1 v c cc DSLAM cp 2 kt ni vo. DSLAM thng l cc thit b ghp knh cp 2 c kt ni ln DSLAM cp 1 hoc BRAS m khng c cc DSLAM th cp. u ra ca n c kt ni v cc DSLAM chnh. Sub-DSLAM chu s qun l ca DSLAM chnh (Main DSLAM). Kt ni gia gia MainDSLAM vi SubDSLAM, hoc MainDSLAM SubDSLAM vi mng IP bng cc loi giao tip sau: n X Ethernet 100/1000 (cho lu lng IP). 155Mbps SDH. 34Mbps PDH. n X 2Mbps. IV.1.3. H thng qun l mng xDSL H thng qun l mng NMS (Network Management System) s lm vic theo khuyn ngh ca ITU: G.992.1, G.992.2, G.997.1 v IETF RFC 2662. NMS l h thng m, kt hp vi tiu chun cu trc qun l mng vin thng TMN c xc nh bi khuyn ngh M.3010 ca ITU. H thng ADSL s c qun l bi mt h thng qun l tp trung c hnh thnh mt Nh qun l cc phn t mng ; tng hp vi h thng qun l mng li trn: Lp qun l phn t mng.
67/116

Lun vn thc s X l thng tin v truyn thng

Lp qun l mng. Lp qun l dch v. Lp qun l kinh doanh.

Hnh IV-1 Cu trc qun l mng

Cc phn t ca mng truy cp s c qun l bi h thng qun l mng NMS dng giao thc SNMP. Ph thuc vo knh c mng trong tng lai v ngi khai thc yu cu gii php qun l c th tu chn bao gm s kt hp qun l phn t EM (Element Management), tr gip th cng LCT (Local Craft Tool) v cc thit b giao tip truyn thng IMD (Interface Mediation Device).

68/116

Lun vn thc s X l thng tin v truyn thng

Hnh IV-2 M hnh tham chiu qun l mng

69/116

Lun vn thc s X l thng tin v truyn thng

Hnh IV-3M hnh h thng qun l DSLAM ca HUAWEI ti Bu in H ni

Yu cu h thng NMS phi h tr tnh nng qun l phn t, qun l mng v qun l dch v. Qun l phn t mng nn h tr a truy cp t ngi khai thc c kt ni trn nn IP, mi trng LAN/WAN.

70/116

Lun vn thc s X l thng tin v truyn thng

Gii php qun l mng phi h tr cho c Mc thp (ng cc mng nh) v Mc cao, rng vi s tng hp ca c qun l mng v dch v. Xem hnh 8-2-1 M hnh tham chiu qun l mng. IV.1.4. Cng vic qun l mng Khun kh cng vic qun l mng s bao trm t nht 4 b phn: H thng qun l mng: Tt c cc phn t ca mng truy cp ADSL phi c qun l bi NMS. Cn cu hnh d cho NMS. Cc node qun l: Cc node qun l, mi node cha mt phn t i din, c th l mt b nh hung router, cu Bridge, chuyn mch Switch, Modem ADSL... Giao thc qun l mng: Giao thc qun l mng c dng bi ngi qun l v cc nhn vin chuyn mch cc tin tc qun l s l SNMP, giao thc qun l mng internet (Lp ng dng) cho php nh qun l qun l hot ng ca mng li, tm v gii quyt cc vn v lp k hoch cho vic pht trin mng. Qun l c s thng tin MIB (Management Information Base): Qun l c s thng tin MIB nh vic su tp cc n v tin tc trong qun l ph v vic lu tr, x l cng vic khi cn. IV.1.5. Chc nng qun l phn t mng NMS s cung cp tt c cc chc nng qun l mng truy cp ADSL. Qun l phn t s cung cp cc chc nng sau: Qun l cu hnh: Cc chc nng qun l cu hnh s cho php hnh thnh cc phn t mng vi: T ng xp t cc trng trng thi.

71/116

Lun vn thc s X l thng tin v truyn thng

Khai bo card mi lp t trong cc DSLAM. Khi lc cu hnh mng cho tt c mc lin lc: ng dy ADSL, truy cp ATM, mng ATM, kim tra chp nhn kt ni CAC (Connection Admission Control) Cu hnh cc kt ni ATM (VPI/VCI). M/Kho dch v ADSL. Download phn mm trn cc bng mch DSLAM v CPE. Qun l phn t phi h tr: Xem cu hnh mng; Xc nh ti nguyn ca node; Thng k theo di thit b lp t; Phn mm qun l. Phn t mng c yu cu h tr cc tnh nng Cu hnh t ng v cu hnh bi ngi khai thc mng. D liu cu hnh cn phi xc nh: v tr node (Tn + v tr node), subrack, bng mch (card, Slot), xc nh cc ng ni ni b (local port). Cu hnh h thng c thc hin trc khi bt u lp t thit b. Ci ny cho php chc nng: cm - chy card, cc u cui mng NT hay bt k thit b khc no c thm vo h thng T ng nhn bit (detect) v t ng cu hnh. cho php ci t cc mch o thng trc PVC khng cn s hin din ca card phn cng v mt NT c th c a vo hot ng sm khi c lp t.

72/116

Lun vn thc s X l thng tin v truyn thng

Hot ng/ dng hot ng cng s c kim tra bi ngi qun l mng, c th thay i trng thi qun l trn thit b v PVC trong h thng. Cc yu cu s c gi ti cc phn t mng qun l cho hot ng/ dng hot ng thit b xc nh. Ngi khai thc phi c thng tin v kt qu: o thc hin thnh cng hoc li. o X l trong h thng c thc hin theo cc nguyn l ITU-T X.731. Cc ch th c th qun l trong h thng s c cc trng thi sau: o Trng thi qun l (loked = Blocked, unlocked = unblocked, enabled = up, disabled = down) o Trng thi hot ng (Active, Idle) Cc ch th c th qun l (danh sch v ng cp sp t) trong h thng l: o Cc bng mch in (Card). o Cc cng (im vt l). o Cc giao tip ATM. o Cc mch o thng trc PVC. o Cc khe (Slot) s c qun l hoc khng c qun l. Mt khe c qun l s c gim st bi cc thit b ng dng. Khe khng qun l s c to ra khi ti cu hnh nh vic xo mt subrack. Qun l li: Qun l li cho php hnh thnh yu t mng vi:

73/116

Lun vn thc s X l thng tin v truyn thng

o Thu nhn c cc cnh bo t thit b. o Phn lp cnh bo trn yu t nghim ngt h trng. o Thc hin ban hnh mt cnh bo di dng thng tin. o Tin trin ca cnh bo (ang b, bit, khc phc). o Hnh thnh s tng quan cnh bo. o Lc la cnh bo. Qun l s hot ng: Chc nng qun l hot ng s hnh thnh ln cc phn t mng nh: o Su tp d liu hot ng cc im hot ng thay i (SDH, PDH, cc kt ni ATM, cc ng ni ADSL). o D liu tng trnh c to ra cng im hot ng. o Gim st hot ng c hot ng v ngng hot ng trn mt bng mch n t ngi qun l phn t (mng). o D liu hot ng (cc b m trong cc b ghi) s c chim gi t h thng bi ngi qun l sau khi gim st hot ng xy ra. Trong mi b ghi c mt gi tr ngng c th c ci t do ngui qun l. Nu gi tr b ghi xp x gi tr ngng th mt cnh bo s xy ra. o B m s c s dng bi ngi qun l: thu thp cc gi tr m cho ngi qun l, bao hm thm chc nng s kin ch . Qun l an ninh mng: Truy cp ti EM (Element Management) c iu hnh bi tiu chun cc c ch an ninh, n iu hnh v

74/116

Lun vn thc s X l thng tin v truyn thng

cho php ngi qun l logon h thng. Chc nng qun l an ninh cho php: o To ra khi lc c s thm quyn truy cp trn Username/ Password. Tin tc truy cp c lu tr trong log file nhn dng hot ng ca ngi qun l. o Cho php cc nh vng domain quan h ca ngi qun l kim tra vic chia s ti nguyn. o Ngi qun l s xc nh tt c cc user, ngi m cn mt phn hoc y thm quyn truy cp, bao gm password, nhm thnh vin... N cng cho php gii hn user truy cp theo thi gian, ci t thng k truy cp... o Truy cp ti h thng NMS s c 3 mc khc nhau: Ngi qun l h thng, ngi gim st v ngi qun l thng thng. Ngi qun l h thng: s c php truy cp ti cc ca s EM, c php thay i bt k cc tham s. C th to, xo, sa i thm quyn cc user. Ngi qun l thng thng: C th truy cp ti cc ca s EM, c php thay i mt vi tham s. Ngi gim st: C th truy cp tt c cc ca s EM, khng c quyn thay i bt k tham s no. o Cho php gn (ci t, xo, to) thm quyn cho user trong mi ng dng (ADSL, PVC, thit b, cnh bo & s kin, dch v, UNI, NB(MD), SNMP). IV.1.6. Mng qun l truy cp H thng qun l mng thng qua ngi qun l phn t (mng) h tr qun l mng truy cp, x l nhiu phn t mng.

75/116

Lun vn thc s X l thng tin v truyn thng

Trong thit b ng dng cc phn t mng khc nhau c gim st t bn trong Open View Network Element Node Manager. N cho php xem cc node h thng, cc subrack, slot v cc bng mch. Cc phn t mng, node h thng v subbrack c cnh bo trn bn Open View. N cho php to ra cnh bo chung v lit k danh sch cc s kin cnh bo ti tt c cc im kim tra (Control Point). Dch v ng dng c dng ci t mt dch v ti ngi dng nh PVC, ADSL v cc chng trnh ci t mu s c to cho tt c cc im kim tra iu khin CP. IV.1.7. Cu hnh Client Server NMS C 2 s thit lp h thng qun l: Client/Server v ng mt mnh Standalone. Thit lp Client/Server i hi trong trng hp thit lp dng mng ln (c nhiu im iu khin CP v nhiu ng dy ADSL). N bao gm mt server vi nhiu mn hnh nh vi vic x l chung v thu bao v c s d liu. (Cc d liu x l ti ch c lu tr ti ch, tt c cu trc d liu cho cc phn t mng c lu tr trong CP). Trong trng hp mun tm kim thng tin t CP, cc Client s lm vic trc tip vi CP.
Client

NMS server

Database server

NE

NE

NE

NE

NE

NE

Hnh IV-4 M hnh h thng NMS Client/Server


76/116

Lun vn thc s X l thng tin v truyn thng

Trong cc thit lp nh, m hnh ng mt mnh Standalone c dng, Client/server c cu hnh trn cng mt Workstation. Sau y l mt s hnh nh giao din NMS Client ca cc chng loi thit b DSLAM c s dng ti Bu in H ni

Hnh IV-5 Giao din ha phn mm qun l thit b SIEMENS (ACI)

77/116

Lun vn thc s X l thng tin v truyn thng

Hnh IV-6 Giao din ha phn mm qun l thit b HUAWEI (iManager N2000)

Hnh IV-7 Giao din ha phn mm qun l thit b UMAP (UltrAccess GUI)

78/116

Lun vn thc s X l thng tin v truyn thng

Hnh IV-8 Giao din ha phn mm qun l thit b ZTE

IV.1.8. Kho st quy trnh cung cp dch v ADSL c th cung cp dch v cho khch hng mt cch nhanh chng, bn cnh vic thit lp cu hnh cho cc thit b DSLAM c th hot ng mt cch bnh thng theo ch dn ca nh sn xut, cc DSLAM cn phi c thit lp cu hnh cho ph hp vi quy trnh cung cp dch v ca nh cung cp dch v. Do c mt s lng khch hng ln, h thng cung cp rng khp trn a bn H ni, nn ph hp vi m hnh kinh doanh ca Bu in H ni, cc DSLAM s c t tn theo mt chun thng nht, to iu kin trao i thng tin gia cc n v khc nhau. V d, cc DSLAM s c t theo b m ca cc

79/116

Lun vn thc s X l thng tin v truyn thng

tng i dt thit b: Tng i bch khoa c thng nht t tn l BKA v thit b DSLAM t ti y s c t tn l BKAxy, trong xy l ch s ca DSLAM c lp t ti tng i (BKA11, BKA12, BKA21). Cc cng DSLAM c thng nht nh s t 1 tr i trn tt c cc loi thit b d thit b c phng n nh ch mc khc nhau. V d, DSLAM ca Siemens c nh ch s tng dn theo khe cm, nhng cc thit b khc nh Huawei, UMAP th khng c tnh nng , m c xc nh di dng Shell/Frame/Slot/Port. iu ny to ra cc bt cp khng nh cho b phn khai thc mng khi phi thc hin ng tc chuyn i t thng tin nhn c (Tn DSLAM, s cng) sang khun dng c quy nh bi nh sn xut. Mt khc theo khuyn ngh ca nh sn xut, trc khi cung cp dch v, cc cng thit b nn trng thi ng disable trnh tiu hao nng lng v ti nguyn tnh ton ca DSLAM. iu dn n yu cu i vi h thng l: 1. Cc cng phi c a vo ch disable trong cc trng hp: a. Cha c khch hng ng k s dng (mc nh khi thit lp h thng) b. Khi khch hng ng k tm ngng s dng c. Khi khch hng n cc, buc phi tm ngng cung cp dch v d. Khi khch hng hy hp ng e. Khi khch hng dch chuyn sang mt v tr khc (cng khc) f. Khi u chuyn thit b sang mt DSLAM mi (cng khc)

80/116

Lun vn thc s X l thng tin v truyn thng

g. Vv 2. Cc cng phi c a vo ch enable trong cc trng hp: a. Khch hng ng k s dng v sn sng s dng dch v b. Khi khch hng mun khi phc dch v c. Khi khch hng ht n cc d. Khi khch hng dch chuyn n mt v tr khc (cng khc) e. Khi u chuyn thit b sang mt DSLAM mi (cng khc) Bn cnh vic s lng cc thao tc lin quan n qu trnh pht trin thu bao ngy cng tng do nhiu khch hng s dng, h thng qun tr mng cn phi thc hin nhiu thao tc lin quan n chnh nh cung cp dch v. Do phi thng xuyn cu hnh li h thng mng ti a ha kh nng cung cp dch v (iu chuyn dung lng cng) s lng thao tc tng vt v ko theo l s qu ti ca cc nhn vin k thut ti trung tm iu khin h thng. Mt vn khc cng lm qu ti h thng qun l tr l cc yu cu cung cp thng tin v trng thi cng ca thit b. Cc phn mm qun l thit b ca cc nh cung cp thng c thit k cho b qun tr nn c rt nhiu tnh nng cao cp, lin quan n hot ng ca c h thng v ch cc k thut vin qua o to mi c th nm bt v s dng trnh gy mt lin lc cho ton h thng. Theo phn cp qun l, nh cung cp dch v s phi c mt b phn h tr khch hng gin tip qua in thoi v thng b phn khng c quyn qun l thit b m ch c th thc hin cc thao tc monitoring.

81/116

Lun vn thc s X l thng tin v truyn thng

Bn cnh vic kh nng ca cc phn mm qun l ng gi do nh sn xut cung cp c nhng hn ch nht nh (v c thit k chnh cho b phn qun l), nhiu phn mm cn khng c kh nng phn quyn cho ngi dng c th hn ch thao tc theo user. d hnh dung v ta cng xem xt mt v d sau: Khi c khch hng yu cu h tr do gp s c khi s dng dch v, cng vic u tin m b phn h tr khch hng phi thc hin l kitm tra thng tin v mt cng truy nhp: ng/m, trng thi li, c thit lp cc cu hnh cn thit Theo cch thc thng thng, cc cn b k thut phi thc hin theo mt quy phc tp bao gm 8 bc vi s tham gia ca 2 cn b k thut ca 2 n v khc nhau: 1. B phn h tr khch hng nhn c yu cu kim tra thng s truy nhp 2. Nhn vin h tr k thut gi in n b phn qun tr mng 3. B phn qun tr mng thc hin xc nh chng loi thit b 4. Chuyn sang my tnh hoc mn hnh iu khin NMS client tng ng vi chng loi thit b 5. Tm n giao din mn hnh m t thit b 6. Xc nh v tr cng trn thit b (khe s bao nhiu, cng th my trn slot ) 7. Thc hin tc v c yu cu (ly thng tin trng thi, ng, m cng) 8. Thng bo li cho bn h tr khch hng thng tin v trng thi cng

82/116

Lun vn thc s X l thng tin v truyn thng

Ton b quy trnh phc tp lm gim ng k cht lng h tr khch hng ca mng MegaVNN cng nh gy qu ti cho cc n v tham gia vo qu trnh cung cp dch v. S pht trin ca mng li xDSL c v s lng v chng loi thit b t ra mt thch thc ln i vi Bu in H ni trong vic vn hnh, khai thc h thng; cng nh nh hng n cht lng cc quy trnh cung cp dch v ca n v, m ta c th tm tt li nh sau: 1. Khng c chc nng cho php cc h thng h tr bn ngoi giao tip vi phn qun l mng: Do khng c chc nng giao tip vi cc h thng h tr bn ngoi (v d h thng qun l khch hng, h thng h tr dch v.), qu trnh cung cp dch v (ng m cng dch v, khi to dch v, tho hy dch v) u phi chuyn n k thut vin khai thc mng thc hin bng nhn cng thng qua h thng NMS ca mi hng; khng cho php kt ni, thc hin t ng ha dy chuyn sn xut, cng nh khng th xy dng v pht trin thnh mt gii php tng th. iu dn n cc h qu tt yu sau: a. S lng thao tc hng ngy tng ln theo s lng thu bao v dch v: Mt ngy phi thc hin nhiu yu cu ng/m cng (khi c khch hng mi ha mng, hu hp ng, n, tr n cc, vv). C nhng ngy, s lng yu cu ln n hn 300; thi gian thc hin trong t 7:00 cho n 21:00 vi cc quy nh cht ch v thi gian hn ch ti a vic mt lin lc ca khch hng; b. To mt sc p khng nh i vi qu trnh vn hnh v khai thc h thng do phi s dng nhiu loi phn mm qun l NMS i vi nhng cng vic hng ngy (kim tra thng s cng, ng, m,
83/116

Lun vn thc s X l thng tin v truyn thng

reset cng) . Thc t l c lc, cn b qun l mng phi ngi trc 04 mn hnh NMS v phi thao tc qua li gia 4 NMS ny; 2. Cng tc h tr v chm sc khch hng gp nhiu kh khn: V l do an ninh, bo mt nn phn qun l mng NMS nn k thut vin ti b phn h tr khng c thng tin v trng thi thit b tr li v h tr khch hng m phi hi thng tin t b phn qun l mng NMS, nh hng khng tt n cht lng chm sc khch hng, tn nhiu nhn lc v mt nhiu thi gian ch i. 3. Kh khn trong vic tch hp ng dng, nng cao cht lng, ty bin ca dch v: Cc phn mm qun l thit b DLSAM c thit k cho cc nhu cu qun l chung nn c nhiu im khng ph hp vi nhu cu s dng ca Bu in H ni; khng tch hp vi cc CSDL hin c ca Bu in H ni, do vy gp nhiu kh khn trong vic tch hp ng dng, nng cao cht lng ca dch v. 4. Khng c mt gii php tng th cho ton h thng: Khng c mt hng cung cp thit b DSLAM no c kh nng cung cp mt gii php tng th tha mn cc yu cu trn, do gii php thit b ca mi hng u khc nhau, cc hng ch c th c kh nng cung cp gii php i vi thit b ca h khi c yu cu, m khng quan tm n thit b ca cc hng sn xut khc. Thc t ti mng do Bu in H ni qun l tn ti thit b ca 4 hng sn xut, trong khi s hng cung cp thit b trn th trng Vit nam c tnh ln hn 10 hng. S pht trin ngy cng mnh m ca dch v xDSL vi xu hng nng cao cht lng dch v m vn tit kim ngun nhn lc k thut cao i hi phi c mt gii php gii quyt trit cc vn nu trn.

84/116

Lun vn thc s X l thng tin v truyn thng

gii quyt tha ng cc vn nu trn, ti ang hng ti mc tiu xy dng mt gii php phn mm ph hp vi m hnh khai thc, qun l ca nh cung cp dch v, p ng cc yu cu t ra vi cc kh nng: Cho php t ng ha cc thao tc khai thc hng ngy; Cung cp giao tip cho php cc ng dng/dch v h tr bn ngoi c giao tip vi cc thit b DSLAM. C th theo di trng thi thit b t xa, tu theo phn quyn ca cc n v tham gia khai thc ph hp vi quy trnh qun l dch v ca nh cung cp dch v, to tin tin ti thc hin cc chc nng qun l phc tp hn Nht th ha giao din qun l, gip ngi s dng trnh vic phi thao tc vi nhiu phn mm qun l khc nhau; Nhn thc c ngha quan trng ca vic tin hc ha, t ng ha dn cc thao tc n gin, gii phng ngun nhn lc c trnh cao khi cc thao tc n iu, cng nh nng cao cht lng cung cp dch v, nhm thc hin ti s c gng hon thnh ti hng ti kh nng p dng vo thc t khng ch i vi n v mnh, m c th p dng vo cc n v khc trong phm vi tp on. IV.2.Qun tr mng tp trung qua WEB s dng CGI xy dng ng dng qun tr mng tp trung qua web, chng ti s dng cc hm SNMP API trn nn Java ca hng AdventNet. Java c s dng v nhng tnh cht rt c bn ca ngn ng lp trnh ny, l tnh n gin, hng i tng, ph hp vi ngn ng lp trnh mng, c bo mt cao, multi-thread v c th chy trn mi loi my tnh khc nhau.

85/116

Lun vn thc s X l thng tin v truyn thng

i vi mt ngn ng lp trnh my tnh, Java tuy ra i mun (nm 1995) nhng nhanh chng tr thnh mt ngn ng lp trnh c pht trin nhanh nht v c cho n nhiu nht trong lch s. Nh trnh by trn, Java c trong n nhiu c tnh qu bu, ph hp vi lp trnh a nn v lp trnh mng trn internet: an ton, khng ph thuc vo chng loi my tnh (chy c trn mi h nn), hng i tng, a lung, l ngn ng lp trnh mng v mt iu rt quan trng, l Java c tch hp vo cc trnh duyt mng. Cc ng dng qun tr mng c th thu hoch c rt nhiu li ch t Java. Java c mt h thng th vin hm phong ph cho cc ng dng trn mng v c th d dng lp trnh cho cc ng dng da trn TCP cng nhu UDP. Do l ngn ng lp trnh khng ph thuc vo h nn (my tnh v h iu hnh), cc m chng trnh Java c th chy trn bt k mt my tnh no trn Internet. Ngoi ra, vi cc Java applets chy trong cc trnh duyt web, nh qun tr mng c th qun tr cc loi thit b khc nhau t xa. iu c c do ngy nay, tt c my tnh mng u c ci dt sn cc trnh duyt v tt c cc trnh suyt u h tr Java. Mt applet l mt chng trnh mini chy bn trong mt trnh duyt web. Applets s c t ng download nh l mt phn ca trang web v c np vo b nh ca web browser client v cho thc hin. Thng thng, cc applet ny s to ra cc hiu ng ha bn trong khu vc hin th ca trang web. Nh vo c ch ny m chng ta c th cung cp cc phn mm nh t mt server trung tm n cc my trm v do cc phn mm nh ny c chy

86/116

Lun vn thc s X l thng tin v truyn thng

ti pha client, chng ta c c mt m hnh tnh ton phn tn server n cc my trm. Gii thiu gi phn mm SNMP ca AdventNet SNMP AdventNet Java SNMP API l mt h thng cc hm cng c dng clientserver ginh cho cc ng dng qun tr mng. AdventNet cung cp cc hm API c bn gip chng ta c th xy dng c cc gii php qun tr mng da trn s kt hp gia SNMP v cng ngh Java. Gi phn mm ny c th chia thnh bn lp chnh sau: 1. Lp cc bin SNMP 2. Lp giao tip SNMP 3. Lp lin quan n cc MIB 4. Lp ph tr Cc lp bin SNMP Chng ta bit l chun SNMP nh ngha mt s kiu bin nh Integer, Bit String, Octet String, Object Identifier v NULL AdventNet SNMP Package cng a ra cc lp bin tng ng vi cc kiu bin trn. u tin l mt lp dng abstract vi tn gi SnmpVar, cha cc abstract methods ginh cho vic in n, m ha ASN v gii m, vv SnmpVar c cc lp con tip theo l SnmpInt, SnmpString, SnmpNull, SnmpOID, SnmpUnsignedInt. Cc lp con ny li c cc lp con tip theo nh: SnmpOpaque, SnmpIpAddess, xem hnh

87/116

Lun vn thc s X l thng tin v truyn thng

Hnh IV-9 Cu trc phn lp ca SnmpVar

Lp SNMP SNMP Communication Chng ta c nm lp lin quan n vic trao i thng tin qua SNMP: SnmpAPI: lp ny c to ra qun l cc phin SNMP c to ra bi cc ng dng ca ngi dng, qun l cc modul MIB c np v lu tr cc d liu quan trng trong giao tip SNMP. y l mt lp r t quan trng ca Advent SNMP Package. Trc khi s dng bt k mt hm SnmpAPI no, chng ta cng u phi khi to v chy lp ny. SnmpSession: c dng qun l cc phin lm vic trong mt cp giao tip SNMP. lp ny cung cp cc hm cho php m cc phin lm vic ng b hoc bt ng b; gi v nhn cc yu cu SNMP, kim tra tr li hoc timeout v ng phin lm vic. SnmpSession cn phi c khi to trc khi bt u thc hin lin lc gia hai bn SNMP. SnmpCallback: c s dng khi c mt kt qu tr li khng ng b n mt thread nhng cn c x l thm bi mt thread khc SnmpPDU: cung cp cc hm v bin cn thit to v s dng cc SNMP PDU. Cc method c cung cp bao gm thm cc lin kt bin vi cc OID v cc bin Null cho cc PDU, in ra tt c cc lin kt bin Cc lp lin quan n SNMP MIB Chng ta c mt s lp lin quan n x l cc SNMP MIB nh sau:
88/116

Lun vn thc s X l thng tin v truyn thng

MibModule: a ra mt cch phn tch c php v s dng cc bin d liu trong cc file modul MIB. Mi mt phin bn MIB c to ra t mt MIBModul File v chng ta c th np vo v loi b cc MIBModul ny bng cch to hay xa cc phin bn (instance) ny. Thng qua phn tch cc modul MIB ny, chng ta c th nhn c cc gi tr do cc Agent tr v. MibMacro: c s dng phn tch c php cc MIB macros. Hin thi ch h tr cc macro dng OBJECT-TYPE v TRAP-TYPE. MIBTrap: c s dng vi cc d liu dng trap MibNode: dng trnh by ca mt node trong cy MIB. C nhiu method v thuc tnh c pht trin n gin ha vic pht trin cc ng dng c s dng cc nh ngha ca MIB. LeafSyntax: S dng trnh by dng m t ca cc l trong cy MIB Cc lp ph tr: C mt s cc lp c thit k nhng khng nm trong cc phn loi trn: SnmpClient: y l mt giao din c s dng thay i cc din bin theo ngm nh ca cc hm callbacks, xc thc v a ra cc thng bo debug. MibException: L mt lp dng bt li v din gii li (nu c) trong qu trnh thc hin. Phn tip theo, chng ta s i vo cc bc c bn p dng qun tr mng qua web da trn gi AdventNet SNMP. Xy dng cng c qun tr mng da trn CGI Cc yu cu c bn ca h thng:

89/116

Lun vn thc s X l thng tin v truyn thng

H thng qun tr mng DSLAM c th c bt u t mt thit k n gin: H thng giao tip SNMP da trn CGI, c kh nng thc hin cc cu lnh truy vn n gin ly cc thng tin v h thng trong MIB-II. y la cc thng tin cc k c bn i vi mt h thng qun tr mng. Cc yu cu cn thit cho NMS_CGI: (1) Ngi s dng c th dng trnh duyt web (NetScape, Internet Explorer,) ly cc thng tin cn thit ca h thng. Do s dng trnh duyt web nn h thng nn cung cp cc giao din ha ph hp vi ngi s dng. (2) Ngi s dng c th nhp vo tn hoc IP ca DSLAM. (3) Ty theo tn hoc a ch IP ca DSLAM m NMS_CGI s tr li vi cc thng tin tng ng c nh ngha trong MIB-II hoc l thng bo ch hoc bo li (4) Theo RFC 1213, kt qu thng bo v ca sysObjectD l OID v SysServices l mt s nguyn nn NMS_CGI cn phi thng dch li ngi s dng c th hiu c. (5) Thi gian thc hin mt yu cu theo khuyn ngh l 15 giy, sau thi gian trn, h thng s a ra thng bo timeout. Da vo cc yu cu trn, h thng s c thit k theo hng i tng. IV.2.1. Xy dng chng trnh trn CGI Trong phn ny, chng ta s lun bn v cch xy dng cng c qun tr mng da trn CGI. Khi ngi s dng bm vo mt lin kt (link) trn trang web v link c tr n mt a ch (URL) ca mt chng trnh nm trn web server,

90/116

Lun vn thc s X l thng tin v truyn thng

server s gi chng trnh ra thc hin. Trc , server s chuyn cc tham s c yu cu vo chng trnh thng qua B nhp chun (standard input) v cc bin mi trng theo ng quy tc ca CGI. Sau khi thc hin xong, chng trnh s gi cc kt qu tr v thng qua b ra chun (Standard Output) cho web server v n lt mnh, web serer s tr li kt qu cho web client. Trong m hnh ny, http client v server cng u phi s dng chun c t d liu MIME (Multipurpose Intemet Mail Extensions) ca Interrnet m t (v thaa thun) v ni dung ca cc thng ip. Theo quy tc ca giao thc HTTP, HTTP client v server phi t tha thun vi nhau v cch thc trnh by d liu mi khi kt ni c thit lp. Mt yu cu HTTp thng thng c ba phn nhu sau:
<method> <resource identifier> <HTTP version><crlf>

<method> l cu lnh HTTP nh GET hay l POST <resource identifier> m t tn ca ti nguyn ch <HTTP version> m t phin bn m pha client s dng, v d nh HTTP/1.0 <crlf> l k t ht-chuyn v u dng (2) Cc trng cha thng tin v yu cu: <Header>:<Value><Crlf> Trng header dng cha cc thng tin lin quan n phn header ca yu cu, c nh dng l tn ca header, tip theo l gi tr ca header v cui cng l Crlf. Trng header cui cng c kt thc bng 2 k t CrLf lin tip. (3) Phn thn thc th (the entity body):

91/116

Lun vn thc s X l thng tin v truyn thng

Phn ny c client s dng chuyn cc thng tin cn thit lin quan trc tip n yu cu ln server HTTP GET c server s dng tip nhn a ch URL v gi d liu v cho client. HTTP POST cng tng t nh HTTP GET nhng c mt im khc bit l chng ta khng th gi mt lng d liu ln hn 256 k t (hay 1024 k t ty theo h thng) thng qua lnh GET. Do , trong thc t, khi c cc yu cu gi v server, chng ta thng hay s dng lnh HTTP POST hn. Listing sau l mt on m java s dng Java Socket to mt kt ni gia client v server.
import import import import java.lang.*; java.util.*; java.net.*; java.io.*;

class ClientCGI { Socket socket = null; private String[] msg = {, , , , , , , , }; private boolean MSG = false, ERR = false; private String script = "/cgi-bin/dslamnet/snmpGet; private String line = ; public ClientCGI(String str) { String data = new String(hostname + str); try ( socket = new Socket( 172.30.1.2, 80); DataoutputStream ostream = new DataOutputStream(socket.getOutputStream()); DataInputStream istream = new DataInputStream(socket,getInputStream()); ostream,writeBytes("POST " + script + " HTTP/l.0\r\n + "Content-type: application/octet-stream\r\n + "Content-length: + data.length() + "\r\n\r\n;) ostream, writeBytes (data) ; ostream,close(); line = istream.readLine(); if(line.equals("Warning!) ( ... // Xu ly loi ) else if(line.equals("Messaqe!")){ ... // Co ket qua gui ve } istream.close() ;

92/116

Lun vn thc s X l thng tin v truyn thng

} catch (Exception e) { ... // Xu ly loi } ... }

Chng ta cng c th s dng lp URLConnebtion c vit sn trong mi trng Java.net. Khi th m lnh s c gin lc i rt nhiu. Thay v phi lm vic vi TCP connection vi cc d liu gc, chng ta ch cn lm ch r URL v gi thng n server. URLClass s thc hin phn cng vic cn li.
public ClientCGI (String str) { try { URL snmpserver = new URL("172.30.1.2' + "/cgi-bin/DSLAMnet/snmpGet); URLConnection connection = snmpServer.openConnection(); connection.setDoOutput(true); PrintStream ostream = new PrintStream(connection.getOutputStream()); ostream.println(str); ostream.close (); BufferedReader istream = new BufferedReader( new InputStreamReader( connection.GetInputStream())); line = istream.readLine(); ... } ... }

Listing ClientCGI.java s dng URL Class Phn m java chy pha Client cn n gin hn nhiu so vi on m chy trn server. Tt c cc cng vic cn lm l nhn s liu t Standard input v gi kt qu ra standard outphut
class RequestHandler { public static void main(String[] args) { String line = null, error = null, rdata; RequestHandler request_handler = new RequestHandler(); try { BufferedReader istream = new BufferedReader( new InputStreamReader(System.in.Read())

93/116

Lun vn thc s X l thng tin v truyn thng

line = istream.readline(); if(line != null ) { ... ; // Lay du lieu va ghi vao rdata System.out.println(Content-Type: text/plain\n\nMeseage!\n + rdata); } else { System.out.println(Content-Type: text/plain\n\nMeseage!\n + error); } istream.close(); } catch (Exception e){ System.out.println(Content-Type: text/plain\n\nWarning!\n + e); } System.exit(0) ; } .. } // Bat dau tien trinh phan tich rData va //gui cac snmp query den cac DSLAM

Listing ServerCGI.java RequestHandler.java IV.2.2. Xy dng chng trnh gi nhn SNMP S dng gi phn mm AdventNet SNMP, lp SnmpTask.java c vit vi mc ch thc hin cc tc v SNMP khi c yu cu. Theo ti liu hng dn ca AvantNet, bt k mt ng dng no mun s dng gi phn mm ny u phi khi to v chy lp snmpAPI. Sau , ung dng s phi np modul MIB c th nhn c cc gi tr tng ng t SNMP agent. Tip , ng dng s phi m mt phin bn ca SnmpSession lin lc vi cc SNMP agent. Theo ti liu ca AvantNet, chng ta c th to khng hn ch cc phin lm vic nhng cn phi lu rng, cc phin lm vic ny thc cht l cc thread v vic m qu nhiu hoc duy tr nhiu thread chy song song vi nhau l khng cn thit.
class SnmpTask{ private MibModule private SnmpOID

module = nuil; oid;

94/116

Lun vn thc s X l thng tin v truyn thng

private private private private private private private private

SnmpPDU SmpVarBind SnmpVar SnmpSession SnmpAPI byte String boolean

pdu = null, re_pdu= null; varbind = null; var = null; session = null; api = null; commnand; errMsg = ; eStat = false;

public SnmpTask(String host , String community) { // Instantiate and start SnmpAPI api = new SnmpAPI(); api.start() ; command = api.GET_REQ_MSG; // change to GET operation // Load the MIB Module try { module = new MibModule("rfcl213-MIB, api, api.DEBUG); } catch (Exception e) { errMsg = "Loi: Doc/xuly MIB URL: " + e; return; } // Instantiate SnmpSession session = new snmpSession(api); session.peername = host; session.comunity = community; session.remote_port = 161; session.timeout = 15000; // 15 seconds session.retries = 0; opensession(); } // end of snmpTask

Listing Xy dng lp snmpTask Constructor ca lp ny s dng method openSession, n gin l thc hin vic m mt phin SNMP v x l cc li pht sinh
// Open session private void opensession() { try { session.open(); } catch (Exception e) { errMsg = khong the mo duoc phien SNMP. Eror: + e.getMessage eStat = true; } }

Listing M mt phin lm vic ca SnmpTask.java

95/116

Lun vn thc s X l thng tin v truyn thng

Tip theo, ta s cn phi to mt SNMP PDU v chuyn d liu n SNMP u xa. Cng vic u tin l khi to v gn PDU vi mt lnh c th (xem v d). Cc cu lnh c th c nh ngha sn trong lp SnmpAPI di dng BYTE: GET_REQ_MSG, SET_REQ_MSG tng ng vi cc tc v Get v Set ca SNMP.
// Tao SnmpPDU private void buildPDU(byte cmd) { pdu = new SnmpPDU(api); pdu.command = cmd; } private void buildPDUex(String poid){ SnmpOID oid = new snmpOID(poid, api); pdu.addNull(oid); } //Gui SnmpPDU private SnmpPDU sendPDU() { SnmpPDU response_pdu = null; try { response_pdu = session.syncSend(pdu); } catch (SnmpException e) { errMsg = "Sending PDU: " + e .getMessage(); return null; } if (response_pdu == null) { . . . } else { return response_pdu } }

Listing cc method to v gi PDU Sau khi mt phin lm vic SNMP c m, chng ta c th bt u gi cc lnh SNMP n cc agent thng qua cc phin lm vic . Vic gi cc PDU c th c thc hin di 2 hnh thc: ng b (synchronous) v bt ng b (asynchronous). Vi phng php x l ng b, ng dng s tm ngng ti thi im v i cho n khi c d liu c gi v hoc phin lm vic b timeout.

96/116

Lun vn thc s X l thng tin v truyn thng

Sau khi vit xong cc on chng trnh gi nhn thng qua web, cng vic tip theo s l to mt h thng hon chnh kim tra. Cng vic u tin l phi to mt file .html c th download t trn mng thng qua web client.
<HTML> <HEAD> <TITLE>DSLAMNET SYSTEM</TITLE></HEAD> <BODY> <CENTER> <APPLET CODEBASE="http://172.30.1.2/cgi-bin/DSLAMnet/, CODE= ClientApplet.class, archive=ClientAppletJar.jar, width=550 height=380> <B>Sorry, your web browser should support Java1.1</B> </APPLET> </CENTER> </BODY> </HTML>

JAR l t vit tt ca Java Archive, c s dng trong mi trng Java nn v trao i nhiu file khc nhau (v d nh cc java class) trong mt file. Trong trng hp ny, browser s ch cn to mt kt ni n web server ti file JAR v chy Java applet. Bn cnh , s dng file JAR cn tit kim c thi gian ti file do d liu c nn t trc. V nguyn tc, cc file nn c t mt v tr m client c qun truy xut v nn c chung trong mt th mc (v d /CGI-BIN/). Cc file t trong th mc ny l: (1) cc file cha cc class chy trn server nh l RequestHandler.class, SnmpTask.class, vv (2) AdventNet SNMP package (3) Mt file .bat hoc .vbs c dng lnh:
java RequestHandler

97/116

Lun vn thc s X l thng tin v truyn thng

Lu hot ng: Hnh IV-9 minh ha cc giao tc cn thc hin gia client terminal v cc phn ca h thng trong m hnh qun tr mng s dng CGI: (1) Ngi s dng nhp vo tn ca DSLAM v s cng trn thit b v chn thao tc cn thc hin ri bm vo nt submit (2) Applet ly s liu do ngi s dng nhp vo v chuyn n cho i tng ClientCGI (3) ClientCGI chuyn d liu v cho web server (4) Web server phn tch yu cu, thc hin mt truy vn vo c s d liu da trn tn ca DSLAM xc nh: a. a ch IP ca DSLAM b. Chng loi ca DSLAM c. Cc SNMP community dng cho lnh GET v SET ca DSLAM d. Cc OID cn thit tng ng vi cng v cu lnh cn thc hin (5) RequestHandler c gi bi web server s ly d liu thng qua bin mi trng v standard input v gi snmpTask; (6) SnmpTask s gi cc gi SMP PDU n cc DSLAM thc hin cc yu cu. (7) SNMP Agent ti cc DSLAM nhn yu cu, x l v tr li kt qu cho Web server (SnmpTask) (8) SnmpTask chuyn kt qu v cho RequestHandler

98/116

Lun vn thc s X l thng tin v truyn thng

(9) RequestHandler to ra kt qu di dng chui v gi v cho web server (10) (11) (12) Web server chuyn kt qu v cho ClientCGI ClientCGI chuyn kt qu v cho JavaApplet JavaApplet hin th kt qu cho ngi s dng: tnh trng thc

hin cu lnh hoc l thng bo li Trn y l nguyn tc c bn xy dng h thng theo di v qun tr DSLAM da trn CGI. Chng ta c th thy y c s tham gia ca 3 thc th, l: (1) WebClient ti my tnh ca ngi s dng (2) WebServer ti im giao tip gia mng ca ngi s dng v mng cc DSLAM (3) SNMP Agent ti cc DSLAM

99/116

Lun vn thc s X l thng tin v truyn thng

Hnh IV-10 Giao din ca DSLAMnet

m hnh ny, ta c th nhn thy gnh nng tnh ton c t ln Web server do phi lm im giao tip vi cc bn v thc hin cc php tnh khc nh truy vn c s d liu, tnh ton cc tham s thit b da trn cng v chng loi DSLAM. Trong trng hp mng cung cp dch v c nhiu thit b v chng loi khc nhau, web server s tr thnh im nghn ca ton b dch v.

100/116

Lun vn thc s X l thng tin v truyn thng

IV.3.Qun tr mng tp trung qua WEB s dng CORBA xy dng ng dng qun tr mng tp trung qua web, s dng CORBA chng ti s dng sn phm VisiBroker ca hng Borland Gii thiu VisiBroker Nh cp n cc chng trc, CORBA l mt trong cc cng ngh trung gian (middleware) trong cng ngh tnh ton phn tn trn mng. CORBA l cc tiu chun chung c nh ngha bi OMG vi mc ch to ra mt giao tip thng nht cho cc ng dng hng i tng trn mng khng ng nht. c th s dng c CORBA, chng ta s cn c mt phn mm to mt mi trng nn pht trin ng dng. VisiBroker l mt trong cc sn phm hng u h tr vic pht trin, trin khai cc i tng ng dng phn tn trn mng vi cc phn cng v phn nn khc nhau v hon ton tng thch vi CORBA. Visibroker c nhiu packet khc nhau cho cc ngn ng lp trnh khc nhau. phc v cho cng vic ca mnh, chng ti s dng gi phn mm h tr Java c th i chiu vi h thng trn CGI. ORB ca VissiBroker c vit hon ton bng Java nn c th c s dng v pht trin di dng c th ti v di dng ORBlet. C ba thnh phn chnh c ng gi km theo VissiBroker cho Java. l: dch v tn (Naming Service), dch v s kin (Event Service) v GateKeeper. Naming Service cho php gn nhiu hn mt tn logic cho mt i tng thc hin v lu trong vng namespace ca dch v. Event Service cung cp cc tin ch chng ta c th tch ring cc trao i gia cc loi i tng khc nhau v nh , nhiu i tng c th gi

101/116

Lun vn thc s X l thng tin v truyn thng

d liu theo phng thc bt ng b n nhiu i tng s dng d liu thng qua cc knh ring s kin ring. Gatekeeper l dch v chy trn web server v c th cho php client nhn cc callback k c khi trong h thng c s dng firewall. y l mt thnh phn rt quan trng i vi cc ng dng trn nn web, c bit l trong m hnh ba bn Client/server nh trnh by cc chng trc. VisiBroker cn a ra cc cng c pht trin tin tin nh idl2ir, idl2java, java2iiop v java2idl. IDL2java l mt cng c rt c bn vit cc chng trnh Java c th s dng c Visibroker ORB. thc cht l cc trnh tin bin dch c su dng sinh ra cc c t Java (stub) cho cc i tng Client v b khung (skeletions) cho cc i tng server t mt file IDL. VissiBroker cn a ra cc cng c mnh cho vic xy dng cc ng dng CORBA, c bit l cc ng dng trn nn web. IV.3.1. Xy dng ng dng vi VisiBroker Hnh IV-11 m t quy trnh xy dng mt ng dng CORBA. Nh cp n phn trc, c th chy c trn nn CORBA, cc i tng phi c m t bi mt file IDL a ra cc c t ca i tng dch v s c cung cp cho cc client. nh ngha ny bao gm kiu ca i tng, cc thuc tnh ca i tng, v danh sch cc method m i tng cung cp cng nh cc tham s ca method . Sau khi vit xong file IDL, chng ta c th s dng trnh tin bin dch ca VissiBroker idl2java, ta s c c cc file class, trong bao gm cc on m cn thit thc hin chng trnh (stub code cho Client v

102/116

Lun vn thc s X l thng tin v truyn thng

Skeletion cho Server). Cc file class ny c cha trong cc ng gi m chng ta hay gi l cc modul trong file DIL

Hnh IV-11 Lu xy dng h thng qun tr mng DSLAM vi VisiBroker

Sau khi vit xong cc chng trnh ng dng client v server, cng vic tip theo l phi bin dch li thnh mt chng trnh Java hon chnh (.class) v ci t vo h thng IV.3.2. Xy dng cng c qun tr mng xDSL s dng CORBA V c bn, cc yu cu i vi h thng s dng CORBA v CGI l nh nhau. Trong m hnh s dng CORBA, chng ta s xem xt m hnh bn bn, iu vn cha th thc hin c m hnh CGI truyn thng. Cng vic u tin cn thc hin l chng ta phi vit c file m t IDL theo ng yu cu ca h thng.

103/116

Lun vn thc s X l thng tin v truyn thng

Trc ht, chng ta s phi a ra nh ngha ca giao din cho cc tc v cn bn nht nh SnmpGet v SnmpSet. Sau y l on m ca file DSLAMnet.idl.
module SnmpSys { struct sysData { string s_Descr; string s_Oid; string s_The; string s_Con; string s_Name; string s_Locat; string s_Serv; string error; }; exception OprException { string reason; }; interface OprInterface{ sysData snmpGet(in string host) raises (OprException); }; ... };

Chng ta cn lu rng t kha modul chnh l tn ca nhm cc giao din v cc d liu cha trong n. C th ni n c vai tr tng t nh cc java package v b sung thm mt mc nh ngha v cu trc phn tng ca IDL namespace. Trong DSLAMnet.idl, chng ta a ra cc nh ngha v tn ca modul, cu trc d liu, exeption v 02 giao din ginh cho cc tc v snmp c bn l OprInterfaceGet (ginh cho GetRequest) v OprInterfaceSet (ginh cho SetRequest). Sau khi m t xong, chng ta c th dng trnh tin bin dch idl2Java ca VisiBroker sinh mt s file java cn thit. Cc file s c lu trong m th mc con tn file nh c m t DSLAMnet.idl (SnmpSys). Mt s file cn thit ca h thng:

104/116

Lun vn thc s X l thng tin v truyn thng

Oprlnterface.java: Khai bo ca cc giao din OprlnterfaceHelper.java Khai bo lp OprlnterfaceHelper. Lp ny a ra nh ngha cc hm tin ch nh l bind, read, write, insert, vv OprException.java M t OprException class, c s dng chuyn thng bo li thng qua ORB SysData.java: File c s dng to i tng Sysdata, dng chuyn d liu qua ORB St_Oprlnterface.java - stub code cho i tng Oprlnterface pha Client. OprInterfaceImpBase.javaL skeleton code cho i tng Oprlnterface pha Server. M chng trnh pha Client c th c s dng li t phn xy dng phn mm qun l da trn CGI. Ch cn thc hin mt s thay i nh on m applet nh sau:
//ClientOrbApplet.java import java.awt.*; import java.awt.event.*; ... public class ClientOrbApplet extends Applet \ implements ActionListener { private SnmpSys.OprInterface op_interface; . . . public void init() { ... // Initialize the ORB. org.omg.CORBA.ORB orb = \ org.omg.CORBA.ORB.init(this, null); interface = SnmpSys.OprInterfaceHelper.bind(orb,\ "System Operation"); } ... // Su dung oprInterface.snmpGet de lay thong tin }

105/116

Lun vn thc s X l thng tin v truyn thng

Thay i ch yu y l chng ta s phi khi to ORB v s dng OprInterfaceHelper.bind to ra mt i tng OprInteface v sau mi thc hin snmpGet thng qua bindhelper ny. ORB class cung cp cc hm h tr, c s dng c hai pha vlient v server. khi to VisiBroker ORB, chng ta s phi gi n hm init(). Hm init() ny c th c gi vi cac tham s this (tham chiu n chnh bn thn applet). Bng cch ny, ORB client s thit lp mt kt ni n mt phin ca Broker Gatekeeper, chy trn my server, tc l ni m applet c ti v. Gatekeeper c nhim v gip cho client xc nh v s dng cc i tng khng nm trn web server (nm mt my tnh khc) v cho php nhn cc callback, iu khng th thc hin c do yu cu bo mt ca cc web browser. Cc web browser p dng hai kiu hn ch v l do bo mt i vi cc Java applet (cn c gi l SandBox): Cc applet ch c kt ni ngc li n cc my tnh m t , applet c ti v Cc applet ch c chp nhn cc kt ni n t host m applet c ti v; c th c cc tham chiu n cc i tng xa nh OprInterface. chng ta phi to s gn kt (dng hm bind) ca OprInterrfafeHelper. Sau khi applet gi n hm bind, ORB s ni chuyn vi SmartAgent xc nh server ng vi OprInterface. Bc tip theo ORB s th thit lp kt n gia applet v server ny. Nu ORB khng th tm c serer hoc khng th thip lp c kt ni, bind s tr v mt li h thng CORBA

106/116

Lun vn thc s X l thng tin v truyn thng

Cng vic tip theo l xy dng on chng trnh chy trn pha server. Chng ta c cc file OprInterface.java (lp OprInterface) nm trong gi SnmpSys. Cng ging nh phn CGI, y chng ta cng ch cn vit li on m chng trnh thc thi bn server. thc hin iu ny, chng ta chia cc hm thc thi pha server thnh 2 lp: SnmpServer.java x l cc yu cu t pha client OprInterfacelmp.java phn thc thi ca OprInterface. Sau y l on m chng trnh ca SnmpServer.java.
//SnmpServer.java public class SnmpServer{ public static void main(String[] args) { try { // Initialize the ORB. org.ong.CORBA.ORB orb = org.omg.CORBA.ORB,init(args,null); // Initialize the BOA. org.omg.CORBA.BOA boa = orb.BOA_init(); // Create the Snmp Operation object. SnmpSys.OprInterface opi = new OprInterfaceImpl(System Operation"); // Export the newly created object. boa.obj_is_ready( opi); system.out.println(opi + " is ready. " ); // Wait for incoming requets boa.impl_is_ready (); } catch (Exception e) { // something failed.,, Sysrem.out.println(e); } }

u tin ORB v BOA phi c khi to trc khi to bt k mt i tng CORBA no. BOA l ch vit tt ca Basic Object Adapter v c cc phn thc thi ca cc i tng s dng kch hot v deactive cc i tng m chng cung cp cho cc client. nu s dng BOA_init m khng

107/116

Lun vn thc s X l thng tin v truyn thng

c tham s vo, chng ta n gin l chp nhn chnh sch chung i vi cc thread thread pooling. Oprlnterface c to ra khi chy lp OprInterfaceImpl. Bc tip theo l ng k vi BOA thng qua method obj_is_ready v nh m cc client trn mng c th nhn thy i tng ny thng qua ORB. Cui cng, boa.impl_is_ready() s c BOA gi a server vo vng lp v hn i cc li gi n v chuyn n i tng tng ng. Listing sau l ong m minh ha ca OprInterfaceImp.java, vi cc m rng ca skeletion _OprInterfaceImplBase l phn thc thi li ca OprInterface, trong c cc tc v thc thi ca snmpGet
import java.io.*; import java.net.*; import javaeutil.*; public class OprInterfaceImpl extends SnmpSys._OprInterfaceImplBase { public OprInterfaceImpl(String name) { super (name) ; } /** Construct a transient object. */ public OprInterfaceImpl() { super() ; } public SnmpSys.sysData snmpGet(String host){ throws SnmpSys.0ptException { SnmpSys.sysData re_data; String warning ; try { SnmpOpr snmpopr = new SnmpOpr(host, public); . . . // thuc hien gui snmp PDU return re_data; } catch (Exception e) { System.out.println(System Exception in snmpGet\n + e); return null; } }

108/116

Lun vn thc s X l thng tin v truyn thng

Sau khi hon thnh chng trnh java, chng ta s s dng trnh bin dch Java dch thnh byte code. Do y l ung dng qua web nn chng cng s phi to mt trang HTML c nhng cc m java applet cn thit: Client.java v cc file jar ca Vbjorb.jar. VBJorb.jar l dile cha cc i tng ORB ginh cho pha Client.
<html> <head> <title>DSLAMnet CORBA</title> </head> <body bgcolor="#C5C5C5> <center> <applet Code=ClientOrbApplet.class" ARCHIVE=Client.jar, vbjorb.jar width=510 height=360> <param name = org.omg.CORBA.ORBClass value=com.visigenic.vbroker.orb.ORB> <param name = ORBgatekeeperIOR value=http://172.18.1.2:15000/gatekeeper.ior <B>Sorry, your web browser should support Javal.l</B> </applet> </center> </body> </html>

C 2 tham s c s dng trong DSLAMnet_CORBA.html, l Visibroker v URL ca file IOR c sinh ra bi Gatekeeper/ ORB bn client s dng gi tr ny tm IOR file. Trong trng hp ny, GateKeeper c chy cng 15000 trn chnh web server (172.18.1.2). Tt nhin l gatekeeper phi c chy trn my ch ny t trc. SNMP server cng phi c khi to c th tip nhn v chuyn tip cc yu cu t pha web server. SNMP server c th c t trn cng my ch web hoc trn mt my khc. y l mt tnh nng m ch khi dng khi CORBA ta mi s dng c.

109/116

Lun vn thc s X l thng tin v truyn thng

Chng V. Kt lun v hng pht trin


V.1. Cc kt qu t c Kt qu nghin cu ca ti c p dng vo thc t, xy dng thnh cng h thng phn mm DSLAMnet qun l cc thit b DSLAM trong mng cung cp dch v ca Bu in H ni. Phn mm c trin khai trong thc t, cung cp c cc thng tin cn thit cho ngi s dng v trng thi cng ca cc DSLAM cho php b phn h tr khch hng c c cc thng tin tc thi nhanh chng chnh xc v tnh trng kt ni ca khch hng, to iu kin phc v khch hng nhanh chng v hiu qu, gii phng b phn qun tr mng khi cc thao tc h tr khch hng thng thng, gp phn r rt trong vic nng cao hiu sut lm vic ca cc b phn h tr khch hng trc tip, gin tip, cc n v i l v gim ti cho b phn qun tr mng. Xy dng trn nn cng ngh CORBA 2.0 v CGI , s dng JDK 1.5.06, h thng c kim tra vi trnh duyt Internet Explorer v Netscape Navigator trn cc my tnh PC s dng Windows 2000. Ni chung, trong cc trng hp, h thng thc hin c cc chc nng thit k, m bo c cc yu cu t ra. V.2. Kt lun Trong ti ny, chng ta thc hin vic xem xt chun qun l mng SNMP v cch thc xy dng mt ng dng qun tr mng trn nn Web cho cc DSLAM da trn vi cng ngh CGI truyn thng v mt hng tip cn mi thng qua CORBA. Qua thc hin ti, ta c th rt ra cc kt lun sau:

110/116

Lun vn thc s X l thng tin v truyn thng

SNMP l mt giao thc rt tt cho vic qun tr mng, khng ch trong thc hin nhim v theo di, gim st h thng m cn c th p dng mt cch kh thnh cng trong vic iu khin cc thit b trn mng. Cc chng trnh c vit bng ngn ng Java cho thy Java l mt ngn ng lp trnh mnh, ph hp vi mi trng mng. Do c thit k hng i tng v khng phc thuc vo h nn nn cc chng trnh Java c th chy trn nhiu h thng khc nhau. Cng ngh CGI v CORBA c p dng xy dng phn mm qun tr cc DSLAM qua web. T gc lp trnh, CORBA hn hn CGI nh tnh trong sut a phng (local/remote transparency) v cc h tr mc cao trong vic truyn d liu, thc hin cc th tc gi hm; Cc ng dng chy trn CGI chm hn so vi CORBA; H thng s dng CORBA c kim th vi cc cu hnh khc nhau nh sau: (1) Web v SNMP server c t trn cng mt my tnh; v (2) Web v SNMP server c t trn hai my tnh khc nhau. Trng hp (1) cho kt qu thc hin nhanh hn so vi trng hp (2). Tuy nhin, iu dn n s tng ti ca my ch v nu a h thng vo hot ng trn quy m rng th rt c th s lm qu ti my tnh v lm chm tc chung ca c h thng; V.3. Kh nng m rng: Phn cp ha h thng qun tr c th c ci t theo tng phn on mng ring bit (phn bit theo n v qun l hoc theo nh sn

111/116

Lun vn thc s X l thng tin v truyn thng

xut) hoc m rng theo m hnh nhiu SNMP server cng nh nhiu Web server vi mc ch phn ti h thng; B sung thm tnh nng bo mt nh m ha d liu trn ng truyn; B sung thm cc tnh nng phn quyn theo nhm v ngi s dng theo chc nng cng nh theo phn vng thit b; Pht trin mt ng dng qun tr mng hon chnh hn c kh nng nhn c cc thng ip SNMP trap ngay ti trnh duyt ca ngi s dng nh vo tnh nng callback thng qua IIOP ca CORBA. Nh , ngi s dng c kh nng nhn bit c cc bt thng ca h thng nh mt qun l ca mt card dch v, b qu ti, s lng gi tin li vt qu mt ngng no vv ng gi mt s thnh phn c bn ca h thng,phc v cho vic chuyn i sang cc ngn ng lp trnh khc, c hiu nng cao hn. Trong ng dng ny s dng Java lm ngn ng lp trnh vi CORBA. Tuy nhin, do CORBA c cung cp chun kt ni cho cc ngn ng lp trnh cao cp nn chng ta cng c th thit k mt s i tng bng cc ngn ng lp trnh khc nh C++ ci tin tc thc thi. V.3.1. Kt lun

Sau mt thi gian nghin cu v hon thnh lun vn, tc gi nm bt c cc khi nim tng qut v cc l thuyt cn bn v SNMP, CGI v CORBA cng nh ngn ng lp trnh Java. ti cng nu r cc chi tit p dng nhng c s l lun ny vo pht trin m hnh c th ca mt gii php qun tr mng cc thit b
112/116

Lun vn thc s X l thng tin v truyn thng

DSLAM da trn cng ngh WEB vi nn tng CORBA hoc CGI v giao thc SNMP. Lun vn thc hin c cc ni dung v t c cc mc tiu ra nh trong bn cng c duyt. Cc kt qu t c bao gm: Nm c cc c t c bn ca chun SNMP. Nm c m hnh, c ch hot ng, h thng qun tr mng da trn SNMP v p dng cng ngh CGI vo qun tr mng. p dng cng ngh CGI, CORBA vo qun tr mng. Xy dng c mt ng dng qun tr cc thit b DSLAM ang c khai thc ti Bu in H ni trn WEB. Cc kt qu t c m ra nhiu hng pht trin tip cho ti, tuy nhin vn cn mt s vn m lun vn cha cp n. Mt s hng pht trin khc na c th m rng nh: hon thin hn h giao din vi ngi s dng, danh sch cc DSLAM nn c ly t mt c s d liu, thay v ly t mt file text, pht trin thm cc kh nng bo mt, m ha d liu vv Mc d c gng trong nghin cu v thc hin ti, nhng v thi gian v trnh c hn, chc chn lun vn khng trnh khi nhiu thiu st. Em xin by t lng bit n su sc ti tin s H Quc Trung, ngi tn tnh ging dy v hng dn ti hon thnh bn lun vn ny. Cng xin by t lng bit n ti cc thy, c v cc anh, ch khoa Cng ngh Thng tin v Trung tm o to sau i hc nhit tnh ging dy v gip em trong sut thi gian hc tp va qua. Xin chn thnh cm n cc bn hc v ng nghip gip ti nhit tnh trong qu trnh trong qu trnh hc tp, nghin cu v th nghim vo thc t ti ny.
113/116

Lun vn thc s X l thng tin v truyn thng

114/116

Lun vn thc s X l thng tin v truyn thng

Ti liu tham kho


[ietf] The Internet Engineering Task Force http://www.ietf.org/rfc [Stallings 96] Stallings W. SNMP, SNMP v2 and RMON 2nd edition, 1996 [Stallings 98] Stallings W. SNMPv3: A Security Enhancement for SNMP, http://www.comsoc.org/livepubs/surveys/public/4q98issue/stallings.html, 1998 [SnmpFAQ] SNMP FAQ http://www.faqs.org/faqs/snmp-faq/ [perkins] Perkins D., McGinnis E., Understanding SNMP MIBs, 1996 [Java] Sun Microsystems, Inc. The Java Language: An Oveview", 'http://java.sun.com/docs/overviews/java/java-overview-l.html [AdventNet] AdventNet, Inc, AdventNet SNMP API 4 http://www.adventnet.com" [CGIPerl] Scott G., Shishir G., Gunther B. CGI Programming with Perl, Second Edition, 2000 [Weinman] Weinman W., The CGI Book, 1996 [Tittel96] Tittel E., Gaither M., et al. Web Programming Secrets with HTML, CGI, and Perl, 1996 [CGI2] Perl, CGI, and JavaScript Complete, 2nd Edition, By Sybex Inc. 2000 [CGI201] Hamilton J., CGI Programming 201, By Amazon 12, 2002 [VBJ] Borland VisiBroker http://www.borland.com/us/products/visibroker/index.html [Rosenberger] Rosenberger, J. Teach Yourself Corba in 14 Days, Second Edition, 2000 [Orfali] Robert Orfali R., Harkey D., Client/Server Programming with Java and CORBA, 2nd Edition, 1998 Mazumdar S., Inter-Domain Management between CORBA and SNMP: WEBbased Management - Corba/Snmp Gateway Approach, http://www.belllabs.com/project/CorbaSnmp/NeoORBImpl/, 1996
115/116

Lun vn thc s X l thng tin v truyn thng

[CORBA] CORBA, Catalog of OMG CORBA/IIOP Specifications, Revision 2.1, 1997 [OMG] Object Management Group, Framingham, Mass, 1998 The Common Object Request Brocker : Architecture and Specification, Rev. 2.2 ftp://ftp.omg.org/pub/docs/formal/98-07-01.pdf [CORBA14] Jeremy L. Rosenberger, Teach Yourself Corba in 14 Days (Sams Teach Yourself), Sams Publishing 1999 [CORBA3.0] Steve V., New Features for CORBA 3.0, IONA Technologies, Inc.. 2001 [OMG_ARCH] Framingham, Object Management Group, The Common Object Request Broker: Architecture and Specification, 1998. [Coulouris] Coulouris G., Dollimore J. v Kindberg T. Distributed Systems: Concepts and Design (4th Edition), August 11, 2000) [TL_CORBA] Nhm hc vin Cao hc X l thng tin v truyn thng 2004 mn hc H phn tn ca lp cao hc X l thng tin v truyn thng 2004, i hc Bch Kha H ni, Tiu lun: Tm hiu kin trc CORBA .

116/116