Abdul MoizFractional CTO · Senior EngineerBook a free call

Engineering

From a Home Router to a Hospital Network: Understanding Enterprise Networking Step by Step

A switch connects devices. A router connects networks. A firewall decides which connections are allowed. Here is how those four ideas scale from the box on your desk to a hospital with its own datacenter.

Updated · 9 min read

Fractional CTO · Senior Engineer

Key takeaways

  • An enterprise network does the same jobs as your home router, split into separate devices.
  • Switches connect devices, routers connect networks, firewalls decide what is allowed, and access points, DHCP and DNS each do one job.
  • A hospital adds segments, so staff, guests and servers stay apart.

I spent years building applications on top of networks I did not understand. I could point a domain at a server, open a port, and debug a connection refused. What I could not answer was simpler: when a doctor opens an internal application on a hospital laptop, where does that traffic actually go?

Everything I knew about networking came from the box the ISP installed in my house, and that box is a lie of convenience. It looks like one thing. It is at least six.

Home network vs enterprise network
JobAt homeIn a hospital
Connect devicesInside the routerAccess and core switches
Connect networksInside the routerEdge router
Decide what is allowedBasic firewallPerimeter and segmentation firewalls
Wi-FiInside the routerMany managed access points
Hand out IP addressesInside the routerDHCP servers
Resolve namesForwarded to the ISPInternal DNS servers

Start with the network you already have

Almost every developer has this diagram in their head:

  • Internet
    • Home Wi-Fi router
      • Phone
      • Laptop
      • TV
      • PC

One box, four devices, nothing to explain. Except it is doing six separate jobs at once, and each becomes its own hardware the moment you scale past a house.

What the internet provider calls "the router" is actually six devices in one box:

Router
Connects your home network to the provider's network
Switch
Moves traffic between your own devices
Wi-Fi access point
Turns radio into ethernet frames
DHCP server
Hands out IP addresses to devices that join
Firewall / NAT
Rewrites addresses, blocks unsolicited inbound traffic
DNS forwarder
Answers name lookups by asking someone upstream

Every confusing thing about enterprise networking gets clearer once you stop treating those six as one device.


Enterprise network: the same six jobs at hospital scale

Here is a hospital network. Every box maps to one of those six jobs — each now its own device or rack.

  • Internet
    • ISP
      • Internet edge router
        • Perimeter firewall
          • Core network
            • Staff LAN
            • Wi-Fi
              • APs
                • Doctors
            • Datacenter
              • Datacenter switch
                • App
                • DB
                • GPU
                • Storage

Assume this addressing plan throughout:

Core services
10.1.0.0/16, for example 10.1.1.10, the internal DNS
Staff LAN
10.10.0.0/16, for example 10.10.3.40, a workstation
Clinical Wi-Fi
10.10.14.0/24, for example 10.10.14.25, a doctor's laptop
Datacenter
10.50.0.0/16, for example 10.50.1.11, the application server

Switch vs router: what is the difference?

This is the distinction that took me longest.

A switch connects devices on the same network. A router connects different networks. That is the whole thing; everything else is detail.

Consider the datacenter switch:

  • Datacenter switch
    • App server10.50.1.11
    • Database10.50.2.20
    • GPU / LLM node10.50.3.30
    • Storage10.50.4.40

Those machines talk to each other all day — app to database, database to storage, app to GPU node. None of that touches a router or the internet. They share a network, and a switch moves frames between them.

Now put two networks side by side:

  1. Clinical Wi-Fi10.10.14.0/24
  2. ???Datacenter10.50.0.0/16

A switch cannot bridge these — different address ranges, different broadcast domains. Getting a packet from 10.10.14.25 to 10.50.1.11 needs a device that understands both and forwards between them. That is a router, and the job is called Layer 3 routing.

If you know which side of that line your problem is on, you know which device to go look at.


Why a hospital does not have 200 ISP routers

The naive scaling model is "a hospital is a big house, so it has a lot of home routers."

At home, one device is router and switch and AP and DHCP and firewall. That is fine for four devices and one uplink, and it breaks at scale because those six jobs scale at different rates: a hospital needs two hundred radios but one internet edge, thousands of switch ports but one DHCP authority. Bundling forces you to buy them in lockstep.

So an enterprise unbundles:

  1. Wi-Fi access pointsmany: one per coverage area
  2. Access / floor switchesmany: one per floor or wiring closet
  3. Core switchesfew: the spine everything connects to
  4. Routers / firewallsfew: the policy and exit points

Those hundreds of access points are not hundreds of networks. They are radios feeding one managed network, configured centrally. A doctor walking between wings changes AP without dropping their session — as far as the network is concerned, they never left.


What happens when a doctor joins the Wi-Fi

The laptop associates with an access point, authenticates, and then has to answer three questions. DHCP answers all three at once.

  1. Doctor joins hospital Wi-Fi
  2. DHCP respondsIP address: 10.10.14.25Default gateway: 10.10.14.1DNS server: 10.1.1.10

These are genuinely different things, and conflating them causes a lot of confusion:

IP address — who am I on this network? The laptop's identity. Other devices on 10.10.14.0/24 can now address it directly.

Default gateway — where do I send traffic that is not for this network? The laptop reaches its own subnet through the switch. For anything else it does not need the route, only who to hand the packet to — a router interface whose entire job is "give it to me, I will find the next hop."

DNS server — who do I ask to turn names into addresses? Nothing about the laptop knows what hospital-ai.internal means. DHCP tells it which resolver to trust.

None of the three mentions the internet. A device can have all three, work perfectly, and never send a packet outside the building.


Internal DNS is still DNS

This one surprised me. I had assumed DNS was an internet service — something out there, run by Cloudflare or Google, that turns public names into public IPs.

It is a protocol. Anyone can run a server that speaks it, including a hospital, for names that exist nowhere on the public internet.

  1. Doctor's laptop
  2. “What is hospital-ai.internal?”Internal DNS10.1.1.10
  3. hospital-ai.internal → 10.50.0.10Doctor's laptop

Type that name on your home laptop and you get NXDOMAIN. Inside the hospital it resolves instantly, because the resolver DHCP handed out is authoritative for the .internal zone. This is why internal services get real names instead of hardcoded IPs — db.internal, models.internal, all private, all independent of whether the building has internet today.


Follow one packet into the datacenter

The section I would keep if I could only keep one. A doctor opens the internal application:

  1. Doctor's laptop10.10.14.25
  2. resolves hospital-ai.internal → 10.50.0.10 destination is not in 10.10.14.0/24, so send to gatewayNearest access point
  3. Floor switch
  4. Core network← routing decision happens here
  5. Datacenter network
  6. Datacenter switch
  7. Application server10.50.1.11

Every hop is inside the hospital. Cut the fibre to the ISP right now and this request still completes.

That realization reorganized everything else for me. I had been treating the internet as the thing that makes networking work. It is one possible destination.


Now watch the same laptop reach Google

Same doctor, same laptop, different destination:

  1. Doctor's laptop
  2. resolves google.com → a public IP destination is not internal, send to gatewayHospital LAN
  3. Core network
  4. Perimeter firewall← “is this allowed to leave?”
  5. Internet edge router
  6. ISP
  7. Internet
  8. Google

Compare the two paths and a clean rule falls out: internal destination, traffic stays inside the hospital; external destination, it exits through the internet edge, past the firewall. The ISP matters only when a packet needs to leave — for a hospital, a minority of traffic.


A private IP is not an internet connection

These ranges are reserved for private use and are not routable on the public internet:

text
10.0.0.0    – 10.255.255.255
172.16.0.0  – 172.31.255.255
192.168.0.0 – 192.168.255.255

Two hospitals can both use 10.50.1.11 and never collide, because neither address is visible outside its own network.

The home version makes it obvious. Unplug the WAN cable and leave everything else running:

Laptop A 192.168.1.5Laptop B 192.168.1.6WAN cable removed

  • ✓A ↔ Bstill works
  • ✕A → Googleno route out

The switch still forwards frames, DHCP still hands out leases, and A and B still reach each other's dev servers. Having an IP address never implied having internet access — those were always two facts that happened to arrive together.

This is what makes an isolated datacenter possible: servers with private IPs, talking over a switch, fully functional, with no route out.


Core switch versus datacenter switch

Both are switches. They sit at different altitudes.

  • Core switchthe spine of the whole hospital
    • Building A
    • Building B
    • Wi-Fi network
    • Staff LAN
    • Datacenter
      • Datacenter switchthe spine of one facility
        • App servers
        • Database
        • Storage
        • GPU nodes

The core connects the major segments of the organization; the datacenter switch connects servers and racks within one facility. A doctor's request crosses the core once, then lives on the datacenter switch while the app talks to the database and the model nodes — east-west traffic never touches the core at all. Different traffic pattern, different job, different hardware.


What an enterprise firewall does

Everything so far described reachability — can a packet physically get there. The firewall answers a different question: should it.

  • ✓Staff → Internetallowed, filtered
  • ✓Doctor → Hospital AI (HTTPS)allowed
  • ✕Doctor → PostgreSQL directlydenied
  • ✕Doctor → GPU / model nodedenied
  • ✕AI datacenter → Internetdenied

Read that last line again, because it matters most for what comes next. The AI datacenter is physically connected to the core switch — packets from it could reach the internet edge. They do not, because the firewall drops them. Reachability and permission are different layers.

That is network segmentation: dividing one physical network into zones and writing rules about which zones may open connections to which. Doctors reach the application over HTTPS and nothing else. Nobody reaches the database directly. The AI zone reaches nothing outbound.

Once you can see that shape, the design of a private AI system stops being mysterious.


The whole model on one screen

  • Internet
    • ISP
      • Edge router
        • Perimeter firewall
          • Core network
            • Staff LAN
            • Wi-Fi
              • Doctors
            • Datacenter
              • DC switch
                • App
                • DB
                • GPU

A switch connects devices. A router connects networks. A firewall controls which connections are allowed. DNS converts names to addresses. The ISP only becomes relevant when traffic actually needs to leave the hospital.


Check your understanding

  • Why a server can have an IP address without having internet access.
  • The difference between a switch, a router, an access point, and a firewall.
  • What DHCP provides, and why those three values are three different things.
  • Why internal DNS does not require an internet connection.
  • How hospital-ai.internal ends up reaching a specific datacenter server.
  • The difference between the internet edge router and the core network.
  • Why connecting a datacenter to the core switch does not give every server internet access.
  • How subnet and VLAN segmentation work, and what the firewall adds on top.

In the next article I use this hospital network as the foundation for an internal generative AI system, where the LLM, embeddings, retrieval, data, and observability all stay inside the hospital's own infrastructure: Designing an Air-Gapped RAG Architecture for Healthcare.

Common questions

What is the difference between a switch, a router and a firewall?

A switch connects devices on the same network. A router connects different networks. A firewall decides which connections are allowed. Home routers do all three in one box.

What is a VLAN used for?

A VLAN splits one physical network into separate logical ones. A hospital can keep staff, guest Wi-Fi and medical devices apart on the same switches, and use a firewall to control traffic between them.

Can a server with a private IP reach the internet?

Only if the network gives it a route and translates its address, usually with NAT. A private address alone does not block or allow internet access. Routing and firewall rules do.

Sources and further reading

Abdul MoizFractional CTOSenior Engineer

About the author

I build production-grade AI applications, AI agents and data systems, fix AI-built apps, and help teams as a fractional CTO. I've spent seven years building software people rely on, including a media platform that grew to 2M+ users.

ShareXLinkedIn

Keep reading

Working on something like this?

Tell me about it on a free 30-minute call.