To develop a simple webserver to serve html pages and display the configuration details of laptop.
HTML content creation.
Design of webserver workflow.
Implementation using Python code.
Serving the HTML pages.
Testing the webserver.
from django .shortcuts import render
from http.server import HTTPServer,BaseHTTPRequestHandler
content ='''<html
><head>
<title>Microsoft</title>
</head>
<body>
<h2 align="centre">TCP/IP PROTOCOL SUITE</h2>
<table border="1" bgcolor = "lavender" align="centre" cellpadding="20">
<tr>
<th bgcolor="pink">LAYER</th>
<th bgcolor="pink">PROTOCOL</th>
</tr>
<tr>
<td>Application layer</td>
<td>HTTP,SMTP,DNS,FTP,RDP,DHCP,X Windows,Telnet,SSH,TFTP,SNMP</td>
</tr>
<tr>
<td>Transport Layer</td>
<td> TCP,UDP</td>
</tr>
<tr>
<td>Internet Layer</td>
<td>ICMP,IGMP,ARP,IPv4/IPv6</td>
</tr>
<tr>
<td>Network Access Layer</td>
<td>Ethernet,FDDI,Frame Relay,Token Ring</td>
</tr>
</table>
</body>
</html>'''
class MyServer(BaseHTTPRequestHandler):
def do_GET(self):
print("Get request received...")
self.send_response(200)
self.send_header("content-type","text/html")
self.end_headers()
self.wfile.write(content.encode())
print("This is my webserver")
server_address =('',8000)
httpd = HTTPServer(server_address,MyServer)
httpd.serve_forever()
The program for implementing simple webserver is executed successfully.

