SlideShare une entreprise Scribd logo
1  sur  31
Introduction to TCP/IPIntroduction to TCP/IP
Frank Fang Kuo YuFrank Fang Kuo Yu
2004/02/202004/02/20
AgendaAgenda
 TCP/IP Network ArchitectureTCP/IP Network Architecture
 Client-Server ModelClient-Server Model
 Naming and AddressingNaming and Addressing
 TCP/UDP/IP/Ethernet Packet FormatTCP/UDP/IP/Ethernet Packet Format
 Application Programming InterfacesApplication Programming Interfaces
 Protocol AnalysisProtocol Analysis
Meet the Protocol Family in the InternetMeet the Protocol Family in the Internet
TCP
UDP
IP
SNMP
ping
tracert
IPsec
Mobile IP
ARP
RARP
PPP
DNS
telnet
ftp
IP QoS
HTTP
IP telephony
IP multicast
BSD socketWinsockJava socket
ICMP
IPv4
IPv6
SMTP
NTCIP
DHCP
POP3
Ethernet
WAP
GPRS
r-utility
ATM
MIB
WinPcap
SLIP
SMS
Internet
internet
intranet
tester
developer
administrator
OSPF
BGP MPLSRTP
WWW
TCP/IP Network ArchitectureTCP/IP Network Architecture
Application LayerApplication Layer
Transport LayerTransport Layer
Network LayerNetwork Layer
Link LayerLink Layer
operating-system/computer-architecture independent
LAN/MAN/WAN applicable
physical-medium independent
host host
network network
media media
process process
client-server model
TCP/IP Protocol SuiteTCP/IP Protocol Suite
EthernetEthernet
ARPARP RARPRARP
IPv4IPv4 IPv6IPv6
TCPTCP UDPUDP
ICMPICMP
TelnetTelnetFTPFTPpingping SNMPSNMP TFTPTFTP
Serial lineSerial line
PPPPPP
SMTPSMTP POP3POP3
21 23 11025 69161
port
number
IP
address
Key Protocols in Transport/Network LayersKey Protocols in Transport/Network Layers
 Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
 aa connection-orientedconnection-oriented,, reliablereliable,, byte-streambyte-stream serviceservice
 User Datagram Protocol (UDP)User Datagram Protocol (UDP)
 aa connectionlessconnectionless,, unreliableunreliable,, datagramdatagram delivery servicedelivery service
 application-aware via port number and UDP checksumapplication-aware via port number and UDP checksum
 Internet Protocol (IP)Internet Protocol (IP)
 aa connectionlessconnectionless,, unreliableunreliable,, datagramdatagram delivery servicedelivery service
 network-aware via routing, fragmentation and reassemblynetwork-aware via routing, fragmentation and reassembly
Encapsulation in Protocol ProcessingEncapsulation in Protocol Processing
ApplicationApplication
TCPTCP
IPIP
EthernetEthernet
fragmentationfragmentation
reassemblyreassembly
paddingpadding
Request For Comments Document SeriesRequest For Comments Document Series
http://www.rfc-editor.org/http://www.rfc-editor.org/
↑↑
http://www.networksorcery.com/enp/default0501.htmhttp://www.networksorcery.com/enp/default0501.htm
↑↑
TCP and UDP Client-Server ModelTCP and UDP Client-Server Model
DNSDNS
clientclient
DNSDNS
serverserver
DNS query (www.yahoo.com)DNS query (www.yahoo.com)
DNS response ( 216.109.125.70 )DNS response ( 216.109.125.70 )
(( UDPUDP 172.18.8.120172.18.8.120 10271027 172.16.2.2172.16.2.2 5353 )),, ,, ,, ,,
172.18.8.120172.18.8.120 172.16.2.2172.16.2.2
( protocol( protocol
locallocal
addressaddress
locallocal
portport
remoteremote
addressaddress
remoteremote
portport )),, ,, ,, ,,
well-knownwell-known
DNS port numberDNS port number
ephemeral port numberephemeral port number
32-bit IPv4 address32-bit IPv4 address
IP Address and TCP/UDP Port NumberIP Address and TCP/UDP Port Number
 Internet Assigned Number AuthorityInternet Assigned Number Authority
 www.iana.orgwww.iana.org
 IP AddressIP Address
 IPv4IPv4 32-bit dotted-decimal notation32-bit dotted-decimal notation e.g., 192.0.32.67e.g., 192.0.32.67
– the IPv4 address space for private internetsthe IPv4 address space for private internets
10.0.0.010.0.0.0 ~ 10.255.255.255~ 10.255.255.255
172.16.0.0172.16.0.0 ~ 172.31.255.255~ 172.31.255.255
192.168.0.0192.168.0.0 ~ 192.168.255.255~ 192.168.255.255
 IPv6IPv6 128-bit hexadecimal string128-bit hexadecimal string e.g., 1080:0:0:0:8:800:200C:417Ae.g., 1080:0:0:0:8:800:200C:417A
 TCP/UDP Port NumberTCP/UDP Port Number
 well known portswell known ports 0 ~ 10230 ~ 1023
 registered portsregistered ports 1024 ~ 491511024 ~ 49151
 dynamic and/or private portsdynamic and/or private ports 49152 ~ 6553649152 ~ 65536
Host Name, IP Address, Physical AddressHost Name, IP Address, Physical Address
TCP Connections underTCP Connections under Windows netstatWindows netstat
show host name and service name
show IP address and port number
TCP Connections underTCP Connections under Linux netstatLinux netstat
show host name and service name
show IP address and port number
show process id and program name
Protocol Stack and netstatProtocol Stack and netstat
Naming, Addressing, and Packet FormatNaming, Addressing, and Packet Format
 TCP SegmentTCP Segment
 UDP DatagramUDP Datagram
 IPv4 DatagramIPv4 Datagram
 Ethernet FrameEthernet Frame
TCP Segment FormatTCP Segment Format
20 bytes
http://www.iana.org/assignments/port-numbershttp://www.iana.org/assignments/port-numbers
C:WINDOWSsystem32driversetcservicesC:WINDOWSsystem32driversetcservices
UDP Datagram FormatUDP Datagram Format
8 bytes
http://www.iana.org/assignments/port-numbershttp://www.iana.org/assignments/port-numbers
C:WINDOWSsystem32driversetcservicesC:WINDOWSsystem32driversetcservices
IPv4 Datagram FormatIPv4 Datagram Format
20 bytes
http://www.iana.org/assignments/protocol-numbershttp://www.iana.org/assignments/protocol-numbers
C:WINDOWSsystem32driversetcprotocolC:WINDOWSsystem32driversetcprotocol
http://www.iana.org/ipaddress/ip-addresses.htmhttp://www.iana.org/ipaddress/ip-addresses.htm
Ethernet Frame FormatEthernet Frame Format
http://www.iana.org/assignments/ethernet-numbershttp://www.iana.org/assignments/ethernet-numbers
Naming, Addressing, and MappingNaming, Addressing, and Mapping
 Mapping fromMapping from Host NameHost Name toto IP addressIP address
 DNS ~ Domain Name SystemDNS ~ Domain Name System
 e.g., www.yahoo.come.g., www.yahoo.com →→ 216.109.125.70216.109.125.70
 Mapping fromMapping from IP AddressIP Address toto Ethernet AddressEthernet Address
 ARP ~ Address Resolution ProtocolARP ~ Address Resolution Protocol
 e.g., 172.18.8.254e.g., 172.18.8.254 →→ 00-0a-8a-d9-47-4000-0a-8a-d9-47-40
Application Programming InterfacesApplication Programming Interfaces
libpcap, WinPcaplibpcap, WinPcap
Raw SocketsRaw Sockets
Sockets, WinSock, Java.net, TLI/XTISockets, WinSock, Java.net, TLI/XTI
Application LayerApplication Layer
Transport LayerTransport Layer
Network LayerNetwork Layer
Link LayerLink Layer
Middleware (RPC, RMI, CORBA, webMiddleware (RPC, RMI, CORBA, web
service,…), HTTP/SMTP/POP3/Telephonyservice,…), HTTP/SMTP/POP3/Telephony
API, …API, …
Sockets Functions for TCP Client/ServerSockets Functions for TCP Client/Server
socket ( )socket ( )
bind ( )bind ( )
listen ( )listen ( )
accept ( )accept ( )
read ( )read ( )
write ( )write ( )
read ( )read ( )
close ( )close ( )
socket ( )socket ( )
connect ( )connect ( )
write ( )write ( )
read ( )read ( )
close ( )close ( )
TCP ServerTCP Server
TCP ClientTCP Client
Connection EstablishmentConnection Establishment
Connection TerminationConnection Termination
requestrequest
replyreply
Sockets Functions for UDP Client/ServerSockets Functions for UDP Client/Server
socket ( )socket ( )
bind ( )bind ( )
recvfrom ( )recvfrom ( )
sendto ( )sendto ( )
socket ( )socket ( )
sendto ( )sendto ( )
recvfrom ( )recvfrom ( )
close ( )close ( )
UDP ServerUDP Server
UDP ClientUDP Client
requestrequest
replyreply
Protocol AnalysisProtocol Analysis
 Hardware/Software Protocol AnalyzerHardware/Software Protocol Analyzer
 Hardware Protocol AnalyzerHardware Protocol Analyzer ~ Agilent, Racal, Rohde & Schwarz~ Agilent, Racal, Rohde & Schwarz
 Software Protocol AnalyzerSoftware Protocol Analyzer ~ WinPcap and Ethereal~ WinPcap and Ethereal
 WinPcap Protocol AnalyzerWinPcap Protocol Analyzer
 http://winpcap.polito.it/http://winpcap.polito.it/
 PcapPcap ~ packet capture library from Lawrence Berkeley Laboratory~ packet capture library from Lawrence Berkeley Laboratory
 WinPcapWinPcap ~ packet capture and network analysis for Win32 from~ packet capture and network analysis for Win32 from ItalyItaly
 Ethereal Protocol AnalyzerEthereal Protocol Analyzer
 http://www.ethereal.comhttp://www.ethereal.com
WinPcap/Ethereal Protocol Analyzer SetupWinPcap/Ethereal Protocol Analyzer Setup
Host A
Host B
WinPcap/Ethereal
Ethernet
internet
Host C
WinPcap/Ethereal
(promiscuous mode)
WinPcap Protocol AnalyzerWinPcap Protocol Analyzer
Screen LayoutScreen Layout
Ethereal Protocol AnalyzerEthereal Protocol Analyzer
Screen LayoutScreen Layout
What is “Ping”?What is “Ping”?
 a program used to test whether another host isa program used to test whether another host is
reachablereachable
 ““PingPing”” sendssends an ICMP echo request messagean ICMP echo request message to ato a
host and expectshost and expects an ICMP echo reply messagean ICMP echo reply message toto
be returned.be returned.
 ““PingPing”” supports a set of options which can be usedsupports a set of options which can be used
by anyone who wants to maintain, investigate, andby anyone who wants to maintain, investigate, and
hack TCP/IP networks.hack TCP/IP networks.
Using “Ping” to Observe Network TrafficUsing “Ping” to Observe Network Traffic
 ICMP Echo Request and Echo ReplyICMP Echo Request and Echo Reply
 ARP Request/Reply and ARP CacheARP Request/Reply and ARP Cache
 DNS Query and ResponseDNS Query and Response
 IP Fragmentation and the “Don’t Fragment” flagIP Fragmentation and the “Don’t Fragment” flag
 Ethernet PaddingEthernet Padding
SummarySummary
 TCP/IP Network ArchitectureTCP/IP Network Architecture
 Client-Server ModelClient-Server Model
 Naming and AddressingNaming and Addressing
 TCP/UDP/IP/Ethernet Packet FormatTCP/UDP/IP/Ethernet Packet Format
 Application Programming InterfacesApplication Programming Interfaces
 Protocol AnalysisProtocol Analysis
TCP
UDP
IP
SNMP
ping
tracert
IPsec
Mobile IP
ARP
RARP
PPP
DNS
telnet
ftp
IP QoS
HTTP
IP telephony
IP multicast
BSD socketWinsockJava socket
ICMP
IPv4
IPv6
SMTP
NTCIP
DHCP
POP3
Ethernet
WAP
GPRS
r-utility
ATM
MIB
WinPcap
SLIP
SMS
Internet
internet
intranet
tester
administrator
OSPF
BGP MPLSRTP
WWW
Everything over IPEverything over IP
IP over EverythingIP over Everything
developer
ThanksThanks
YouYou
Q & AQ & A

Contenu connexe

Tendances

Dhcp presentation 01
Dhcp presentation 01Dhcp presentation 01
Dhcp presentation 01
maverick4489
 

Tendances (20)

Definiciones de mac, protocolo, ip, mascara
Definiciones de mac, protocolo, ip, mascaraDefiniciones de mac, protocolo, ip, mascara
Definiciones de mac, protocolo, ip, mascara
 
Dhcp presentation 01
Dhcp presentation 01Dhcp presentation 01
Dhcp presentation 01
 
Osi model
Osi modelOsi model
Osi model
 
Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
 
Alphorm.com Formation Certification NSE4 : Fortinet Fortigate Security 6.x
Alphorm.com Formation Certification NSE4 : Fortinet Fortigate Security 6.xAlphorm.com Formation Certification NSE4 : Fortinet Fortigate Security 6.x
Alphorm.com Formation Certification NSE4 : Fortinet Fortigate Security 6.x
 
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelThe TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
 
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDPDockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
 
RSS++
RSS++RSS++
RSS++
 
FTP - File Transfer Protocol
FTP - File Transfer ProtocolFTP - File Transfer Protocol
FTP - File Transfer Protocol
 
HSRP ccna
HSRP ccna HSRP ccna
HSRP ccna
 
Computer Ports
Computer PortsComputer Ports
Computer Ports
 
Serveur ftp
Serveur ftpServeur ftp
Serveur ftp
 
Configuration DHCP
Configuration DHCPConfiguration DHCP
Configuration DHCP
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
F5 DDoS Protection
F5 DDoS ProtectionF5 DDoS Protection
F5 DDoS Protection
 
Linux Kernel and Driver Development Training
Linux Kernel and Driver Development TrainingLinux Kernel and Driver Development Training
Linux Kernel and Driver Development Training
 
DHCP
DHCPDHCP
DHCP
 
An Introduction to BGP Flow Spec
An Introduction to BGP Flow SpecAn Introduction to BGP Flow Spec
An Introduction to BGP Flow Spec
 
Ftp
FtpFtp
Ftp
 

En vedette

Joomla security nuggets
Joomla security nuggetsJoomla security nuggets
Joomla security nuggets
guestbd1cdca
 
05 directnets errors
05 directnets errors05 directnets errors
05 directnets errors
jyang1983
 
الجريمة الانتخابية
الجريمة الانتخابيةالجريمة الانتخابية
الجريمة الانتخابية
IHEC2013
 
E learning management system
E learning management systemE learning management system
E learning management system
chrt222
 
Final Ancillary Tasks
Final Ancillary TasksFinal Ancillary Tasks
Final Ancillary Tasks
philippa21
 
โครงงาน 2
โครงงาน 2โครงงาน 2
โครงงาน 2
Fam Santiboon
 

En vedette (20)

TCP/IP Protocol - JAVA
TCP/IP Protocol - JAVATCP/IP Protocol - JAVA
TCP/IP Protocol - JAVA
 
5 DLL-LLC- Book
5 DLL-LLC- Book5 DLL-LLC- Book
5 DLL-LLC- Book
 
Joomla security nuggets
Joomla security nuggetsJoomla security nuggets
Joomla security nuggets
 
Troubleshooting Tips for Data communications, Networking & TCP/IP
Troubleshooting Tips for Data communications, Networking & TCP/IPTroubleshooting Tips for Data communications, Networking & TCP/IP
Troubleshooting Tips for Data communications, Networking & TCP/IP
 
05 directnets errors
05 directnets errors05 directnets errors
05 directnets errors
 
Tcp ip
Tcp ipTcp ip
Tcp ip
 
Case study methodology
Case study methodologyCase study methodology
Case study methodology
 
Haystack + DASH7 Security
Haystack + DASH7 SecurityHaystack + DASH7 Security
Haystack + DASH7 Security
 
Case study methodology
Case study methodologyCase study methodology
Case study methodology
 
Case Method at Harvard Business School
Case Method at Harvard Business SchoolCase Method at Harvard Business School
Case Method at Harvard Business School
 
Sangregorio
SangregorioSangregorio
Sangregorio
 
الجريمة الانتخابية
الجريمة الانتخابيةالجريمة الانتخابية
الجريمة الانتخابية
 
Using Video for Business
Using Video for BusinessUsing Video for Business
Using Video for Business
 
Essential tips & effective tactics for social media & quality content marketing
Essential tips & effective tactics for social media & quality content marketingEssential tips & effective tactics for social media & quality content marketing
Essential tips & effective tactics for social media & quality content marketing
 
Sectores económicos
Sectores económicos Sectores económicos
Sectores económicos
 
Enith
EnithEnith
Enith
 
E learning management system
E learning management systemE learning management system
E learning management system
 
Final Ancillary Tasks
Final Ancillary TasksFinal Ancillary Tasks
Final Ancillary Tasks
 
Eduardo
EduardoEduardo
Eduardo
 
โครงงาน 2
โครงงาน 2โครงงาน 2
โครงงาน 2
 

Similaire à Introduction to TCP/IP

บทที่ 2 โพรโตคอล (protocol)
บทที่  2 โพรโตคอล (protocol)บทที่  2 โพรโตคอล (protocol)
บทที่ 2 โพรโตคอล (protocol)
chrisman77
 
NAT 64 FPGA Implementation
NAT 64 FPGA ImplementationNAT 64 FPGA Implementation
NAT 64 FPGA Implementation
Janith Rukman
 
Group Apres
Group ApresGroup Apres
Group Apres
ramya5a
 
Multipath TCP
Multipath TCPMultipath TCP
Multipath TCP
Olivier Bonaventure
 
Cisco discovery d homesb module 6 - v.4 in english.
Cisco discovery   d homesb module 6 - v.4 in english.Cisco discovery   d homesb module 6 - v.4 in english.
Cisco discovery d homesb module 6 - v.4 in english.
igede tirtanata
 

Similaire à Introduction to TCP/IP (20)

TCP/IP Basics
TCP/IP BasicsTCP/IP Basics
TCP/IP Basics
 
Tcp ip
Tcp ipTcp ip
Tcp ip
 
บทที่ 2 โพรโตคอล (protocol)
บทที่  2 โพรโตคอล (protocol)บทที่  2 โพรโตคอล (protocol)
บทที่ 2 โพรโตคอล (protocol)
 
NAT 64 FPGA Implementation
NAT 64 FPGA ImplementationNAT 64 FPGA Implementation
NAT 64 FPGA Implementation
 
Group Apres
Group ApresGroup Apres
Group Apres
 
C Cpres
C CpresC Cpres
C Cpres
 
C Cpres
C CpresC Cpres
C Cpres
 
C Cpres
C CpresC Cpres
C Cpres
 
Lecture 5 internet-protocol_assignments
Lecture 5 internet-protocol_assignmentsLecture 5 internet-protocol_assignments
Lecture 5 internet-protocol_assignments
 
Replacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumReplacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with Cilium
 
Ip address
Ip address Ip address
Ip address
 
Multipath TCP
Multipath TCPMultipath TCP
Multipath TCP
 
Transport Layer Port or TCP/IP & UDP Port
Transport Layer Port or TCP/IP & UDP PortTransport Layer Port or TCP/IP & UDP Port
Transport Layer Port or TCP/IP & UDP Port
 
Cisco discovery d homesb module 6 - v.4 in english.
Cisco discovery   d homesb module 6 - v.4 in english.Cisco discovery   d homesb module 6 - v.4 in english.
Cisco discovery d homesb module 6 - v.4 in english.
 
IRJET - Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP...
IRJET - Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP...IRJET - Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP...
IRJET - Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP...
 
TCP/IP For Engineers
TCP/IP For EngineersTCP/IP For Engineers
TCP/IP For Engineers
 
TCP IP
TCP IP TCP IP
TCP IP
 
Clase 1 Direccionamiento IPv4.pdf
Clase 1 Direccionamiento IPv4.pdfClase 1 Direccionamiento IPv4.pdf
Clase 1 Direccionamiento IPv4.pdf
 
Application Visibility and Experience through Flexible Netflow
Application Visibility and Experience through Flexible NetflowApplication Visibility and Experience through Flexible Netflow
Application Visibility and Experience through Flexible Netflow
 
Normas y Estándares
Normas y EstándaresNormas y Estándares
Normas y Estándares
 

Plus de Frank Fang Kuo Yu

如何做報告 (How to make a presentation?)
如何做報告 (How to make a presentation?)如何做報告 (How to make a presentation?)
如何做報告 (How to make a presentation?)
Frank Fang Kuo Yu
 

Plus de Frank Fang Kuo Yu (20)

Microsoft Bing Image Creator (OpenAI DALL-E 3) 文字生成圖片經驗分享
Microsoft Bing Image Creator (OpenAI DALL-E 3) 文字生成圖片經驗分享Microsoft Bing Image Creator (OpenAI DALL-E 3) 文字生成圖片經驗分享
Microsoft Bing Image Creator (OpenAI DALL-E 3) 文字生成圖片經驗分享
 
Microsoft Bing Image Creator (OpenAI DALL·E) 建築景觀圖片生成經驗分享
Microsoft Bing Image Creator (OpenAI DALL·E) 建築景觀圖片生成經驗分享Microsoft Bing Image Creator (OpenAI DALL·E) 建築景觀圖片生成經驗分享
Microsoft Bing Image Creator (OpenAI DALL·E) 建築景觀圖片生成經驗分享
 
大型語言模型的幻覺和風險
大型語言模型的幻覺和風險大型語言模型的幻覺和風險
大型語言模型的幻覺和風險
 
從 Atari/AlphaGo/ChatGPT 談深度強化學習及通用人工智慧
從 Atari/AlphaGo/ChatGPT 談深度強化學習及通用人工智慧從 Atari/AlphaGo/ChatGPT 談深度強化學習及通用人工智慧
從 Atari/AlphaGo/ChatGPT 談深度強化學習及通用人工智慧
 
強化學習的王者之旅
強化學習的王者之旅強化學習的王者之旅
強化學習的王者之旅
 
強化學習的王者之旅
強化學習的王者之旅強化學習的王者之旅
強化學習的王者之旅
 
A Journey to Reinforcement Learning
A Journey to Reinforcement LearningA Journey to Reinforcement Learning
A Journey to Reinforcement Learning
 
人工智慧圖像應用簡介
人工智慧圖像應用簡介人工智慧圖像應用簡介
人工智慧圖像應用簡介
 
Orange Data Mining 軟體系統簡介及生醫應用支援
Orange Data Mining 軟體系統簡介及生醫應用支援Orange Data Mining 軟體系統簡介及生醫應用支援
Orange Data Mining 軟體系統簡介及生醫應用支援
 
從開源資料集看人工智慧醫療應用
從開源資料集看人工智慧醫療應用從開源資料集看人工智慧醫療應用
從開源資料集看人工智慧醫療應用
 
Deep Learning and Object Detection
Deep Learning and Object DetectionDeep Learning and Object Detection
Deep Learning and Object Detection
 
Data Science and Machine Learning in Smart manufacturing
Data Science and Machine Learning in Smart manufacturingData Science and Machine Learning in Smart manufacturing
Data Science and Machine Learning in Smart manufacturing
 
Automated Machine Learning
Automated Machine LearningAutomated Machine Learning
Automated Machine Learning
 
Deep Learning and Image Recognition
Deep Learning and Image RecognitionDeep Learning and Image Recognition
Deep Learning and Image Recognition
 
Leap Motion Controller and Application Development
Leap Motion Controller and Application DevelopmentLeap Motion Controller and Application Development
Leap Motion Controller and Application Development
 
創客/創業/創新
創客/創業/創新創客/創業/創新
創客/創業/創新
 
Startup Ecosystem in Shanghai
Startup Ecosystem in ShanghaiStartup Ecosystem in Shanghai
Startup Ecosystem in Shanghai
 
如何做報告 (How to make a presentation?)
如何做報告 (How to make a presentation?)如何做報告 (How to make a presentation?)
如何做報告 (How to make a presentation?)
 
Introduction to GPRS
Introduction to GPRSIntroduction to GPRS
Introduction to GPRS
 
Introduction to PPP
Introduction to PPPIntroduction to PPP
Introduction to PPP
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Introduction to TCP/IP

  • 1. Introduction to TCP/IPIntroduction to TCP/IP Frank Fang Kuo YuFrank Fang Kuo Yu 2004/02/202004/02/20
  • 2. AgendaAgenda  TCP/IP Network ArchitectureTCP/IP Network Architecture  Client-Server ModelClient-Server Model  Naming and AddressingNaming and Addressing  TCP/UDP/IP/Ethernet Packet FormatTCP/UDP/IP/Ethernet Packet Format  Application Programming InterfacesApplication Programming Interfaces  Protocol AnalysisProtocol Analysis
  • 3. Meet the Protocol Family in the InternetMeet the Protocol Family in the Internet TCP UDP IP SNMP ping tracert IPsec Mobile IP ARP RARP PPP DNS telnet ftp IP QoS HTTP IP telephony IP multicast BSD socketWinsockJava socket ICMP IPv4 IPv6 SMTP NTCIP DHCP POP3 Ethernet WAP GPRS r-utility ATM MIB WinPcap SLIP SMS Internet internet intranet tester developer administrator OSPF BGP MPLSRTP WWW
  • 4. TCP/IP Network ArchitectureTCP/IP Network Architecture Application LayerApplication Layer Transport LayerTransport Layer Network LayerNetwork Layer Link LayerLink Layer operating-system/computer-architecture independent LAN/MAN/WAN applicable physical-medium independent host host network network media media process process client-server model
  • 5. TCP/IP Protocol SuiteTCP/IP Protocol Suite EthernetEthernet ARPARP RARPRARP IPv4IPv4 IPv6IPv6 TCPTCP UDPUDP ICMPICMP TelnetTelnetFTPFTPpingping SNMPSNMP TFTPTFTP Serial lineSerial line PPPPPP SMTPSMTP POP3POP3 21 23 11025 69161 port number IP address
  • 6. Key Protocols in Transport/Network LayersKey Protocols in Transport/Network Layers  Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)  aa connection-orientedconnection-oriented,, reliablereliable,, byte-streambyte-stream serviceservice  User Datagram Protocol (UDP)User Datagram Protocol (UDP)  aa connectionlessconnectionless,, unreliableunreliable,, datagramdatagram delivery servicedelivery service  application-aware via port number and UDP checksumapplication-aware via port number and UDP checksum  Internet Protocol (IP)Internet Protocol (IP)  aa connectionlessconnectionless,, unreliableunreliable,, datagramdatagram delivery servicedelivery service  network-aware via routing, fragmentation and reassemblynetwork-aware via routing, fragmentation and reassembly
  • 7. Encapsulation in Protocol ProcessingEncapsulation in Protocol Processing ApplicationApplication TCPTCP IPIP EthernetEthernet fragmentationfragmentation reassemblyreassembly paddingpadding
  • 8. Request For Comments Document SeriesRequest For Comments Document Series http://www.rfc-editor.org/http://www.rfc-editor.org/ ↑↑ http://www.networksorcery.com/enp/default0501.htmhttp://www.networksorcery.com/enp/default0501.htm ↑↑
  • 9. TCP and UDP Client-Server ModelTCP and UDP Client-Server Model DNSDNS clientclient DNSDNS serverserver DNS query (www.yahoo.com)DNS query (www.yahoo.com) DNS response ( 216.109.125.70 )DNS response ( 216.109.125.70 ) (( UDPUDP 172.18.8.120172.18.8.120 10271027 172.16.2.2172.16.2.2 5353 )),, ,, ,, ,, 172.18.8.120172.18.8.120 172.16.2.2172.16.2.2 ( protocol( protocol locallocal addressaddress locallocal portport remoteremote addressaddress remoteremote portport )),, ,, ,, ,, well-knownwell-known DNS port numberDNS port number ephemeral port numberephemeral port number 32-bit IPv4 address32-bit IPv4 address
  • 10. IP Address and TCP/UDP Port NumberIP Address and TCP/UDP Port Number  Internet Assigned Number AuthorityInternet Assigned Number Authority  www.iana.orgwww.iana.org  IP AddressIP Address  IPv4IPv4 32-bit dotted-decimal notation32-bit dotted-decimal notation e.g., 192.0.32.67e.g., 192.0.32.67 – the IPv4 address space for private internetsthe IPv4 address space for private internets 10.0.0.010.0.0.0 ~ 10.255.255.255~ 10.255.255.255 172.16.0.0172.16.0.0 ~ 172.31.255.255~ 172.31.255.255 192.168.0.0192.168.0.0 ~ 192.168.255.255~ 192.168.255.255  IPv6IPv6 128-bit hexadecimal string128-bit hexadecimal string e.g., 1080:0:0:0:8:800:200C:417Ae.g., 1080:0:0:0:8:800:200C:417A  TCP/UDP Port NumberTCP/UDP Port Number  well known portswell known ports 0 ~ 10230 ~ 1023  registered portsregistered ports 1024 ~ 491511024 ~ 49151  dynamic and/or private portsdynamic and/or private ports 49152 ~ 6553649152 ~ 65536
  • 11. Host Name, IP Address, Physical AddressHost Name, IP Address, Physical Address
  • 12. TCP Connections underTCP Connections under Windows netstatWindows netstat show host name and service name show IP address and port number
  • 13. TCP Connections underTCP Connections under Linux netstatLinux netstat show host name and service name show IP address and port number show process id and program name
  • 14. Protocol Stack and netstatProtocol Stack and netstat
  • 15. Naming, Addressing, and Packet FormatNaming, Addressing, and Packet Format  TCP SegmentTCP Segment  UDP DatagramUDP Datagram  IPv4 DatagramIPv4 Datagram  Ethernet FrameEthernet Frame
  • 16. TCP Segment FormatTCP Segment Format 20 bytes http://www.iana.org/assignments/port-numbershttp://www.iana.org/assignments/port-numbers C:WINDOWSsystem32driversetcservicesC:WINDOWSsystem32driversetcservices
  • 17. UDP Datagram FormatUDP Datagram Format 8 bytes http://www.iana.org/assignments/port-numbershttp://www.iana.org/assignments/port-numbers C:WINDOWSsystem32driversetcservicesC:WINDOWSsystem32driversetcservices
  • 18. IPv4 Datagram FormatIPv4 Datagram Format 20 bytes http://www.iana.org/assignments/protocol-numbershttp://www.iana.org/assignments/protocol-numbers C:WINDOWSsystem32driversetcprotocolC:WINDOWSsystem32driversetcprotocol http://www.iana.org/ipaddress/ip-addresses.htmhttp://www.iana.org/ipaddress/ip-addresses.htm
  • 19. Ethernet Frame FormatEthernet Frame Format http://www.iana.org/assignments/ethernet-numbershttp://www.iana.org/assignments/ethernet-numbers
  • 20. Naming, Addressing, and MappingNaming, Addressing, and Mapping  Mapping fromMapping from Host NameHost Name toto IP addressIP address  DNS ~ Domain Name SystemDNS ~ Domain Name System  e.g., www.yahoo.come.g., www.yahoo.com →→ 216.109.125.70216.109.125.70  Mapping fromMapping from IP AddressIP Address toto Ethernet AddressEthernet Address  ARP ~ Address Resolution ProtocolARP ~ Address Resolution Protocol  e.g., 172.18.8.254e.g., 172.18.8.254 →→ 00-0a-8a-d9-47-4000-0a-8a-d9-47-40
  • 21. Application Programming InterfacesApplication Programming Interfaces libpcap, WinPcaplibpcap, WinPcap Raw SocketsRaw Sockets Sockets, WinSock, Java.net, TLI/XTISockets, WinSock, Java.net, TLI/XTI Application LayerApplication Layer Transport LayerTransport Layer Network LayerNetwork Layer Link LayerLink Layer Middleware (RPC, RMI, CORBA, webMiddleware (RPC, RMI, CORBA, web service,…), HTTP/SMTP/POP3/Telephonyservice,…), HTTP/SMTP/POP3/Telephony API, …API, …
  • 22. Sockets Functions for TCP Client/ServerSockets Functions for TCP Client/Server socket ( )socket ( ) bind ( )bind ( ) listen ( )listen ( ) accept ( )accept ( ) read ( )read ( ) write ( )write ( ) read ( )read ( ) close ( )close ( ) socket ( )socket ( ) connect ( )connect ( ) write ( )write ( ) read ( )read ( ) close ( )close ( ) TCP ServerTCP Server TCP ClientTCP Client Connection EstablishmentConnection Establishment Connection TerminationConnection Termination requestrequest replyreply
  • 23. Sockets Functions for UDP Client/ServerSockets Functions for UDP Client/Server socket ( )socket ( ) bind ( )bind ( ) recvfrom ( )recvfrom ( ) sendto ( )sendto ( ) socket ( )socket ( ) sendto ( )sendto ( ) recvfrom ( )recvfrom ( ) close ( )close ( ) UDP ServerUDP Server UDP ClientUDP Client requestrequest replyreply
  • 24. Protocol AnalysisProtocol Analysis  Hardware/Software Protocol AnalyzerHardware/Software Protocol Analyzer  Hardware Protocol AnalyzerHardware Protocol Analyzer ~ Agilent, Racal, Rohde & Schwarz~ Agilent, Racal, Rohde & Schwarz  Software Protocol AnalyzerSoftware Protocol Analyzer ~ WinPcap and Ethereal~ WinPcap and Ethereal  WinPcap Protocol AnalyzerWinPcap Protocol Analyzer  http://winpcap.polito.it/http://winpcap.polito.it/  PcapPcap ~ packet capture library from Lawrence Berkeley Laboratory~ packet capture library from Lawrence Berkeley Laboratory  WinPcapWinPcap ~ packet capture and network analysis for Win32 from~ packet capture and network analysis for Win32 from ItalyItaly  Ethereal Protocol AnalyzerEthereal Protocol Analyzer  http://www.ethereal.comhttp://www.ethereal.com
  • 25. WinPcap/Ethereal Protocol Analyzer SetupWinPcap/Ethereal Protocol Analyzer Setup Host A Host B WinPcap/Ethereal Ethernet internet Host C WinPcap/Ethereal (promiscuous mode)
  • 26. WinPcap Protocol AnalyzerWinPcap Protocol Analyzer Screen LayoutScreen Layout
  • 27. Ethereal Protocol AnalyzerEthereal Protocol Analyzer Screen LayoutScreen Layout
  • 28. What is “Ping”?What is “Ping”?  a program used to test whether another host isa program used to test whether another host is reachablereachable  ““PingPing”” sendssends an ICMP echo request messagean ICMP echo request message to ato a host and expectshost and expects an ICMP echo reply messagean ICMP echo reply message toto be returned.be returned.  ““PingPing”” supports a set of options which can be usedsupports a set of options which can be used by anyone who wants to maintain, investigate, andby anyone who wants to maintain, investigate, and hack TCP/IP networks.hack TCP/IP networks.
  • 29. Using “Ping” to Observe Network TrafficUsing “Ping” to Observe Network Traffic  ICMP Echo Request and Echo ReplyICMP Echo Request and Echo Reply  ARP Request/Reply and ARP CacheARP Request/Reply and ARP Cache  DNS Query and ResponseDNS Query and Response  IP Fragmentation and the “Don’t Fragment” flagIP Fragmentation and the “Don’t Fragment” flag  Ethernet PaddingEthernet Padding
  • 30. SummarySummary  TCP/IP Network ArchitectureTCP/IP Network Architecture  Client-Server ModelClient-Server Model  Naming and AddressingNaming and Addressing  TCP/UDP/IP/Ethernet Packet FormatTCP/UDP/IP/Ethernet Packet Format  Application Programming InterfacesApplication Programming Interfaces  Protocol AnalysisProtocol Analysis
  • 31. TCP UDP IP SNMP ping tracert IPsec Mobile IP ARP RARP PPP DNS telnet ftp IP QoS HTTP IP telephony IP multicast BSD socketWinsockJava socket ICMP IPv4 IPv6 SMTP NTCIP DHCP POP3 Ethernet WAP GPRS r-utility ATM MIB WinPcap SLIP SMS Internet internet intranet tester administrator OSPF BGP MPLSRTP WWW Everything over IPEverything over IP IP over EverythingIP over Everything developer ThanksThanks YouYou Q & AQ & A