Number Systems. Network Math Binary presentation of data The American Standard Code for Information...
-
Upload
angelica-blair -
Category
Documents
-
view
220 -
download
3
Transcript of Number Systems. Network Math Binary presentation of data The American Standard Code for Information...
Number Systems
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
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)
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’s 1,000’s 100’s 10’s 1’s
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
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)
Base 2 (Binary) Number System
Digits (10): 0, 1
Number of:
27 26 25 24 23 22 21 20
128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’s
Dec.
2 1 0
10 1 0 1 0
17
70
130
255
Converting between Decimal and Binary
Digits (10): 0, 1
Number of:
27 26 25 24 23 22 21 20
128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’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
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.
Rick’s Program
Rick’s Program
Rick’s Program
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.
IP Addresses
The 32 bits of an IP address are grouped into 4 bytes:
Dotted-Decimal Notation
10000011 01101100 01111010 11001100
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 169 199 69 137
IP Addresses
An IP address has two parts: network number host number
A third part will be added shortly: Subnet Part
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.
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.
Classful IP Addressing
There are 5 classes of IP addresses: Class A Class B Class C Class D Class E
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.
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.
Address Classes
Class A
Class B
Class C
Network Host Host Host
Network Network Host Host
Network Network Network Host
1st octet 2nd octet 3rd octet 4th octet
N = Network number assigned by ARIN (American Registry for Internet Numbers)H = Host number assigned by administrator
Address Classes
Class A
Class B
Class C
85 45 31 158
168 65 114 201
210 144 235 56
Network Host
Looking at Classful IP Addresses
Which part is network, what is the network address, and what is the class?
1) 199.46.36.52) 111.211.11.13) 7.141.30.894) 222.8.56.1075) 192.168.16.26) 63.100.5.17) 192.0.0.2
Looking at Classful IP Addresses
IP Address Network Address Class1) 199.46.36.5 192.46.36.0 Class C2) 111.211.11.1 111.0.0.0 Class A3) 7.141.30.89 7.0.0.0 Class A4) 222.8.56.107 222.8.56.0 Class C5) 192.168.16.2 192.168.16.0 Class C6) 163.100.5.1 163.100.0.0 Class B7) 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).
Looking at Classful IP Addresses
IP Address1) 199.46.36.5 Class C
Network: 199.46.36.0 Hosts: 199.46.36.1 through 199.46.36.254Broadcast: 199.46.36.255
199 46 36 HOST
11000111 00101110 00100100 00000000
11000111 00101110 00100100 00000001
11000111 00101110 00100100 00000010
11000111 00101110 00100100 00000011
11000111 00101110 00100100 Etc.
11000111 00101110 00100100 11111110
11000111 00101110 00100100 11111111
1 Network Address
1 Broadcast Address
254 Host Addresses
28 - 2
Looking at Classful IP Addresses
IP Address1) 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
Looking at Classful IP Addresses
Your Turn! IP Address4) 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
Looking at Classful IP Addresses
IP Address4) 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).
Looking at Classful IP Addresses
IP Address6) 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).
IP Address Classes
N = Network number assigned by ARIN (American Registry for Internet Numbers)H = Host number assigned by administrator
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.
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?
192.168.1.0
192.168.2.0
222.0.0.0
10.0.0.0
IP Addressing
192.168.1.0
192.168.2.0
222.0.0.0
10.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?
Network IDs and ZIP Codes
Valencia Community College
1800 S Kirkman Rd
Orlando, FL, 32811
Your Name123 Main StreetAnytown, ST 12345
ZIP codes direct your mail to your local post office and your neighborhood. The street address then directs the carrier to your home.
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.
IPv4 Address Classes
Class A
Class B
Class C
Network Host Host Host
Network Network Host Host
Network Network Network Host
1st octet 2nd octet 3rd octet 4th octet
Class A addresses
Network Host Host Host
First octet is between 0 - 127
Number between 0 - 127
8 bits 8 bits 8 bits
With 24 bits available for hosts, there a 224 possible addresses. That’s 16,777,216 nodes!
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 24.0.0.0 and Pacbell DSL users have 63.0.0.0 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!
Class B addresses
Network Network Host Host
First octet is between 128 - 191
Number between 128 - 191
8 bits 8 bits
With 16 bits available for hosts, there a 216 possible addresses. That’s 65,536 nodes!
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).
Class C addresses
Network Network Network Host
First octet is between 192 - 223
Number between 192 - 223
8 bits
With 8 bits available for hosts, there a 28 possible addresses. That’s 256 nodes!
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.
Problems with IPv4 Addressing
Address Depletion Internet Routing Table Explosion
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
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.
The Default Subnet Masks (no subnets)
Class A or /8
Class B or /16
Class C or /24
11111111 00000000 00000000 00000000
11111111 11111111 00000000 00000000
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.
Class A
Class B
Class C
Network Host Host Host
Network Network Host Host
Network Network Network Host
1st octet 2nd octet 3rd octet 4th octet
The Default Subnet Masks (no subnets)
Class A or /8
Class B or /16
Class C or /24
255 0 0 0
255 255 0 0
255 255 255 0
Class A
Class B
Class C
Network Host Host Host
Network Network Host Host
Network Network Network Host
1st octet 2nd octet 3rd octet 4th octet
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.
What is subnetting?
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.)
Network Network Host Host
172 16 0 0
Network Network Subnet Host
Analogy
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 254 usable hosts
100 apples = 98 Usable Apples
Analogy
It is the same as taking a barrel of 100 apples and dividing it into 10 barrels of 10 apples each.
10
10
10
1010
10
10
10
10
10
10 barrels x 10 apples = 100 apples
98 Apples (100 – 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
(less 2) (less 2) (less 2)
(less 2) (less 2) (less 2)
(less 2) (less 2) (less 2)
8 8 8
8 8 8
8 8 8
10X
9 barrels x 8 apples = 72 apples
98 Apples (100 – 2)
2 = 1 network address + 1 broadcast address
Subnetting a Class C Address
255 255 255 0
207 21 54 0Address
Default Mask
Network Network Network Host
Class C address 207.21.54.0
11111111 11111111 11111111 00000000
Network Network Network Host
Number between 192 - 223
8 bits
With 8 bits available for hosts, there a 28 possible addresses. That’s 256 nodes!
Subnetting a Class C Address
Network Address: 207.21.54.0 (note this address)
Default Mask: 255.255.255.0 (/24) Broadcast Address: 207.21.54.255 (note this
address) Hosts: 207.21.54.1 through 207.21.54.254
255 255 255 0
207 21 54 0Address
Default Mask
Network Network Network Host
Class C address 207.21.54.0
11111111 11111111 11111111 00000000
Class C: 4-bit Mask (/28)
11001111 00010101 00110110 00000000
207 21 54 0Address
Subnet Mask
Network Network Network Host
11111111 11111111 11111111 11110000
255 255 255 240
Network Address: 207.21.54.0 (note this address) Broadcast Address: 207.21.54.255 (note this address)
Default Mask: 255.255.255.0 Subnet Mask: 255.255.255.240
Subnet
11001111 00010101 00110110
11001111 00010101 00110110
11001111 00010101 00110110
11001111 00010101 00110110
11001111 00010101 00110110
11001111 00010101 00110110
00000000
00010000
00100000
00110000
01000000
01010000
11001111 00010101 00110110 01100000
11001111 00010101 00110110 10000000
11001111 00010101 00110110 10010000
11001111 00010101 00110110 10100000
11001111 00010101 00110110 10110000
11001111 00010101 00110110 11000000
11001111 00010101 00110110 11010000
11001111 00010101 00110110 11100000
11001111 00010101 00110110 11110000
207.21.54.0/28
207.21.54.16/28
207.21.54.32/28
207.21.54.48/28
207.21.54.64/28
207.21.54.80/28
207.21.54.96/28
207.21.54.112/28
11001111 00010101 00110110 01110000
207.21.54.128/28207.21.54.144/28207.21.54.160/28207.21.54.176/28207.21.54.192/28207.21.54.208/28207.21.54.224/28207.21.54.240/28
207.21.54.0/28 (Subnet mask 255.255.255.240) SubnetsWhat are the hosts for each
subnet?
11001111 00010101 00110110 01100000 207.21.54.96/28
207.21.54.0/28 (Subnet mask 255.255.255.240)
11001111 00010101 00110110 01100001
11001111 00010101 00110110 01100010
11001111 00010101 00110110 01100011
11001111 00010101 00110110 01100100
11001111 00010101 00110110 01100101
11001111 00010101 00110110 01100110
11001111 00010101 00110110 01100111
11001111 00010101 00110110 01101000
11001111 00010101 00110110 01101001
11001111 00010101 00110110 01101010
11001111 00010101 00110110 01101011
11001111 00010101 00110110 01101100
11001111 00010101 00110110 01101101
11001111 00010101 00110110 01101110
11001111 00010101 00110110 01101111
207.21.54.97/28
207.21.54.98/28
207.21.54.99/28
207.21.54.100/28207.21.54.101/28207.21.54.102/28207.21.54.103/28207.21.54.104/28207.21.54.105/28207.21.54.106/28207.21.54.107/28207.21.54.108/28207.21.54.109/28207.21.54.110/28207.21.54.111/28
14 Usable Hosts
Network Address
Broadcast Address
11001111 00010101 00110110
11001111 00010101 00110110
11001111 00010101 00110110
11001111 00010101 00110110
11001111 00010101 00110110
11001111 00010101 00110110
00000000
00010000
00100000
00110000
01000000
01010000
11001111 00010101 00110110 01100000
11001111 00010101 00110110 10000000
11001111 00010101 00110110 10010000
11001111 00010101 00110110 10100000
11001111 00010101 00110110 10110000
11001111 00010101 00110110 11000000
11001111 00010101 00110110 11010000
11001111 00010101 00110110 11100000
11001111 00010101 00110110 11110000
207.21.54.0/28
207.21.54.16/28
207.21.54.32/28
207.21.54.48/28
207.21.54.64/28
207.21.54.80/28
207.21.54.96/28
207.21.54.112/28
11001111 00010101 00110110 01110000
207.21.54.128/28207.21.54.144/28207.21.54.160/28207.21.54.176/28207.21.54.192/28207.21.54.208/28207.21.54.224/28207.21.54.240/28
207.21.54.0/28 (Subnet mask 255.255.255.240)
Subnets
15 usable subnets with 14 hosts per subnet = 210 usable hosts. (Lose 2 hosts per subnet, subnet and broadcast.)
(254 without subnetting)
Can use the first subnet on newer networks, even though the subnet address 207.21.54.0 is the same as the address for the entire network.
Can’t use last subnet, because the broadcast address for that subnet is 207.21.54.255, the same as the broadcast address for the entire network. You lose all those hosts.
Other subnetting options…
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
11001111 00010101 00110110 00000000
207 21 54 0Address
Subnet Mask
Network Network Network Host
11111111 11111111 11111111 11110000
255 255 255 240
Subnet
Class C: 2-bit Mask (/26)
11001111 00010101 00110110 00000000
207 21 54 0Address
Mask
Network Network Network Host
11111111 11111111 11111111 11000000
255 255 255 192
3 usable subnets, 62 usable hosts per subnet
Sub
Class C: 3-bit Mask (/27)
11001111 00010101 00110110 00000000
207 21 54 0Address
Mask
Network Network Network Host
11111111 11111111 11111111 11100000
255 255 255 224
7 usable subnets, 30 usable hosts per subnet
Sub
Class C: 4-bit Mask (/28)
11001111 00010101 00110110 00000000
207 21 54 0Address
Mask
Network Network Network Host
11111111 11111111 11111111 11110000
255 255 255 240
15 usable subnets, 14 usable hosts per subnet
Sub
Class C: 5-bit Mask (/29)
11001111 00010101 00110110 00000000
207 21 54 0Address
Mask
Network Network Network Host
11111111 11111111 11111111 11111000
255 255 255 248
31 usable subnets, 6 usable hosts per subnet
Sub
Class C: 6-bit Mask (/30)
11001111 00010101 00110110 00000000
207 21 54 0Address
Mask
Network Network Network Host
11111111 11111111 11111111 11111100
255 255 255 252
63 usable subnets, 2 usable hosts per subnet
Sub
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 200.133.175.199 belongs???
Logical And – How
Host IP Address (in binary format)AND
Subnet Mask (in binary format)= Subnet ID
1 And 1 = 11 And 0 = 00 And 0 = 00 and 1 = 0Short cut: X And 255 = X
X And 0 = 0
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?
Example
Say company XYZ was assigned a Class C network number of 200.100.50.0/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).
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
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
iMac iMac iMac iMac iMac iMac iMac iMac
Rules1. Each router’s interface has to be on a separate network ( You can’t have two differentinterfaces on the same network)2. Each interface on the router has to be assigned an ip address and a subnet mask3. Routers’ interfaces usually take the first available IP address on a network4. Switches are layer 2 devices and do not need an IP address to work5. Each PC on the network must be configured with the correct IP properties. Your PC will needan IP address and a subnet mask to be able to communicate with other hosts on the samenetwork. Your PC will need a default gateway to be able to communicate with other hosts on adifferent network6. PCs and their Default Gateway must belong to the same network.
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?
Subnetting Class B
Subnet Example
Network Network Subnet Host
Class B address 172.16.0.0
Using Subnets: subnet mask 255.255.252.0 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 255.255.0.0 or /16 Subnet mask used here is 255.255.252.0 or /22
Default Subnet Mask: 255.255.0.0 or /16
New Subnet Mask: 255.255.252.0 or /22
11111111 11111111 00000000 00000000
11111111 11111111 11111100 00000000
Subnet Example
Network Network Subnet Host
Class B address 172.16.0.0
172 16 0 Host
172 16 4 Host
172 16 8 Host
Using Subnets: subnet mask 255.255.252.0 or /22
172 16 12 Host
172 16 Etc. Host
172 16 248 Host
172 16 252 Host
63 Subnets
26 - 1
Cannot use last subnet as it contains broadcast address
Subnets
Putting it all together!
Given the following Host IP Address and Subnet mask fill in the blanks including:
Subnet Address Range of Host Addresses Broadcast Address
Host IP Address
Class
Subnet Mask
No. of Subnet Bits
Maximum # of Subnets s = (n – 2)
Ordinal Number of this Subnet
138.101.114.250 255.255.255.192 Subnet Address of This Subnet or Wire
Range of Host Addresses For this subnet
Broadcast Address of This Subnet
B
Putting it all together!
Step 1: Translate Host IP Address and Subnet Mask into binary
notation
138. 101. 114. 250 IP Address 10001010 01100101 01110010 11111010 Mask 11111111 11111111 11111111 11000000 255. 255. 255. 192
Putting it all together!
Step 2: Determine the Network (or Subnet) where this Host address
lives:1. Draw a line under the mask2. 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 Notation4. The result is the Subnet Address of this Subnet or “Wire” which is
138.101.114.192
138. 101. 114. 250 IP Address 10001010 01100101 01110010 11111010 Mask 11111111 11111111 11111111 11000000 Network 10001010 01100101 01110010 11000000 138 101 114 192
Host IP Address
Class
Subnet Mask
138.101.114.250 255.255.255.192
B
Putting it all together!
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
138. 101. 114. 250 IP Address 10001010 01100101 01110010 11111010 Mask 11111111 11111111 11111111 11000000 Network 10001010 01100101 01110010 11000000 138 101 114 192
Host IP Address
Class
Subnet Mask
138.101.114.250 255.255.255.192
B
Putting it all together!
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.
Host IP Address
Class
Subnet Mask
138.101.114.250 255.255.255.192
G.D. S.D.
IP Address 10001010 01100101 01110010 11 111010 Mask 11111111 11111111 11111111 11 000000 Network 10001010 01100101 01110010 11 000000 subnet host
counting range counting range
B
Putting it all together!
Host Portion First Host: all 0’s and a 1 Last Host: all 1’s and a 0 Broadcast: all 1’s
G.D. S.D.
IP Address 10001010 01100101 01110010 11 111010 Mask 11111111 11111111 11111111 11 000000 Network 10001010 01100101 01110010 11 000000 subnet host
counting range counting range
First Host 10001010 01100101 01110010 11 000001 138 101 114 193 Last Host 10001010 01100101 01110010 11 111110 138 101 114 254 Broadcast 10001010 01100101 01110010 11 111111 138 101 114 255
Host IP Address
Class
Subnet Mask
138.101.114.250 255.255.255.192
B
G.D. S.D.
IP Address 10001010 01100101 01110010 11 111010 Mask 11111111 11111111 11111111 11 000000 Network 10001010 01100101 01110010 11 000000 subnet host
counting range counting range
First Host 10001010 01100101 01110010 11 000001 138 101 114 193 Last Host 10001010 01100101 01110010 11 111110 138 101 114 254 Broadcast 10001010 01100101 01110010 11 111111 138 101 114 255
Host IP Address
Class
Subnet Mask
No. of Subnet Bits
Maximum # of Subnets s = (n – 2)
Ordinal Number of this Subnet
138.101.114.250 255.255.255.192 10 1022=(1024-2)
459
Subnet Address of This Subnet or Wire
Range of Host Addresses For this subnet
Broadcast Address of This Subnet
138.101.114.192
138.101.114.193 through 138.101.114.254
138.101.114.255
B
All in one page!
Host IP Address
Class
Subnet Mask
No. of Subnet Bits
Maximum # of Subnets s = (n – 2)
Ordinal Number of this Subnet
138.101.114.250 255.255.255.192 10 1022=(1024-2)
459
Subnet Address of This Subnet or Wire
Range of Host Addresses For this subnet
Broadcast Address of This Subnet
138.101.114.192
138.101.114.193 through 138.101.114.254
138.101.114.255
B
138. 101. 114. 250 IP Address 10001010 01100101 01110010 11111010 Mask 11111111 11111111 11111111 11000000 Network 10001010 01100101 01110010 11000000 138 101 114 192
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
Host IP Address
Class
Subnet Mask
No. of Subnet Bits
Maximum # of Subnets s = (n – 2)
Ordinal Number of this Subnet
138.101.114.250 255.255.255.192 10 1022=(1024-2)
459
Subnet Address of This Subnet or Wire
Range of Host Addresses For this subnet
Broadcast Address of This Subnet
138.101.114.192
138.101.114.193 through 138.101.114.254
138.101.114.255
B
138. 101. 114. 250 IP Address 10001010 01100101 01110010 11111010 Mask 11111111 11111111 11111111 11000000 Network 10001010 01100101 01110010 11000000 138 101 114 192
Ordinal Number of this Subnet This will tell you which number is this subnet in the list. Use the number of subnet bits, 10. 0000000000 = subnet 0 0000000101 = subnet 5 0000000001 = subnet 1 Etc. 0000000010 = subnet 2 0111001011 = subnet 459 0000000011 = subnet 3 Etc. 0000000100 = subnet 4 1111111111 = subnet 1,023
Case 1
1. Suppose you are given the IP address 195.5.5.0 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.
i. What is the subnet mask for this network?
ii. What is the broadcast address of the 3rd subnet?
iii. On the diagram, assign a subnet address to each network and give each router interface an appropriate IP address for that network.
Case 1 Answer
Southpark
Springfield Bedrock
--
192.5.5.33/27
192.5.5.34/27
192.5.5.65/27
192.5.5.66/27
192.5.5.97/27 192.5.5.129/27
IP:192.5.5.98/27SM: 255.255.255.224
GW: 192.5.5.97
IP:192.5.5.130/27SM: 255.255.255.224
GW: 192.5.5.129
List of networks for the 195.5.5.0 network with the subnet mask 255.255.255.224
Hosts Network
from to Broadcast Address
195.5.5.0 195.5.5.1 195.5.5.30 195.5.5.31 195.5.5.32 195.5.5.33 195.5.5.62 195.5.5.63 195.5.5.64 195.5.5.65 195.5.5.94 195.5.5.95 195.5.5.96 195.5.5.97 195.5.5.126 195.5.5.127 195.5.5.128 195.5.5.129 195.5.5.158 195.5.5.159 195.5.5.160 195.5.5.161 195.5.5.190 195.5.5.191 195.5.5.192 195.5.5.193 195.5.5.222 195.5.5.223 195.5.5.224 195.5.5.225 195.5.5.254 195.5.5.255
Rules1. Each router’s interface has to be on a separate network ( You can’t have two differentinterfaces on the same network)2. Each interface on the router has to be assigned an ip address and a subnet mask3. Routers’ interfaces usually take the first available IP address on a network4. Switches are layer 2 devices and do not need an IP address to work5. Each PC on the network must be configured with the correct IP properties. Your PC will netan IP address and a subnet mask to be able to communicate with other hosts on the samenetwork. Your PC will net a default gateway to be able to communicate with other hosts on adifferent network6. PCs and their Default Gateway must belong to the same network.
Case 2
Given the IP address 199.199.199.172 with a subnet mask of 255.255.255.192. Answer the following:
a. How many bits were borrowed? b. How many subnets have been created? c. How many host address per subnet? d. What is the subnet address of the network containing the given IP
address? e. What is the broadcast address of the network containing the given
IP address?
Case 2 Answer
List of networks for the 199.199.199.0 network with the subnet mask 255.255.255.192
Hosts Network
from to Broadcast Address
199.199.199.0 199.199.199.1 199.199.199.62 199.199.199.63 199.199.199.64 199.199.199.65 199.199.199.126 199.199.199.127 199.199.199.128 199.199.199.129 199.199.199.190 199.199.199.191 199.199.199.192 199.199.199.193 199.199.199.254 199.199.199.255
A: 2
B: 4
C: 64
D: 199.199.199.128
E: 199.199.1299.191