Presentation is loading. Please wait.

Presentation is loading. Please wait.

Routing and Addressing

Similar presentations


Presentation on theme: "Routing and Addressing"— Presentation transcript:

1 Routing and Addressing
Layer 3 Routing and Addressing

2 Layer 3 Responsibilities
move data through a set of networks use a hierarchical addressing scheme (opposed to MAC addressing, which is flat) segment network and control flow of traffic reduce congestion talk to other networks

3 Layer 3 Devices Routers interconnect network segments or entire networks make logical decisions based on IP addresses determine best path for data on an internetwork (routing of packets)

4 Path Determination the process the router uses to choose the next hop in the path the packet travels The router uses the network address to identify the destination network of a packet within an internetwork. IP addresses can be assigned by a network administrator or automatically (dynamically).

5 Routers connect separate networks, routers make best path decisions based on Layer 3 information, and routers actually switch packets from incoming ports to appropriate outgoing ports. Without routers you could not connect separate networks efficiently, there would be no devices intelligent enough to route packets along a best path nor to switch them to that best path.

6 Layer 3 Packet/Datagram
Header includes source AND destination addresses

7 Network Layer Addresses
IP addresses are 32 bits long. They are represented as four octets in dotted decimal format. The IP address has two components: The network ID The host ID

8

9 Layer 3 Addresses Network ID Host ID assigned by ARIN (www.arin.net)
identifies the network to which a device is attached may be identified by one, two, or three of the first three octets Host ID assigned by a network administrator identifies the specific device on that network may be identified by one, two, or three of the last three octets

10 IP Addresses Class A N H Class B Class C
32 bit address represented as 8 bit dotted decimals different class addresses reserve different amounts of bits for the network and host portions of the address Class A N H Class B Class C

11 Number of Hosts The maximum number of hosts vary for each class.
Class A has 16,777,214 available hosts (224 –2) Class B has 65,534 available hosts (216 –2) Class C has 254 available hosts (28 –2) The first address in each network is reserved for the network address and the last address is reserved for the broadcast address.

12 Classes How do you know what class an IP address is in?
0–127 Class A address Class B address 192–223 Class C address 224–239 Class D - Multicast 240–255 Class E - Research

13 There are certain IP address ranges reserved for private IP addressing schemes. Not everyone needs connectivity to the Internet. Another relevant discussion is IP address depletion. Various schemes are being pursued to deal with IP address depletion. First there is NAT. Second there is CIDR. Third there is IP v6. While all of these have there benefits, you should be well-grounded in classful IP addresses.

14 Recognizing Class in Binary Format
1 Class C Class B Class A 32s place 64s place 128s place Initial bit pattern in first octet of IP address.

15 Reserved Addresses Network Address (wire address) – This is an IP address that ends with binary 0s in the host part of the address. Class A network address example: Hosts on a network can only communicate directly with other hosts if they have the same network ID. If they don’t, they will not be able to communicate unless there is another device connecting the networks.

16 (Remember decimal 255 = binary 11111111)
Reserved Addresses Broadcast Address – is used to send data to all of the devices on a network. Broadcast IP addresses end with binary 1s in the host part of the address. Class B broadcast address example: (Remember decimal 255 = binary )

17 For a Class A address 99. 0 would be a reserved network number and 99
For a Class A address would be a reserved network number and would be a broadcast number. For a Class B address would be a reserved network "wire" number and would be a broadcast number. For a Class C address would be a reserved network number and would be a broadcast number. Once subnets are created, the reserved network numbers and broadcast numbers become less obvious and require more work to compute.

18 You must recognize the number of bits in the network and host portions of all three classes of IP addresses. If you can recognize this, then it is a matter of powers of 2 to determine how many hosts are intrinsically part of classful IP addressing. Remember that the first address on each segment is reserved for the network number and the final address on each segment is reserved for broadcasts.

19 Network administrators sometimes need to divide networks, particularly large networks, into smaller networks, called subnetworks, in order to provide extra flexibility. Most of the time subnetworks are simply referred to as subnets.

20 The primary reason for using a subnet is to reduce the size of a broadcast domain. Broadcasts are sent to all hosts on a network or subnetwork. When broadcast traffic begins to consume too much of the available bandwidth, network administrators may chose to reduce the size of the broadcast domain.

21 An unfortunate by-product of creating subnetworks is that the reserved network and broadcast numbers now exist for each and every subnetwork created. Thus entire blocks of IP addresses, which begin with these subnetwork ID and subnetwork broadcast numbers, are wasted. So the network administrator must strike a balance between the number of subnets required, the hosts per subnet that is acceptable, and the resulting waste of addresses.

22 Basics of Subnetting Subnetworks are smaller divisions of networks.
They provide addressing flexibility. Subnet addresses are assigned locally, usually by a network administrator. Subnets reduce a broadcast domain.

23 Subnet Addresses Include Class A, B, or C network portion plus a subnet field and a host field. Bits are borrowed from the host field and are designated as the subnet field. Network Subnet Host

24 How many bits can I borrow?
The minimum number of bits you can borrow is two. Size of Host Field Maximum # of borrowed bits Class A 24 22 Class B 16 14 Class C 8 6

25 To create a subnet address, a network administrator borrows bits from the host field and designates them as the subnet field. The minimum number of bits that can be borrowed is 2. If you were to borrow only 1 bit, to create a subnet, then you would only have a network number - the .0 network - and the broadcast number - the .1 network. The maximum number of bits that can be borrowed can be can any number that leaves at least 2 bits, remaining, for the host number.

26 The longer name for subnet mask is instructive -- "extended network prefix". The mask's ones show how far we are extending the network number (at the expense of the host numbers).

27 Default Subnet Masks Class A 255.0.0.0 Class B 255.255.0.0
Class C

28 Calculating a Subnet We will subnet the IP address:
What class IP address is this? Class C

29 Step #1 Determine the default subnet mask Class C default subnet mask:

30 Step #2 Determine the number of subnets needed and the number of hosts needed on each subnet to determine how many bits to borrow from the host ID. Need: 13 subnets 10 hosts on each subnet

31 Step #3 Figure the actual number of subnets and hosts by borrowing bits from host ID. Let’s see how many subnets and hosts we will have by borrowing 4 bits from the host.

32 16 possible hosts for each subnet
Step #3 continued… X X X X H H H H 16 possible subnets 16 possible hosts for each subnet

33 Step #3 continued… We get 16 possible subnets and 16 possible hosts for each subnet because: For the 4 bits borrowed each bit can be a 1 or a 0 leaving you with 24 or 16 possible combinations. The same goes for the 4 leftover host bits. Important: There are only 14 available subnets and hosts on each subnet. Why?

34 Step #3 continued… Because you cannot use the first and last subnet.
Because you cannot use the first and last address within each subnet. For each, one is the broadcast address and one is the network address.

35 Step #4 Determine the subnet mask. 223.14.17.0
X X X X H H H H Where X represents the borrowed bits for subnetting.

36 Step #4 continued… Add the place values of X together to get the last octet decimal value of the subnet mask. = 240 The subnet mask is: The subnet mask is used to reveal the subnet and host address fields in IP addresses.

37 Step 5 Determine the ranges of host addresses for each subnet.
Subnet Bits Host Bits In Decimal 1 0000 2 0001 3 0010 4 0011 5 0100 6 0101 7 0110 8 0111

38 Step 5 continued… Subnet # Subnet Bits Host Bits In Decimal 9 1000
10 1001 11 1010 12 1011 13 1100 14 1101 15 1110 16 1111

39 Step 5 continued… There are 16 possible subnets.
There are 16 possible hosts on each subnet. That equals 256 possible hosts. What are our available subnets? What are our available hosts on each subnet? Why?????

40 Figuring Subnet Network Addresses
Step #1: Change the IP host address to binary. Step #2: Change the subnet mask to binary. Step #3: Use the boolean operator AND to combine the two. Step #4: Convert the network binary address to dotted decimal.

41 Figuring Subnet Network Addresses
IP Host Subnet Mask AND This is the subnet network address. It is the lowest numbered address on the subnet network. It can help determine path.

42 Types of IP Addressing Problems
Problem: Given and needing 8 usable subnets, find the subnetwork numbers, the ranges of host numbers, and subnetwork broadcast numbers.

43 SOLUTION: IP Address is a class C. Default subnet mask is We need to extend the network number by enough bits to give 8 usable subnets. Stealing 2 bits yields 2 usable subnets, stealing 3 bits yields 6 usable subnets, so we must steal 4 bits to get 14 usable subnets, of which we needed 8. This makes the subnet mask So the Network number is NNNN HHHH where Ns stand for network extension bits (subnets) and Hs stand for host numbers. Next we must number the subnets; there are 16 combinations of 4 bit binary numbers but they retain their place value within the last octet.

44 The key to understanding the result of the Boolean ANDing of an IP address and a subnet mask is to realize that once created, subnetworks are valid network numbers as far as the "outside" world is concerned. So as with the earlier calculation, the bit-by-bit ANDing of the IP address and the subnet mask gives the subnetwork number.

45 The router performs the Boolean operations, the most important of which is the AND operation. In order to find the network ID of a subnet, the router must take the IP address, and the subnet mask, and logically, AND them together. The resulting number is the network/subnetwork number.

46 Check Your Understanding
Lab Activities Check Your Understanding Journal


Download ppt "Routing and Addressing"

Similar presentations


Ads by Google