Setting Up a Local Web Server

12 minsSimneta AcademyOct 12, 2026

Learn how the Client-Server model powers modern computer networks. Deploy an enterprise Linux intranet server, configure static IP addressing, wire workstations through an access switch, and trace TCP three-way handshakes and HTTP port 80 requests across the wire.

When two personal laptops connect over a local network, they operate as peers: each machine acts as both a consumer and a provider. But modern organizations cannot operate on peer-to-peer relationships. You do not store your company database or employee intranet on an engineer personal laptop that might shut down at 5 PM when they head home.

Instead, modern infrastructure relies on the Client-Server architecture. Servers are dedicated, high-availability host machines optimized to run 24/7 without interruption. They execute background software services called daemons that passively listen on standardized network ports, waiting to serve incoming requests from hundreds of simultaneous client workstations.

Understanding web delivery requires understanding three distinct layers: how the Linux kernel binds listening sockets to physical interfaces, how the Transmission Control Protocol synchronizes sequence numbers, and how clients exchange formatted ASCII headers with the web daemon.

Network Architecture Plan

SegmentInterfaceSubnet / AddressFunctional Role
Enterprise Web ServerFastEthernet0192.168.1.100/24HTTP Port 80 Web Service Daemon
Distribution SwitchFastEthernet0/1 - 0/3Layer 2 SwitchingLocal frame distribution forwarder
Workstation AlphaFastEthernet0192.168.1.10/24Client workstation accessing web portal
Engineer LaptopFastEthernet0192.168.1.20/24Secondary browser & diagnostic client
1

Client Server Architecture Basics

In client-server architecture, responsibilities are sharply divided. Clients (desktops, laptops, mobile phones) initiate requests whenever a user wants to view a document, load a webpage, or fetch database records. The server silently processes incoming requests, enforces authentication, and delivers the requested payloads.

Because servers provide mission-critical resources to the entire organization, they require dedicated hardware with redundant power supplies, enterprise-grade storage, and high-bandwidth network adapters. Placing servers on a centralized network segment ensures that all departmental workstations can access company files concurrently without bottlenecks.

On your canvas, place a rackmount Enterprise Server and an Access Switch, along with two client workstations: Workstation Alpha and an Engineer Laptop.

Connect the Enterprise Server to switch port 1, Workstation Alpha to switch port 2, and the Engineer Laptop to switch port 3 using standard Cat6 Straight-Through cables.

Field Architecture Insight

Real-world field story: A web developer spent three hours debugging why coworkers could not open his local development portal. He had bound his HTTP server to 127.0.0.1 (localhost) instead of 0.0.0.0, so the Linux kernel rejected every incoming request that arrived across the physical network card.

2

Static Addressing And Sockets

Production servers must always have predictable static IP addresses. If a server IP changed dynamically via DHCP every morning, bookmarks, scripts, and internal DNS entries across the company would immediately break.

Open the Server inspector and configure its static IPv4 parameters: assign IP address 192.168.1.100 with subnet mask 255.255.255.0. Inside the server operating system, an embedded HTTP daemon is bound to the wildcard socket 0.0.0.0:80.

A network socket binds an IP address to a Layer 4 port number (such as `192.168.1.100:80`). Binding to the wildcard address 0.0.0.0 rather than loopback (127.0.0.1) is mandatory—it instructs the operating system kernel to accept incoming HTTP requests across every physical network interface on the machine.

Next, configure Workstation Alpha with static IP 192.168.1.10/24 and the Engineer Laptop with 192.168.1.20/24 within the same broadcast domain. Confirm that all physical link lights turn solid green.

Server Network Parameters & Socket Binding
# Server Static Network Configuration
Hostname:    corp-portal-srv01
Interface:   FastEthernet0
IP Address:  192.168.1.100
Subnet Mask: 255.255.255.0 (/24)
Active Port: TCP 80 (HTTP World Wide Web)
Bind Socket: 0.0.0.0:80 (All Interfaces)
Process:     httpd (PID 1042, Listening)

Analyzing server network and socket configuration fields:

1IP Address: 192.168.1.100: The fixed Layer 3 destination address that client browsers target when requesting web pages.
2Active Port: TCP 80: The standardized well-known port reserved for unencrypted Hypertext Transfer Protocol traffic.
3Bind Socket: 0.0.0.0:80: Tells the network stack to listen on all active network interfaces. If bound solely to 127.0.0.1, only local programs on the server itself could connect.
4Process: httpd (Listening): The web server daemon running in the background ready to accept TCP connections.
Field Architecture Insight

Server IP configuration rule: Never use DHCP on critical infrastructure servers like DNS, Active Directory, or core web portals. Always assign static IP addresses and document them in your enterprise IP address management database.

3

TCP Three-Way Handshake Mechanics

Before a client can send an HTTP request, the two machines must establish a reliable transport layer session. HTTP relies on the Transmission Control Protocol (TCP) at Layer 4, which uses a synchronized three-way handshake.

The TCP handshake synchronizes connection parameters in three discrete steps:

1SYN (Synchronize): Workstation Alpha chooses a random Initial Sequence Number (e.g. `ISN=1000`) and transmits a TCP SYN segment to server port 80. This tells the server: I want to open a session and begin numbering my bytes at 1000.
2SYN-ACK (Synchronize-Acknowledge): The web server receives the SYN, allocates a transmission buffer in RAM, and responds with a SYN segment of its own (`ISN=5000`) while acknowledging the client packet (`ACK=1001`). This means: I agree to talk; my bytes start at 5000, and I am ready for your byte 1001.
3ACK (Acknowledge): Workstation Alpha acknowledges the server sequence number (`ACK=5001`). The TCP socket enters the ESTABLISHED state on both computers in less than 2 milliseconds.

Because TCP handles sequencing, retransmission of lost packets, and flow control, application developers never have to worry about missing bytes.

TCP Handshake Flag Exchange Summary
Step  Source Endpoint       Destination Endpoint  TCP Flags  Sequence / ACK Numbers
----  ---------------       --------------------  ---------  ----------------------
1     Client (Port 49152)   Server (Port 80)      [SYN]      Seq=1000, Ack=0
2     Server (Port 80)      Client (Port 49152)   [SYN, ACK] Seq=5000, Ack=1001
3     Client (Port 49152)   Server (Port 80)      [ACK]      Seq=1001, Ack=5001

Analyzing the TCP connection setup steps:

1In step 1, the client operating system dynamically selects an ephemeral source port (e.g. 49152) and sends a SYN packet with control flag SYN=1.
2In step 2, the server increments the client sequence number by 1 (Ack=1001) to confirm receipt, while providing its own sequence number (Seq=5000).
3In step 3, the client confirms the server sequence number (Ack=5001). Once this packet is received, the connection is fully ESTABLISHED and ready for application data.
Field Architecture Insight

Reliability guarantee: The TCP handshake guarantees delivery. If an Ethernet cable experiences electrical noise that drops a packet, TCP detects the missing sequence number and automatically retransmits the data before the user notices.

4

HTTP Request Response Structure

With the reliable TCP tunnel established, Workstation Alpha transmits its application layer payload: an HTTP GET request.

Open the web browser on Workstation Alpha, enter http://192.168.1.100, and press Enter. The browser generates plaintext ASCII headers:

GET / HTTP/1.1 Host: 192.168.1.100 User-Agent: SimnetaBrowser/2.0 Accept: text/html

When the web server daemon receives these headers, it validates the request, fetches the target index.html file from local disk, and generates an HTTP 200 OK response.

The server headers contain metadata including Content-Type, Content-Length, and Server version, followed by the HTML markup that renders the corporate portal on the user monitor.

HTTP Header Exchange Structure
>>> CLIENT REQUEST HEADERS:
GET / HTTP/1.1
Host: 192.168.1.100
User-Agent: SimnetaBrowser/2.0
Accept: text/html

<<< SERVER RESPONSE HEADERS:
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Content-Length: 142
Connection: keep-alive

Examining the HTTP transaction structure:

1GET / HTTP/1.1: Requests the root document using version 1.1 of the HTTP protocol.
2Host: 192.168.1.100: Informs the web server of the hostname or IP being accessed, enabling virtual hosting on multi-site servers.
3HTTP/1.1 200 OK: The standard success status code indicating that the server successfully located and prepared the requested web resource.
4Content-Length: 142: Specifies the exact byte count of the HTML document body following the double carriage-return line feed delimiter.
Field Architecture Insight

Protocol statelessness: HTTP is inherently stateless. Each request and response cycle is independent. Modern applications maintain user login sessions by embedding cookies or authorization tokens in these headers.

5

Testing Web With Curl

In enterprise troubleshooting, network engineers rarely rely on graphical browsers alone. Instead, they use command-line utilities like curl to inspect raw HTTP status codes and headers.

Open the CLI terminal on Workstation Alpha and execute curl -i http://192.168.1.100 to request both protocol headers and HTML body content across the local switch.

Observe the server reply displaying headers, status code, and HTML body.

Terminal Session Output
Console Verification
Alpha-PC:~$ curl -i http://192.168.1.100
HTTP/1.1 200 OK
Server: Simneta-HTTP/1.4
Date: Sat, 17 Oct 2026 12:00:00 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 142
Connection: keep-alive
<!DOCTYPE html>
<html><body>
<h1>Simneta Corporate Intranet</h1>
<p>Welcome to the secure internal network portal.</p>
</body></html>
Laptop:~$ curl http://192.168.1.100
<!DOCTYPE html><html><body><h1>Simneta Corporate Intranet</h1>...</body></html>

Analyzing the terminal verification output:

1HTTP/1.1 200 OK confirms that the web daemon received the GET request, verified socket binding on port 80, and successfully delivered the default index file.
2Content-Type: text/html instructs the client to parse the payload as markup, while Content-Length: 142 defines the exact payload size in bytes.
3If you ever encounter Connection Refused during testing, remember: it means IP routing succeeded, but the service port on the host is either stopped or blocked. If you see No Route to Host, you face a physical cable disconnect or an IP subnet mask mismatch.
Field Architecture Insight

Troubleshooting rule: When diagnosing web failures, test in layers: first ping the server IP to confirm Layer 3 reachability; then test TCP port 80 with curl or telnet to confirm Layer 4 transport; finally check HTTP status codes for Layer 7 application errors.

Key Takeaways: Servers host listening daemons on well-known ports (like TCP port 80 for HTTP). Client machines establish a reliable 3-way TCP handshake over the local switch before exchanging application data.
#web-server #http-port-80 #tcp-socket #browser-client #intranet #client-server

Discussion & Community Notes

Ask questions, share configuration tips, or discuss this laboratory topology.

0 Comments
Posting as Guest • 1-level replies supported
Loading discussion thread...