{"id":30,"date":"2015-08-19T02:16:31","date_gmt":"2015-08-19T02:16:31","guid":{"rendered":"http:\/\/wiki.thomasandsofia.com\/?p=30"},"modified":"2015-09-06T20:24:46","modified_gmt":"2015-09-06T20:24:46","slug":"ccent-2-s02-e06-basic-tcpip-understanding-port-numbers","status":"publish","type":"post","link":"https:\/\/wiki.thomasandsofia.com\/?p=30","title":{"rendered":"CCENT 2 S02 E06 &#8211; Basic TCP\/IP: Understanding Port Numbers"},"content":{"rendered":"<h3>How Port Numbers Work<\/h3>\n<p>Every time an applications communicates across a network, it must decide both the source and destination port numbers.<\/p>\n<p><a href=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2015\/08\/client-server.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-31\" src=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2015\/08\/client-server.png\" alt=\"client-server\" width=\"785\" height=\"228\" srcset=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2015\/08\/client-server.png 785w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2015\/08\/client-server-300x87.png 300w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2015\/08\/client-server-150x44.png 150w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><\/a><\/p>\n<div class=\"clear\"><\/div>\n<p>If 10.1.1.1 wants to access 150.1.1.1&#8217;s web server, it will use well known port 80. This is written as 150.1.1.1:80<br \/>\nWhen written in this notation, it is known as a &#8220;Socket&#8221;.<\/p>\n<p>The Source computer also needs to generate a &#8220;Source Port&#8221;. This port is created by the OS.<\/p>\n<div class=\"info\">To see the active connections:<br \/>\nLinux: netstat -pant<br \/>\nWindows: netstat -f<\/div>\n<pre>Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID\/Program name\r\ntcp        0      0 192.168.1.66:42828      168.144.134.153:80      ESTABLISHED 5454\/firefox<\/pre>\n<p>&nbsp;<\/p>\n<h3>Well Known Port Numbers<\/h3>\n<ul>\n<li>0 &#8211; 1023 are &#8220;Well Known Port Numbers&#8221;<\/li>\n<li>TCP and UDP Ports can run completely different services!<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<th colspan=\"2\">TCP<br \/>\n0 &#8211; 65535<\/th>\n<\/tr>\n<tr>\n<td>21<\/td>\n<td>FTP<\/td>\n<\/tr>\n<tr>\n<td>22<\/td>\n<td>SSH<\/td>\n<\/tr>\n<tr>\n<td>23<\/td>\n<td>TELNET<\/td>\n<\/tr>\n<tr>\n<td>25<\/td>\n<td>SMTP<\/td>\n<\/tr>\n<tr>\n<td>53<\/td>\n<td>DNS SERVER<\/td>\n<\/tr>\n<tr>\n<td>80<\/td>\n<td>HTTP<\/td>\n<\/tr>\n<tr>\n<td>110<\/td>\n<td>POP3<\/td>\n<\/tr>\n<tr>\n<td>443<\/td>\n<td>HTTPS<\/td>\n<\/tr>\n<tr>\n<th colspan=\"2\">UDP<br \/>\n0 &#8211; 65535<\/th>\n<\/tr>\n<tr>\n<td>53<\/td>\n<td>DNS CLIENT<\/td>\n<\/tr>\n<tr>\n<td>69<\/td>\n<td>TFTP*<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>*TFTP: Trivial File Transfer Protocol, can be used to send and receive files to and from Cisco devices.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How Port Numbers Work Every time an applications communicates across a network, it must decide both the source and destination port numbers. If 10.1.1.1 wants to access 150.1.1.1&#8217;s web server, it will use well known port 80. This is written as 150.1.1.1:80 When written in this notation, it is known as a &#8220;Socket&#8221;. The Source ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/?p=30\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,2,10],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-ccent","category-networking","category-tcpip"],"_links":{"self":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=30"}],"version-history":[{"count":1,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":32,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions\/32"}],"wp:attachment":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}