Addressing & Subneting

Post on 27-Oct-2014

49 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

Transcript

1

Addressing & Subnettingfor Exploration-S1

PDF created with pdfFactory trial version www.pdffactory.com

2

Addressing

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

• Identification: hostname, address (MAC, IP)– IP address ? MAC add ?

• MAC address: local• IP address: internetwork

• An address generally represents the connection to the network

PDF created with pdfFactory trial version www.pdffactory.com

3

Addressing

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

PDF created with pdfFactory trial version www.pdffactory.com

4

IP Address (IPv4)

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

PDF created with pdfFactory trial version www.pdffactory.com

5

IP Addressing Structure

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

address (net-id).• 2 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 address• Network address= IP address AND Subnet mask

PDF created with pdfFactory trial version www.pdffactory.com

6

IP Addressing Structure

• 32-bit address is expressed in Dotted decimal

• Network portion

• Host portion

• Octet

PDF created with pdfFactory trial version www.pdffactory.com

7

Subnet Mask

• The subnet mask is 32-bit pattern and created by – placing a binary 1 in each bit position that represents the network

portion and – placing a binary 0 in each bit position that represents the host

portion. • The prefix and the subnet mask are different ways of representing the

same thing - the network portion of an address. – The number of bits of an address used as the network portion is

called the prefix length.• In 8-bit pattern, there are:

00000000 = 0 11110000 = 24010000000 = 128 11111000 = 24811000000 = 192 11111100 = 25211100000 = 224 11111110 = 254

11111111 = 255

PDF created with pdfFactory trial version www.pdffactory.com

8

Defining the Network and Host Portions

PDF created with pdfFactory trial version www.pdffactory.com

9

Defining the Network and Host Portions

PDF created with pdfFactory trial version www.pdffactory.com

10

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 of broadcast domain ?

PDF created with pdfFactory trial version www.pdffactory.com

11

Example 2:

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

H: hhhhhhhh0000000000000001000000100000001100000100…

1111111011111111

PDF created with pdfFactory trial version www.pdffactory.com

12

Example 3:

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

• IP address : 11000000.10101000.01100100.00000001

• SM : 11111111.11111111.11111111.00000000

• Net address : 11000000.10101000.01100100.00000000

PDF created with pdfFactory trial version www.pdffactory.com

13

Example 4:

• IP address: 96.168.100.1• Subnet mask: 255.255.224.0• Net address: ?

• IP address : 01100000.10101000.01100100.00000001

• SM : 11111111.11111111.11100000.00000000

• Net address : 01100000.10101000.01100000.00000000

PDF created with pdfFactory trial version www.pdffactory.com

14

Hierachical addressing scheme

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

PDF created with pdfFactory trial version www.pdffactory.com

15

Classes of IP Addresses

• Class A addresses are assigned to larger networks.

• Class B addresses are used for medium-sized networks

• Class C for small networks.

PDF created with pdfFactory trial version www.pdffactory.com

16

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)

PDF created with pdfFactory trial version www.pdffactory.com

17

Classes of IP Addresses

PDF created with pdfFactory trial version www.pdffactory.com

18

Type of Address in an IPv4 Network

• Three types of addresses:– Network address - The address by which we refer

to the network. All hosts in a network will have the same network bits.

– Broadcast address - A special address used to send data to all hosts in the network. The broadcast address uses the highest address in the network range. This is the address in which the bits in the host portion are all 1s. This address is also referred to as the directed broadcast.

– Host addresses - The addresses assigned to the end devices in the network

PDF created with pdfFactory trial version www.pdffactory.com

19

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.

PDF created with pdfFactory trial version www.pdffactory.com

20

Network Address

PDF created with pdfFactory trial version www.pdffactory.com

21

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– Ping 255.255.255.255

PDF created with pdfFactory trial version www.pdffactory.com

22

Broadcast Address

PDF created with pdfFactory trial version www.pdffactory.com

23

Extra: 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 1s (255.255.255.255) or all 0s (0.0.0.0).

– Directed broadcast - A packet is sent to a specific destination address where only the host portion of the IP address is either all 1s or all 0s (such as 192.20.255.255 or 190.20.0.0).

PDF created with pdfFactory trial version www.pdffactory.com

24

Host address

PDF created with pdfFactory trial version www.pdffactory.com

25

PDF created with pdfFactory trial version www.pdffactory.com

26

Calculating Network, Hosts & Broadcast Addresses

• Practice 6.2.2

PDF created with pdfFactory trial version www.pdffactory.com

27

Type of Communication

• Three types: Unicast, Broadcast, Multicast

PDF created with pdfFactory trial version www.pdffactory.com

28

Unicast

• Is used for the normal host-to-host communication in both a client/server and a peer-to-peer network.

• Uses the host address of the destination device as the destination address and can be routed through an internetwork.

PDF created with pdfFactory trial version www.pdffactory.com

29

Broadcast

• The process of sending a packet from one host to all hosts in the network

• Host processes a broadcast address destination packet like unicast address. – A directed broadcast is sent to all hosts on a specific network. – The limited broadcast is used for communication that is limited to

the hosts on the local network.

PDF created with pdfFactory trial version www.pdffactory.com

30

Multicast

• The process of sending a packet from one host to a selected group of hosts.

• Multicast transmission is designed to conserve the bandwidth of the IPv4 network.

• The multicast clients use services initiated by a client program to subscribe to the multicast group.

PDF created with pdfFactory trial version www.pdffactory.com

31

Reserved IPv4 Address Ranges

PDF created with pdfFactory trial version www.pdffactory.com

32

Public and Private addresses

PDF created with pdfFactory trial version www.pdffactory.com

33

Public IP Addresses

• Public Addresses: are designed to be used in the hosts that are publicly accessible from the Internet.•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).

PDF created with pdfFactory trial version www.pdffactory.com

34

Private IP Addresses

• Private Addresses: are set aside for use in private networks.• Network Address Translation (NAT): is used to translate private addresses to public addresses, be implemented on a device at the edge of the private network.

PDF created with pdfFactory trial version www.pdffactory.com

35

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.

10.0.0.0 /8172.16.0.0 /12192.168.0.0 /16

PDF created with pdfFactory trial version www.pdffactory.com

36

Using Private Addresses

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

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

PDF created with pdfFactory trial version www.pdffactory.com

37

Special IPv4 Addresses

• TEST-NET Addresses– The address block 192.0.2.0 to 192.0.2.255 (192.0.2.0 /24) is set aside for

teaching and learning purposes. These addresses can be used in documentation and network examples. Unlike the experimental addresses, network devices will accept these addresses in their configurations

• Network Addresses• Broadcast Addresses• Default Route

– 0.0.0.0/0• Loopback: 127.0.0.0/8• Link-Local Addresses

– 169.254.0.0 to 169.254.255.255 (169.254.0.0 /16)

– These addresses can be automatically assigned

– APIPA ( Automatic Private IP Addressing )

PDF created with pdfFactory trial version www.pdffactory.com

38

Extra: 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• Net.all 0s – Network address, exp: 192.168.1.0• 127.anything (often 1) - Loopback, exp: 127.0.0.1• Exp: ping 0.0.0.0

0.0.6.156255.255.255.25510.0.6.255

PDF created with pdfFactory trial version www.pdffactory.com

39

Legacy IPv4 Addressing

PDF created with pdfFactory trial version www.pdffactory.com

40

Legacy IPv4 Addressing

• Classful addressing: A company or organization was assigned an entire class A, class B, or class C address block.– Limits to the Class-based System

• Classful allocation of address space often wasted many addresses, which exhausted the availability of IPv4 addresses.

• Classless Addressing– Address blocks appropriate to the number of hosts

are assigned to companies or organizations without regard to the unicast class.

PDF created with pdfFactory trial version www.pdffactory.com

41

IP addressing crisis

• Address Depletion• Internet Routing Table Explosion

PDF created with pdfFactory trial version www.pdffactory.com

42

PDF created with pdfFactory trial version www.pdffactory.com

43

PDF created with pdfFactory trial version www.pdffactory.com

44

PDF created with pdfFactory trial version www.pdffactory.com

45

Subnetting

• Exp:• Net address: 192.168.100.0; SM: 255.255.255.0; usable host addresses:2^8-2=254• If hosts per network is 60 à used: 6 host bits: xxhhhhhh, 2^6-2=62 hosts;

unused: 2 host bitsxxhhhhhhxx000000 (0)xx000001xx000010…xx111110xx111111 (63)

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

• Net 1: 172.16.0.0• Net 2: 172.17.0.0• Net 3: 172.18.0.0• Net 4: 172.19.0.0• Usable hosts per network : 2^16-2= 65534 !!!

PDF created with pdfFactory trial version www.pdffactory.com

46

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.

PDF created with pdfFactory trial version www.pdffactory.com

47

Subnetting

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

• Providing broadcast contentment and low level security.

PDF created with pdfFactory trial version www.pdffactory.com

48

Subnetting

• 1 net address: 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.0192.168.10.32192.168.10.64192.168.10.96

.128…192.168.10.192192.168.10.224

Exp:

xxxhhhhh

000 (0)

001 (32)

010 (64)

011 (96)

100 (128)

101 (160)

110 (192)

111 (224)

PDF created with pdfFactory trial version www.pdffactory.com

49

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 (previous !)

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

PDF created with pdfFactory trial version www.pdffactory.com

50

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

PDF created with pdfFactory trial version www.pdffactory.com

51

Other: Basic subnetting

PDF created with pdfFactory trial version www.pdffactory.com

52

Other: Basic subnetting

PDF created with pdfFactory trial version www.pdffactory.com

53

Other: Basic subnetting

PDF created with pdfFactory trial version www.pdffactory.com

54

Example 5:

• Primary network 192.168.10.0/24• Number of hosts per network: 60• Number of subnets: 4• Borrows bits ?• Subnetwork address ?• Subnet Mask ?• Host Range ?• Broadcast address ?

PDF created with pdfFactory trial version www.pdffactory.com

55

Calculating subnets with VLSM

4 subnets of 62 hosts4 links of 2 hosts

PDF created with pdfFactory trial version www.pdffactory.com

56

Calculating subnets with VLSM

172.16.0010xxxx.xxhhhhhh/26

172.16.0010hhhh.hhhhhhhh/20

PDF created with pdfFactory trial version www.pdffactory.com

57

Calculating subnets with VLSM

• 4 subnets of 62 hosts: – 172.16.32.0/26– 172.16.32.64/26– 172.16.32.128/26– 172.16.32.192/26

• 4 links of 2 hosts:– 172.16.33.0/26 is further subnetted with a prefix of

/30.

PDF created with pdfFactory trial version www.pdffactory.com

58

Calculating subnets with VLSM

• 172.16.33.0/26 is further subnetted:– 172.16.33.00xxxxhh/30– 172.16.33.000000hh à 172.16.33.0/30– 172.16.33.000001hh à 172.16.33.4/30– 172.16.33.000010hh à 172.16.33.8/30– 172.16.33.000011hh à 172.16.33.12/30

PDF created with pdfFactory trial version www.pdffactory.com

59

Calculating subnets with VLSM

PDF created with pdfFactory trial version www.pdffactory.com

60

Example 2

• Your company has been given the network address 172.16.32.0/19. After careful planning, looking at current needs and expansion, you realize you need a maximum of three subnets of 1000 hosts, three subnets of 250 hosts, and several subnets for serial point-to-point links.

PDF created with pdfFactory trial version www.pdffactory.com

61

Example 2

• 172.16.32.0/19• 172.16.00100000.00000000• Subnets of 1000 hosts: need 10 host bits

– 172.16.001xxxhh.hhhhhhhh/22– 172.16.001000hh.hhhhhhhhà172.16.32.0– 172.16.001001hh.hhhhhhhhà172.16.36.0– 172.16.001010hh.hhhhhhhhà172.16.40.0– 172.16.001011hh.hhhhhhhhà172.16.44.0– 172.16.001100hh.hhhhhhhhà172.16.48.0– 172.16.001101hh.hhhhhhhhà172.16.52.0– 172.16.001110hh.hhhhhhhhà172.16.56.0– 172.16.001111hh.hhhhhhhhà172.16.60.0

PDF created with pdfFactory trial version www.pdffactory.com

62

Example 2

• 3 subnets of 1000 hosts:– 172.16.32.0/22– 172.16.36.0/22– 172.16.40.0/22

• Subnets of 250 hosts: need 8 host bits• To sub-subnet the subnet 172.16.44.0/22

PDF created with pdfFactory trial version www.pdffactory.com

63

Example 2

• 172.16.44.0/22• 172.16.001011xx.hhhhhhhh/24• 172.16.00101100.hhhhhhhhà172.16.44.0• 172.16.00101101.hhhhhhhhà172.16.45.0• 172.16.00101110.hhhhhhhhà172.16.46.0• 172.16.00101111.hhhhhhhhà172.16.47.0

PDF created with pdfFactory trial version www.pdffactory.com

64

Example 2

• 3 subnets of 250 hosts:– 172.16.44.0/24– 172.16.45.0/24– 172.16.46.0/24

• Links of 2 hosts: need 2 host bits• To sub-subnet the subnet 172.16.47.0/24

PDF created with pdfFactory trial version www.pdffactory.com

65

Example 2

• 172.16.47.0/24• 172.16.47.xxxxxxhh/30• 172.16.47.000000hhà172.16.47.0/30• 172.16.47.000001hhà172.16.47.4• 172.16.47.000010hhà172.16.47.8• 172.16.47.000011hhà172.16.47.12• …

PDF created with pdfFactory trial version www.pdffactory.com

66

Other: Subnetting a Subnet

PDF created with pdfFactory trial version www.pdffactory.com

67

Other: Subnetting a Subnet

PDF created with pdfFactory trial version www.pdffactory.com

68

Other: Subnetting a Subnet

PDF created with pdfFactory trial version www.pdffactory.com

69

Other: Subnetting a Subnet

PDF created with pdfFactory trial version www.pdffactory.com

70

Other: Subnetting a Subnet

PDF created with pdfFactory trial version www.pdffactory.com

71

Other: Subnetting a Subnet

PDF created with pdfFactory trial version www.pdffactory.com

72

Other: Subnetting a Subnet

PDF created with pdfFactory trial version www.pdffactory.com

73

Other: Subnetting a Subnet

PDF created with pdfFactory trial version www.pdffactory.com

74

Other: Subnetting a Subnet

PDF created with pdfFactory trial version www.pdffactory.com

75

Other: Subnetting a Subnet

PDF created with pdfFactory trial version www.pdffactory.com

76

Other: Subnetting a Subnet

PDF created with pdfFactory trial version www.pdffactory.com

77

Other: Subnetting a Subnet

PDF created with pdfFactory trial version www.pdffactory.com

78

Other: Subnetting a Subnet

• Practice 6.5.4-6

PDF created with pdfFactory trial version www.pdffactory.com

top related