IP address

skang6283·2021년 1월 28일
0

Network

목록 보기
3/4
post-thumbnail

Range: 0.0.0.0 - 255.255.255.255

IP Addresses are two addresses in one

  • Host & Network

only first octect used to be for networks, but as internet started to grow, this simply didn't work. Thus the followings...


Still not enough IPs....so Subnet Mask

Subnet tells us which part is for network and which part is for host.

  • Devices in the same subnet must be in the same IP network. If not, they will not be able to communicate.
  • If devices in the same subnet are separated by a router, they will not be able to communicate.

CIDR Notation (for Subnet Mask)
/24 = 255.255.255.0

VLSM (Variable Length Subnet Mask)
Creating Subnets of different sizes


Lact Octet 0000 is reserved for network
Last Octet 1111 is reserved for broadcast


How do devices find router?

  • Each machine has a default gateway ( = local router's IP address)
  • So if host has no way to sending traffic to the destination on its own, it will forward it to default gateway(local router).

255.255.255.255 = IDC, Send this traffic everywhere!!! (used for host to ask for IP address from server)

  • This type of braodcast may flood the network. To prevent this, routers never forward broadcast messages. All IP broadcast messages stay within local network.

What if you still want to forward messages to other networks (ex. video stream)?

Solution : Multicast

  • Way for devices to opt in for receiving certain traffic.
  • It uses multicast IP to send its data, and other hosts look for traffic sent to that IP.

How do devices get IP addresses?

  • Configure it manually. (Need to make sure it is unique to avoid IP conflict)
  • Dynamically set it through DHTP Server
    Private IP's are not allowed on the internet.
    - When a device starts, it broadcast message around local network to find DHTP server, then server will give it unique IP address. (No guarantee that device will get IP address every time).

IP Headers : added to data before being sent

Flags determines fragmentation
Fragment Offset tracks the order of fragments in case of fragmentaiton of data.
Time to Live (TTL) packet alive time. Every time packet is passed, TTL--;

Private IP addresses
10.0.0.0 /8
172.16.0.0 /12
192.168.0.0 /16

profile
Hi :) I'm Max

0개의 댓글