`

The Note of Java Network Programming

阅读更多

the layers  of  a network:

figs/JNP3_0201.gif

 

As to java programmer,the internetLayer is very important,the layer contains the ip datagrams,

 

and each datagram contains a header between 20 and 60 bytes(which is goes by the 4-bits

header length) and  a payload that contains up to 65515 bytes datas.

 

The structure of an IPv4 datagram

figs/JNP3_0202.gif

 

4-bits version number :0100 for ipv4,0110 for ipv6.

4-bits header length:the maximum is 15,15*4=60, so the header  can be at most 60 bytes long.

1 byte type of service: 2 bytes datagram length (including the header and payload).

1 byte protocol:6 for tcp,17 for udp, and the others ..

 4 byte ip address of  the sending node(computer)

4 byte ip address of destination node.

 

 

 

分享到:
评论
1 楼 狂放不羁 2007-08-10  
Today ,I felt the java network programming is a highly classical book..,i like it .

相关推荐

Global site tag (gtag.js) - Google Analytics