1 of 10

Module 4

Networks

Introduction to Modern Application Development

Dr Gaurav Raina (IIT Madras), Tanmai Gopal (Hasura)

2 of 10

Outline

1.What is a Network?

2.IP (Internet Protocol) networks

Introduction to Modern Application Development

Dr Gaurav Raina (IIT Madras), Tanmai Gopal (Hasura)

3 of 10

What is a Network?

  • A network is simply a collection of computers that can communicate with each other.

  • A computer is connected to a network typically via Wi-Fi or ethernet.

  • Each computer on a network is called a host.

  • Terms like LAN (local area network) & WAN (wide area network) are used to describe different network types based on network size and configuration.

Introduction to Modern Application Development

Dr Gaurav Raina (IIT Madras), Tanmai Gopal (Hasura)

4 of 10

A simple network

A simple network is a router with some computers connected to it.

The simplest “network” is the host by itself. By default, the IP address 127.0.0.1 refers to the host itself.

Introduction to Modern Application Development

Dr Gaurav Raina (IIT Madras), Tanmai Gopal (Hasura)

5 of 10

The Internet

The Internet is the world’s largest computer network!

Each line is drawn between two nodes, representing two IP addresses.

Introduction to Modern Application Development

Dr Gaurav Raina (IIT Madras), Tanmai Gopal (Hasura)

6 of 10

IP networks

  • Most common networks are IP (Internet Protocol) based networks.
  • An IP network is a communication network that uses Internet Protocol (IP) to send and receive messages between one or more computers.
  • Ethernet, Wi-Fi, 2G/3G/4G are all different kinds of networks (at the physical / link layer) but they all use the IP system (‘protocol’) to manage communication.

Ethernet

Wi-Fi hotspot

Introduction to Modern Application Development

Dr Gaurav Raina (IIT Madras), Tanmai Gopal (Hasura)

7 of 10

IP Addresses

  • Every host on a network has a unique IP address that other hosts use to communicate with it.

  • An IP address is a 32bit number (for IPv4) typically represented in the format 0-255.0-255.0-255.0-255 example: 10.34.245.253 for better readability.

  • A host could either have a fixed “static IP” or a temporary “dynamic IP” assigned to it by the network every time it connects to it.

Introduction to Modern Application Development

Dr Gaurav Raina (IIT Madras), Tanmai Gopal (Hasura)

8 of 10

Which program on the computer do you want to reach?

  • Even though our message and data can reach the computer how do we know which program to contact on the computer?

  • Programs use port numbers as ‘addresses’ within the same computer
  • Port numbers vary from 1 to 65536
  • Web servers typically run on port 80 for http, and port 443 for https

Introduction to Modern Application Development

Dr Gaurav Raina (IIT Madras), Tanmai Gopal (Hasura)

9 of 10

How do these programs understand each other’s messages?

  • Web servers and clients agree to communicate in a format called HTTP (Hypertext Transfer Protocol)

  • HTTP is a format that mandates the following items:
    • URL (Uniform Resource Locator)
    • Headers, Method type
    • Body

Introduction to Modern Application Development

Dr Gaurav Raina (IIT Madras), Tanmai Gopal (Hasura)

10 of 10

Important statement

My browser is a program that can connect to some program (the server) on some machine somewhere on the network.

Question: How does this happen?

  1. If computers can discover each other.
  2. If computers can message each other in a way that both can understand each other.
  3. If a program can discover a specific program on another computer.
  4. If a program can message another program in a way both can understand each other.

You can watch this module on YouTube: https://www.youtube.com/watch?v=QyVLIi4J3fY

Introduction to Modern Application Development

Dr Gaurav Raina (IIT Madras), Tanmai Gopal (Hasura)