Escolar Documentos
Profissional Documentos
Cultura Documentos
McDougall 2001
TCP/IP - Example
9/2000
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
Application
Transport
Internet
Data Link
Physical
9/2000
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
9/2000
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
L5 data
L5 data H4
L4 data
T2
L3 data
H3
H2
01010101010110101
L5 data H4
L4 data
L5 data
T2
L3 data
H3
H2
01010101010110101
Transmission medium
9/2000
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
9/2000
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
Application Layer
Application
Presentation
Application
Eg. SMTP - Email
Session
6869
Message
(2 bytes)
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
Transport Layer
User datagram
(22 bytes)
Transport
6869
TCP
UDP
2 bytes
TCP Header
(20 bytes)
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
TCP Header
- 6869
- 520
- 520
5H
9/2000
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
Network Layer
Datagram
(42 bytes)
Network
H
IP
IP header
(20 bytes)
User datagram
(22 bytes)
9/2000
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
IP Header
4H
5H
0026H
9594H
80H
0.0.0
11H
128.194.55.152
128.194.55.254
9/2000
10
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
Frame
(68 bytes)
Data link
T Datagram H
Trailer Header
(4 bytes) (14 bytes)
10010101010001
Bits
11
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
Type
9/2000
12
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
UDP: Example
9/2000
13
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
Connectionless
Unreliable
Simple
Packet Oriented
Simple Application Interface
9/2000
14
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
UDP Frame
Source Port
(16 Bits)
Destination Port
(16 Bits)
Length
(16 Bits)
Length of Datagram
Checksum
(16 Bits)
DATA
9/2000
15
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
SNMP
DNS
BOOTP
TFTP
SUNRPC
SNMPTRAP
NFS
RIP
GDP
BIFF
WHO
SYSLOG
9/2000
16
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
17
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
18
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
To Send Datagrams
int port;
InetAddress address;
DatagramSocket socket = null;
DatagramPacket packet;
byte[] sendBuf = new byte[256];
19
Telecommunication Engineering Technology, Texas A&M University LAN WAN Lecture Notes - Copyright Jeff M. McDougall 2001
To Receive Datagrams
int port;
InetAddress address;
DatagramSocket socket = null;
DatagramPacket packet;
byte[] sendBuf = new byte[256];
DatagramSocket socket = new
DatagramSocket(port);
20
socket.receive(packet);
10