TCP/IP Protocol - PowerPoint PPT Presentation

About This Presentation
Title:

TCP/IP Protocol

Description:

TCP/IP Protocol TCP/IP Protocol TCP/IP TCP/IP Protocol Stack TCP/IP OSI TCP/IP Protocol Stack Application Layer TCP/IP Transport ... – PowerPoint PPT presentation

Number of Views:309
Avg rating:3.0/5.0
Slides: 54
Provided by: medict
Category:

less

Transcript and Presenter's Notes

Title: TCP/IP Protocol


1
TCP/IP Protocol
2
TCP/IP Protocol
  • TCP/IP? ??? ??? ????.
  • TCP ??? ??? ? ??.
  • UDP ??? ??? ? ??.
  • IP ??? ??? ? ??.
  • ARP, RARP, ICMP Protocol? ???? ??.

?) IOS Internetwork Operating System
3
TCP/IP Overview
Host
Host
Internet
TCP/IP
4
TCP/IP Overview
??
  • ISO/OSI ?? 4 Transport Protocol? ??
  • Transmission Control Protocol/Internet Protocol
  • ? ???(DOD)?? ??? ????? ?? ? ??? ???? ?? ???? ???
    ? ???? Protocol
  • ??? ? ?? Network ??? ??? ????? ???? ??? ?? ???
    Program? ??

??
  • 1969 ARPANET ??
  • Advanced Research Projects Agency(? ??? ????
    ?????)
  • 1972 ARPANET? Demo
  • 1970 ?? UNIX(DEC PDP-11)? TCP/IP? ??? ??
  • 1980 ? ???? Protocol?? ??
  • 1980 ?? NCP? TCP? ???? Berkeley UNIX??
  • TCP/IP? DOD(Department of Defense????)? ???? ??
  • 1983 TCP/IP? Military Standard Specification? ?

5
TCP/IP Overview (Cont.)
??
  • ?. TCP/IP? OSI? ??
  • ISO/OSI? ?? 3,4? ??
  • ??? ????? ??
  • ??? Media? ?? ???
  • TCP/IP ?? ??
  • ??? ?? ?? layer? ????
  • ?. ??
  • ??? ?? ????(Virtual Circuit)?? ??? ??
  • ??? ?? ?? network?? ??? Host?? ??? ??
  • ???? ??? ??(Basic Data Transfer)
  • ?????(Reliability) ??

6
TCP/IP ????
  • TCP/IP Protocol Stack? ??

OSI 7?? ??? TCP/IP ???? ??? ??
7
TCP/IP? OSI ??
8
TCP/IP Protocol Stack
Application
4
Presentation
Application
Session
3
Transport
Transport
Internet
Network
Data Link
Data Link
Physical
Physical
9
TCP/IP Protocol ??
  • TCP(Transmission Control Protocol)
  • ???? ????
  • ??? ?????? ??? ?? full-duplex, byte stream ????
    ????.
  • ???? ??? ???? TCP? ????.
  • UDP(User Data Protocol)
  • ??? ????
  • UDP datagram? ??? ??? ?? ??
  • ICMP(Internet Control Message Protocol)
  • ???? ??????? ?? ? ?? ??? ??
  • IP(Internet Protocol)
  • TCP, UDP, ? ICMP? ?? ?? ?? ???? ??
  • ARP(Address Resolution Protocol)
  • IP ??? Hardware ??? ??
  • RARP(Reverse ARP)
  • Hardware ??? IP ??? ??

10
Data Encapsulation Decapsulation
???? ?? ??? Header ??? ??
???? ?? ?? ??? Header ??
11
???? ??? ??? ??
TCP
UDP
Layer
stream
message
segment
packet
datagram
frame
12
Application Layer
File Transfer - TFTP - FTP - NFS E-Mail -
SMTP Remote Login - Telnet - rlogin Network
Management - SNMP Name Management - DNS
Application
Transport
Internet
Data Link
Physical
  • Application Protocol??? ??? ??? ???? ??.

13
TCP/IP Transport Layer Overview
Transmission Control Protocol (TCP) User
Datagram Protocol (UDP)
Connection-OrientedConnectionless
Application
Transport
Internet
Data Link
Physical
14
Transport Layer
??
  • Application ???? ??? Datagram ?? ???? ??
  • End-to-End? ?? ???? ???? ?? ??? ???? ??
  • TCP? UDP
  • transport layer?? application layer? port??? ???
    ??? ??. ?? FTP? ?? ???? ?? ??? ? transport
    layer??? port 21??? ?? ???? ????

TCP
  • ???? Connection-oriented, ??? ? ?? ?? ???? ????
    TCP? TCP ?? ??? ??? ??? ??, ???, ?? ?? ??? ???
    ???? ??? ?? ??.

UDP
  • ???, ?? ?? connectionless, ??? ? ?? ?? ???? ????.
    UDP? ?? ??? ???? ??? ??? TCP ?? ??? ?? ??? ?? ?
    ?? ?? ????? ??? ? ?? ??? ???? ??? ????.

15
TCP Segment Format
16
Fields in Datagram
  • source? destination ?? ??
  • TCP ??? ? ??? ?? ?? ????? ???? ?? ??
  • sequence ??
  • ????? ?? ?? ???? ?? ????? byte stream?? ?? ???
    ???? ????.
  • ACK ?? ????? ??????? ?? ????? ?? ??
  • ?? ??? ??? ???? ????? byte ??? ????.
  • ?? ??
  • 32 bits? ???? ??? ???? ?? ??? ???? ???
  • ??(Reserved) ?? ??? ??? ??? 6-?? ??
  • ??(Control) 6 ?? ?? ?? ?? ?? ?? ???? ???
  • ??? ??(window size)
  • receiver? ???? ?? ??? ?? ??(availiable
    buffer)? ??? ?? ??.
  • ??? ???? ? ?? ?? flow control? ????.
  • Checksum

17
TCP Port Numbers
  • Telnet Service(Daemon)? TCP Port 23?? Port
    Address? ???? Telnet Service? 23? ???
    Listening??.
  • ??? Telnet Client? Telnet Server? ?? IP Address?
    23? Destination Port Address? Telnet Service?
    ???? 23? ??? Listening?? Telnet Service? ????
    Telnet Service? ????? ??.
  • Port Address 1 -65535??? ??? ??
  • 0- 1023? ??? Port Address? Well-Known Port
    Address? ??, ?? ?? ???? ??? Address ??.

18
TCP Port Numbers
Source Port
Dest. Port

Telnet Z
Host Z
Host A
Dest. port 23.Send packet to my Telnet
application.
SP
DP
1028
23

19
TCP ???? ? ????
  • TCP? Connection Oriented Protocol? ??? ??? ?? ??
    ??? ????. Three Hand-Shaking??? Process? ?? ?
    ???? Virtial Circuit? ????, ???? ????. ??? ???
    ??? Two Hans-Shaking? ?? Session? ????.
  • ????? ??? ?? Sequence No, Window ???, MTU ??? ??
    ??? ????.

Host A
Host B
Send SYN (seq100 ctlSYN)
SYN received
Send SYN, ACK (seq300 ack101 ctlsyn,ack)
SYN received
Established (seq101 ack301 ctlack)
20
TCP Handshake/Open Connection
Host A
Host B
Send SYN (seq100 ctlSYN)
SYN received
21
TCP Handshake/Open Connection
Host A
Host B
Send SYN (seq100 ctlSYN)
SYN received
Send SYN (seq300 ack101 ctlsyn,ack)
SYN received
22
TCP Handshake/Open Connection
Host A
Host B
Send SYN (seq100 ctlSYN)
SYN received
Send SYN (seq300 ack101 ctlsyn,ack)
SYN received
Established (seq101 ack301 ctlack)
23
TCP Handshake/Open Connection
Host A
Host B
Send SYN (seq100 ctlSYN)
SYN received
Send SYN (seq300 ack101 ctlsyn,ack)
SYN received
Established (seq101 ack301 ctlack)
Established (seq101 ack301 ctlack Data)
24
TCP Sequence Acknowledgment
Source Port
Dest. Port

Sequence
Acknowledgement
I just sent 11.
I just got 11, now I need 12.
Source
Dest.
Seq.
Ack.
1028
23
10
1
Source
Dest.
Seq.
Ack.
1028
23
11
1
Source
Dest.
Seq.
Ack.
1028
23
11
2
Source
Dest.
Seq.
Ack.
1028
23
12
2
25
TCP Windowing
ACK 2 Window size 3
Window size 3 Send 1
Sender
Receiver
Window size 3 Send 2
Window size 3 Send 3
Packet 3 isDropped
ACK 3 Window size 2
Window size 3 Send 3
Window size 3 Send 4
ACK 5 Window size 2
Window filed
  • ????? ??? ?? TCP? ??? ??? ?? Octet (1 Byte)??
    ???? ???.
  • ?? TCP? ?? ????, ???? ??? ?? ??? ? ??. ? ???
    ??? 16bit??? ???? ?? ??? 65,535 ?????.

26
UDP Segment Format
Bit 0
1
Bit 15
Bit 16
Bit 31
Destination port (16)
Source port (16)
8Bytes
Length (16)
Checksum (16)
Data (if any)
  • No sequence or acknowledgment fields

27
Fields in Datagram
  • SOURCE PORT,DESINATION PORT SOURCE PORT ? ???
    ?? ??????? ??. Destination Port? UDP ??? ??? ??
    ????? UDP ??? ?? ????? ? ???? ?? ??? ??????.
  • LENGTH UDP datagram (headerdata)? Byte ??
    ????.???? 8??.
  • CHECKSUM ???? ??? 0? ? ?? ???, ? ??? ???? ????
    ??? ????.?? ???? ???? ???? ?? ?? ?? UDP Datagram?
    ??? ????.

28
Internet Layer Overview
Internet Protocol (IP) Internet Control
Message Protocol (ICMP) Address
Resolution Protocol (ARP) Reverse
Address Resolution Protocol (RARP)
Application
Transport
Internet
Data Link
Physical
  • OSI network layer corresponds to the TCP/IP
    internet layer

29
Internet Protocol Overview
  • ??? ??? ??(Destination IP Address)? ??, ????? ??
    ??? ??? ?? ??? ????.
  • IP ??? Connection-less? ?? ??, ??,??,?? ?? ??
    ??? ????? Best Effort ???????.
  • IP Process? ? ???? ??? ??? ????.
  • IP? ????? TCP, UDP, ICMP,IGMP ?? ??.

30
IP Datagram Format
Bit 0
1
Bit 15
Bit 16
Bit 31
Version(4)
HeaderLength (4)
Priority Type of Service (8)
Total Length (16)
Flags(3)
Identification (16)
Fragment offset (13)
20Bytes
Time to live (8)
Protocol (8)
Header checksum (16)
Source IP Address (32)
Destination IP Address (32)
Options (0 or 32 if any)
Data (varies if any)
31
Fields in Datagram
  • VERS (Version) IP protocol version (Ipv4, IPv6)
  • HLEN (Header Length) ?????? ????(?? 20???)?
    ????. ?????? ??? 60 ????? ????. IP??? ??? 32??
    ??? ????. ???? IP ??? ??? 20?????, ? ??? ?? ?? ??
    5?. (5 x 32 160??, ?? 20???)
  • Service Type ????(3bit)? ?????(4bit)? ?????
    ????, ?? ??(Version 4)??? ?? ????? ???? ???.
    ??????? ??? ??? ??? IP? ??? ? ??.
  • TOTAL LENGTH IP Header? ??? ??? ???? 16bit?
    ????? IP Packet? ????? 65,536 ????? ????.
  • Fragmentation Identifier ?????? ?????.
  • Fragmentation Flags Fragment? ?? ??, Fragment?
    ?? ??? Fragment??? ????.
  • Fragment Offset . Fragment? ??? ??, ?? ?????
    ??? ????. 8 ??? ??? ??? ????.

32
Fields in Datagram(Cont.)
  • TIME TO LIVE (TTL) ?????? ??? ????.???? ??? 1?
    ????.
  • PROTOCOL Identifier IP? ???? ????? ????.(TCP6,
    UDP17, ICMP1, OSPF89)
  • Header Checksum IP Header? ??? ?? ????.??? ?
    ????? ??? ???? ????? ???? ??? ?????? ????.
  • SOURCE IP ADDRESS ??? ??? 32-bit IP address
  • DESTINATION ADDRESS ?? ??? 32-bit IP address
  • IP OPTIONS ??? IP ?? Option? ??? ? ???, ???? ??
    ???? ???, ???? IP Header? 20Byte? ???? ??? ???
    ??.?? 40Byte?? ????? IP Header? ??? ?? 60Byte? ??
    ? ??.
  • PADDING Option? ???? ??, IP Header? 32bit ???
    ?? ? ??? ??? ????.

33
Type of Service
????(3bit)? ?????(4bit)? ????? ??
  • Precedence Field(3bit) 0-7??? ?? ?? ????? ??? ?
    ??.?? ?? ? ??.
  • TOS field(4bit)? ?? ?(?? DTRC? ?? 0? Normal
    Mode? ????.) ??????? ??? ??? ??? IP? ??? ? ??.

34
Type of Service
  • Minimize Delay? ???? IP? ?? ??? ??? ??? ?? ???
    ????, Maximize Throughput? ???? ??? ???? ? ???
    ????? ??, Maximize Reliability? ???? ?? ??,
    Minimize Cost? ??? ?? ?? ??? ???? ????.

35
IP Fragmentation
  • MTU (maximum transfer unit)? Fragmentation
  • MTU(Maximum Transport Unit)
  • ? ??? ??? ????? ?? ??? ?? ?? ??
  • Ethernet ? ?? ?? ??? ???? 1518 Byte?? ??.
  • IP ?????? ?? ?? ??? 65536 ?????.
  • (Total Length Field? 16????? 2? 16?? ???? ????.)

Protocol MTU
Protocol MTU
HyperChannel 65,535byte 16Mbps Token Ring
17,914byte FDDI
4,352byte 4Mbps Token Ring 4,464byte
DIX Ethernet 1,500byte
802.3 1,492byte
X.25 576byte PPP
296byte
?? ?? ????? MTU
36
IP Fragmentation
  • MTU (maximum transfer unit)? Fragmentation
  • Fragmentation
  • IP? ?? ??? ??? ???? MTU? ?? Packet? ??? ??.
  • Datagram? MTU?? ? ??, ? ??? ??? ?? ?? ????
    ????.
  • ?? ???? ???? ? ???? ??, ???? IP? ???? ???
    ?????.
  • TCP ????? ??? ??? ???? ?? ?? MTU ??? ??? ????
    ????? ??? IP Layer? ?? ???.
  • UDP? ????? Application? ???? ??(65536Byte? ?? ??
    ????.)? ?????? IP Layer? ?? ??? IP? ???
    Fragmentation

37
IP Fragmentation
  • ???? ??? ??
  • ???(Identification) 16?? ??
  • ??? ???? ???? ?????? ??
  • ?? ?? ?? 1? ?? ???.
  • ???? IP ??? ??? ?????? ???? ?? ? ???? ??????
  • ?????? ??? ? ? ??? ???? ?? ??? ???

Fragmentation Identifier ??? ??? ????? ?? (???
?????)
38
IP Fragmentation
  • ???? ??? ??
  • ???(Flag) 3?? ??
  • ?? ?? ???? ??(Reserved Flag ) - 0
  • ? ?? ?? Do not Fragment ??. 1?? ??? ??? ??
  • ? ?? ?? More Fragment ??. 1?? ??? ??? ??? ???
    ???? ?? ??. 0?? ??? ?????, ??? ???

39
IP Fragmentation
  • ???? ??? ??
  • ??? ??(Fragmentation Offset) 13?? ??
  • ?? ????? ??? ??? ??? ??
  • ? ??? ?? ??? ???? ??? 8??? ??? ???

4000Byte? ????? ???? ? (???? ??? MTU? ?? ??, ????
1480Byte)
40
TTL(Time To Live)
  • ???? ??? ? ?? ????? 1? ????. ????? 0? ?? ??????
    ??? ICMP ?????? ???? ????. ?????? Looping? ????
    ??, ????? ???? ?? ??? ????. ?? ?? TTL? 1? ???
    ?????? LAN??? ??? ? ??.
  • ??? sec? ?? ???? ???? ??? ?? ? ???, ?? ???? ????
    ????? ?? ????? ??? ???? ??? ?? ???.
  • TTL ??? 1?? 255??? ?? ??, ?? ???? ???? ??? ? ??
    0???, ??? ??? ? ?? ??? ???? ?? ????.
  • ? ??? ??? 8????.
  • RFC 793??? TTL? 60

41
ARP(Address Resolution Protocol)
  • IP Packet ??? ???? Destination? MAC Address? ????
    Frame? Header? DA? ???? Frame ??? ??? ? ??.IP?
    ARP ????? ???? IP Address? ?? Layer 2
    Address(MAC Address)? ????? ??? IP Address? MAC
    Address? ????? Protocol? ARP? ??.ARP? Local
    Broadcasting? ????.ARP? ?? ?? Address? ARP Cache?
    ???? IP Address-MAC Address??? ????.

I heard that broadcast. The message is for me.
Here is my Ethernet address.
I need the Ethernet address of 176.16.3.2.
172.16.3.1
172.16.3.2
IP 172.16.3.2 ???
IP 172.16.3.2 Ethernet 0800.0020.1111
42
RARP(Reverse ARP) Protocol
  • ???? ??? ?? ?? ???? ??? IP ??? ????? ???? ????
    RARP (Reverse Address Resolution Protocol)??
    TCP/IP ??? ????? ???? ??. ARP?? ??? RARP ??? MAC
    Address ??? ???? IP Address? ????.RARP ??? RARP
    ?????? ???? ??? IP ??? ?? Mapping DataBase? ????.
  • ?? ???? RARP ???? ????????. ?????? ?? ????? ? ???
    ???, RARP ???? ????? ???? ?? ???? ? ??? ????, ?
    ??? Unicast? ???. RARP? ????? ???? ???, ????? ???
    ??? RARP ??? ???? ??.
  • Operation ??? ? 3(RARP Request), 4(RARP
    Response)
  • RARP? IP Address? ???? Subnetmask? Default
    Gateway ?? ??? ???? ????, ??? BootP? DHCP? ??
    ????, ??? ?????? ???? ?? ?? ? ? ??. RARP Client?
    ICMP Address Mask ??(ICMP Type 17, Code 0)? ?? ??
    ???? ?? ???? ?? Subnet Mask??? ??, ICMP Router
    Solicitation(ICMP Type 10, Code 0)? ?? Default
    Gateway? ?? ??? ?? ? ? ??.

43
RARP(Reverse ARP)
I heard that broadcast. Your IP address is
172.16.3.25.
What is my IP address?
Ethernet 0800.0020.1111 IP ???
Ethernet 0800.0020.1111 IP 172.16.3.25
  • Map Ethernet IP
  • ARP? RARP? ????? ??? ?? ??? ?

44
ICMP(Internet Control Message Protocol)
  • ????? ??? ? ???? ???? ??? ?? ??? ????, ??? ???
    ?? ??? ?? ???? ???? ? ???? ???? ????? Internet
    Control Message Protocol(ICMP)?? ??. Error
    Reporting Message? Query Message? ?? ? ??.
  • IP ?????? ???? ???? ?? ???? ??? ???? ???? ?? ????
    ????, ????? ?? ? ??? ??(Error Reporting).ICMP?
    ????? ???? ??? ????? ????? ??? ????? ??? ??
    ??(Query). ?? ?? ping ????? ?? ???? Alive ???
    ???? ?? ICMP ????? ???? ??????.
  • ICMP Message? IP Datagram? ???? ?? ???? Protocol
    ID? 1??? ?? ????? ????? 1? ??? ?????? ???? ???? ?
    ???? ICMP? ???? ??.
  • ?? ?? ??? ??, ICMP ???? IP ?????? ?????? ?? ????
    ?? ????. ??? ICMP Message ??? ?? ? ? ??.ICMP ???
    ???? ?????? ???? ???.ICMP? ??? ??? ? ???? ???.
    ????? TCP? ??????? ????.

45
Network Unreachable
192.168.39.10 ?? ???? ??
ROUTER 192.168.10.254 192.168.20.254
Bhkang 192.168.10.1
Server 192.168.20.1
ICMP Network Unreachable
  • Destination Unrechable (Type 3, Code 0-15)
  • net/host/protocol/port? unreachable ?? ?, ????
    ?????? ?? ? ? ?? ? ????.

46
ICMP ?? ???
  • ICMP ?? ??? (Type 5,Code 0)
  • ?? ??? ?? ? ???? ???? ? ??, ?? Default Gateway?
    ??? ????? Default Gateway ? ??? ??? ?? ? ?? ??
    ?? ???? ???? ??? ?? ?????? ??, ?? ???? ??????
    ????, ICMP? ?? ???? ???? ???? ?????? ???.???? ?
    ???? ??, ??? ???? ????.?? TCP/IP ??? ICMP ??
    ???? ????.

47
Multicast IGMP
Unicast, Broadcast, Muticast
  • Unicast ??? ???? Destination?? ??.Ethernet
    Frame Header? DA? ??? MAC Address? ????.
    (?.00-50-04-F2-A7-3B) Destination IP Address? ??
    IP Address??. (?.150.21.32.250)
  • Broadcast ?? ???? Destination??.Ethernet Frame
    Header? DA? ?? MAC Address? ????.
    (FF-FF-FF-FF-FF-FF)Destination IP Address?
    Broadcast IP Address??. (?.150.21.255.255 ??
    255.255.255.255)
  • Multicast ????? ??? ??? ???? Destination??.
    Ethernet Frame Header? DA? ?? MAC Address?
    ????.Destination IP Address? Multicast IP
    Address??.

48
Broadcast Address
172.16.3.0
172.16.4.0
172.16.1.0
172.16.2.0
172.16.3.255 (Directed broadcast)
X
255.255.255.255 (Local broadcast)
172.16.1.255 (subnets broadcast)
49
Muticast Address
  • ??? ???? ????, ??? ???? ????, ??????? ???? ????
    ?????? ????? ???. Unicast? ??, ?? ?? ???? ???
    ???? ????? ??? ???? ???? ???? ??.
  • ????, VOD(Video On Demand)?? ??? ??? ? ??? UDP?
    ????. TCP? ????? ?? ?? Unicast? ???? ??.
  • Multicast Group Ethernet Address
  • 01005e00000000 - 01005e7fffff
  • 01005e? ????.(?? 28Bit? ??? ?? ????.)
  • 01005e ?? Address? ?? 23bit? Octet ??? 16??
    ??? ??? ??? ????.
  • IP??? ??? 23??? ??? 01005e000000 ??? ?? ??
    ???? ????.
  • 224.128.64.32? 224.0.64.32? 01005e004020??
    ??? ??? ??? ?? ??. ? ??, IP Level?? ??? ???.

50
?? ??
  • TCP/IP?? ???? ??

51
?? ??(Physical Address)
  • ?? ????? ?
  • LAN?? WAN?? ??? ??? ????.
  • ? ??? ??? ??? ????? ???? ??? ?? ???
  • ? ??? 6???? ????
  • ???? ????? ????? unicast, multicast, broadcast?
    ?? ???? ???? ?? ????? ??.

52
??? ??(IP Address)
  • ??? ???? ?????? ?? ???? ? ???? ?? ???? ?? ????.
  • ? ???? ???? ??? ? ?? ? ???? ?? ?? ???
  • 32?? ?? ?? ??
  • ??? ??? ?????, ?????, ??????? ? ? ??.

53
?? ??(Port Address)
  • ???? ????? ??? ????? ???? ???? ?? ??? IP??? ????.
  • ??? ??? ???? ???? ?? ?? ??? ???.
  • ?? ??? ???? ?? ???? ???? ???? ???? ???? ???.
  • ???? ?? ??? ? ????? ?? ????? ??? ? ??? ?? ???.
  • TCP/IP ???? ????? ??? ???? ?? ???? ??.
  • TCP/IP?? ?? ?? ??? 16????.
Write a Comment
User Comments (0)
About PowerShow.com