Module 8 Flashcards
Learning Unit 4 (40 cards)
Network Segmentation Overview
- Definition: Dividing a larger network into smaller broadcast domains.
- Benefits:
o Enhanced security
Limits malware/hacker access to sensitive parts.
Allows open access to specific areas (e.g., web server in a screened subnet / DMZ).
Part of defense-in-depth strategy.
o Improved performance
Reduces size of broadcast domains.
More efficient use of bandwidth.
Prioritizes critical traffic (e.g., studio traffic vs. office traffic).
o Simplified troubleshooting
Easier to isolate issues to specific segments (e.g., only Accounting has issues). - Common segmentation bases:
o Geographic – e.g., LAN per floor, WAN per building.
o Departmental – e.g., HR, Accounting, Sales.
o Device types – e.g., IP phones, printers, desktops. - OSI layers involved:
o Layer 1–2: Physical segmentation using routers/switches.
o Layer 2: VLANs.
o Layer 3: Subnets/IP organization.
Subnets
- Definition: Group of IP addresses forming a logical network segment.
- Function: Organizes address space; divides larger networks into smaller logical pieces.
- OSI Layer: Layer 3 (Network).
- Purpose in segmentation:
o Works with VLANs for traffic isolation.
o Ensures logical separation of IP traffic. - Example usage: A subnet per department (e.g., one for HR, one for IT).
VLANs (Virtual Local Area Networks)
- Definition: Group of switch ports assigned to a virtual segment regardless of physical location.
- Function: Logically groups devices on different switches.
- OSI Layer: Layer 2 (Data Link).
- Purpose in segmentation:
o Separates traffic virtually instead of physically.
o Often paired with subnets for complete isolation.
o Allows flexibility: ports from different physical locations can be in the same VLAN.
Methods of Segmenting Networks
- Physical Segmentation:
o Use of routers and separate hardware.
o Creates separate LANs. - Logical Segmentation:
o Uses VLANs.
o Segments based on switch configuration. - Layer 3 Segmentation:
o Uses subnetting to divide IP space.
o Can apply to both physical and virtual LANs.
Subnetting Basics
- Subnetting = dividing a large network into smaller, more manageable subnets
- Helps manage:
o Broadcast traffic
o IP address space efficiently
o Troubleshooting (easier to isolate issues)
o Documentation and routing - Routers = broadcast boundaries; do not forward broadcasts between interfaces
- Subnets created by splitting IP address pool into ranges per LAN/floor
- Devices use subnet info to decide if traffic is local or needs to go to the gateway
Subnet Masks
- IPv4 address = 32 bits (4 octets)
o Network portion = defined by 1s in subnet mask
o Host portion = defined by 0s in subnet mask - Example:
o IP: 192.168.123.132 → 11000000.10101000.01111011.10000100
o Mask: 255.255.255.0 → 11111111.11111111.11111111.00000000
o Network ID: 192.168.123.0
o Host: 0.0.0.132 - Devices compare their own network ID with destination:
o If match → direct send
o If not match → send to default gateway - Subnet mask defines how many bits of IP are network ID:
o E.g., /24 means 24 bits = network, 8 bits = host
Classful IPv4 Addressing
- Class A
o Format: nnnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh
o Network bits: 8
o Host bits: 24
o Default mask: 255.0.0.0 or /8
o Example network ID: 92.0.0.0 - Class B
o Format: nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
o Network bits: 16
o Host bits: 16
o Default mask: 255.255.0.0 or /16
o Example network ID: 147.12.0.0 - Class C
o Format: nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
o Network bits: 24
o Host bits: 8
o Default mask: 255.255.255.0 or /24
o Example network ID: 192.168.123.0
Classful Addressing Notes
- Always uses whole octets for dividing network/host portions
- Network ID’s last octet is always 0
- Host IPs should not end in .0
- Each octet can only range from 0 to 255
- Used as a starting point for subnetting in modern networks
- Class D and E = reserved (not used for host addressing)
Subnetting Basics
- Classless Addressing: Allows borrowing host bits to create subnets
- More subnet bits = more networks, fewer hosts per network
- Trade-off: More subnets created, but lose 2 host addresses per subnet (network ID + broadcast)
- Subnetting advantages:
o Improves management
o Limits broadcast domains
o Enables logical segmentation
Binary Subnetting Example (1 bit borrowed)
- Original Network ID: 192.168.89.0
- Original Subnet Mask: 255.255.255.0 (/24)
- Borrow 1 host bit → /25 mask
- Binary subnet mask: 11111111.11111111.11111111.10000000
- Decimal subnet mask: 255.255.255.128
- Subnets created: 2
o Subnet 1: 192.168.89.0/25
o Subnet 2: 192.168.89.128/25 - Usable host IPs:
o Subnet 1: 192.168.89.1 → 192.168.89.126 (126 hosts)
o Subnet 2: 192.168.89.129 → 192.168.89.254 (126 hosts) - Lost hosts: 2 (per subnet) for network & broadcast addresses
Subnetting Formulas
To calculate # of subnets:
* 2^n = # of subnets
* n = # of bits borrowed
To calculate # of hosts per subnet:
* 2^h - 2 = # of usable hosts
* h = # of bits remaining for hosts
CIDR notation:
* /x where x = number of bits for network ID
Subnetting Example with 3 Bits Borrowed (Formula Method)
Goal: Create 6 subnets from 192.168.89.0
Formula: 2ⁿ ≥ needed subnets → 2³ = 8 (borrow 3 bits)
New subnet mask:
* Binary: 11111111.11111111.11111111.11100000
* Decimal: 255.255.255.224
* CIDR: /27
Remaining host bits: 5 → 2⁵ - 2 = 30 hosts per subnet
Calculating Network IDs Using Magic Number
Magic Number = 256 - subnet mask’s last octet
* In /27 mask → last octet: 224 → magic number = 32
Subnet IDs (add 32 each time):
* Subnet 1: 192.168.89.0
* Subnet 2: 192.168.89.32
* Subnet 3: 192.168.89.64
* Subnet 4: 192.168.89.96
* Subnet 5: 192.168.89.128
* Subnet 6: 192.168.89.160
* Subnet 7: 192.168.89.192
* Subnet 8: 192.168.89.224
IP Address Ranges per Subnet (/27 Example)
Total addresses per subnet: 2⁵ = 32
Usable hosts: 30 per subnet
* First = Network ID
* Last = Broadcast address
Example (Subnet 1):
* Network ID: 192.168.89.0
* Broadcast: 192.168.89.31
* Host range: 192.168.89.1 → 192.168.89.30
Subnet 2:
* Network ID: 192.168.89.32
* Broadcast: 192.168.89.63
* Host range: 192.168.89.33 → 192.168.89.62
(Repeat pattern with +32 each time)
Subnetting Trade-Off Summary
Advantages:
* More logical segmentation
* Better traffic control
* Tailored broadcast domains
Disadvantages:
* Lose 2 host addresses per subnet
* Increased complexity
Total available hosts = (# subnets × usable hosts)
* Eg: 8 subnets × 30 hosts = 240 total usable hosts
* Original /24 had 254 usable hosts
* Trade-off: -14 usable hosts for more networks
Class B Subnet Mask Table (IPv4)
- Based on default Class B mask: 255.255.0.0
- Subnet mask progression and their properties:
Mask CIDR Subnets Hosts/Subnet
255.255.128.0 /17 2 32,766
255.255.192.0 /18 4 16,382
255.255.224.0 /19 8 8,190
255.255.240.0 /20 16 4,094
255.255.248.0 /21 32 2,046
255.255.252.0 /22 64 1,022
255.255.254.0 /23 128 510
255.255.255.0 /24 256 254
255.255.255.128 /25 512 126
255.255.255.192 /26 1024 62
255.255.255.224 /27 2048 30
255.255.255.240 /28 4096 14
255.255.255.248 /29 8192 6
255.255.255.252 /30 16384 2
Class C Subnetting Summary
- Fewer subnetting options than Class B
- Fewer host bits = fewer hosts per subnet
- Limited number of subnets due to fewer bits available to borrow
Types of Subnetting Exam Questions
- Type 1: Given requirements (hosts/subnets), calculate:
o Possible subnet masks
o IP address ranges per subnet - Type 2: Given a single IP address, determine:
o Network ID
o Broadcast address
o First and last usable host addresses
Subnet Implementation (Static IP)
- Admin assigns IP and subnet mask to each router interface
- Convention: use first or last usable IP in range for default gateway
- Static IP settings shown via:
o Ubuntu: TCP/IPv4 config
o Windows: Manual IP config - Example use case: three LANs using different subnets from same network block
Subnet Implementation (DHCP / Dynamic IP)
- DHCP server must be configured with:
o Network ID
o Subnet mask
o IP range
o Default gateway - Cost-prohibitive to deploy a DHCP server per subnet
- DHCP relies on broadcasts, which do not cross routers by default
Centralized DHCP via UDP Forwarding
- Relay Agent (router/firewall/L3 switch) enables UDP forwarding
- Common UDP services:
o DHCP (port 67)
o DNS (port 53)
o NTP (port 123)
o TFTP (port 69) - Relay agent detects broadcast message, then:
Step 1: Receives DHCP request on local subnet
Step 2: Repackages & sends to IP helper address (central DHCP)
Step 3: DHCP server assigns IP based on relay agent’s source interface
Step 4: Reply is routed back to original subnet
* IP Helper Address:
o Can be a single server (e.g. DHCP only)
o Or subnet broadcast address (e.g. DHCP, DNS, NTP servers monitor)
VLSM (Variable Length Subnet Mask)
- Subnetting a subnet to match varying host needs
- Avoids inefficiency of fixed-size subnets
- Process:
o Start with the largest subnet
o Subdivide remaining address space for next largest, and so on - Analogy: pizza slices sized differently for Dad, Mom, kids
- Efficient but leaves little room for future growth
- Best used with private IPs; public IPs have limitations
- Planning for growth:
o Start with /23 or /22 instead of /24
o Or move to IPv6
VLSM Example – Subnet Breakdown (IPv4: 192.168.10.0/24)
- Step 1:
o /25 = 192.168.10.0 → Sales
o Remaining: 192.168.10.128/25 - Step 2:
o /26 = 192.168.10.128 → Accounting
o Remaining: 192.168.10.192/26 - Step 3:
o /27 = 192.168.10.192 → HR
o Remaining: 192.168.10.224/27 - Step 4:
o /29 =
192.168.10.224 → IT
192.168.10.232 → Executives
192.168.10.240 → reserved
192.168.10.248 → future use - Step 5:
o /30 =
192.168.10.240 → WAN 1
192.168.10.244 → WAN 2
192.168.10.248/29 → future use
IPv6 Subnetting – Key Differences
- 128-bit addresses (vs. IPv4’s 32-bit)
- Vast address space = one subnet holds 18 quintillion+ addresses
- Subnetting = for organization, not conservation
- IPv6 has:
o No classes (no A, B, C)
o No subnet masks
o All addresses are classless