Mobility in The Same IP Subnet
Mobility in The Same IP Subnet
When a device stays within the same IP subnet, it can maintain its IP address because the subnet
defines a single broadcast domain where devices can communicate directly at the link layer (Layer 2).
Here’s how it typically works:
1. Layer 2 Mobility:
o In a Wi-Fi network, for example, a device can move between access points (APs) that
are part of the same subnet. The switch or wireless controller learns which AP the
device is associated with (e.g., via self-learning in Ethernet switches) and forwards
traffic accordingly.
o The switch updates its MAC address table to reflect the new AP association, but the
device’s IP address stays the same. This is often called "intra-subnet mobility."
3. No IP Reconfiguration:
o Since the device remains in the same subnet, it doesn’t need to request a new IP
address via DHCP or update routing tables. This reduces latency and maintains
ongoing connections (e.g., video calls or file transfers).
o Wireless LAN controllers (e.g., in Cisco systems) or switches manage the handoff
between APs transparently. The device’s MAC address is used to track its location
within the subnet.
Benefits
• Seamless Roaming: Users experience uninterrupted connectivity as they move (e.g., walking
through an office or campus).
• Simplicity: The network handles mobility at Layer 2, keeping the IP layer unaffected.
Limitations
• Subnet Boundary: Mobility is restricted to the same subnet. Moving to a different subnet
(e.g., 192.168.2.0/24) requires IP-level mobility solutions like Mobile IP or Proxy Mobile IPv6,
which involve changing the IP address or tunneling traffic.
• Scale: Large networks may need multiple subnets, limiting the range of seamless Layer 2
mobility.
Real-World Context
In a typical enterprise Wi-Fi setup, a user’s laptop might roam between APs in a building. As long as
all APs are in the same VLAN and IP subnet (e.g., 192.168.1.0/24), the laptop keeps its IP address
(say, 192.168.1.50), and the switch ensures packets reach the correct AP. This is often referred to as
"micro-mobility" within a local domain, distinct from "macro-mobility" across subnets or networks.
What is an IP Subnet?
An IP subnet is a logical subdivision of an IP network where devices share the same network prefix
(e.g., 192.168.1.0/24). Within a subnet:
• Devices communicate directly at Layer 2 (using MAC addresses) without needing a router.
• The subnet is typically mapped to a single broadcast domain, meaning ARP (Address
Resolution Protocol) requests and broadcasts are confined to that subnet.
• Mobility within this scope relies on Layer 2 mechanisms rather than IP-layer (Layer 3)
reconfiguration.
For example:
• Subnet: 192.168.1.0/24
• Gateway: 192.168.1.1
• All devices in this subnet share the same VLAN (e.g., VLAN 10) and can communicate via
switches without routing.
• MAC Address Tracking: In a wired or wireless network, switches maintain a MAC address
table (also called a CAM table) that maps device MAC addresses to physical ports. When a
device moves (e.g., from one AP to another), the switch updates this table dynamically using
MAC learning.
• Broadcast Domain: Since the subnet is a single broadcast domain, ARP resolves IP-to-MAC
mappings without needing Layer 3 intervention.
In a WLAN, mobility within a subnet involves a device (called a station or STA in 802.11 terms)
transitioning between access points (APs) while retaining its IP address. Here’s how it happens:
• Same SSID: All APs must advertise the same Service Set Identifier (SSID) and be part of the
same subnet/VLAN. This ensures the device perceives the network as a single entity.
o As the device moves and detects a stronger signal from another AP, it initiates a
reassociation process, informing the new AP of its prior association. This is defined
in the IEEE 802.11 standard.
o The reassociation includes the device’s MAC address and session details, allowing a
seamless handoff.
• Frame Delivery: After reassociation, the new AP forwards the device’s frames to the wired
network (e.g., via a switch). The switch updates its MAC table to direct traffic to the new AP’s
port.
o 802.11k (Radio Resource Management): The device can request a list of nearby APs
from the current AP, aiding in faster AP selection during roaming.
• Switches: In a basic setup, a Layer 2 switch connects all APs and forwards traffic based on
MAC addresses. It doesn’t care about IP addresses, making intra-subnet mobility
transparent.
• Wireless LAN Controllers (WLCs): In enterprise networks (e.g., Cisco, Aruba), a WLC
centralizes control of APs:
o AP Coordination: The WLC tracks the device’s location and ensures traffic is tunneled
or switched to the correct AP.
o Client State: The WLC maintains session state (e.g., IP address, QoS policies) during
roaming.
o Tunneling (Optional): In some architectures, traffic is tunneled from APs to the WLC
(e.g., via CAPWAP), but the device’s IP remains unchanged within the subnet.
• ARP Cache: When a device moves to a new AP, other devices in the subnet may still have its
MAC address cached from the old AP. The switch’s updated MAC table ensures frames reach
the new AP, and ARP updates occur naturally as needed.
• No DHCP Needed: Since the device stays in the same subnet, its IP lease (assigned via DHCP)
remains valid. The DHCP server isn’t involved unless the lease expires.
Detailed Example Scenario
• Network Setup:
o Subnet: 192.168.1.0/24
o VLAN: 10
o APs: AP1 (port 1 on switch), AP2 (port 2 on switch), both in VLAN 10, SSID
"OfficeWiFi"
1. Initial Connection:
o Laptop sends traffic (e.g., a ping to 192.168.1.1). Switch forwards frames to the
gateway via its port.
2. Roaming to AP2:
o Laptop detects AP2’s stronger signal, reassociates with AP2 (using 802.11r for fast
transition if supported).
o AP2 sends a frame from 00:1A:2B:3C:4D:5E to the switch. Switch updates its MAC
table: 00:1A:2B:3C:4D:5E now maps to port 2.
o Gateway replies to 192.168.1.50. Switch forwards the reply to port 2 (AP2), and AP2
delivers it to the laptop.
3. Outcome:
o The laptop’s IP (192.168.1.50) and active sessions (e.g., a video stream) remain intact
because no Layer 3 change occurred.
Technical Considerations
o Without 802.11r, reassociation can take 100-500 ms, potentially disrupting real-time
apps. With 802.11r, it drops to ~50 ms.
2. Scalability:
o A single subnet/VLAN can’t scale indefinitely due to broadcast traffic (e.g., ARP
storms). Large networks use multiple subnets, requiring Layer 3 mobility solutions.
3. Security:
o WPA2/WPA3 encryption persists across APs if using the same SSID and key. 802.11r
ensures key caching for fast transitions.
o In redundant switch setups, STP prevents loops but may delay MAC table updates
during topology changes. Modern networks use Rapid STP (RSTP) or disable STP
where possible.
o IP Change: None
Practical Applications
• Campus Networks: Students roaming across a university campus within a single VLAN.
• IoT Devices: Sensors or robots moving within a factory floor on the same subnet.