--- title: 3. Network Devices collection: computer networks author: Akash Kadlag updated: 2026-09-17 source: https://docs.chaicode.com/networking/network-devices --- # 3. Network Devices ![Network Devices](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/ff07fda8d9c3c5864e7d20a01886aace716de8d605547c83c0e8ad3d6e6b69c7.png) Network Devices — Chap 3 The Machines Behind the Network ![A photo of an older PCI network interface expansion card with an Ethernet port.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/06ac2747d6b959a89a05ba338282165cc18f59d9847d37c933c3b193b3fecb28.png) NIC — Every device that communicates over a network - your laptop, your phone, your server, your smart TV, your printer has a NIC inside it. On older desktops, NICs were separate expansion cards you plugged into the motherboard. Today, NICs are almost always built directly into the motherboard of your laptop or PC. You just don't see them because they are soldered in. ![NIC](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/9daee280d44025689e736bc3f232b2be9dc6e468426ebbaebdef66241ea3a387.png) NIC — There are two types of NICs Wired NIC has an Ethernet port - that rectangular port on the side of your PC where you plug in a LAN cable. It communicates through physical cables. Wireless NIC also called a Wi-Fi adapter. It communicates through radio waves. No cable needed. This is what connects your laptop or phone to WiFi. Most modern devices actually have both. Every NIC in the world has a unique identifier burned into it at the factory. This is called the MAC address - Media Access Control address When devices communicate within a LAN - switches use MAC addresses to figure out which device to send data to. This is Layer 2 operation - the Data Link layer of the OSI model. ![NIC](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/a2ae5a2d54a61ff289366f210ab798cd53d17a9e2ed06dfc8c9b7702abac779d.png) NIC — NIC operates at both Layer 1 - physically sending and receiving signals and Layer 2 - using MAC addresses for local identification. To see your Mac Address • In MacOS open terminal and run ifconfig en0 | grep ether • In Windows open powershell and run getmac A MAC address is a unique hardware identifier for your network device. While it’s not as sensitive as a password, exposing it can still create privacy and security concerns. ![A photo of an 8-port Netgear network switch.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/e47cfd1f1f49990de73d7bec3ea816f0c308720790c96200d4abb337901efde3.png) Hub — Every device has a NIC, and every NIC has a MAC address. When multiple devices want to communicate with each other on a network, they need something to connect them together. Hub is the device that is used to connect. It has Less Number of Ports. Broadcasts signals. Doesn't learn MAC Address Hub is layer 1 device. ![A network diagram showing two computers connected to a hub on either side, with the two hubs connected to each other via a central bridge, alongside an image of a Landis+Gyr network bridge device.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/45fb6b308665d6227edacf85a8f1add5cc85cb1c41e30e065b3f35ffa6b99cbc.png) Bridge — It also has less number of ports and operates on Layer 2. Bridge Learns Mac Addresses that helps to Reduce Broadcast and save bandwidth. Bridges typically had very few ports, sometimes just two. You could use them to connect two segments of a network together, but you couldn't build a large network from bridges alone. ![A network diagram showing a network switch connected to various network devices including a router, server, PC, IP camera, firewall, phone, and printer, displayed above photos of various industrial Ethernet switches.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/c8da604cfde97dbb4f21afff91e2d20ef468353543ba9715e26ac087fe67f124.png) Switch — Successor of Bridge More Number of Ports - 8, 16, 24, 48 & more. Switch operates at the Data Link Layer. It learns MAC addresses. ![A network diagram showing local devices including a desktop computer, printer, and laptop connected to a router, which bridges a boundary line to connect to the Internet cloud.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/27b45fe69a18bed8c87ead6f6156650b5ba0963e8d2d40bfa516d0d10419a280.png) Router — Router is used to connect different networks with each other. Your home network is one network. Your ISP's network is another. Google's servers are on yet another. The router is the device that sits at the boundary and decides how to move data between them. ![A diagram at the bottom illustrates hop-by-hop routing showing a computer connected in sequence through five routers to a globe representing the internet, accompanied by a photo of a Wi-Fi router on the top right.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/61ffcdf1e96e690d8e1bf1bd5860d1a9bb0275c4337d7344228a038b151224c1.png) Router — Routers read IP addresses. When data arrives at a router, the router looks at the destination IP address and consults its routing table - a map of known networks and the best path to reach them. It then forwards the packet toward the destination - possibly through several other routers along the way. This process of passing a packet from router to router until it reaches its destination is called hop-by-hop routing. ![A network diagram illustrating data flow from the Internet to a Modem, then to a Router, and finally splitting to Computer #1 and Computer #2.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/1dd6a8ee42c753ac1d3e332015838572a3f7e042ba7377a91f472042344d131e.png) Modem — The word modem comes from Modulator-Demodulator. Modulation: converting digital data into a signal for transmission Demodulation: converting that signal back into digital data. The modem's job is to translate the incoming signal into standard digital data your network can use, and to convert outgoing data back into the format the ISP's infrastructure expects. In most homes today, the modem and router are combined into a single device provided by your ISP. ![A network diagram showing devices in a "Computer Network" connecting through a "Gateway" to an "External Network / Internet" cloud.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/58087704d8beeacaddbbd4716d4ab9a8cc9d989cf7a657a25daa37fc17e1d06d.png) Gateway — The term Gateway is one of the most overloaded words in networking - it means different things in different contexts. A gateway is any device that connects two networks that use different protocols and translates between them. Gateways serve as network entry and exit points because all data must pass through or communicate with the gateway before being routed. When someone says "default gateway" - they mean the IP address of your router. It's the exit point from your local network to the outside world. ![ISPs](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/a0446e5216036b5133fa80b6c79cc38e52db3e1c439e24b15fb74c647dfc43e0.png) ISPs — ISP stands for Internet service provider. ISPs are classified by tier: Tier 1 - Massive backbone providers who own the infrastructure that spans countries and oceans. They peer with each other for free. Examples: AT&T, Tata Communications, NTT. Tier 2 - Regional ISPs who pay Tier 1 providers for access, then sell to smaller ISPs or directly to businesses. Jio, Airtel, BSNL Tier 3 - Your local ISP. They buy access from Tier 2 and sell it to you as a home or business subscription. ![A network topology diagram showing client devices PC and Laptop connected via switch SW1 and router R1 across the Internet to router R2 and switch SW2, which connect to servers SRV 1 and SRV 2.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/6bb22cc42b84a613fd3870005ca63e010bf0e73c41223282b8056f1d660ea691.png) Firewall ![A network diagram illustrating end devices (PC, Laptop) connected via switch SW1 and router R1 through the Internet (with an associated Attacker) to router R2, switch SW2, and two servers (SRV 1, SRV 2).](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/cc7945d34795b91c19870063e3913f4427c92d7766679adb7ff3ded8f8007815.png) Firewall — PC Laptop SW1 R1 Internet Attacker R2 SW2 SRV 1 SRV 2 ![A network diagram illustrating a connection between a client network (PC and Laptop connected through switch SW1, router R1, and firewall FW1) and a server network (servers SRV 1 and SRV 2 connected through switch SW2, firewall FW2, and router R2) across the Internet, where an attacker is positioned.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/965f54880e26d482b415c65cea992d9a9c1d9b26420c982532d09e200b9f42c3.png) Firewall — SRV 1 PC Internet SW1 R1 FW1 R2 FW2 SW2 Attacker Laptop SRV 2 ![Firewall](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/05160ab104a1f1b052fc8a330605229cecdbb69a01e0014dd1c13f3d4316d6a4.png) Firewall — Firewalls monitor and control network traffic based on configured rules. Firewalls can be placed inside the network or outside the network. There are two types 1. Network Firewalls These are hardware devices that filter traffic between networks. 2. Host-based Firewall These are software applications that filter traffic entering and exiting on a host machine. ![An illustration showing a central Wi-Fi icon connected via dashed green and red lines to various network hosts: a smartphone, two laptops, and a desktop computer.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/1fc7bcfcd7f4a73c6850036c8686f6d55f68ed506a7e2e73fcdddd24a5bc5248.png) Host-to-Host Communication — Understanding how hosts talk to each other at the lowest level is crucial. This mainly involves Layer 2 and Layer 3 of the OSI model. • Layer 2: Deals with MAC addresses. • Layer 3: Deals with IP addresses. MAC Addresses ![Host-to-Host Communication](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/495c984faa366c4e46c94188e709b5d8feea9bec210b5cf9d239cc2408658ec2.png) Host-to-Host Communication — Sending data to everyone on the network wastes resources and poses security risks (e.g., public Wi-Fi sniffing). IP Addresses MAC addresses are not enough for efficient and secure communication. IP addresses help route data across different networks. The IP Address is built in two parts One part is to identify the network, and the other is to the host We use the network portion to eliminate many networks. The host part is used to find the host. We still need MAC addresses ![A network diagram illustrates communication from Host A (192.168.1.1) through router R1 across the Internet cloud to router R2 and destination Host B (10.5.3.2).](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/9c8c62576b0672c21125452c1cb0feb185ced2f6a2f061673b940ec8e6f99ae1.png) Host-to-Host Communication — Routing Host A (192.168.1.1) wants to talk to Host B (10.5.3.2). Router identifies the destination network using network portion of IP address. Router sends the packet to the appropriate network and eventually to Host B. ![Host-to-Host Communication](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/bf265b7147bec32068f50a9ccbe1b0018743094b5f4157269651be448cdc2b66.png) Host-to-Host Communication — Hosts run multiple applications. Ports distinguish between different applications on the same host. Standard Ports: Port 80: HTTP (web traffic) Port 22: SSH (secure shell) Port 53: DNS (domain name system) For Example: Host A sends an HTTPs request to Host B on Port 443. Host B's web server listens on Port 443 and processes the request. ![Host-to-Host Communication](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/97cfda17f4f9b67568e114669d6c6f577c22edb424419d335e6c401cf97f5e4c.png) Host-to-Host Communication — The Host to Host Communication Uses MAC addresses for local communication (Layer 2). Uses IP addresses for routing across networks (Layer 3). Uses ports to direct data to the correct application on the host. Understanding these basic concepts is fundamental to networking. The interplay of MAC addresses, IP addresses, and ports ensures efficient and secure communication between hosts. ![A collection of 3D illustrations displaying various network devices labeled Modem, NIC, Firewall, Hub, Switch, Router, Bridge, and Gateway.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/95936632e7fd483b9915c0c27bafa0c463c089cb64981fea4f2975b70679c2bf.png) Network Devices — The Machines Behind the Network NIC, Hub Bridge and Switch Router, Modem, Gateway Firewalls, ISPs Host-to-host Communication. Modem NIC Firewall Hub Switch Router Bridge Gateway In the next chapter, we’ll understand about routing of data over the network.