SlideShare a Scribd company logo
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

More Related Content

What's hot (20)

PPT
3GPP IMS
Chris Venteicher
 
PDF
The linux networking architecture
hugo lu
 
PDF
alphorm.com - Formation Cisco ICND1-CCENT (100-101)
Alphorm
 
PDF
Alphorm.com Formation CCNP ENCOR 350-401 (1of8) : Commutation
Alphorm
 
PDF
MPLS Presentation
Unni Kannan VijayaKumar
 
ODP
Linux Internals - Kernel/Core
Shay Cohen
 
PDF
Cisco CCNA Data Center Networking Fundamentals
E.S.G. JR. Consulting, Inc.
 
PDF
Cours routage inter-vlan
EL AMRI El Hassan
 
PDF
Mlag invisibile layer 2 redundancy
Cumulus Networks
 
PPTX
ccna networking ppt
Er. Anmol Bhagat
 
PPTX
Tutorial: Using GoBGP as an IXP connecting router
Shu Sugimoto
 
PDF
Using OpenLDAP
Wildan Maulana
 
PPTX
Cisco Live Milan 2015 - BGP advance
Bertrand Duvivier
 
PDF
Deploying IP/MPLS VPN - Cisco Networkers 2010
Febrian ‎
 
PPTX
Diameter Presentation
Beny Haddad
 
PDF
SIP - The Basics
Jonas Borjesson
 
PPTX
EMEA Airheads_ Aruba AppRF – AOS 6.x & 8.x
Aruba, a Hewlett Packard Enterprise company
 
PDF
Multi Chassis LAG for Cloud builders
Juniper Networks (日本)
 
PDF
Hands on with CoAP and Californium
Julien Vermillard
 
The linux networking architecture
hugo lu
 
alphorm.com - Formation Cisco ICND1-CCENT (100-101)
Alphorm
 
Alphorm.com Formation CCNP ENCOR 350-401 (1of8) : Commutation
Alphorm
 
MPLS Presentation
Unni Kannan VijayaKumar
 
Linux Internals - Kernel/Core
Shay Cohen
 
Cisco CCNA Data Center Networking Fundamentals
E.S.G. JR. Consulting, Inc.
 
Cours routage inter-vlan
EL AMRI El Hassan
 
Mlag invisibile layer 2 redundancy
Cumulus Networks
 
ccna networking ppt
Er. Anmol Bhagat
 
Tutorial: Using GoBGP as an IXP connecting router
Shu Sugimoto
 
Using OpenLDAP
Wildan Maulana
 
Cisco Live Milan 2015 - BGP advance
Bertrand Duvivier
 
Deploying IP/MPLS VPN - Cisco Networkers 2010
Febrian ‎
 
Diameter Presentation
Beny Haddad
 
SIP - The Basics
Jonas Borjesson
 
EMEA Airheads_ Aruba AppRF – AOS 6.x & 8.x
Aruba, a Hewlett Packard Enterprise company
 
Multi Chassis LAG for Cloud builders
Juniper Networks (日本)
 
Hands on with CoAP and Californium
Julien Vermillard
 

Viewers also liked (20)

PPTX
TCP/IP Protocol - JAVA
cooddy
 
PPT
5 DLL-LLC- Book
Water Birds (Ali)
 
PPT
Joomla security nuggets
guestbd1cdca
 
PPT
Troubleshooting Tips for Data communications, Networking & TCP/IP
Living Online
 
PPT
05 directnets errors
jyang1983
 
PPT
Case study methodology
Anton Halkouski
 
PDF
Haystack + DASH7 Security
Haystack Technologies
 
PPT
Case study methodology
Beulah Heights University
 
PDF
Case Method at Harvard Business School
Frank Fang Kuo Yu
 
PPTX
Sangregorio
Efren Beltran
 
PDF
الجريمة الانتخابية
IHEC2013
 
PPTX
Using Video for Business
Adashmore Creative, LLC
 
PPTX
Essential tips & effective tactics for social media & quality content marketing
Adashmore Creative, LLC
 
PPTX
Sectores económicos
Efren Beltran
 
PPTX
Enith
Efren Beltran
 
PPTX
E learning management system
chrt222
 
PPTX
Final Ancillary Tasks
philippa21
 
PPTX
Eduardo
Efren Beltran
 
PDF
โครงงาน 2
Fam Santiboon
 
TCP/IP Protocol - JAVA
cooddy
 
5 DLL-LLC- Book
Water Birds (Ali)
 
Joomla security nuggets
guestbd1cdca
 
Troubleshooting Tips for Data communications, Networking & TCP/IP
Living Online
 
05 directnets errors
jyang1983
 
Case study methodology
Anton Halkouski
 
Haystack + DASH7 Security
Haystack Technologies
 
Case study methodology
Beulah Heights University
 
Case Method at Harvard Business School
Frank Fang Kuo Yu
 
Sangregorio
Efren Beltran
 
الجريمة الانتخابية
IHEC2013
 
Using Video for Business
Adashmore Creative, LLC
 
Essential tips & effective tactics for social media & quality content marketing
Adashmore Creative, LLC
 
Sectores económicos
Efren Beltran
 
E learning management system
chrt222
 
Final Ancillary Tasks
philippa21
 
Eduardo
Efren Beltran
 
โครงงาน 2
Fam Santiboon
 
Ad

Similar to Introduction to TCP/IP (20)

PPT
TCP/IP Basics
SMC Networks Europe
 
PPT
Tcp ip
Akshay Nagpurkar
 
PDF
บทที่ 2 โพรโตคอล (protocol)
chrisman77
 
PDF
NAT 64 FPGA Implementation
Janith Rukman
 
ODP
Group Apres
ramya5a
 
ODP
C Cpres
ramya5a
 
ODP
C Cpres
ramya5a
 
ODP
C Cpres
ramya5a
 
PPT
Lecture 5 internet-protocol_assignments
Serious_SamSoul
 
PDF
OSI MODEL, PORTS, AND PROTOCOLS CHEAT SHEET
priyanshamadhwal2
 
PDF
OSI Model, Ports, and Protocols Cheat Sheet.pdf
infosec train
 
PDF
Replacing iptables with eBPF in Kubernetes with Cilium
Michal Rostecki
 
PPT
Ip address
CYBERINTELLIGENTS
 
PPTX
Multipath TCP
Olivier Bonaventure
 
PDF
Transport Layer Port or TCP/IP & UDP Port
Netwax Lab
 
PDF
Where can buy Special Edition Using TCP IP Niit (Usa) Inc. ebook with cheap p...
attietorreda
 
PDF
Cisco discovery d homesb module 6 - v.4 in english.
igede tirtanata
 
PDF
IRJET - Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP...
IRJET Journal
 
PPT
TCP/IP For Engineers
Leif Bloomquist
 
PPT
TCP IP
muh kemal
 
TCP/IP Basics
SMC Networks Europe
 
บทที่ 2 โพรโตคอล (protocol)
chrisman77
 
NAT 64 FPGA Implementation
Janith Rukman
 
Group Apres
ramya5a
 
C Cpres
ramya5a
 
C Cpres
ramya5a
 
C Cpres
ramya5a
 
Lecture 5 internet-protocol_assignments
Serious_SamSoul
 
OSI MODEL, PORTS, AND PROTOCOLS CHEAT SHEET
priyanshamadhwal2
 
OSI Model, Ports, and Protocols Cheat Sheet.pdf
infosec train
 
Replacing iptables with eBPF in Kubernetes with Cilium
Michal Rostecki
 
Ip address
CYBERINTELLIGENTS
 
Multipath TCP
Olivier Bonaventure
 
Transport Layer Port or TCP/IP & UDP Port
Netwax Lab
 
Where can buy Special Edition Using TCP IP Niit (Usa) Inc. ebook with cheap p...
attietorreda
 
Cisco discovery d homesb module 6 - v.4 in english.
igede tirtanata
 
IRJET - Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP...
IRJET Journal
 
TCP/IP For Engineers
Leif Bloomquist
 
TCP IP
muh kemal
 
Ad

More from Frank Fang Kuo Yu (20)

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

Recently uploaded (20)

PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PDF
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
ScyllaDB
 
PDF
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
Priyanka Aash
 
PPTX
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
PDF
Kubernetes - Architecture & Components.pdf
geethak285
 
PDF
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PDF
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
PPTX
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PDF
The Growing Value and Application of FME & GenAI
Safe Software
 
PDF
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
PPTX
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
PDF
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
PDF
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
PPTX
𝙳𝚘𝚠𝚗𝚕𝚘𝚊𝚍—Wondershare Filmora Crack 14.0.7 + Key Download 2025
sebastian aliya
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
ScyllaDB
 
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
Priyanka Aash
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
Kubernetes - Architecture & Components.pdf
geethak285
 
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
The Growing Value and Application of FME & GenAI
Safe Software
 
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
𝙳𝚘𝚠𝚗𝚕𝚘𝚊𝚍—Wondershare Filmora Crack 14.0.7 + Key Download 2025
sebastian aliya
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 

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