LAN
Local Area Network
- Pronunciation
- LAN
In short
A LAN is a network that connects devices within a small area such as a home, office or school, letting them reach each other directly and share resources fast.
What is a LAN?
A LAN, or local area network, is a network that links devices within a limited area, such as a home, an office floor, a school, or a single data center. Devices on a LAN, including computers, phones, printers, and servers, can talk to each other directly and quickly without their traffic leaving the building. A LAN is usually owned and managed by one person or organization.
Most LANs are built from Ethernet cables and switches, Wi-Fi access points, or both, and a wireless LAN is often called a WLAN. Devices on the same LAN are normally in the same subnet and deliver frames to each other using MAC addresses, with ARP translating IP addresses into MAC addresses. A router connects the LAN to other networks, usually handing out private IP addresses with DHCP and sharing one public address through NAT. Because distances are short and all the equipment belongs to one owner, LANs offer high bandwidth, often 1 Gbps or more on wired links, and very low latency.
A LAN is like the internal hallways of a building: people inside can walk to each other's desks freely, and only trips outside need the main entrance, which is the router. Developers use LANs constantly, for example to test a site on a phone by opening the laptop's LAN address, such as http://192.168.1.20:3000, to share files and printers, or to run home lab servers. Larger LANs are often split into VLANs, virtual LANs that keep groups of devices, such as guests and staff, apart on the same physical equipment.
A LAN is most often compared with a WAN, a wide area network. A LAN covers one site and is owned by one organization, while a WAN connects sites across cities or countries, usually over lines leased from telecom providers, with lower speeds and higher latency; the internet itself is the largest WAN. Being on the same LAN is also not the same as being trusted: attackers who compromise one device often move to others on the local network, which is one reason for zero trust security.
Key takeaways
- A LAN connects devices within a small area, such as a home, office, or building.
- It is built from Ethernet switches, Wi-Fi access points, or both; a wireless LAN is called a WLAN.
- LANs offer high bandwidth and low latency because distances are short.
- A router connects the LAN to the internet and other networks.
- A LAN covers one site, while a WAN connects many sites over long distances.
Example
# Find this machine's LAN address (Linux; on macOS: ipconfig getifaddr en0)
hostname -I
# 192.168.1.20
# Start a server that listens on all interfaces, not just localhost
python3 -m http.server 3000 --bind 0.0.0.0
# Any device on the same LAN, such as a phone, can now open:
# http://192.168.1.20:3000Readers ask
What is the difference between a LAN and a WAN?
A LAN connects devices within one location, such as a home or office, and is owned by one organization. A WAN connects networks across large distances, such as offices in different cities, usually over leased lines or the internet, and it is slower and has higher latency.
Is Wi-Fi a LAN?
Yes. A Wi-Fi network is a wireless LAN, or WLAN, and in most homes and offices wired and wireless devices belong to the same LAN, connected through the same router or switches.
What is a VLAN?
A VLAN, or virtual LAN, splits one physical network into several isolated logical networks, so devices plugged into the same switches can be kept apart. Companies use VLANs to separate traffic for guests, staff, phones, and servers.
Often compared
See also
- WANNetworking, p. 37A WAN is a network that connects devices and local networks across large distances, such as cities or countries, often over links rented from telecom providers.
- Network SwitchNetworking, p. 18A network switch is a device that connects devices on the same local network and forwards each frame only to the port where its destination MAC address lives.
- RouterNetworking, p. 25A router is a networking device that forwards packets between different networks, choosing the next hop for each one based on its destination IP address.
- SubnetNetworking, p. 29A subnet is a smaller network carved out of a larger one by splitting its range of IP addresses, which keeps traffic organized, contained, and easier to secure.
- MAC AddressNetworking, p. 16A MAC address is a 48-bit hardware identifier assigned to a network interface and used to deliver data between devices on the same local network.
- IP AddressNetworking, p. 10An IP address is a numeric label assigned to each device on a network so that data can be routed to it, much like a postal address for a house.
Spotted a mistake or something missing on this page?Suggest an edit