Layer 3 (Network Layer) provides connectivity between end hosts on DIFFERENT networks, not just within a local area network. Unlike Layer 2 which uses physical MAC addresses assigned at manufacture, Layer 3 uses logical IP addresses that are configured by network administrators. Routers operate at Layer 3 and are responsible for path selection, determining the best route for data to travel from source to destination across complex networks like the Internet.
An IPv4 address is a 32-bit number divided into four 8-bit sections called octets, written in dotted decimal notation for human readability. Each octet can range from 0 to 255 (since 2^8 = 256 possible values). The address is split into two portions: the network portion (which identifies the network) and the host portion (which identifies specific devices on that network).
Binary is base-2, meaning each digit position represents a power of 2, doubling as you move left. The 8-bit positions represent: 128, 64, 32, 16, 8, 4, 2, 1. To convert binary to decimal, add the values of positions containing a 1. To convert decimal to binary, subtract the largest possible value starting from 128, writing 1 if you can subtract, 0 if you cannot.
IPv4 addresses are divided into five classes (A, B, C, D, E) based on the first octet. Classes A, B, and C are used for host addressing with different network/host bit distributions. Class D is reserved for multicast, and Class E is reserved for experimental purposes. The class determines the default prefix length and number of available networks versus hosts per network.
The network address has all 0s in the host portion and identifies the network itself—it cannot be assigned to any device. The broadcast address has all 1s in the host portion and is used to send packets to all hosts on the network—it also cannot be assigned to a device. These two addresses reduce the usable host addresses in any network by 2.
IPv4 address length: 32 bits (4 bytes)
Octet size: 8 bits
Octet range: 0-255
Binary position values: 128-64-32-16-8-4-2-1
Formula for usable hosts: 2^n - 2 (where n = host bits)
Routers do NOT forward broadcast traffic between networks
Broadcasts are limited to the local network segment
Layer 3 broadcast IP uses all 1s in host portion
Layer 2 broadcast MAC address is all Fs (FF:FF:FF:FF:FF:FF)
Cisco router interfaces are administratively down by default
Must use no shutdown command to enable interfaces
no shutdown
Switch interfaces are UP by default (opposite of routers)
Status column = Layer 1, Protocol column = Layer 2
Class A: Fewer networks, more hosts per network
Class C: More networks, fewer hosts per network
Class B: Balanced between networks and hosts
Loopback range (127.0.0.0/8) is reserved for testing
Dotted Decimal Notation: The human-readable format of IPv4 addresses using four decimal numbers (0-255) separated by dots (e.g., 192.168.1.1).
Octet: An 8-bit section of an IPv4 address; four octets make up the complete 32-bit address.
Prefix Length: The number of bits in the network portion of an IP address, written with a forward slash (e.g., /24 means 24 network bits).
Subnet Mask (Netmask): The dotted decimal representation of the prefix length, where network bits are all 1s and host bits are all 0s (e.g., 255.255.255.0 = /24).
Network Address: The first address in a network with all 0s in the host portion; identifies the network itself and cannot be assigned to hosts.
Broadcast Address: The last address in a network with all 1s in the host portion; used to send packets to all hosts on the network and cannot be assigned to hosts.
Loopback Address: Any address in the 127.0.0.0/8 range used to test the network stack of the local device without sending traffic externally.
BIA (Burned-In Address): Another term for MAC address, referring to the permanent hardware address assigned during manufacturing.
Administratively Down: Interface status indicating the interface has been manually disabled with the shutdown command.
shutdown
Class
First Octet Range
Leading Bits
Default Prefix
Network Bits
Host Bits
Networks
Hosts per Network
A
1-126*
0
/8
8
24
128
16,777,214
B
128-191
10
/16
16
16,384
65,534
C
192-223
110
/24
2,097,152
254
D
224-239
1110
N/A
Multicast
E
240-255
1111
Experimental
*Note: 0 and 127 are reserved in Class A
/8 = 255.0.0.0 (Class A default)
/16 = 255.255.0.0 (Class B default)
/24 = 255.255.255.0 (Class C default)
1, 2, 4, 8, 16, 32, 64, 128
Loopback: 127.0.0.0 to 127.255.255.255
Most common loopback: 127.0.0.1
Forgetting to subtract 2 from host calculations: Always remember network and broadcast addresses cannot be assigned to hosts. Formula is 2^n - 2, NOT 2^n.
Confusing prefix length with subnet mask: /24 and 255.255.255.0 are the same thing, just different notation. Cisco CLI uses subnet mask format.
Class A range confusion: Some sources say 0-127, others say 1-126. Remember that 0 and 127 are reserved, so usable Class A range is 1-126.
Router vs Switch defaults: Router interfaces are administratively DOWN by default; switch interfaces are UP by default.
Binary conversion errors: Practice the 128-64-32-16-8-4-2-1 method repeatedly. Most errors come from rushing through the calculation.
Network vs broadcast address identification: Network address has all 0s in host portion; broadcast has all 1s. Don't confuse them!
First and last usable addresses: First usable = network address + 1; Last usable = broadcast address - 1. Don't forget to add/subtract!
Status vs Protocol columns: Status = Layer 1 (physical); Protocol = Layer 2 (data link). You can't have Protocol UP if Status is DOWN.
"NBA" - Network and Broadcast Addresses cannot be assigned to hosts.
"1-2-4-8-16-32-64-128" - Practice this sequence forwards and backwards until automatic.
Class A: 0-127 (starts with 0)
Class B: 128-191 (starts with 10)
Class C: 192-223 (starts with 110)
Remember: Each class roughly doubles the starting number
Count the 255s:
One 255 = /8
Two 255s = /16
Three 255s = /24
Config terminal (conf t)
Interface selection (int g0/0)
Address assignment (ip address X.X.X.X Y.Y.Y.Y)
No shutdown (no shut)
Exit and verify (show ip int brief)
"Two to the N, minus TWO" - 2^n - 2 (n = number of host bits)
Given: 192.168.1.0/24
Network Address: 192.168.1.0
First Usable: 192.168.1.1
Last Usable: 192.168.1.254
Broadcast: 192.168.1.255
Total Hosts: 2^8 - 2 = 254
Subnet Mask: 255.255.255.0
Given: 172.16.0.0/16
Network Address: 172.16.0.0
First Usable: 172.16.0.1
Last Usable: 172.16.255.254
Broadcast: 172.16.255.255
Total Hosts: 2^16 - 2 = 65,534
Subnet Mask: 255.255.0.0
Given: 10.0.0.0/8
Network Address: 10.0.0.0
First Usable: 10.0.0.1
Last Usable: 10.255.255.254
Broadcast: 10.255.255.255
Total Hosts: 2^24 - 2 = 16,777,214
Subnet Mask: 255.0.0.0
Router(config)# interface gigabitethernet 0/0
Router(config-if)# ip address 192.168.1.254 255.255.255.0
Router(config-if)# description ## Connected to SW1 ##
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# do show ip interface brief
What is the length of an IPv4 address in bits and bytes?
32 bits or 4 bytes
What is an octet in IPv4 addressing?
An 8-bit section of an IPv4 address (IPv4 has 4 octets)
What is the range of decimal values for one octet?
0 to 255 (2^8 = 256 possible values)
What is dotted decimal notation?
The human-readable format of IPv4 addresses using four decimal numbers separated by dots (e.g., 192.168.1.1)
At which OSI layer do routers operate?
Layer 3 (Network Layer)
What are the two main portions of an IPv4 address?
Network portion and Host portion
What does Layer 3 provide that Layer 2 does not?
Connectivity between DIFFERENT networks (not just within a LAN), logical addressing (IP), and path selection
Do routers forward broadcast traffic between networks?
No, broadcasts are limited to the local network and do not cross routers
What are the binary position values from right to left in an 8-bit octet?
Convert binary 11000000 to decimal.
192 (128 + 64)
Convert binary 10101000 to decimal.
168 (128 + 32 + 8)
Convert binary 11111110 to decimal.
254 (128 + 64 + 32 + 16 + 8 + 4 + 2)
Convert decimal 255 to binary.
11111111
Convert decimal 192 to binary.
11000000
Convert decimal 127 to binary.
01111111
What is the maximum decimal value that can be represented with 8 bits?
255 (when all bits are 1)
What is the first octet range for Class A addresses?
1-126 (technically 0-127, but 0 and 127 are reserved)
What is the first octet range for Class B addresses?
What is the first octet range for Class C addresses?
What is the first octet range for Class D addresses?
224-239 (reserved for multicast)
What is the first octet range for Class E addresses?
240-255 (reserved for experimental use)
What are the leading bits for Class A addresses?
What are the leading bits for Class B addresses?
What are the leading bits for Class C addresses?
What is the default prefix length for Class A?
What is the default prefix length for Class B?
What is the default prefix length for Class C?
How many network bits does Class A have?
8 bits
How many host bits does Class A have?
24 bits
How many network bits does Class B have?
16 bits
How many host bits does Class B have?
How many host bits does Class C have?
How many usable hosts per network in Class A?
16,777,214 (2^24 - 2)
How many usable hosts per network in Class B?
65,534 (2^16 - 2)
How many usable hosts per network in Class C?
254 (2^8 - 2)
What is the subnet mask for /8?
255.0.0.0
What is the subnet mask for /16?
255.255.0.0
What is the subnet mask for /24?
255.255.255.0
What prefix length does subnet mask 255.0.0.0 represent?
What prefix length does subnet mask 255.255.0.0 represent?
What prefix length does subnet mask 255.255.255.0 represent?
What is a subnet mask (netmask)?
A dotted decimal representation of the prefix length where network bits are all 1s and host bits are all 0s
How is a prefix length written?
With a forward slash followed by the number of network bits (e.g., /24)
What is the network address?
The first address in a network with all 0s in the host portion; identifies the network itself
What is the broadcast address?
The last address in a network with all 1s in the host portion; used to send packets to all hosts on the network
Can the network address be assigned to a host?
No, it cannot be assigned to any device
Can the broadcast address be assigned to a host?
What is the network address for 192.168.1.0/24?
192.168.1.0
What is the broadcast address for 192.168.1.0/24?
192.168.1.255
What is the first usable address for 192.168.1.0/24?
192.168.1.1 (network address + 1)
What is the last usable address for 192.168.1.0/24?
192.168.1.254 (broadcast address - 1)
What is the loopback address range?
127.0.0.0 to 127.255.255.255 (entire /8 network)
What is the most commonly used loopback address?
127.0.0.1
What is the purpose of loopback addresses?
To test the network stack of the local device without sending traffic externally
What happens when you ping a loopback address?
The device responds to its own ping; traffic doesn't leave the device
What is the formula for calculating usable hosts in a network?
2^n - 2, where n = number of host bits
Why do we subtract 2 when calculating usable hosts?
To account for the network address and broadcast address, which cannot be assigned to hosts
How do you find the first usable address?
Network address + 1
How do you find the last usable address?
Broadcast address - 1
For network 10.0.0.0/8, what is the network address?
10.0.0.0
For network 10.0.0.0/8, what is the broadcast address?
10.255.255.255
For network 10.0.0.0/8, what is the first usable address?
10.0.0.1
For network 10.0.0.0/8, what is the last usable address?
10.255.255.254
For network 172.16.0.0/16, what is the network address?
172.16.0.0
For network 172.16.0.0/16, what is the broadcast address?
172.16.255.255
For network 172.16.0.0/16, what is the first usable address?
172.16.0.1
For network 172.16.0.0/16, what is the last usable address?
172.16.255.254
For network 172.16.0.0/16, how many usable hosts?
For network 192.168.5.0/24, how many usable hosts?
What command enters global configuration mode?
configure terminal (or conf t)
What command enters interface configuration mode for GigabitEthernet 0/0?
interface gigabitethernet 0/0 (or int g0/0)
What command assigns an IP address to an interface?
ip address [ip-address] [subnet-mask]
What command enables a router interface?
no shutdown (or no shut)
What command shows a brief summary of all interfaces?
show ip interface brief (or sh ip int br)
What command shows detailed information about a specific interface?
show interfaces [interface-name]
What command shows interface descriptions?
show interfaces description
What command configures an interface description?
description [text]
What is the default state of Cisco router interfaces?
Administratively down (shutdown command applied by default)
What is the default state of Cisco switch interfaces?
Up (if connected) or Down (if not connected) - NOT administratively down
How can you execute a privileged EXEC command from configuration mode?
Use the "do" command before the show command (e.g., do show ip int brief)
What does the Status column indicate in "show ip interface brief"?
Layer 1 (physical layer) status
What does the Protocol column indicate in "show ip interface brief"?
Layer 2 (data link layer) status
What does "administratively down" mean in the Status column?
The interface has been manually disabled with the shutdown command
Can Protocol be UP if Status is DOWN?
No, Layer 2 cannot function if Layer 1 is down
What does BIA stand for?
Burned-In Address (the permanent MAC address)
What is the shortcut for the enable command?
en
What is the shortcut for the interface command?
int (minimum is "in", but "int" is commonly used)
Can you configure a router interface with just "int g0/0" (without space)?
Yes, "int gigabitethernet0/0" works the same as "int gigabitethernet 0/0"
What does the Method column show in "show ip interface brief"?
How the IP address was assigned (manual, DHCP, etc.)
Given IP 43.109.23.12/8, identify the class and network address.
Class A; Network address: 43.0.0.0
Given IP 43.109.23.12/8, what is the broadcast address?
43.255.255.255
Given IP 43.109.23.12/8, how many usable hosts?
Given IP 129.221.23.13/16, identify the class and network address.
Class B; Network address: 129.221.0.0
Given IP 129.221.23.13/16, what is the broadcast address?
129.221.255.255
Given IP 129.221.23.13/16, how many usable hosts?
Given IP 209.211.3.22/24, identify the class and network address.
Class C; Network address: 209.211.3.0
Given IP 209.211.3.22/24, what is the broadcast address?
209.211.3.255
Given IP 209.211.3.22/24, how many usable hosts?
If two devices have IPs 192.168.1.5/24 and 192.168.1.100/24, are they on the same network?
Yes, they have the same network portion (192.168.1)
Why do routers need an IP address for each connected network?
Because each interface connects to a different network, and the router needs an address in each network to route traffic
What happens to a broadcast frame when it reaches a router?
The router does not forward it; broadcasts are limited to the local network
What is the Layer 3 broadcast MAC address equivalent?
FF:FF:FF:FF:FF:FF (all Fs)
If you ping 192.168.1.255 on a /24 network, what receives it?
All hosts on the 192.168.1.0/24 network (it's the broadcast address)
What characterizes Class A networks?
Fewer networks, but many hosts per network (24 host bits)
What characterizes Class C networks?
Many networks, but fewer hosts per network (8 host bits)
What is Class D used for?
Multicast addresses (224.0.0.0 to 239.255.255.255)
What is Class E used for?
Experimental purposes (240.0.0.0 to 255.255.255.255)
Why is 127.0.0.0/8 excluded from Class A usable range?
It's reserved for loopback addresses
What does /24 mean in 192.168.1.0/24?
The first 24 bits are the network portion (first 3 octets)
What does /16 mean in 172.16.0.0/16?
The first 16 bits are the network portion (first 2 octets)
What does /8 mean in 10.0.0.0/8?
The first 8 bits are the network portion (first octet)
In binary 10101010, which positions have a 1?
Positions 128, 32, 8, and 2 (equals 170 in decimal)
What is 192.168.1.0/24 in binary for the last octet?
00000000
What is 192.168.1.255/24 in binary for the last octet?
Complete the configuration: Router(config)# interface g0/0, Router(config-if)# ip address 10.1.1.1 _______
255.0.0.0 (or the appropriate subnet mask)
What command must follow IP address configuration to activate the interface?
If Status shows "up" and Protocol shows "down", what's the problem?
Layer 1 is working, but there's a Layer 2 issue (possibly Ethernet framing or encapsulation problem)
Can you switch directly from one interface to another in configuration mode?
Yes, you can type "interface [name]" without exiting to global config first
What is the purpose of interface descriptions?
To document what each interface connects to or its purpose (optional but helpful)
Master binary conversion - Practice until you can convert without writing it down
Memorize the class ranges - You should instantly recognize 10.x.x.x as Class A
Know the formulas - 2^n - 2 for usable hosts should be automatic
Practice subnet mask conversion - /24 = 255.255.255.0 should be instant recall
Understand the concepts - Don't just memorize; understand WHY routers stop broadcasts
Write down binary values - Start each question by writing 128-64-32-16-8-4-2-1 on scratch paper
Watch for trick questions - They may ask for "total addresses" vs "usable addresses"
Double-check network vs broadcast - All 0s = network, all 1s = broadcast
Verify your class identification - Check the first octet range carefully
Use process of elimination - If unsure, eliminate obviously wrong answers first
Binary to decimal conversion (and vice versa)
Identifying address class from first octet
Calculating usable hosts
Finding network, broadcast, first/last usable addresses
Matching prefix lengths to subnet masks
Router configuration commands
Interpreting "show" command outputs
Zuletzt geändertvor 12 Tagen