30
Addressing & Subnetting

Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Embed Size (px)

Citation preview

Page 1: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Addressing & Subnetting

Page 2: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Addressing

• …to identify and locate each host. We call it “addressing”.

• Identification: hostname, address (MAC, IP)• IP add ? MAC add ?• MAC add: local• IP add: internetwork• An address generally represents the connection to the

network

Page 3: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Addressing

unique address: letter (network address) and number (host address)

Page 4: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

IP Address (IPv4)

• IP address is 32-bit long.• It is often writen in dotted decimal format.

Page 5: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Addressing

• IP add has two parts: net-id & host-id• Two different networks must have different network

address (net-id).• Two different hosts in the same network must have

different host address (host-id). • Hosts in the same network have the same network

address.• Broadcast domain: one network add• Network address= IP address AND Subnet mask

Page 6: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Example 1:

SM : 255.255.255.0Net/host id: N.N.N.HNet E1 (Net-ID): 192.168.11.0Net E2 : 192.168.10.0Net E3 : 192.168.12.0

Number broadcast domain ?

Page 7: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Example 2:

SM: 255.255.255.0Net add: 192.168.10.0Net/host id: N.N.N.H

H: hhhhhhhh0000000000000001000000100000001100000100…1111111011111111

Page 8: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Example 3:

• IP add: 192.168.100.1• Subnet mask: 255.255.255.0• Net add: 192.168.100.0• Net/Host ID: N.N.N.H

• IP add : 11000000.10101000.01100100.00000001

• SM : 11111111.11111111.11111111.00000000

• Net add : 11000000.10101000.01100100.00000000

Page 9: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Example 4:

• IP add: 192.168.100.1• Subnet mask: 255.255.224.0• Net add: ?

• IP add : 11000000.10101000.01100100.00000001

• SM : 11111111.11111111.11100000.00000000

• Net add : 11000000.10101000.01100000.00000000• Note: subnetmask

Page 10: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Hierachical addressing scheme

As a hierachical addressing scheme, IP addresses are divided into “classes”.

Page 11: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Classes of IP Addresses

• Class Aaddresses are assigned to larger networks.

• Class Baddresses are used for medium-sized networks

• Class C for small networks.

Page 12: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Classes of IP Addresses

• First octet order bits:– Class A: 00000000 (0)

00000001 (1)…01111110 (126)01111111 (127)

• First octet order bits:– Class B: 10000000 (128)

10000001 (129)…10111110 (190)10111111 (191)

• First octet order bits:– Class C: 11000000 (192)

11000001 (193)…11011110 (222)11011111 (223)

• First octet order bits:– Class D: 11100000 (224)

11100001 (225)…11101110 (238)11101111 (239)

Page 13: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Classes of IP Addresses

Page 14: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Network Address

• When all host-bits are zeros (0), we have a number that represents network address. This address is reserved, namely it cannot be assigned to any host.

Page 15: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Broadcast Address

• When host-bits are all one (1), we have a number that represents broadcast address. This address is also reserved, namely it cannot be assigned to any host.

• Exp: ping 10.0.6.255

Page 16: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Reference: broadcast Address

• The router supports the following kinds of broadcast types: – Limited broadcast - A packet is sent to a specific network or

series of networks. In a limited broadcast packet destined for a local network, the network identifier portion and host identifier portion of the destination address is either all ones (255.255.255.255) or all zeros (0.0.0.0).

– Flooded broadcast - A packet is sent to every network. – Directed broadcast - A packet is sent to a specific destination

address where only the host portion of the IP address is either all ones or all zeros (such as 192.20.255.255 or 190.20.0.0).

Page 17: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Unicast and Broadcast Transmission

• The concept of unicast and broadcast transmission exist in both layer 2 and layer 3 protocols. There are refelections in the addressing scheme.

Unicast transmission Broadcast transmission

Page 18: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Reserved IP Address

Host-bits = all zeros (network address); exp: 176.10.0.0Host-bits = all ones (broadcast address); exp: 176.10.255.255Network-bits = all ones; exp: 01111111.x.x.xNetwork-bits = all zeros; exp: 00000000.x.x.x127.x.x.x (loopback address = 127.0.0.1).

Page 19: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Reference: Reserved IP Address

• all 0s -This host, exp: 0.0.0.0• all 0s.host - Host on this net, exp:0.x.x.x• all 1s - Limitted broadcast (local net),exp:

255.255.255.255• Net.all 1s - Directed broadcast for net, exp:

192.168.100.255• 127.anything (often 1) - Loopback, (127.0.0.1)• Exp: ping 0.0.0.0

0.0.6.156255.255.255.25510.0.6.255

Page 20: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Public IP Addresses

• Public IP addresses are unique. No two machines that connect to a public network can have the same IP address. (X#Y#Z )• Public IP addresses must be obtained from an Internet service provider (ISP) or a registry at some expense.• With the rapid growth of the Internet, public IP addresses were beginning to run out(IP address depletion).• New addressing schemes, such as classless interdomain routing (CIDR) and IPv6were developed to help solve the problem. Private IP addresses are another solution.

Page 21: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Private IP Addresses

Page 22: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Private IP Addresses

• RFC 1918 sets aside three blocks of IP addresses for private, internal use. These three blocks consist of one Class A, a range of Class B addresses, and a range of Class C addresses.• Addresses that fall within these ranges are not routed on the Internet backbone. Internet routers immediately discard private addresses.

Page 23: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Using Private Addresses

• When addressing a nonpublic intranet, a test lab, or a homenetwork, we normally use private addresses instead of globally unique addresses.

• Private addresses can be used to address point-to-point serial linkswithout wasting real IP addresses.

• Connecting a network using private addresses to the Internet requires translation of the private addresses to public addresses. This translation process is referred to as Network Address Translation (NAT).

Page 24: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Subnetting

• Exp:• Net add: 192.168.100.0; SM: 255.255.255.0; Number hosts usable: 2^8-2=254• If hosts per network is 60 used: 6 bits host: xxhhhhhh, 2^6-2=62 hosts; unused: 2 bits hostxxhhhhhhxx000000 (0)xx000001xx000010…xx111110xx111111 (63)

• IP add for poin-to-point link (router – router): 2 hosts 2 IP add

• Waste !!!

• Net 1: 172.16.0.0• Net 2: 172.17.0.0• Net 3: 172.18.0.0• Net 4: 172.19.0.0• Hosts per network (usable): 2^16-2= 65534 !!!

Page 25: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Subnetting

• Subnetting is another method of managing IP addresses. This method of dividing full network address classes into smaller pieces has prevented complete IP address exhaustion.• The network is no longer limited to the default Class A, B, or C network masks and there is more flexibility in the network design.• Subnet addresses include the network (N) portion, plus a subnet (sN) field and a host (H) field.

To create a subnet address, a network administrator borrows bits from the host field and designates them as the subnet field.

Page 26: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Subnetting

• Host bit must be reassigned as network bit.Thestarting “borrow” bit is the leftmost hosting bit.

• Providing broadcast contentment and low level security.

Page 27: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Subnetting

• 1 net add: 192.168.10.0; SM: 255.255.255.0; 254 hosts

• hosts per network: 30; networks: 6 ?– Borrows bits: 3 2^3-2= 6 subnets– Host bits: 5 2^5-2=30 hosts– SM: 255.255.255.224– Subnets: 192.168.10.32

192.168.10.64192.168.10.96

.128…192.168.10.192

Exp:

xxxhhhhh

000 (0)

001 (32)

010 (64)

011 (96)

100 (128)

101 (160)

110 (192)

111 (224)

Page 28: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Establishing SM address• The number of bits in

the subnet will depend on the maximum number of hosts required per subnet.

• The subnet mask: using binary ones in the host octet(s)

• (2 power of borrowed bits) – 2 = usable subnets

• (2 power of remaining host bits)–2= usable hosts

Page 29: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Applying the Subnet Mask

• Exp: subnet 192.168.10.32/27

• Host Range ???

• 192.168.10.001hhhhh • .00100000• .00100001 (33)• .00100010• .00100011• …• 192.168.10.00111110 (62)• .00111111

Page 30: Addressing & subneting - · PDF fileAddressing •to identify and locate each host. We call it “addressing”. • Identification: hostname, address (MAC, IP) • IP add ? MAC add

Example 5:

• Primary network 192.168.10.0/24• Hosts per network: 30• Number subnets: 4• Borrows bits ?• Subnets ?• IP add for hosts ?