SlideShare ist ein Scribd-Unternehmen logo
1 von 17
 TCP and UDP are used to connect two devices over the
Internet or other networks.
 However, to give data packages an entrance to the PC
or server at the other end of the connection, the
“doors” have to be open.
 These openings into the system are called ports.
 For both protocols, there are some known and
important ports which you need to know when
developing web apps.

 when you send a TCP/IP message over the Internet,
you have to send it to the right port. TCP ports, unlike
entrances ,are referred to by numbers (from 0 to
65535).
 When communicating via the Internet, the two
protocols TCP and UDP establish the connection,
compile data packages again after transfer, and then
hand them over to the programs addressed on the
recipient’s device.
 For this handover to work, the operating system must
create entrances and open them for the transfer.
 Every entrance has a specific code number. After
the transfer, the receiving system knows where the
data has to be delivered based on the port number.
 The data package always includes two port numbers:
the sender’s and the recipient’s.
 Ports have consecutive numbers – from 0 to 65536.
 Some of these code numbers are standardized,
which means they are assigned to specific
applications.
 Ports 0–1023 are “well-known ports”, and only a system
process or an administrator can connect to them.
 Ports 1024–49151 are “registered”, so that common
applications can have a usual port number.
 However, most services are able to bind any port
number in this range.
 The Internet Assigned Numbers Authority (IANA) is
responsible for registering the numbers in these
ranges.
OTHER COMMON PORTS
 Even if you will rarely need a complete catalogue of all port numbers
for services, you can rapidly start to memorize port numbers for the
common services that you use daily. For example, you will very likely
come across the following ports regularly:
 80 HTTP
 8080 HTTP (for testing servers)
 443 HTTPS
 22 SSH (Secure Shell)
 23 Telnet
 25 SMTP (outbound email)
 110 POP3 (inbound email)
 220 IMAP (inbound email)

APPLICATION LAYER PROTOCOLS
 We have seen examples of protocols at the different
layers of the TCP/IP stack, from the low-level
communication across wired Ethernet, the low-level
IP communication, and the TCP transport layer.
 Now we come to the highest layer of the stack, the
application layer. This is the layer you are most likely
to interact with while prototyping an Internet of
Things project.
 A protocol is a set of rules for communication between
computers. It includes rules about how to initiate the
conversation and what format the messages should be
in.
 It determines what inputs are understood and what
output is transmitted.
 It also specifies how the messages are sent and
authenticated and how to handle (and maybe correct)
errors caused by transmission.
 some application layer protocols, starting with
HTTP
 HTTP
 The Internet is much more than just “the web”, but
inevitably web services carried over HTTP hold a large
part of our attention when looking at the Internet of
Things.
 HTTP is, at its core, a simple protocol. The client
requests a resource by sending a command to a URL,
with some headers.
 We use the current version of HTTP, 1.1, in these
examples. Let’s try to get a simple document
 at http://book.roomofthings.com/hello.txt. You can
see the result if you open the URL in your web browser.
 But let’s look at what the browser is actually sending to the
server to do this.The basic structure of the request would
look like this:
 GET /hello.txt HTTP/1.1
 Host: book.roomofthings.com
 Notice how the message is written in plain text, in a
human-readable way (this might sound obvious, but not all
protocols are; the messages could be encoded into bytes in
a binary protocol, for example).
 We specified the GET method because we’re simply getting
the page. We then tell the server which resource we want
(/hello.txt) and what version of the protocol we’re using.
HTTPS: ENCRYPTED HTTP
 We have seen how the request and response are
created in a simple text format. If someone
eavesdropped your connection (easy to do with tools
such as Wireshark if you have access to the network at
either end), that person can easily read the
conversation.
 In fact, it isn’t the format of the protocol that is the
problem: even if the conversation happened in binary,
an attacker could write a tool to translate the format
into something readable.
 Rather, the problem is that the conversation isn’t
encrypted. The HTTPS protocol is actually just a mix-
up of plain old HTTP over the Secure Socket Layer
(SSL) protocol.
 An HTTPS server listens to a different port (usually
443) and on connection sets up a secure, encrypted
connection with the client . When that’s established,
both sides just speak HTTP to each other as before!
 This means that a network snooper can find out only
the IP address and port number of the request
(because both of these are public information in the
envelope of the underlying TCP message, there’s no
way around that).
 After that, all it can see is that packets of data are
being sent in a request and packets are returned for
the response.

Weitere ähnliche Inhalte

Was ist angesagt?

Real Time Systems
Real Time SystemsReal Time Systems
Real Time SystemsDeepak John
 
Chapter04 -- network protocols
Chapter04  -- network protocolsChapter04  -- network protocols
Chapter04 -- network protocolsRaja Waseem Akhtar
 
RARP, BOOTP, DHCP and PXE Protocols
RARP, BOOTP, DHCP and PXE ProtocolsRARP, BOOTP, DHCP and PXE Protocols
RARP, BOOTP, DHCP and PXE ProtocolsPeter R. Egli
 
File Protection in Operating System
File Protection in Operating SystemFile Protection in Operating System
File Protection in Operating SystemMeghaj Mallick
 
Learning set of rules
Learning set of rulesLearning set of rules
Learning set of rulesswapnac12
 
Networking Standards And Protocols
Networking Standards And ProtocolsNetworking Standards And Protocols
Networking Standards And ProtocolsSteven Cahill
 
directory structure and file system mounting
directory structure and file system mountingdirectory structure and file system mounting
directory structure and file system mountingrajshreemuthiah
 
Disassembler and simulators
Disassembler and simulatorsDisassembler and simulators
Disassembler and simulatorsShriya Shankar
 
Multithreading
MultithreadingMultithreading
MultithreadingA B Shinde
 
Operating systems system structures
Operating systems   system structuresOperating systems   system structures
Operating systems system structuresMukesh Chinta
 
Introduction to Parallel Computing
Introduction to Parallel ComputingIntroduction to Parallel Computing
Introduction to Parallel ComputingAkhila Prabhakaran
 
6 multiprogramming & time sharing
6 multiprogramming & time sharing6 multiprogramming & time sharing
6 multiprogramming & time sharingmyrajendra
 
Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing marwan aldulaimy
 
Address resolution protocol (ARP)
Address resolution protocol (ARP)Address resolution protocol (ARP)
Address resolution protocol (ARP)NetProtocol Xpert
 

Was ist angesagt? (20)

Interrupts
InterruptsInterrupts
Interrupts
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
 
Chapter04 -- network protocols
Chapter04  -- network protocolsChapter04  -- network protocols
Chapter04 -- network protocols
 
RARP, BOOTP, DHCP and PXE Protocols
RARP, BOOTP, DHCP and PXE ProtocolsRARP, BOOTP, DHCP and PXE Protocols
RARP, BOOTP, DHCP and PXE Protocols
 
File Protection in Operating System
File Protection in Operating SystemFile Protection in Operating System
File Protection in Operating System
 
Mac layer
Mac  layerMac  layer
Mac layer
 
Bridging in Networking
Bridging in NetworkingBridging in Networking
Bridging in Networking
 
Learning set of rules
Learning set of rulesLearning set of rules
Learning set of rules
 
Networking Standards And Protocols
Networking Standards And ProtocolsNetworking Standards And Protocols
Networking Standards And Protocols
 
directory structure and file system mounting
directory structure and file system mountingdirectory structure and file system mounting
directory structure and file system mounting
 
Disassembler and simulators
Disassembler and simulatorsDisassembler and simulators
Disassembler and simulators
 
Multithreading
MultithreadingMultithreading
Multithreading
 
Circuit Switching
Circuit SwitchingCircuit Switching
Circuit Switching
 
Operating systems system structures
Operating systems   system structuresOperating systems   system structures
Operating systems system structures
 
Distributed Transaction
Distributed TransactionDistributed Transaction
Distributed Transaction
 
Introduction to Parallel Computing
Introduction to Parallel ComputingIntroduction to Parallel Computing
Introduction to Parallel Computing
 
6 multiprogramming & time sharing
6 multiprogramming & time sharing6 multiprogramming & time sharing
6 multiprogramming & time sharing
 
Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing
 
TCP and UDP
TCP and UDP TCP and UDP
TCP and UDP
 
Address resolution protocol (ARP)
Address resolution protocol (ARP)Address resolution protocol (ARP)
Address resolution protocol (ARP)
 

Ähnlich wie Important Ports and Protocols for IoT Development

How does internet works
How does internet worksHow does internet works
How does internet worksRamonNavarro46
 
Protocols in computer network
Protocols in computer network   Protocols in computer network
Protocols in computer network priya sehgal
 
Internetbasics
InternetbasicsInternetbasics
Internetbasicspatinijava
 
Ch4 Protocols.pptx
Ch4 Protocols.pptxCh4 Protocols.pptx
Ch4 Protocols.pptxkebeAman
 
Ch4 Protocols.pptx
Ch4 Protocols.pptxCh4 Protocols.pptx
Ch4 Protocols.pptxazmerawAnna1
 
Networking-basics
Networking-basicsNetworking-basics
Networking-basicsRaj Alam
 
HNS L III UC2 Installing and Managing Network Protocols .pdf
HNS L III UC2 Installing and Managing Network Protocols .pdfHNS L III UC2 Installing and Managing Network Protocols .pdf
HNS L III UC2 Installing and Managing Network Protocols .pdfAbenetAsmellash
 
How Internet Works
How Internet WorksHow Internet Works
How Internet Workssumit kumar
 
Published on IST 554 (httpsonline.ist.psu.eduist554).docx
Published on IST 554 (httpsonline.ist.psu.eduist554).docxPublished on IST 554 (httpsonline.ist.psu.eduist554).docx
Published on IST 554 (httpsonline.ist.psu.eduist554).docxamrit47
 
Ajp notes-chapter-04
Ajp notes-chapter-04Ajp notes-chapter-04
Ajp notes-chapter-04Ankit Dubey
 
Network protocols
Network protocolsNetwork protocols
Network protocolsAbiud Orina
 
Unit 4 tansport layer in the internat
Unit 4 tansport layer in the internatUnit 4 tansport layer in the internat
Unit 4 tansport layer in the internatKritika Purohit
 

Ähnlich wie Important Ports and Protocols for IoT Development (20)

How does internet works
How does internet worksHow does internet works
How does internet works
 
Protocols in computer network
Protocols in computer network   Protocols in computer network
Protocols in computer network
 
Tcp Udp Notes
Tcp Udp NotesTcp Udp Notes
Tcp Udp Notes
 
Internetbasics
InternetbasicsInternetbasics
Internetbasics
 
Ch4 Protocols.pptx
Ch4 Protocols.pptxCh4 Protocols.pptx
Ch4 Protocols.pptx
 
Ch4 Protocols.pptx
Ch4 Protocols.pptxCh4 Protocols.pptx
Ch4 Protocols.pptx
 
Networking infrastructure
Networking infrastructureNetworking infrastructure
Networking infrastructure
 
Networking-basics
Networking-basicsNetworking-basics
Networking-basics
 
internet protocol
internet protocolinternet protocol
internet protocol
 
HNS L III UC2 Installing and Managing Network Protocols .pdf
HNS L III UC2 Installing and Managing Network Protocols .pdfHNS L III UC2 Installing and Managing Network Protocols .pdf
HNS L III UC2 Installing and Managing Network Protocols .pdf
 
Application Layer
Application LayerApplication Layer
Application Layer
 
How Internet Works
How Internet WorksHow Internet Works
How Internet Works
 
Http Vs Https .
Http Vs Https . Http Vs Https .
Http Vs Https .
 
Published on IST 554 (httpsonline.ist.psu.eduist554).docx
Published on IST 554 (httpsonline.ist.psu.eduist554).docxPublished on IST 554 (httpsonline.ist.psu.eduist554).docx
Published on IST 554 (httpsonline.ist.psu.eduist554).docx
 
Ajp notes-chapter-04
Ajp notes-chapter-04Ajp notes-chapter-04
Ajp notes-chapter-04
 
An Introduction to HTTP
An Introduction to HTTPAn Introduction to HTTP
An Introduction to HTTP
 
Basic to advance protocols
Basic to advance protocolsBasic to advance protocols
Basic to advance protocols
 
application layer
application layerapplication layer
application layer
 
Network protocols
Network protocolsNetwork protocols
Network protocols
 
Unit 4 tansport layer in the internat
Unit 4 tansport layer in the internatUnit 4 tansport layer in the internat
Unit 4 tansport layer in the internat
 

Kürzlich hochgeladen

ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 

Kürzlich hochgeladen (20)

LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 

Important Ports and Protocols for IoT Development

  • 1.
  • 2.  TCP and UDP are used to connect two devices over the Internet or other networks.  However, to give data packages an entrance to the PC or server at the other end of the connection, the “doors” have to be open.  These openings into the system are called ports.  For both protocols, there are some known and important ports which you need to know when developing web apps. 
  • 3.  when you send a TCP/IP message over the Internet, you have to send it to the right port. TCP ports, unlike entrances ,are referred to by numbers (from 0 to 65535).  When communicating via the Internet, the two protocols TCP and UDP establish the connection, compile data packages again after transfer, and then hand them over to the programs addressed on the recipient’s device.
  • 4.  For this handover to work, the operating system must create entrances and open them for the transfer.  Every entrance has a specific code number. After the transfer, the receiving system knows where the data has to be delivered based on the port number.  The data package always includes two port numbers: the sender’s and the recipient’s.
  • 5.  Ports have consecutive numbers – from 0 to 65536.  Some of these code numbers are standardized, which means they are assigned to specific applications.  Ports 0–1023 are “well-known ports”, and only a system process or an administrator can connect to them.
  • 6.  Ports 1024–49151 are “registered”, so that common applications can have a usual port number.  However, most services are able to bind any port number in this range.  The Internet Assigned Numbers Authority (IANA) is responsible for registering the numbers in these ranges.
  • 7. OTHER COMMON PORTS  Even if you will rarely need a complete catalogue of all port numbers for services, you can rapidly start to memorize port numbers for the common services that you use daily. For example, you will very likely come across the following ports regularly:  80 HTTP  8080 HTTP (for testing servers)  443 HTTPS  22 SSH (Secure Shell)  23 Telnet  25 SMTP (outbound email)  110 POP3 (inbound email)  220 IMAP (inbound email) 
  • 8. APPLICATION LAYER PROTOCOLS  We have seen examples of protocols at the different layers of the TCP/IP stack, from the low-level communication across wired Ethernet, the low-level IP communication, and the TCP transport layer.  Now we come to the highest layer of the stack, the application layer. This is the layer you are most likely to interact with while prototyping an Internet of Things project.
  • 9.
  • 10.  A protocol is a set of rules for communication between computers. It includes rules about how to initiate the conversation and what format the messages should be in.  It determines what inputs are understood and what output is transmitted.  It also specifies how the messages are sent and authenticated and how to handle (and maybe correct) errors caused by transmission.
  • 11.  some application layer protocols, starting with HTTP  HTTP  The Internet is much more than just “the web”, but inevitably web services carried over HTTP hold a large part of our attention when looking at the Internet of Things.  HTTP is, at its core, a simple protocol. The client requests a resource by sending a command to a URL, with some headers.
  • 12.  We use the current version of HTTP, 1.1, in these examples. Let’s try to get a simple document  at http://book.roomofthings.com/hello.txt. You can see the result if you open the URL in your web browser.
  • 13.
  • 14.  But let’s look at what the browser is actually sending to the server to do this.The basic structure of the request would look like this:  GET /hello.txt HTTP/1.1  Host: book.roomofthings.com  Notice how the message is written in plain text, in a human-readable way (this might sound obvious, but not all protocols are; the messages could be encoded into bytes in a binary protocol, for example).  We specified the GET method because we’re simply getting the page. We then tell the server which resource we want (/hello.txt) and what version of the protocol we’re using.
  • 15. HTTPS: ENCRYPTED HTTP  We have seen how the request and response are created in a simple text format. If someone eavesdropped your connection (easy to do with tools such as Wireshark if you have access to the network at either end), that person can easily read the conversation.  In fact, it isn’t the format of the protocol that is the problem: even if the conversation happened in binary, an attacker could write a tool to translate the format into something readable.
  • 16.  Rather, the problem is that the conversation isn’t encrypted. The HTTPS protocol is actually just a mix- up of plain old HTTP over the Secure Socket Layer (SSL) protocol.  An HTTPS server listens to a different port (usually 443) and on connection sets up a secure, encrypted connection with the client . When that’s established, both sides just speak HTTP to each other as before!
  • 17.  This means that a network snooper can find out only the IP address and port number of the request (because both of these are public information in the envelope of the underlying TCP message, there’s no way around that).  After that, all it can see is that packets of data are being sent in a request and packets are returned for the response.