1 / 88

# Number Systems

Number Systems. Network Math. www.thinkgeek.com. 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. Bits and bytes. Base 10 number system – The Math.

Télécharger la présentation

## Number Systems

E N D

### Presentation Transcript

1. Number Systems

2. Network Math www.thinkgeek.com

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: 104 103 102 101 100 10,000’s1,000’s100’s10’s1’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,000 1,000 100 10 1 • Base 2: 16 8 4 2 1 • Base 16: 65,536 4,096 256 16 1

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

9. Base 2 (Binary) Number System Digits (10): 0, 1 Number of: 27 26 25 24 23 22 21 20 128’s64’s32’s16’s8’s4’s2’s1’s Dec. 2 1 0 10 1 0 1 0 17 70 130 255

10. Converting between Decimal and Binary Digits (10): 0, 1 Number of: 27 26 25 24 23 22 21 20 128’s64’s32’s16’s8’s4’s2’s1’s Dec. 1 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 172 192

11. Computers do Binary 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 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. 10101001 11000111 01000101 10001001 16919969137

18. 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 Used for Internet hosts 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 0 - 127 Class B First octet is between 128 - 191 Class C First octet is between 192 - 223 Class D First octet is between 224 - 239 Class E First octet is between 240 - 255 Computers on the Internet can only be addressed using Class A, Class B, or Class C addresses.

24. Address Classes 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) 199.46.36.5 2) 111.211.11.1 3) 7.141.30.89 4) 222.8.56.107 5) 192.168.16.2 6) 63.100.5.1 7) 192.0.0.2

27. Looking at Classful IP Addresses IP Address Network Address Class 1) 199.46.36.5 192.46.36.0 Class C 2) 111.211.11.1 111.0.0.0 Class A 3) 7.141.30.89 7.0.0.0 Class A 4) 222.8.56.107 222.8.56.0 Class C 5) 192.168.16.2 192.168.16.0 Class C 6) 163.100.5.1 163.100.0.0 Class B 7) 192.0.0.2 192.0.0.0 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 IP Address 1) 199.46.36.5 Class C Network: 199.46.36.0 Hosts: 199.46.36.1 through 199.46.36.254 Broadcast: 199.46.36.255 199 46 36 HOST 1 Network Address 11000111 00101110 00100100 00000000 11000111 00101110 00100100 00000001 11000111 00101110 00100100 00000010 254 Host Addresses 28 - 2 11000111 00101110 00100100 00000011 11000111 00101110 00100100 Etc. 11000111 00101110 00100100 11111110 1 Broadcast Address 11000111 00101110 00100100 11111111

29. Looking at Classful IP Addresses IP Address 1) 199.46.36.5 Class C Network: 199.46.36.0 Hosts: 199.46.36.1 through 199.46.36.254 Broadcast: 199.46.36.255 2) 111.211.11.1 Class A Network: 111.0.0.0 Hosts: 111.0.0.1 through 111.255.255.254 Broadcast: 111.255.255.255 3) 7.141.30.89 Class A Network: 7.0.0.0 Hosts: 7.0.0.1 through 7.255.255.254 Broadcast: 7.255.255.255

30. Looking at Classful IP Addresses Your Turn! IP Address 4) 222.8.56.107 Class C 5) 192.168.16.2 Class C 6) 163.100.5.1 Class B 7) 192.0.0.2 Class B

31. Looking at Classful IP Addresses IP Address 4) 222.8.56.107 Class C Network: 222.8.56.0 Hosts: 222.8.56.1 through 222.8.56.254 Broadcast: 222.8.56.255 5) 192.168.16.2 Class C Network: 192.168.16.0 Hosts: 192.168.16.1 through 192.168.16.254 Broadcast: 192.168.16.255 • 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 IP Address 6) 163.100.5.1 Class B Network: 163.100.0.0 Hosts: 163.100.0.1 through 163.100.255.254 Broadcast: 163.100.255.255 7) 192.0.0.2 Class B Network: 192.0.0.0 Hosts: 192.0.0.1 through 192.0.0.254 Broadcast: 192.0.0.255 • 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 192.168.1.0 222.0.0.0 10.0.0.0 192.168.2.0 • 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 192.168.1.0 222.0.0.0 • 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? 10.0.0.0 192.168.2.0

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 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

41. 8 bits 8 bits Class B addresses • 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). First octet is between 128 - 191 Network Network Host Host With 16 bits available for hosts, there a 216 possible addresses. That’s 65,536 nodes! Number between 128 - 191

42. 8 bits Class C addresses • 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. First octet is between 192 - 223 Network Network Network Host With 8 bits available for hosts, there a 28 possible addresses. That’s 256 nodes! Number between 192 - 223

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 11111111 00000000 00000000 00000000 Class B or /16 11111111 11111111 00000000 00000000 Class C or /24 11111111 11111111 11111111 00000000 • 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 0 0 0 Class B or /16 255 255 0 0 Class C or /24 255 255 255 0 • 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. Network Network Subnet Host What is subnetting? Network Network Host 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.) 172 16 0 0

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: 207.21.54.0 /16 2. Broadcast Address – One address is reserved to address all hosts in that network or subnet. For Example: 207.21.54.255 This gives us a total of 254usable hosts

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

More Related