TCP/IP
TCP/IP TCP/IP TCP/IP TCP/IP Internet Protocol _ IP Address Internet Protocol _ Subnet Mask Internet Protocol _ ARP(Address Resolution Protocol) Internet Protocol _ RARP(Reverse Address Resolution Protocol) Internet Protocol _ Header Internet Protocol _ Routing Transport Layer TCP & UDP Transport Layer TCP Transport Layer UDP
TCP/IP 1960ARPA(Advanced Research Project Agency) ARPANet DARPA Internet protocol suite OPEN Protocol TCP/IP Berkeley UNIX PC LANWAN,,, TCP & IP
TCP/IP OSI IP OSI (Application) Application) (Presentation) Presentation) (Session) Session) (Transport) Transport) (Network) Network) (Data Data Link) Link) (Physical) Physical) TCP/IP (Application) Application) (Transport) Transport) (Internet) Internet) (Network) Network)
TCP/IP RFC 1180 TCP/IP (Application) User Application(HTTP, FTP, Telnet ) (Transport) TCP UDP (Internet) IP ICMP ARP RARP (Network) Hardware Interface(Ethernet, PPP )
TCP/IP Network Layer( ) OSI 48bit MAC(Media Access Control) Address IP ARP/RARP Internet Layer( ) IP(Internet Protocol) - TCP, UDP, ICMP ICMP(Internet Control Message Protocol) - ARP(Address Resolution Protocol) - IP Hardware RARP(Reverse ARP) - Hardware IP
TCP/IP Transport Layer( ) TCP(Transmission Control Protocol) - - full-duplex, byte stream - TCP. UDP(User Data Protocol) - - UDP datagram Application Layer( ) HTTP, Telnet, FTP, SMTP, POP3
TCP/IP Header (Application) Application) (Transport) Transport) (Internet) Internet) (Network) Network) DATA DATA DATA DATA TCP TCP Header Header DATA DATA TCP TCP Header Header IP IP Header Header DATA DATA TCP TCP Header Header IP IP Header Header Etherne Etherne t Header Header User Data Segment IP Datagram Frame
Internet Protocol _ IP Address IPv4 Internet Address32-2 - IP 4 10 - Network IDHost ID IP IP NIC(Network Information Center) - Network IDNIC - Host IDLocal 2 8 Bit 8 Bit 8 Bit 8 Bit 32 Bit 1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 10 172. 168. 10. 1
Internet Protocol _ IP Address IP A Class - Bit 0 - Network : 126, Host : 16,777,214 B Class - Bit 1 0 - Network : 16,384, Host : 65,534 8 Bit 8 Bit 8 Bit 8 Bit A Class 0 x x x x x x x Network 0 ~ 127 x x x x x x x x x x x x x x x x Host x x x x x x x x B Class 8 Bit 8 Bit 8 Bit 8 Bit 1 0 x x x x x x 128 ~ 191 x x x x x x x x Network x x x x x x x x Host x x x x x x x x
Internet Protocol _ IP Address C Class - Bit 1 1 0 - Network : 2,097,152, Host : 254 D Class - Bit 1 1 1 0 - Multicast C Class D Class 8 Bit 8 Bit 8 Bit 8 Bit 1 1 0 x x x x x 192 ~ 223 1 1 1 0 x x x x x x x x x x x x Network x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x Host 8 Bit 8 Bit 8 Bit 8 Bit 224 ~ 239 Host Group x x x x x x x x
Internet Protocol _ Subnet Mask Subnet Mask IP NetworkHost Major Class A Class B Class C Class 2 11111111. 00000000. 00000000. 0000000 11111111. 11111111. 00000000. 0000000 11111111. 11111111. 11111111. 0000000 255. 0. 0. 0 /8 CIDR 255. 255. 0. 0 /16 255. 255. 255. 0 /24 CIDR(Classless Internet Domain Routing) : Subnet Mask
Internet Protocol _ Subnet Mask Subnetting Host ID Subnet ID Subnet IDHost ID 0 1 Subnet IDNet ID 2 Bit ) C Class Subnetting IP Address Subnet Mask 1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 192. 168. 10. 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 255. 255. 255. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Subnetting Network Host 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 255. 255. 255. 192 62 4 Sub Network Subnet ID
Internet Protocol _ Subnet Mask Subnetting Network & Host C Class Subnetting - Network : 2 n - Host : 2 n - 2 Subnet Bit(n) Subnet Mask Network /Subnet 1 255. 255. 255. 128 2 126 2 255. 255. 255. 192 4 62 3 255. 255. 255. 224 8 30 4 255. 255. 255. 240 16 14 5 255. 255. 255. 248 32 6 6 255. 255. 255. 252 64 2
Internet Protocol _ Subnet Mask Broadcast and Multicast Unicast - Broadcast - Multicast - (Group) Network broadcast IP Host ID Bit 1 Broadcast Host ID Bit 0 0s"this", 1s"all"
Internet Protocol _ ARP(Address Resolution Protocol) (RFC 826) IP Address MAC Address Broadcast ARP ARP A D ARP requestbroadcast broadcast D reply A D Broadcasting to All A B A B IP? C D C D Only Response
Internet Protocol _ RARP(Reverse Address Resolution Protocol) (RFC 826) MAC Address IP Address Broadcast RARP RARP A MAC RARP requestbroadcast D(RARP ) broadcast D(RARP ) AIP reply Broadcasting to All A B A B C D C D Only Response (RARP )
Internet Protocol _ Header Internet Layer(IP Layer) IP datagram IP datagram (Association) ( ) IP IP Header 0 31 Version (4) Header Length(4) Type of Service(8) Total Length(16) Identification(16) Flag(3) Fragment offset(13) Time to Live(8) Protocol(8) Source IP Address(32) Header Checksum(16) Destination IP Address(32) Option(?) Padding(?)
Internet Protocol _ Header Version(4 Bit) IP (IPv4) Header Length(4 Bit) IP 32 Bit 20 Byte(32 Bit x 5) Type of Service(8 Bit) (QoS) 8 0 ~ 2 3 ~ 6 ToS 7 0 Total Length(16 Bit) IP IP 16 65,535 8192
Internet Protocol _ Header Identification(16 Bit) Datagram Datagram Datagram Packet Flag(3 Bit) "more fragment" fragment fragment 3 Bit - Bit 0 : 0 Setting - Bit 1 : 0, 1 - Bit 2 : 0, 1 Fragment offset(13 Bit) Datagramfragment
Internet Protocol _ Header Fragmentation and Reassembly - MTU(Maximum Transfer Unit) Ethernet MTU1,500 bytes Fragmentation IP datagram, IP IP datagram Fragment Fragment, Fragment Reassemble, IP Fragmentation Time to Live(8 Bit) TTLDatagram Datagram (0 ~ 255), "(0)" datagram,
Internet Protocol _ Header Protocol(8 Bit) IP ICMP(1), TCP(6), UDP(17) Header Checksum IP checksum TTL, Fragment ICMP, IGMP, TCP, UDP checksum IP Address( 32 Bit) IP Datagram Source IP IP Datagram Destination IP Option(?) Optional Information IP datagram ( ) - Security,Record Route, Timestamp - Strict Source Routing Padding(?) Option Field (IP Header32 Bit )
Internet Protocol _ Routing Network IP IP IP User Applicatio n User Applicatio n TCP TCP IP IP IP IP Data Link LAN Data Link WAN Data Link LAN Data Link 1 1 2 2
Internet Protocol _ Routing IP Datagram -, -, -,, IP - RIP, OSPF, IGRP, EIGRP - EGP, BGP Default
Internet Protocol _ Routing ( ), Routing Metric Routing Metric Interior Routing Protocol -, (same AS) Exterior Routing Protocol - Backbone, (different AS)
Internet Protocol _ Routing Interior Routing Protocol - RIP(Routing Information Protocol) - OSPF(Open Shortest Path First) - IGRP(Interior Gateway Routing Protocol) - EIGRP(Enhanced IGRP) Exterior Routing Protocol Inter-domain routing protocol EGP(Exterior Gateway Protocol) BGP(Border Gateway Protocol)
Transport Layer TCP & UDP IP 6 Connection-Oriented or Connectionless Sequencing Error Control Flow Control Byte stream or Message Full-Duplex or Half-Duplex
Transport Layer TCP & UDP Connection-Oriented TCP, Virtual Circuit( ) Connection-Oriented - - - connectionless UDP (Datagram) (datagram)
Transport Layer TCP & UDP Sequencing TCP - sequencing UDP - sequencing Error control - checksum( ) & positive acknowledgment - -
Transport Layer TCP & UDP Port Number UDP TCP TCPUDP 16 Port Number Well-Known Ports - Client Server - HTTP : 82, FTP: 21, TFTP: 69, SMTP : 25, DNS : 53 TCP Connections Between Processes Sequencing of Data End-to-End Reliability End-to-End Flow Control UDP Port Numbers Optional Checksum
Transport Layer TCP TCP Segment 0 31 Source Port(16) Destination Port(16) Sequence Number(32) Acknowledgment Number(32) Data Offset(4) Reserved (6) Control Bit(6) Window(16) Checksum(16) Urgent Pointer(16) Option(?) Padding(?) Source Port(16 Bit) : Destination Port(16 Bit) :
Transport Layer TCP Sequence Number(32 Bit) - octet Acknowledgment Number(32 Bit) - Data Offset(4 Bit)-HELN - 32 TCP. Reserved(6 Bit) - Control Bit(6 Bit) - TCP, Bit ( ) Bit Set 1 URG Urgent pointer field ACK PSH RST SYN FIN Acknowledgment Sequence Number
Transport Layer TCP Window - Checksum - TCP Urgent Pointer - Options - TCP 8 Padding - 32 TCP "0"padding
Transport Layer TCP Transport Stream Service,,, (IP) TCP End-to-End Segment, Maximum Segment Size(MSS) IP datagram TCP IP Header TCP Header TCP DATA IP Datagram TCP Segment
Transport Layer TCP TCP Flow Control - Sliding Windows TCP Sliding Window TCP - - Sliding Window Window Size 0 1 2 3 4 5 6 7 8 9 10... sent and ACKed sent and not ACKed scan send ASAP can't send until window moves Window Size, Acknowledgment 0,
Transport Layer TCP Connection TCP - TCP3-way handshake TCP Lost, Delayed, Duplicated, Delivered out of Order - Site 1 SYN Control bits - Site 2 ACKSYN Control bits - Site 1 SYN ACK Events at Site 1 Network Message Events at Site 2 Send SYN seq=x Receive SYN + ACK segment Send ACK y+1 Receive SYN segment Send SYN seq=y, ACK x+1 Receive ACK segment
Transport Layer TCP TCP - TCP3-way handshake - FIN, FIN ACK - TCP - TCP TCP 2FIN - ACK Events at Site 1 Network Message Events at Site 2 Send FIN seq=x Receive ACK segment Receive FIN + ACK segment Send ACK y+1 Receive FIN segment Send ACK x+1 inform application Send FIN, ACK x+1 Receive ACK segment
Transport Layer UDP UDP datagram 0 31 Source Port(16) Length(16) Destination Port(16) Checksum(16) Data Source Port(16 Bit) : Destination Port(16 Bit) : UDP Length(16 Bit) : UDP header + Data UDP Checksum: UDP header + Data Checksum
Transport Layer UDP Transport Simple, Datagram-Oriented IP datagram UDP datagram IP Header UDP Header UDP DATA IP Datagram UDP Datagram UDP (DNS) IP : 192.168.0.1 ) IP : 172.16.10.1 Port : 2034( www.korea.comip? Port : 53(DNS) IP192.168.0.1 IP : 172.16.10.1 IP : 192.168.0.1 Port : 53(DNS) Port : 2034