Addressing and routing

DNS

Why do we need domain names?

Because it is very hard to remember all of the ip addresses, of the websites you like to go to

What is a bad way of address mapping?

'hosts' file on your computer stores names and their corresponding addresses

What is a DNS server?

It is a dedicated server with the purpose of handing out IP addresses when it receives a domain name

Domain Name Service

What protocol does a DNS server use?

DNS protocol

How does DNS work?
  • You type in domain name
  • Browser creates socket with DNS server (browser already knows the IP of DNS server)
  • DNS server then looks up the domain name
  • Your computer will then receive an answer
  • Then your computer will then create a socket with the website that you want to connect to with a HTTP GET request
  • Server responds with a HTTP OK, with the data

How do routers route?

How does a router decided where to send the packet?
  • Receive an IP packet
  • Look at its destination IP in the header
  • Compare IP to its routing table
  • Defines 'next hop' for its given destination
Say a possible approach towards a routing table?

Would be to have a destination, and its corresponding 'Next Hop'

This is bad because potentially 4.3 billion entries and what about IPv6

For a host

What is a default gateway?

This is were you send all packets that are not address to a IP on your local network straight to the router

Do IP addresses have structure?

Yesish

The first half of an IP address describes the network

The second half describes the computing device within that network

Masking

What is a mask?

It is a 32-bit binary number, that always starts with number of ones and ends in a number of zeros

What does the mask represent?

The number of bits used for the network ID

What do masks help us do?

They tell us how much of the IP address is allocated to the network address and how much is for the computer address, this means that the routing table can be smaller

What would each segment of a IP address with mask of 11111111 11111111 11111111 00000000 begin with?

network address number here . network address number here . network address number here . devices address number here

example: 245.134.26.27

Here the segments beginning with ones represent the parts of the IP address that is allocated to the network address

Where did they come from?

In the original internet - You could tell the mask of an address by it class, so if an address began with '10', it is class B, and is assumed to have a mask 255.255.0.0

When is a mask size defined?

This is defined when allocating addresses and routing tables

What is the address allocation?

network-ID or network Mask prefix

host-ID suffix

What are the two reserved host IDs?
What happens if the host bits are all 0?

Address of the network

What happens if the host bits are all 1?

That means all nodes on that network will receive the packet

What does the 123.255.128.64/24 mean?

The first 24bits are for the network ID

Must all IP addresses have the same mask in a LAN

YES, therefore routers may have two ip addresses

What is a network interface?

essentially it represents a mask, so if a router has two network interfaces, that means it has to deal with two lans with different masks.

Unicast

This is when a packet goes to a single computer

Multicast

This is when packets will have the opportunity to be sent to all computers, however only the computers that want to receve the file will receive it

Broadcast

This is when the file is sent to all nodes on a network

What protocol manages all of these communication types?

IGMP

Internet Group Management Protocol