ѧ
JOURNAL OF SOFTWARE
2000Vol.11No.2P.207-212



Э鼯ɲϵͳIP v4ЭһԲ
⽨ƽ޻
ժҪTCP/IPЭʵֵһԲǱ֤Internet豸֮以뻥Ļ.ĻЭ鼯ɲԻIPInternet protocolЭһԲоʵʲ,IPϵͳмϵͳֱ˷ֲʽԶ̺ʽԷ,IPһԲԼ.ѽIPЭһԲӦõ·Ŀƹ.
ؼʣһԲ,Эϵͳ,Է,IP (Internet protocol),TTCN (tree and table combined notation).
ţTP393
Conformance Testing on Internet IP v4 Based on Protocol Integrated Test System
WANG Jian-guoWU Jian-pingCHEN Xiu-huanFENG Xiao-dong
(Department of Computer Science and Technology Tsinghua University Beijing 100084)
AbstractConformance testing of TCP/IP protocol is the first step for interoperability among Internet network products.The conformance testing of the Internet protocol with a PITS (protocol integrated test system) is presented in this paper.The authors use the distributed test method and remote traverse test method to test IP (Internet protocol) end system and IP relay system in Internet,respectively.IP test suite in TTCN (tree and table combined notation) is derived according to IP test purposes.Furthermore,the IP conformance testing has been applied for developing routers.
Key wordsConformance testing,protocol test system,test method,IP (Internet protocol),TTCN (tree and table combined notation).
żͨżĲϽ,ЭƺʵֱԽԽ,ҶͬһЭ׼ʱڶͬʵְ汾.Ϊ˱֤Эĸʵְ汾ܹ֮ȫ໥,пɿͨ,ЧֶξǶЩЭʵֽв.Э԰3͵Ĳ:һԲԡԲԼܲ.,һԲֲԵĻ.
Ŀǰ,TCP/IPЭInternetѾΪȫϢչͽĻ.,TCP/IPƷ֮ĿɿͨŶδϢٹ·ķչҪ.Ϊ׼ȷط·E-mailϵͳԼ豸еƴ,ͱڽTCP/IPƷĻ֮ǰЭһԲ.Ȼ,ڳOSIЭͷЭ,TCP/IPЭʽ֤ͲԵȷоչո.Ϊ,ͨŬ,ǳɹؿһЭ鼯ɲϵͳPITSprotocol implementation conformance statement,ڶTCP/IPƷĶֲΪ.,ǶTCP/IPЭкЭIP version 4Э飨¼IPЭ飩һԲ,TTCNtree and table combined notationʽIP(Internet protocol)Լ.봫ͳOSIԵʽЭ,IPЭаͨģʽϵͳģʽмϵͳģʽ.Ϊ,ڽIPЭһԲԵĹ,µм̲Է.Ҫ,ѾIPЭһԲӦõ·ƺͿ.,ҲԹ·ʵʵĲ.
ĵ1ڼҪPITSϵͳ.2ڽIPԽṹͲԼ֯.3ڽ·IP v4ģһԲ.4ܽȫ.
1 Э鼯ɲϵͳPITS
ͼ1ʾPITSṹ.PITSϵͳTTCNԼΪ֯ĲԹ,ڲвнִв.ɹTUGEN,ЭEBEexternal behavior expressionԶTTCN.MPʽĲԼ.TTCN༭׼TTCN.GRʽĲԼ(ISO/IEC 8882)תTTCN.MPʽ.PICSPIXITprotocol implementation extra information for testingѡ,ִTEtest executionѡĲнִ.TEǲִеĹؼ,PITSͬɲԹ,ݲԼݿƲԹ,ͬʱɲԱҪȫϢ.TE¼ɱ,͸ӦϢͲοʵ.οʵPITSкͱʵIUTͨŵĵײ֧.οʵֿͨ漸ϢͺϢͨ:
starttest:ʼһִ;
stoptest:ֹһִ;
frame-send-out:TEһASP/PDU;
frame-receive:TEһASP/PDU;
quit:˳ִй.
,ֻҪѡʵĲԼͲοʵ,PITSͿòͬĲԷԲͬЭв.

Fig.1The architecture of protocol integrated resting system-PITS
ͼ1Э鼯ɲϵͳPITSṹͼ
2 IPһԲԷͽṹ
ȽIPЭҪ,IPʵڵıϵͳĲͬ,ֳIPϵͳмϵͳһԲ.
2.1 IPЭ
IPЭҪIETF RFC791岢.IPĹܣĿģʹݱͨͬĻеIPģ,Դ˵ĿĶ.ЩIPģǶInternetе·.ݶIPַķ,ʵIPݱת.ͨIPڵ·ת,ݱͨСݱȵд.Ϊ˿Դͳݱ,мϵͳ(relay-system,·еIPЭģݱֶΣsegment.Ӧ,ݱϵͳ(end-system,ĿеIPģʱ,ֶεݱͱ.ͼ2IPмϵͳͶϵͳеķֲ.IPݱĴICMPInternet control message protocol,IGMPInternet group message protocol·Ķಥ.

Fig.2The role of IP in Internet
ͼ2IP绷еĲ
2.2 IPϵͳһԲ
2.2.1 IPϵͳԷ
ISOITU-TѾISO/IEC IS 9646/1(ISO/IEC 9646-1,1993)ITU-T X.290(ITU-T X.290,1992)й涨4ڶϵͳĳԷ.ѡеķֲʽԷDTM(distributed test method)ΪIPϵͳĲԷ.
DTM,ͨ²LTlower testerϲUTupper testerĿƹ۲PCOpoint of control and observeƹ۲챻IPϵͳΪ.,ǿֱӷʶϵͳеIPģṩķӿ,ʵϲUT,IPģIPݱԼIPģǷܹȷͣõģIPݱ.
2.2.2 IPϵͳĲԽṹ
ͼ3ʾЭ鼯ɲϵͳеķֲʽԽṹ.,ڱʵIUTimplementation under testʵUT,ǲ·ӿDLPIdata link provider interfaceΪͨ,ִвTEIUT֮ͨͨͨMTPmain test path,UTͨͨATPauxiliary test path.Ϊ˲IPģ,TEͨMTPIUTͲ¼,ȻͨATP,UTTEIUTӦ,ǲIPģʱ,ͨATPTEõԿϢ,UTIUTͨMTPIPݱ.TEIPÿ¼ΪϢ,PCOıʶ,ǴϢ͸οʵ.TEյIUTϢʱ,ݲ嶨ƥ,ִµĲ¼,õͨpassʧܣfailĲо.

Fig.3The test architecture of IP end system
ͼ3IPϵͳԽṹ
2.3 IPмϵͳһԲ
ISO/IEC 9646,ֻмϵͳĲԷ:ʽԷͺʽԷ.,ƷĲڼ,ʵ;ʽԷҪϵͳ,ʹϵͳЭΪ.ڱ,ǽһIPмϵͳԵķĲԽṹ.
2.3.1 IPмϵͳԷ
Զ̺ʽԷRTTMremote traverse test method1IPмϵͳһԲ.RTTMӦõIPмϵͳԵĽṹͼ4ʾ.ڸòԽṹ,IUT˿ڷֱӦPCO.TEPCO1ĿһIP/ICMPݱʱ,IP·ģ·,̫LAN1ת̫LAN2,TEӴLAN2еPCO2õһݱ.PCO1PCO2ڲ,,ֻTEִPCOϵĲ¼,׵ؿLTЭ.

Fig.4The test architecture of IP relay system
ͼ4IPмϵͳԽṹ
2.4 TTCNIPԼ
IPЭص,ͨȷĿIPһԲԼ.һ,ǽIPԼɺƷ.
2.4.1 IPԼƺɷ
Ŀǰ,ΪֱӴFSM,EFSMʽɲ൱Ĺ24.Ȼ,RFC 791涨IPЭOSIЭȽ,ЭΪ,ڶԵʵ֮ûڽصݱ.ⲿΪ۲,ҲֻһЭ״̬,Ի,Ͳκ״̬֮ıǨ.,ļ򵥵ЭȴǴⲿ۲ЭʵΪ.ʺԶ.ǰISO/IEC 9646Ľ,ЭĲĿ,ƺIPԼ,1.
Table 1 IP v4 test suite
1 IP v4Լ

test groupTest purposeTest cases
IP-PDUPDU format13
IP-OPTOptions implement10
IP-SEGSegmentation function6
IP-RESReassemble function6
IP-BROBroadcast function7
IP-MULMulticast function4
IP-ERROption error handing function11

ٲ,ڲĿ,۲,ݱʽ,
ѡʵ,޷ֶι,鹦,㲥,
ಥ,ѡ.
Ŀĵɹͼ5ʾ,ISO/IEC 9646Ķ,ĿĿԿһһ,ӦĲԹ̵ľȷ.ʵ,Э,һԹϵ͸ӵЭʵּӰ쵽ĿĺͲ.һԹϵЭļʵֵļ֮Ĺϵ.ѡһԹϵԿɲԵʵֵ.

Fig.5The process of test purposes generation
ͼ5Ŀɹ
վȡIPһԲĿļ,ɴƳIPЭһԲ԰7,53.Щ飨IPЭеҪ(ȫOPTIONѡ),нϺõ걸.
2.4.2 
IPϵͳһԲУ2,ǽ֤IPǷȷؽյѾֶεݱ,ܽһݱ.Ϊ,TEֱӴPCO1ݱ,ݱֱؾеĴ·ɺ󵽴SUT,֮,TEPCO2õһȷĸݱ,оPCO2¼,ͼ3ʾ.
Table 2 One of test cases for IP end system
2 IPϵͳ֮һ

Nr.LabelBehavior descriptionConstraint Ref.VerdictComments
1Pco1!Ip-Seg-SecondIp-Seg-02(1)
2Pco1!Ip-Seg-FirstIp-Seg-01(2)
3Start Tm-01Ip-Reass-01
4Pco2?Ip-Reass-WholePass
5Pco2?OtherwiseFail
?Timeout Tm-01Fail

Test Case Name:IP-REASSEMBLE-02; Group:IP/END/IP-RES;
Purpose:To verify that send two sub-datagrams disorderly,
IUT can correctly reassemble them to a whole datagram.
COMMENTS:(йPDUԼϸ,μͼ3);
(1) FLAG field:=000,FRAGMENT field:=offset in original data(0);
(2) FLAG field:=010,FRAGMENT field:=0.
IPмϵͳһԲУ3,òĲĿΪ֤һн·ɺͼ¼·ѡstrict route and record route optionݱ,IUTǷȷԴ·滻ĿĵַԼ¼ĳڵַ.ͼ4ʾ,TEPCO1һн·ѡIPݱ,ԴַóɲLAN1еIPַ,ĿĵַóIP·ڵַ,Դ·ǲLAN2еIPַ.IP·յݱʱ,ӦԴ·ɣLAN2еIPַĿĵַ,ݱԴ·нIP·ĳڵַ¼.ݱᱻIP·͵TEĿƹ۲PCO2.¼һĻ,PASSĲо.
Table 3 One of test cases for IP relay system
3 IPмϵͳ֮һ

Nr.LabelBehavior descriptionConstraint Ref.VerdictComments
1Pco1!Ip-Strict-OptionIp-Strop-01(1)
2Start Tm-01
3Pco2?Ip-Strict-OptionIp-Strop-02Pass(2)
4Pco2?OtherwiseFailProcedure Error
5?Timeout Tm-01FailNot Forwarded

Test Case Name:IP-STRICTROUTE-01; Group:IP/RELAY/IP-OPT; 
Purpose:To verify when tester sends a datagram with strict and recorder route option,
IUT can correctly replace destination address with source route and recorder
its outgoing address.
COMMENTS:(йPDUԼϸ,μͼ4);
(1) sour-addr field:=Tester-sour,dest-addr field:=lut-in,sour-route1:=Tester-dest;
(2) sour-addr field:=Tester-sour,dest-addr field:=Tester-dest,sour-route1:=lut-out.
3 ·IP v4ģһԲ
Э鼯ɲԻPITS,ǶԹڵ·IPЭмϵͳһԲ.,ǻȺƿ·ԭ͢ԭ͢IPģһԲ,3ֲƷĲԽ˱Ƚ,ͼ6·ԭ͢ԭ͢ԽıȽʾͼ.ͼ7ǽ·Router·ԭ͢ԽıȽʾͼ.

Fig.6 Compare between router prototype  and 
ͼ6 ·ԭ͢͢ıȽ

ͼ7 ·ԭ͢ͽ·ıȽ
Fig.7 Compare between router prototype and imported router
ݲԽ,ǿɵó½:
(1) ·ԭ͢ԭ͢,ڴIPѡIGMPϴŽ϶ʹ;
(2) ԭ͢ھIPһԲ֮,ܺԵĸ,ͨʴ51%ߵ100%;
(3) ݶԽ·ĲԽ,ǿԷ,RFC 791RFC 1122ᵽһЩѡϸ.
ͨʵ֤,ͨƺͿ,һԲⶨλͬʱṩķǳõķ.
4  
ڱ,صIPһԲԷʵʵ·ƷͲеӦ,ʹõĲԷѾPITSϵͳеʵ.IPϵͳмϵͳ,ֲͬĲԷ,ƿ˻TTCNʽIP v4һԲԼ.ͬʱ,п·ԭͺĳ·ʵʵĲ.ʵ֤,PITSTCP/IPһԲǿе,ɵIP v4ԼҲ൱걸.,ЩӦõTCP/IPЭһԲԻ.,ǻע⵽,һԲԵķչ벻ʵʵӦ.ǽʵʵ豸ATMInternet·ͷֲʽϵͳĲ.
ĿоõȻѧ(No.69725003,69682002,69473011).
߼飺,1972,ʿ,ҪоΪ,Э.
⽨ƽ,1953,ʿ,,ʿʦ,ҪоΪ,Э.
޻,Ů,1940,,ҪоΪ.
,1972,ʦ,ҪоΪ,Э.
ߵλ(廪ѧѧ뼼ϵ100084)
⽨ƽ(廪ѧѧ뼼ϵ100084)
޻(廪ѧѧ뼼ϵ100084)
(廪ѧѧ뼼ϵ100084)
οף
1Bi Jun,Wu Jian-ping.Towards abstarct test method for relay system testing.In:Davidson I ed.Proceedings of the IFIP 10th International Workshop on Protocol Test Systems.Amsterdam:Elsevier Science Publishers,1997
2Chanson S T,Zhu Jin-song.A unified approach to protocol test sequence generation.In:Smith J ed.Proceedings of the IEEE INFORCOM Conference.New York:IEEE Press,1993
3Huang C M,Lin Y C,Jang M Y.An executable protocol test sequence generation method for EFSM-specified protocols.In:Litwack D W ed.Proceedings of the IFIP 5th International Workshop on Protocol Test Systems.Amsterdam:Elsevier Science Publishers,1995
4Bourhfir C,Dssouli R,Aboulhamid E et al.Automatic executable test case generation for extended finite state machine protocols.In:Marteniuk R ed.Proceedings of the IFIP 10th International Workshop on Protocol Test Systems.Amsterdam:Elsevier Science Publishers,1997
ոڣ1999-01-12
޸ڣ1999-03-18
