What happens when you type in a URL in browser?

  1. browser checks cache; if requested object is in cache and is fresh, skip to #9
  2. browser asks OS for server's IP address
  3. OS makes a DNS lookup and replies the IP address to the browser
  4. browser opens a TCP connection to server (this step is much more complex with HTTPS)
  5. browser sends the HTTP request through TCP connection
  6. browser receives HTTP response and may close the TCP connection, or reuse it for another request
  7. browser checks if the response is a redirect or a conditional response (3xx result status codes), authorization request (401), error (4xx and 5xx), etc.; these are handled differently from normal responses (2xx)
  8. if cacheable, response is stored in cache
  9. browser decodes response (e.g. if it's gzipped)
  10. browser determines what to do with response (e.g. is it a HTML page, is it an image, is it a sound clip?)
  11. browser renders response, or offers a download dialog for unrecognized types

Difference between router and switch:

router: for Internet layer-- using IP address for WAN (wide area network)

Switch: for physical layer -- using ethernet MAC address for LAN (local area network)

Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically provides an Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet mask and default gateway.

ARP:

The main task of ARP or Address Resolution Protocol is to map a known IP address to a MAC layer address.

TCP/IP

TCP/IP is short for Transmission Control Protocol / Internet Protocol. This is a set of protocol layers that is designed to make data exchange possible on different types of computer networks.

TCP/IP is a two-layer program. The higher layer, Transmission Control Protocol, manages the assembling of a message or file into smaller packets that are transmitted over the Internet and received by a TCP layer that reassembles the packets into the original message. The lower layer, Internet Protocol, handles the address part of each packet so that it gets to the right destination.

TCP VS. UDP:

TCP:Transmission Control Protocol

TCP is a connection-oriented protocol.

TCP is suited for applications that require high reliability, and transmission time is relatively less critical.

UDP: Universal Datagram Protocol

UDP is a connectionless protocol.

UDP is suitable for applications that need fast, efficient transmission, such as games. UDP's stateless nature is also useful for servers that answer small queries from huge numbers of clients.

DNS- domain name system

Assigning meaningful high-level names for machines

Mapping between names and the ip addresses of the machines.

The Hypertext Transfer Protocol (HTTP)

HTTP, the Hypertext Transfer Protocol, is the application-level protocol that is used

to transfer data on the Web.

OSI: Open Systems Interconnection:

Application (email)

Transportation (tcp/udp)

Network (ip, routing)

Data link (ethernet)

Physical

Packet switching:

a mode of data transmission in which a message is broken into a number of parts that are sent independently, over whatever route is optimum for each packet, and reassembled at the destination.

BGP: border gateway protocol:

Border Gateway Protocol (BGP) (is a standardized exterior gateway protocol) designed to exchange routing and reachability information among autonomous systems (AS) on the Internet.

DHCP:

DHCP is short for Dynamic Host Configuration Protocol. Its main task is to automatically assign an IP address to devices across the network. It first checks for the next available address not yet taken by any device, then assigns this to a network device.

OSPF: (link state routing protocol)

Open Shortest Path First:

Dijkstra's Algorithm

Huffman coding is a lossless data compression algorithm.

Main idea: represent the most frequence symbol by using the less bits

The idea is to assign variable-legth codes to input characters, lengths of the assigned codes are based on the frequencies of corresponding characters. The most frequent character gets the smallest code and the least frequent character gets the largest code.

results matching ""

    No results matching ""