Top Banner
HEPBURN PARKS ANGELOU GERMAIN FRANKLIN NEWS REVIEWS FACULTIES CHARITY PERFORMANCE SUCCESS SUMMER 2019 WHALLEY RANGE 11-18 HIGH SCHOOL - A MEMBER OF THE EDUCATION AND LEADERSHIP TRUST MATHS CHALLENGE SPORTING SUCCESS DRONE WORKSHOP WORLD BOOK DAY SPANISH TRIP featuring and so much more...
12

Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Aug 10, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Scaling the Network: Subnetting and Other Protocols

Networking CS 3470, Section 1

Page 2: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Today

CIDR Subnetting Private IP addresses ICMP, IMAP, and DHCP Protocols

2

Page 3: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Packet Encapsulation

3 ** Creative Commons: http://en.wikipedia.org/wiki/File:UDP_encapsulation.svg

Page 4: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

IP Addressing

Classful addressing scheme separates groups of addresses into classes Class A

8 bits used for network (256) 24 bits used for hosts and network devices (16,777,216) Binary address starts with 0

Class B 16 bits for networks (65,536) 16 bits for hosts and network devices (65,536) binary address starts with 10

Class C 24 bits for the network (16,777,216) 8 bits for the host (256) Binary address starts with 110

Page 5: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Classless Inter-Domain Routing

Classful addressing scheme wasteful IP address space exhaustion Class B net allocated enough for 65K hosts Even if only 2K hosts in that network

Solution: Classless Inter Domain Routing (CIDR) Eliminate class distinction No A,B,C

Keep multicast class D

5

Page 6: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Classless Addressing

Addresses allocated in contiguous blocks Number of addresses assigned always power of 2

Network portion of address is of arbitrary length Address format: a.b.c.d/x

x is number of bits in network portion of address

6

11001000 00010111 1 0000000 00000000

network part

host part

200.23.128.0/17

Page 7: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Subnet Motivation

This network can have 215 = 32,768 hosts! Imagine the size of the routing tables if we had a

flat network of all these hosts! We want to split this network up into smaller

networks

7

11001000 00010111 1 0000000 00000000

network part

host part

200.23.128.0/17

Page 8: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Subnet Motivation

We probably want to split this network up into smaller networks (subnets) due to Security reasons Logistical reasons Routing reasons

8

11001000 00010111 1 0000000 00000000

network part

host part

200.23.128.0/17

Page 9: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Let’s play with a small example

Suppose you have this private class C network, and you need to divide it evenly You will have hosts 0-127 Friend will have hosts 128-255

9

11000000 10101000 00001010 00000000

network part

host part

192.168.10.0/24

Page 10: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Let’s play with a small example

Dividing the network into subnets involves using some of the host bits as the subnet ID What bit of the host part of the address do we

have to flip to signify >= 128 for the host ID?

10

11000000 10101000 00001010 00000000

network part

host part

192.168.10.0/24

Page 11: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Let’s play with a small example

Can address hosts 0-127

Can address hosts 128-255

11

11000000 10101000 00001010 0 0000000

network part

host part

192.168.10.0/25

subnet ID

11000000 10101000 00001010 1 0000000

network part

host part

192.168.10.128/25

subnet ID

Page 12: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Let’s play with a small example

Now, how can routers easily figure out where destination IP address 192.168.10.202 should be routed? 192.168.10.0/25 or 192.168.10.128/25 subnet? 12

11000000 10101000 00001010 0 0000000

network part

host part

192.168.10.0/25

subnet ID

Page 13: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Let’s play with a small example

A subnet number is the network part + subnet ID + zeros for the host 192.168.10.0

A subnet mask consists of all 1’s for the network+subnet ID and all 0’s for the host part

What is this subnet mask?

13

11000000 10101000 00001010 0 0000000

network part

host part

192.168.10.0/25

subnet ID

Page 14: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Let’s play with a small example

Subnet mask: 255.255.255.128

14

11000000 10101000 00001010 0 0000000

network part

host part

192.168.10.0/25

subnet ID

11111111 11111111 11111111 10000000

Page 15: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Let’s play with a small example

Subnet mask: 255.255.255.128

15

11000000 10101000 00001010 1 0000000

network part

host part

192.168.10.128/25

subnet ID

11111111 11111111 11111111 10000000

Page 16: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Subnet Masks

We can figure out where to route by noting that

dest subnet = subnet mask & dest IP addr

16

Page 17: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Subnet Masks

dest subnet = subnet mask & dest IP addr

Let’s say destination IP is 192.168.10.202 and lets & with subnet mask

192 . 168 . 10 . 128 We send packet to 192.168.10.128/25 network!

17

11000000 10101000 00001010 110001010 & 11111111 11111111 11111111 100000000

11000000 10101000 00001010 100000000

Page 18: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Longest-Prefix Match

Suppose two network IDs exist: 1) 128.186.0.0/16 2) 128.186.134.0/24

Suppose you have destination IP of 128.186.134.100

Both subnet mask & IP of 1 and 2 will yield match – what to do? Longest-prefix match – route to network with

the most matching host bits.

18

Page 19: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Subnetting

Notes Would use a default router if nothing matches Not necessary for all ones in subnet mask to be

contiguous Can put multiple subnets on one physical network Subnets not visible from the rest of the Internet

Page 20: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Routing with CIDR

Destination IP is BA.DB.EE.F2

20

Page 21: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Special IP Addresses

Network address: host id = all 0’s Local broadcast address: all 1’s Used during system startup

Directed broadcast address: host id = all 1’s Routers will forward this broadcast address

Local host address (this computer): all 0’s Used during system startup

Loopback address network id = 127, any host id (e.g. 127.0.0.1)

21

Page 22: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Private IP Addresses

Some addresses are not globally routable IP packets created by these addresses

cannot be transmitted into the public domain Commonly used for home, office, and

enterprise LANS

22

Page 23: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Private IP Addresses

Address Range CIDR Number of Addresses

10.0.0.0 – 10.255.255.255 10.0.0.0/8 16,777,216 172.16.0.0 – 172.31.255.255 172.16.0.0/12 1,048,576 192.168.0.0 – 192.168.255.255 192.168.0.0/16 65,535

23

Page 24: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Private IP addresses

Router uses Network Address Translation (NAT) to send IP packets from private IP addresses onto public networks Router places it’s own IP address as destination Maintains table, knows which host to route addresses

24

Router keeps translation table

Page 25: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

IP Address Configuration

May configure a network statically by giving each host it’s IP address and routing information (like gateway)

Or may configure a server to do this for you dynamically

25

Page 26: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

DHCP Server

Dynamic Host Configuration Protocol (DHCP) DHCP server is responsible for providing

configuration information to hosts There is at least one DHCP server for an

administrative domain DHCP server maintains a pool of available

addresses

Page 27: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

DHCP Protocol

State Protocol DHCPDISCOVER (client) DHCPOFFER (server) DHCPREQUEST (client) DHCPACK (server) DHCPNAK (server) DHCPINFORM (client)

Page 28: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

DHCP

Newly booted or attached host sends DHCPDISCOVER message to a special IP address (255.255.255.255)

Rest of messages are unicast back and forth

Page 29: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

DHCP

IP leases are valid for a predefined period of time (T1)

Leases are renewed at T1/2 Leases are released if they have not been

renewed at the expiration of the lease time

Page 30: Scaling the Network: Subnetting and Other Protocolsdiesburg/courses/cs3470_fa14/sessions/s20/s20.pdfIP Addressing Classful addressing scheme separates groups of addresses into classes

Internet Control Message Protocol (ICMP) Defines a collection of error messages that

are sent back to the source host whenever a router or host is unable to process an IP datagram successfully Destination host unreachable due to link /node

failure Reassembly process failed TTL had reached 0 (so datagrams don't cycle

forever) IP header checksum failed