Presentation is loading. Please wait.

Presentation is loading. Please wait.

Number Systems.

Similar presentations


Presentation on theme: "Number Systems."— Presentation transcript:

1 Number Systems

2 Network Math

3 Binary presentation of data
The American Standard Code for Information Interchange (ASCII) is the most commonly used code for representing alpha-numeric data in a computer.

4 Bits and bytes

5 Base 10 number system – The Math
The decimal number system: based on powers of 10. Each column position of a value, from right to left, is multiplied by the number 10, which is the base number, raised to a power, which is the exponent. The power that 10 is raised to depends on its position to the left of the decimal point. 2134 = (2x103) + (1x102) + (3x101) + (4x100)

6 Base 10 (Decimal) Number System
Digits (10): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Number of: 10,000’s 1,000’s 100’s 10’s 1’s

7 Rick’s Number System Rules
All digits start with 0 A Base-n number system has n number of digits: Decimal: Base-10 has 10 digits Binary: Base-2 has 2 digits Hexadecimal: Base-16 has 16 digits The first column is always the number of 1’s Each of the following columns is n times the previous column (n = Base-n) Base 10: 10, , Base 2: Base 16: 65, ,

8 Base 2 number system – The Math
= (1 x 24 = 16) + (0 x 23 = 0) + (1 x 22 = 4) + (1 x 21 = 2) + (0 x 20 = 0) = 22 ( )

9 Base 2 (Binary) Number System
Digits (10): 0, 1 Number of: 128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’s Dec. 17 70 130 255

10 Converting between Decimal and Binary
Digits (10): 0, 1 Number of: 128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’s Dec. 172 192

11 0 1 Computers do Binary Bits have two values: OFF and ON
0 1 Bits have two values: OFF and ON The Binary number system (Base-2) can represent OFF and ON very well since it has two values, 0 and 1 0 = OFF 1 = ON Understanding Binary to Decimal conversion is critical in networking. Although we use decimal numbers in networking to display information such as IP addresses (LATER), they are transmitted as OFF’s and ON’s that we represent in binary.

12 Rick’s Program

13 Rick’s Program

14 Rick’s Program

15 IP Addressing Scheme Where the network part ends ant the host part begins depends on the subnet mask or classful address (coming). Divide into four 8 bit sections (octets). Convert from binary to decimal.

16 IP Addresses Dotted-Decimal Notation 10000011 01101100 01111010
The 32 bits of an IP address are grouped into 4 bytes:

17 IP Addresses We use dotted notation (or dotted decimal notation) to represent the value of each byte (octet) of the IP address in decimal.

18 An IP address has two parts:
IP Addresses An IP address has two parts: network number host number A third part will be added shortly: Subnet Part

19 IP Addresses Which bits refer to the network number?
Which bits refer to the host number? Answer: Classful IP Addressing Value of first octet determines the network portion and the host portion. Used with classful routing protocols like RIPv1. Classless IP Addressing (Next week) Value of first octet does NOT matter. The subnet mask determines the network portion and the host portion. Hosts and Classless Inter-Domain Routing (CIDR). Classless IP Addressing is what is used within the Internet and in most internal networks.

20 Classful IP Addressing
This chapter discusses Classful IP Addressing and Classful Subnetting. Next week we will discuss Classless IP Addressing and Classless Subnetting which is very similar to Classful.

21 Classful IP Addressing
There are 5 classes of IP addresses: Class A Class B Class C Class D Class E

22 Address Classes Class A Used for Internet hosts Class B
Class C Used for Internet hosts Class D Used for Internet multicasts Class E Unused (used “experimentally”) Computers on the Internet can only be addressed using Class A, Class B, or Class C addresses.

23 Determining Address Class
Class A First octet is between Class B First octet is between Class C First octet is between Class D First octet is between Class E First octet is between Computers on the Internet can only be addressed using Class A, Class B, or Class C addresses.

24 Address Classes Class A Network Host Host Host Class B Network Network
1st octet 2nd octet 3rd octet 4th octet Class A Network Host Host Host Class B Network Network Host Host Class C Network Network Network Host N = Network number assigned by ARIN (American Registry for Internet Numbers) H = Host number assigned by administrator

25 Address Classes Class A 85 45 31 158 Class B 168 65 114 201 Class C
210 144 235 56 Network Host

26 Looking at Classful IP Addresses
Which part is network, what is the network address, and what is the class? 1) 2) 3) 4) 5) 6) 7)

27 Looking at Classful IP Addresses
IP Address Network Address Class 1) Class C 2) Class A 3) Class A 4) Class C 5) Class C 6) Class B 7) Class C What are the range of hosts for each of these networks? All zeroes in the host portion is the network address All ones in the host portion is the broadcast address (coming).

28 Looking at Classful IP Addresses
1) Class C Network: Hosts: through Broadcast: 199 46 36 HOST 1 Network Address 254 Host Addresses 28 - 2 Etc. 1 Broadcast Address

29 Looking at Classful IP Addresses
1) Class C Network: Hosts: through Broadcast: 2) Class A Network: Hosts: through Broadcast: 3) Class A Network: Hosts: through Broadcast:

30 Looking at Classful IP Addresses
Your Turn! IP Address 4) Class C 5) Class C 6) Class B 7) Class B

31 Looking at Classful IP Addresses
4) Class C Network: Hosts: through Broadcast: 5) Class C Network: Hosts: through Broadcast: All zeroes in the host portion is the network address All ones in the host portion is the broadcast address (coming).

32 Looking at Classful IP Addresses
6) Class B Network: Hosts: through Broadcast: 7) Class B Network: Hosts: through Broadcast: All zeroes in the host portion is the network address All ones in the host portion is the broadcast address (coming).

33 IP Address Classes N = Network number assigned by ARIN (American Registry for Internet Numbers) H = Host number assigned by administrator

34 IP Addressing Network ID or Network Portion
Host on a network can only communicate directly with devices if they have the same network ID All zeros in the host portion of the address Routers use the network ID when it forwards data on the Internet This is only partially true. The router uses the subnet mask to determine the network ID, which is then used to forward data. Network IDs cannot be used as an address for any device that is attached to the network, such as hosts, router interfaces, etc.

35 Addressing: Network & Host
Routers are required when two hosts with IP addresses on different networks need to communicate. What are some example Host IP addresses?

36 IP Addressing Broadcast Address Used to send data to all devices on the network All ones in the host portion of the address All devices pay attention to a broadcast Broadcast addresses cannot be used as an address for any device that is attached to the network. What are the broadcast addresses for these networks?

37 Network IDs and ZIP Codes
Your Name 123 Main Street Anytown, ST 12345 Valencia Community College 1800 S Kirkman Rd Orlando, FL, 32811 ZIP codes direct your mail to your local post office and your neighborhood. The street address then directs the carrier to your home.

38 Subnets and Subnet Masks
Formalized in 1985, the subnet mask breaks a single class A, B or C network in to smaller pieces. A “1” bit in the subnet mask means that the corresponding bit in the IP address should be read as a network number A “0” bit in the subnet mask means that the corresponding bit in the IP address should be read as a host bit.

39 IPv4 Address Classes Class A Network Host Host Host Class B Network
1st octet 2nd octet 3rd octet 4th octet Class A Network Host Host Host Class B Network Network Host Host Class C Network Network Network Host

40 Class A addresses First octet is between 0 - 127 Network Host
8 bits 8 bits 8 bits With 24 bits available for hosts, there a 224 possible addresses. That’s 16,777,216 nodes! Number between There are 126 class A addresses. 0 and 127 have special meaning and are not used. 16,777,214 host addresses, one for network address and one for broadcast address. Only large organizations such as the military, government agencies, universities, and large corporations have class A addresses. Cable Modem ISPs have and Pacbell DSL users have Class A addresses account for 2,147,483,648 of the possible IPv4 addresses. That’s 50 % of the total unicast address space, if classful was still used in the Internet!

41 Class B addresses First octet is between 128 - 191 Network Network
Host Host 8 bits 8 bits With 16 bits available for hosts, there a 216 possible addresses. That’s 65,536 nodes! Number between There are 16,384 (214) class B networks. 65,534 host addresses, one for network address and one for broadcast address. Class B addresses represent 25% of the total IPv4 unicast address space. Class B addresses are assigned to large organizations including corporations (such as Cisco, government agencies, and school districts).

42 Class C addresses First octet is between 192 - 223 Network Network
Host 8 bits With 8 bits available for hosts, there a 28 possible addresses. That’s 256 nodes! Number between There are 2,097,152 possible class C networks. 254 host addresses, one for network address and one for broadcast address. Class C addresses represent 12.5% of the total IPv4 unicast address space.

43 Problems with IPv4 Addressing
Address Depletion Internet Routing Table Explosion

44 IP address shortage In the early days of the Internet, IP addresses were allocated to organizations based on request rather than actual need. No medium size - Hosts: Class A: 16 million (approx.) Class B: 65,536 Class C: 256 Subnet Mask The solution to the IP address shortage was thought to be the subnet mask. Formalized in 1985 (RFC 950), the subnet mask breaks a single class A, B or C network in to smaller pieces. Solutions to IP Address shortage Classless Inter-Domain Routing (CIDR) VLSM and Route Aggregation (supernetting, route summarization) NAT/PAT IPv6

45 The Subnet Mask The Subnet Mask corresponds to the IP address.
A “1” bit in the subnet mask means that the corresponding bit in the IP address should be read as a network number A “0” bit in the subnet mask means that the corresponding bit in the IP address should be read as a host bit. The Subnet Mask is a 32-bit number. Its job is to tell routers (and humans) which bits are network number and which bits are used to represent hosts.

46 The Default Subnet Masks (no subnets)
1st octet 2nd octet 3rd octet 4th octet Class A Network Host Host Host Class B Network Network Host Host Class C Network Network Network Host Class A or /8 Class B or /16 Class C or /24 A “1” bit in the subnet mask means that the corresponding bit in the IP address should be read as a network number A “0” bit in the subnet mask means that the corresponding bit in the IP address should be read as a host bit. /n “slash” tells us how many “1” bits are in the subnet mask.

47 The Default Subnet Masks (no subnets)
1st octet 2nd octet 3rd octet 4th octet Class A Network Host Host Host Class B Network Network Host Host Class C Network Network Network Host Class A or /8 255 Class B or /16 255 255 Class C or /24 255 255 255 A “1” bit in the subnet mask means that the corresponding bit in the IP address should be read as a network number A “0” bit in the subnet mask means that the corresponding bit in the IP address should be read as a host bit.

48 What is subnetting? Network Network Host Host 172 16 Network Subnet
Network Subnet Host Subnetting is the process of borrowing bits from the HOST bits, in order to divide the larger network into small subnets. Subnetting does NOT give you more hosts, but actually costs you hosts. You lose two host IP Addresses for each subnet, one for the subnet IP address and one for the subnet broadcast IP address. You lose the last subnet and all of it’s hosts’ IP addresses as the broadcast for that subnet is the same as the broadcast for the network. In older networks, you would have lost the first subnet, as the subnet IP address is the same as the network IP address. (This subnet can be used in most networks.)

49 Analogy 100 apples = 98 Usable Apples Before subnetting:
In any network (or subnet) we can not use all the IP addresses for host addresses. We lose two addresses for every network or subnet. 1. Network Address - One address is reserved to that of the network. For Example: /16 2. Broadcast Address – One address is reserved to address all hosts in that network or subnet. For Example: This gives us a total of 254 usable hosts                                                                                                                                

50 Analogy 10 barrels x 10 apples = 100 apples 10 10 10
                                                                                                                                                                                                98 Apples (100 – 2) 10 10 10 10 10 10 It is the same as taking a barrel of 100 apples and dividing it into 10 barrels of 10 apples each. 10

51 X 9 barrels x 8 apples = 72 apples 8 8 8 98 Apples (100 – 2) 8 8 8 8 8
2 = 1 network address + 1 broadcast address 9 barrels x 8 apples = 72 apples 8 8 8                                                                                                                                                                                                 (less 2) (less 2) (less 2) 98 Apples (100 – 2) 8 8 8 (less 2) (less 2) (less 2) 8 8 8 (less 2) (less 2) (less 2) However, in subnetting we will see that we lose two apples per subnet, one for the address and one for the broadcast. We also lose the last basket of apples, subnet, as it contains the broadcast address for the entire network. In older networks, we also lost the first basket, subnet, as it contained the address of the entire network, but this is usually no longer the case. X 10 X

52 Subnetting a Class C Address
Network Network Network Host Address 207 21 54 255 255 255 Default Mask Network Network Network Host 8 bits With 8 bits available for hosts, there a 28 possible addresses. That’s 256 nodes! Number between

53 Subnetting a Class C Address
Network Network Network Host Address 207 21 54 255 255 255 Default Mask Network Address: (note this address) Default Mask: (/24) Broadcast Address: (note this address) Hosts: through

54 Class C: 4-bit Mask (/28) Network Network Network Subnet Host 207 21
54 Address Subnet Mask 255 255 255 240 Network Address: (note this address) Broadcast Address: (note this address) Default Mask: Subnet Mask:

55 What are the hosts for each subnet?
/28 (Subnet mask ) What are the hosts for each subnet? Subnets /28 /28 /28 /28 /28 /28 /28 /28 /28 /28 /28 /28 /28 /28 /28 /28

56 14 Usable Hosts 207.21.54.0/28 (Subnet mask 255.255.255.240) 11001111
Network Address /28 /28 /28 /28 /28 /28 /28 14 Usable Hosts /28 /28 /28 /28 /28 /28 /28 /28 Broadcast Address /28

57 /28 (Subnet mask ) Subnets /28 Can use the first subnet on newer networks, even though the subnet address is the same as the address for the entire network. /28 /28 /28 /28 /28 15 usable subnets with 14 hosts per subnet = 210 usable hosts. (Lose 2 hosts per subnet, subnet and broadcast.) (254 without subnetting) /28 /28 /28 /28 /28 /28 Can’t use last subnet, because the broadcast address for that subnet is , the same as the broadcast address for the entire network. You lose all those hosts. /28 /28 /28 /28

58 Other subnetting options…
Network Network Network Subnet Host 207 21 54 Address Subnet Mask 255 255 255 240 What Subnet Mask to use?: More subnets, but fewer hosts per subnet. Fewer subnets, but more hosts per subnet. Choose mask that gives you enough hosts for your largest subnet, but also gives you enough subnets, including future expansion. Better Solutions: RFC 1918 – Priviate Address Space (next week) VLSM (Variable Length Subnet Masks) – Semester 2

59 Class C: 2-bit Mask (/26) 3 usable subnets, 62 usable hosts per subnet
Network Network Network Sub Host 207 21 54 Address Mask 255 255 255 192

60 Class C: 3-bit Mask (/27) 7 usable subnets, 30 usable hosts per subnet
Network Network Network Sub Host 207 21 54 Address Mask 255 255 255 224

61 Class C: 4-bit Mask (/28) 15 usable subnets, 14 usable hosts per subnet Network Network Network Sub Host 207 21 54 Address Mask 255 255 255 240

62 Class C: 5-bit Mask (/29) 31 usable subnets, 6 usable hosts per subnet
Network Network Network Sub Host 207 21 54 Address Mask 255 255 255 248

63 Class C: 6-bit Mask (/30) 63 usable subnets, 2 usable hosts per subnet
Network Network Network Sub Host 207 21 54 Address Mask 255 255 255 252

64 Logical And – Why Why: The logical AND function is used to extract the subnet ID from a host IP address and its subnet Mask Question: With out using the table from the previous group exercise, can you tell to which subnet the host belongs???

65 Logical And – How Host IP Address (in binary format) AND
Subnet Mask (in binary format) = Subnet ID 1 And 1 = 1 1 And 0 = 0 0 And 0 = 0 0 and 1 = 0 Short cut: X And 255 = X X And 0 = 0

66 Logical AND Exercise Given the IP Address: 199.10.10.110/248
What is the subnet mask? How many bits were borrowed? How many subnets were created What is the number of theoretical hosts per subnet? Using the Logical And function, find the subnet ID where the host resides What is the broadcast address for this subnet?

67 Example Say company XYZ was assigned a Class C network number of /24 (apologies to anyone who may actually own this domain address:). You want to utilize this network between two departments within the company. You can do this by subnetting that network. Break this network into 4 subnets of 32 IP addresses each. Connect the subnets Using layer three devices (Routers).

68 Building the Topology Now, we will use real Cisco routers and switches to connect two LANs (Let’s say, the HR department LAN and the IT department LAN) During this lab make sure that you take the time to do the following: Check the different types of interfaces that a router can have Know what each type of an interface is used for Know what type of cable is used with each interface Ask Questions

69 Default Gateway The role of Routers in connecting subnets
What is a Gateway? Combination of software and hardware that enable two different network segments to exchange data Examples: Cisco Routers, Linksys routes, Linux servers with multiple NICs and routing services installed, windows 2000 server with multiple NICs and RRAS installed. The IP address of a router’s port through which a network is connected to the router Every device has to have a default gateway to communicate with other devices outside its network

70

71 Building The Topology with Packet Tracer
Interconnect Devices Simulate how a Packet traverses a simple WAN How would it be if we added a third network to the diagram, Let’s say Admin LAN?

72 Subnetting Class B

73 Subnet Example Class B address 172.16.0.0
Using Subnets: subnet mask or /22 Network Subnet Host Default Subnet Mask: or /16 New Subnet Mask: or /22 Applying a mask which is larger than the default subnet mask, will divide your network into subnets. Class B default subnet mask is or /16 Subnet mask used here is or /22

74 Subnet Example Class B address 172.16.0.0
Using Subnets: subnet mask or /22 Network Subnet Host Subnets 172 16 Host 172 16 4 Host 172 16 8 Host 63 Subnets 26 - 1 172 16 12 Host 172 16 Etc. Host 172 16 248 Host Cannot use last subnet as it contains broadcast address 172 16 252 Host

75 Putting it all together!

76 Putting it all together!
B Given the following Host IP Address and Subnet mask fill in the blanks including: Subnet Address Range of Host Addresses Broadcast Address

77 Putting it all together!
Step 1: Translate Host IP Address and Subnet Mask into binary notation

78 Putting it all together!
B Step 2: Determine the Network (or Subnet) where this Host address lives: 1. Draw a line under the mask 2. Perform a bit-wise AND operation on the IP Address and the Subnet Mask 1 AND 1 results in a 1 0 AND anything results in a 0 3. Express the result in Dotted Decimal Notation 4. The result is the Subnet Address of this Subnet or “Wire” which is

79 Putting it all together!
B More on the bit-wise AND operation to determine Subnet Address Performed on the IP Address and the Subnet Mask 1 AND 1 results in a 1 0 AND anything results in a 0 End result is to get the Subnet (or Network) address: Copy all bits in IP address that is above the 1’s in the subnet mask The rest of the bits to the right are 0’s

80 Putting it all together!
B Step 3: Determine which bits in the address contain Network information and which contain Host information: Divide the Classful address (Great Divide) from the rest of the address. Divide the subnet from the hosts (Small Divide) between the last “1” and the first “0” in the subnet mask.

81 Host Portion First Host: all 0’s and a 1 Last Host: all 1’s and a 0
B Host Portion First Host: all 0’s and a 1 Last Host: all 1’s and a 0 Broadcast: all 1’s

82 All in one page! B

83 Maximum number of Subnet The number of subnets to the second power.
Number of Subnet bits Number of bits in the subnet mask which are greater than the default mask. Maximum number of Subnet The number of subnets to the second power. 102 = 1,024 Subtract the last one which is the broadcast subnet = 1,023 Some documentation says subtract two, first and last = 1,022

84 Ordinal Number of this Subnet
This will tell you which number is this subnet in the list. Use the number of subnet bits, 10. = subnet = subnet 5 = subnet Etc. = subnet = subnet 459 = subnet Etc. = subnet = subnet 1,023

85 Case 1 What is the subnet mask for this network?
Suppose you are given the IP address and wish to connect Springfield and Bedrock to Southpark. Create an IP addressing scheme that will meet the following requirements: A: Each subnet must support between 25 and 30 devices. B: You must have enough subnets to address each network. What is the subnet mask for this network? What is the broadcast address of the 3rd subnet? On the diagram, assign a subnet address to each network and give each router interface an appropriate IP address for that network.

86 Case 1 Answer

87 Case 2 Given the IP address with a subnet mask of Answer the following: How many bits were borrowed? How many subnets have been created? How many host address per subnet? What is the subnet address of the network containing the given IP address? What is the broadcast address of the network containing the given IP address?

88 Case 2 Answer A: 2 B: 4 C: 64 D: E:


Download ppt "Number Systems."

Similar presentations


Ads by Google