Beruflich Dokumente
Kultur Dokumente
Objectives
Know about TCP/IP protocol suite Be familiar with commonly used IP network devices
Contents
OSI Model and Layer Function TCP/IP Protocol Suite Transfer Control Protocol Internet Protocol Address Resolution Protocol IP Network Equipment
Post System
Jim
N.Y.
Pekin
Tom
Post network
To Jim
Post code
stamp
Destination address
TCP/IP
Host A Host B
Internet
TCP/IP
OSI Model
Application Upper layer Presentation session
Application
Presentation
Session
Network
Data Link
Physical
Data Encapsulation
Application Presentation Upper Layer Data TCP Header Upper Layer Data Session
PDU
Segment
Transport
IP Header
Network
Packet
MAC+LLC Header
Data Link
Frame
0101110101001000010
Physical
Bits
Data Decapsulation
Application Presentation Session
Transport
Network
Data Link
Physical
0101110101001000010
Contents
OSI model and layer function TCP/IP protocol suite Transfer Control Protocol Internet Protocol Address Resolution Protocol IP Network Equipment
Data Link
Data Link Physical
S M T P
D N S
T F T P
S N M P
21
23 TCP 6
25 53 69 Application
UDP
161
17
ARP
0806 0800
IP
Data Link
ICMP
Contents
OSI model and layer function TCP/IP protocol suite Transfer Control Protocol Internet Protocol Address Resolution Protocol IP Network Equipment
Transport Layer
Segment upper layer data Establish end to end connection Ensure the reliability of data transfer
Logical connection
TCP Protocol
Bit 0 Bit 15 Bit 16 Bit 31
20 Bytes
S M T P
D N S
T F T P
S N M P
25 53 69 Application
UDP
161
server
Port multiplexing
SP 1028 1029 23 DP 23
Sender
Receiver
Code Bits
U R G
A C K
P
S H
R
S T
S
Y N
F
I N
URG: Urgent Pointer field significant ACK: Acknowledgment field significant PSH: Push function RST: Reset the connection SYN: Synchronize sequence numbers FIN: No more data from sender
Window Control
Window size = 1 Send 1
Send 2
Sender
Receiver
Receive 1 Receive 2
Receive 3 Ack 4
Receiver
Send 4
Connection-oriented Session
TCP connection
Sender Receiver
1
Data transfer (Send Segments)
Establish Connection
Send SYN (seq=100 ctl=SYN) SYN received Established (seq=101 ack=301 ctl=ACK)
1 2 3
Established
Data Transfer
SP
DP
Seq. #
Ack. #
Host A
Host B
Source Dest. Seq. Ack. 1028 23 102 301 Source Dest. Seq. Ack. 23 1028 301 103 Source Dest. Seq. Ack. 1028 23 103 302 Source Dest. Seq. Ack. 23 1028 302 104
FIN
ACK to FIN
FIN ACK to FIN
2 3 Close application
UDP Protocol
Bit 0 Source port (16) Length (16) Data (if any) Bit 15 Bit 16 Destination port (16) Checksum (16) Bit 31 8 Bytes
TCP/UDP Comparison
TCP
Connection oriented Or connectionless Reliable or not With traffic Control Or not Transfer speed
Traffic control
Slow
No traffic control
Fast
overhead of protocol
Big
Small
Contents
OSI model and layer function TCP/IP protocol suite Transfer Control Protocol Internet Protocol Address Resolution Protocol IP Network Equipment
Internet/Network Layer
TCP 6 ARP IP
UDP
17
Data Link
ICMP
IP Packet Format
Bit 1 0
Version (4) Header Length (4)
Bit 15 Bit 16 Type of Service (8) Flags (3) Total Length (16)
Bit 31
Identification (16)
Time to live (8) Protocol (8)
20 Bytes
Source IP Address (32) Destination IP Address (32) Options (0 or 32 if any) Upper layer data (varies if any)
precedence
Bits 0-2: Precedence Bit 3: Delay Bit 4: Throughput Bit 5: Reliability Bits 6-7: Reserved for future use
15 16 17 18
D M 0 F F
Flags(3)
Bit 16: Reserved, must be zero Bit 17: (DF)0=May fragment, 1=Dont fragment
Host B
RA MTU 1000
RB
Ethernet
IP(1500)
HDLC HDLC
IP(750) IP(750)
Ethernet Ethernet
IP(750) IP(750)
IP Address
Host A Fei_1/1 Fei_1/2 Host B
172.16.2.1
172.16.2.1
10.6.24.2
10.250.8.11
0
Dotted Decimal Maximum
7 8
15 16
23 24
31
Network
Host
255
255
255
255
Binary
11111111 11111111
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
11111111 11111111
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
IP
Data Link
ICMP
Host B
I am here.
Is B reachable?
yes
Destination Unreachable
1: 172.16.1.1
2: 200.1.1.2
Host A
3: 10.1.1.2
172.16.1.1 200.1.1.1 200.1.1.2 10.1.1.1
Host B
172.16.1.2
RA RB
10.1.1.2
Contents
OSI model and layer function TCP/IP protocol suite Transfer Control Protocol Internet Protocol Address Resolution Protocol IP Network Equipment
Combine bit to byte and byte to frame Access media by physical address (MAC address) SAP associated with upper layer protocols type Error detection without error correction
ARP
0806 0800
IP
Data Link
ICMP
6 Dest. Addr
6 Src. Addr
2 Type
4 FCS
00.d0.d0
IEEE assign to Manufacturers
xx.xx.xx
Sequence ID for NIC
Host A
Host B
172.16.3.1
172.16.3.2
Other hosts
ftp://10.66.1.100:21 I wanna download a file SP:1024 DP:21 Seq.100 Ack.200 SIP:10.66.1.1 DIP:10.66.1.100,TTL=100, DF, Protocol=7 SA:01-00-39 DA:01-00-4A type=0800 01010010100010101010101010100010110111000101001
Contents
OSI model and layer function TCP/IP protocol suite Transfer Control Protocol Internet Protocol Address Resolution Protocol IP Network Equipment
- Forward signal to all ports except receive port - Interconnect hosts in same network
0101101 0101101 0101101
PC1
PC2
PC3
Out 1 2
MAC2 IP DATA
MAC2 IP DATA
1.1.1.1 MAC1
1.1.1.2
MAC2
1.1.1.3
MAC3
OUT
fei_1/1 fei_1/2
fei_1/2 :2.2.2.254 MAC3
- forward according to
destination IP address - interconnect hosts in different network - collect routing informationOSPF BGP
Routing Switch
Router
Im a switch? Im a router? Interface fei_1/1 ip add 1.1.1.254 255.255.255.0
RS
switch
1.1.1.1/24 G:1.1.1.254
1.1.1.2/24 G:1.1.1.254
1.1.1.1/24 G:1.1.1.254
1.1.1.2/24 G:1.1.1.254
MAC4
The received frames destination MAC address is different from RSs MAC address , switching
Route table
NET
2.0.0.0
1.0.0.0
Router
CPU + NP Less ports, costly Applicable to network export
Routing Switch
CPU + ASIC (Application Specific Integrated Circuit) More ports, high cost performance Applicable to exchange data in large LAN, routing capability is not as good as the same level router
Summarization
OSI reference model TCP protocol suite Transport layer Network layer Data link layer IP network equipment