JavaScripter

Internet protocols

Rules and guidelines established to promote consistency in the design code which makes up a web page.



Networks

LAN
A computer network that spans a relatively small area connected via ethernet and wifi.
WAN
A computer network that spans a large area by connecting multiple LANs. The largest WAN in existence is the Internet.
VPN
Extends a private network across a public network, and enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network.
IP address
A numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. When communicating with devices within the network, a private IP address is used. When communicating with devices outside the network, a public IP address is used. Since all devices within a private network share the same public IP address, port forwarding and network address translation is used by the router to determine how to route data among devices. CIDR is a method for dividing networks into subnetworks.
Image
An example of a cloud VPN on AWS
↑ Top

TCP/IP

The Internet protocol suite (TCP/IP) provides end-to-end data communication specifying how data should be packetized, addressed, transmitted, routed, and received. This functionality is organized into abstraction layers.

Link/physical
The link layer is used to move packets between the Internet layer interfaces of two different hosts on the same link using MAC addresses. This is also the layer where packets may be selected to be sent over a VPN. In this scenario, the link layer data may be considered application data allowing it to traverse over the layers again before being transmitted.
Internet
The primary protocol in this scope is the Internet Protocol, which defines IP addresses. Its function in routing is to transport datagrams to the next IP router that has the connectivity to a network closer to the final data destination.
Transport
Handling host-to-host communication. TCP provides reliable, ordered, and error-checked delivery of a stream of octets (bytes) between applications running on hosts communicating via an IP network. Applications that do not require reliable data stream service may use the User Datagram Protocol (UDP), which provides a connectionless datagram service that emphasizes reduced latency over reliability.
Application
Providing process-to-process data exchange for applications. This is the layer in which all higher level protocols, such as SMTP, FTP, SSH, HTTP, operate. Processes are addressed via ports which essentially represent services.

Image
Image
↑ Top

HTTP

The client and server communicate by sending plain-text (ASCII) messages. The client sends requests to the server and the server sends responses.

The request message consists of the following:

  • a request line with an HTTP method, URI, and HTTP version (e.g., GET /images/logo.png HTTP/1.1, which requests a resource called /images/logo.png from the server.)
  • request header fields (e.g., Accept-Language: en).
  • an empty line
  • an optional message body
GET /guide/index.html HTTP/1.1
Host: www.xxxx.com
Accept: image/gif, image/jpeg, /
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
(blank line)

The response message consists of the following:

  • a status line with a status code with message and HTTP version (e.g., HTTP/1.1 200 OK, which indicates that the client’s request succeeded.)
  • response header fields (e.g., Content-Type: text/html)
  • an empty line
  • an optional message body
HTTP/1.1 200 OK
Date: Sun, 18 Oct 2015 08:56:53 GMT
Server: Apache/2.2.14 (Win32)
Last-Modified: Sat, 20 Nov 2015 07:16:26 GMT
ETag: “10000000565a5-2c-3e94b66c2e680”
Accept-Ranges: bytes
Content-Length: 44
Connection: close
Content-Type: text/html
X-Pad: avoid browser bug
<html><body><h1>Guide</h1><p>This is guide on HTTP protocol</p></body></html>

↑ Top

DNS

The Domain Name System (DNS) is a worldwide, distributed database for translating easily memorized domain names into IP addresses needed for communication over the internet. Each domain has at least one authoritative DNS server that stores records such as IP addresses (A and AAAA), SMTP mail exchangers (MX), name servers (NS), and domain name aliases (CNAME). Name servers “point” your domain name to the company that controls its DNS settings.

DNS resolution occurs by first looking up the name server for the TLD (.com or .net), then the name server for the full domain (medium.com), and lastly the numeric IP of the subdomain with domain (www.medium.com). To reduce the load on the Domain Name System servers, results are cached locally or in intermediate resolver hosts. A time to live (TTL) is included with the cached results, an expiration time after which the results must be discarded or refreshed.

↑ Top