Port

gapingbeaver1440·2023년 3월 4일
0

Port

프로세스 식별자. TCP socket에 attach되는 정보 중 하나.

IP address and port number work together to exchange data on a network

An IP address determines the location of that server. A port number determines which service or program on that server it wants to use(web page, FTP service, email… ).

Whenever we use web pages, we use port num. 443 (some 80)

  • 80 : associated with HTTP (Hypertext Transfer Protocol)
  • 443 : HTTPS (HTTP Secure)
  • 21 : FTP
  • SMTP : 25
  • https://www.google.com/ = 173.194.212.94 = 173.194.212.94/ = 173.194.212.94:443

ip address locates google’s web server then → forward the request to its built-in web server → finally reach google’s search page

My computer also can work as a server.

3 categories of port num.

  • System / Well-known : 0-1023
  • User / Registered : 1024-49151 (1102 - Adobe Server / 1433 - Mic. SQL Server / 1527 - Oracle)
  • Dynamic / Private : 49152-65535 = client-side ports that are free to use → my computer assignes temporarilly to itself during a session

⇒ ‘cuz packet format of TCP segemnt is 16-bit integers port range = 2^16 - 1 = 65535

Web Page

Commands (Window)

  • netstat : Network Statistics - display the current network connections & port activity on ur com
    • -a : display all ports
    • -n : "IP address:port" 형태로 보여준다.
    • -o : shows up PID
  • nslookup [DNS Name]


0.0.0.0 & 127.0.0.1

Loopback address, localhost address (such as 127.0.0.1) is used to send back the data to itself after connected to another server but wants to receive the packet in itself without other’s interruptions.

⇒ the packet never leaves the localhost, it loopbacks. whereas 0.0.0.0 is everywhere (listen on every available network interface, IPv4).

Difference


Ref - YouTube

0개의 댓글