SlideShare a Scribd company logo
DEVRY GSP 215 Week 7 iLab Networking and a Tiny Web
Server NEW
Check this A+ tutorial guideline at
http://www.homeworkrank.com/gsp-215-devry/gsp-215-
week-7-ilab-networking-and-a-tiny-web-server-updated
For more classes visit
http://www.homeworkrank.com/
TCO 1—Given a computing environment with multiple
operating systems, demonstrate the ability to use the command
line interface in Windows and Linux, and compile and run a
program using the command line.
TCO 10—Given the importance of networking in game design,
explain how computers are connected to a network, and
summarize basic networking fundamentals, terminologies,
protocols, and devices.
Scenario
In this week's lab, we will create two C programs to use with
networking commands. The first program will read a domain
name or dotted-decimal address from the command line and
display the corresponding host entry. The second program will
be a tiny web server used on localhost.
Part A:
In this lab, we will explore DNS mapping by creating a file
named hostinfo.c. This program will read a domain name or
dotted-decimal address from the command line and display the
corresponding host entry. Local host will always map to
127.0.0.2.
Enter the following C code into notepad. Save the file in the
cygwinhomeusername folder on your computer (ie:
C:cygwin64homegina) as hostinfo.c.
Open Cygwin, and compile the program: gcchostinfo.c –o
hostinfo.
#include <stdlib.h>
#include <stdio.h>
#include <arpa/inet.h>
#include <netdb.h>
Run the program with the following domain names, and note
the results. Also, choose some of your own.
Part B:
Read pages 919-927 in the book. We will be developing the tiny
web server listed in the book. This web server supports the GET
method. It will look for an HTML file in the current directory
and will display the web page in a web browser. Please study
and review the code to understand what it is doing. Feel free to
extend the code as well.
Copy the C code below into notepad. Save the file in the
cygwinhomeusername folder on your computer (i.e.,
C:cygwin64homegina) as tiny.c.
Compile the program: gcctiny.c –o tiny.
, at a cygwin prompt, type ./tiny 10000.
This will start the web server listening at port 10000.
Open your web browser, and type the following in the address
bar: http://localhost:10000/home.html.
This will open your website using your own tiny web server. To
stop your tiny web server, press control + c in cygwin.
Include a screenshot below of your web page working in a
browser.
C Code:
//Tiny web server code
#include <stdlib.h>
#include <stdio.h>

More Related Content

PDF
Perl on-embedded-devices
ODP
Wt vs phalcon
PDF
KubeCon EU 2016: Getting the Jobs Done With Kubernetes
PPTX
R brownbag seminar 2.2
PDF
Moving to the next neth server ui by @davideprincipi #neth17
PPTX
Managing your Drupal project with Composer
PDF
Latex with git
PDF
The First 10M Pulls: Building The Official Curl Image for Docker Hub
Perl on-embedded-devices
Wt vs phalcon
KubeCon EU 2016: Getting the Jobs Done With Kubernetes
R brownbag seminar 2.2
Moving to the next neth server ui by @davideprincipi #neth17
Managing your Drupal project with Composer
Latex with git
The First 10M Pulls: Building The Official Curl Image for Docker Hub

What's hot (20)

PDF
funcs, func expressions, closure, returning funcs, recursion, the stack -goph...
PDF
Extensible web
PDF
Git introduction
PDF
Containerize spring boot application with docker
PDF
SambaStatus a "Do it yourself" module for NethServer
PDF
deployer, deployment for TYPO3 CMS with ease and fun
PDF
EC CUBE 3.0.x installation guide
PDF
Learn backend java script
ODP
An open source flash workflow using HaXe (2009)
ODP
Laka Blogging engine
PDF
Sparknize - Visualize CSV Data With Sparkline In Seconds
PDF
Pemaketan blankon-ii
PPT
The future of server side JavaScript
PPTX
Meetup #24 Docker for Node Developer
PDF
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
PPTX
Introduction to Docker
PDF
Installing Python on Mac
PDF
Statyczna analiza kodu PHP
PPTX
Last Month in PHP - April 2016
PPTX
C++ compilation process
funcs, func expressions, closure, returning funcs, recursion, the stack -goph...
Extensible web
Git introduction
Containerize spring boot application with docker
SambaStatus a "Do it yourself" module for NethServer
deployer, deployment for TYPO3 CMS with ease and fun
EC CUBE 3.0.x installation guide
Learn backend java script
An open source flash workflow using HaXe (2009)
Laka Blogging engine
Sparknize - Visualize CSV Data With Sparkline In Seconds
Pemaketan blankon-ii
The future of server side JavaScript
Meetup #24 Docker for Node Developer
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Introduction to Docker
Installing Python on Mac
Statyczna analiza kodu PHP
Last Month in PHP - April 2016
C++ compilation process
Ad

Similar to Devry gsp 215 week 7 i lab networking and a tiny web server new (20)

PPT
Net Programming.ppt
PDF
PDF
Download full ebook of Linux Socket Programming Walton Sean instant download pdf
PDF
From Drives to URLs
DOCX
#include stdio.h#include systypes.h#include syssocket.h
PPT
Network programming-Network for engineering
PPT
Network Prog.ppt
PPT
03 sockets
PDF
Uccn1003 -may10_-_lab_01_-_network_services_and_commands
PDF
Uccn1003 -may10_-_lab_01_-_network_services_and_commands
PDF
Bgnet a4 2
PPTX
Socket programming
PPT
lecture03 on socket programming000000.ppt
PPT
lecture03for socket programming college.ppt
PDF
NP-lab-manual (1).pdf
PDF
NP-lab-manual.pdf
PDF
D200011_2024_Dec13 (2).pdf aaaaaaaaaaaaa
DOCX
NP-lab-manual.docx
PDF
Filip palian mateuszkocielski. simplest ownage human observed… routers
PDF
Simplest-Ownage-Human-Observed… - Routers
Net Programming.ppt
Download full ebook of Linux Socket Programming Walton Sean instant download pdf
From Drives to URLs
#include stdio.h#include systypes.h#include syssocket.h
Network programming-Network for engineering
Network Prog.ppt
03 sockets
Uccn1003 -may10_-_lab_01_-_network_services_and_commands
Uccn1003 -may10_-_lab_01_-_network_services_and_commands
Bgnet a4 2
Socket programming
lecture03 on socket programming000000.ppt
lecture03for socket programming college.ppt
NP-lab-manual (1).pdf
NP-lab-manual.pdf
D200011_2024_Dec13 (2).pdf aaaaaaaaaaaaa
NP-lab-manual.docx
Filip palian mateuszkocielski. simplest ownage human observed… routers
Simplest-Ownage-Human-Observed… - Routers
Ad

More from williamethan912 (11)

DOCX
Uop law 421 week 3 dq 3
DOC
Uop law 421 final guide new
DOC
Devry gsp 215 week 7 homework networking commands new
DOC
Devry gsp 215 week 6 i lab virtual memory new
DOC
Devry gsp 215 week 5 i lab memory new
DOC
Devry gsp 215 week 3 homework representing and manipulating information new
DOC
Fin 592 week 6 team final assignment new
DOC
Fin 592 week 3 team outline new
DOC
Uop fin 590 week 6 fraud at enron materiality
DOC
Uop fin 590 week 6 case study 2 new
DOC
Uop fin 590 week 3 case study 1 new
Uop law 421 week 3 dq 3
Uop law 421 final guide new
Devry gsp 215 week 7 homework networking commands new
Devry gsp 215 week 6 i lab virtual memory new
Devry gsp 215 week 5 i lab memory new
Devry gsp 215 week 3 homework representing and manipulating information new
Fin 592 week 6 team final assignment new
Fin 592 week 3 team outline new
Uop fin 590 week 6 fraud at enron materiality
Uop fin 590 week 6 case study 2 new
Uop fin 590 week 3 case study 1 new

Recently uploaded (20)

PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PPTX
Lesson notes of climatology university.
PDF
Complications of Minimal Access Surgery at WLH
PDF
RMMM.pdf make it easy to upload and study
PDF
Empowerment Technology for Senior High School Guide
PDF
1_English_Language_Set_2.pdf probationary
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PPTX
Cell Types and Its function , kingdom of life
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
Trump Administration's workforce development strategy
PDF
IGGE1 Understanding the Self1234567891011
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PPTX
Introduction to Building Materials
Final Presentation General Medicine 03-08-2024.pptx
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
Lesson notes of climatology university.
Complications of Minimal Access Surgery at WLH
RMMM.pdf make it easy to upload and study
Empowerment Technology for Senior High School Guide
1_English_Language_Set_2.pdf probationary
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Chinmaya Tiranga quiz Grand Finale.pdf
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Cell Types and Its function , kingdom of life
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
What if we spent less time fighting change, and more time building what’s rig...
Trump Administration's workforce development strategy
IGGE1 Understanding the Self1234567891011
Unit 4 Skeletal System.ppt.pptxopresentatiom
Introduction to Building Materials

Devry gsp 215 week 7 i lab networking and a tiny web server new

  • 1. DEVRY GSP 215 Week 7 iLab Networking and a Tiny Web Server NEW Check this A+ tutorial guideline at http://www.homeworkrank.com/gsp-215-devry/gsp-215- week-7-ilab-networking-and-a-tiny-web-server-updated For more classes visit http://www.homeworkrank.com/ TCO 1—Given a computing environment with multiple operating systems, demonstrate the ability to use the command line interface in Windows and Linux, and compile and run a program using the command line. TCO 10—Given the importance of networking in game design, explain how computers are connected to a network, and summarize basic networking fundamentals, terminologies, protocols, and devices. Scenario In this week's lab, we will create two C programs to use with networking commands. The first program will read a domain name or dotted-decimal address from the command line and display the corresponding host entry. The second program will be a tiny web server used on localhost.
  • 2. Part A: In this lab, we will explore DNS mapping by creating a file named hostinfo.c. This program will read a domain name or dotted-decimal address from the command line and display the corresponding host entry. Local host will always map to 127.0.0.2. Enter the following C code into notepad. Save the file in the cygwinhomeusername folder on your computer (ie: C:cygwin64homegina) as hostinfo.c. Open Cygwin, and compile the program: gcchostinfo.c –o hostinfo. #include <stdlib.h> #include <stdio.h> #include <arpa/inet.h> #include <netdb.h> Run the program with the following domain names, and note the results. Also, choose some of your own.
  • 3. Part B: Read pages 919-927 in the book. We will be developing the tiny web server listed in the book. This web server supports the GET method. It will look for an HTML file in the current directory and will display the web page in a web browser. Please study and review the code to understand what it is doing. Feel free to extend the code as well. Copy the C code below into notepad. Save the file in the cygwinhomeusername folder on your computer (i.e., C:cygwin64homegina) as tiny.c. Compile the program: gcctiny.c –o tiny. , at a cygwin prompt, type ./tiny 10000. This will start the web server listening at port 10000. Open your web browser, and type the following in the address bar: http://localhost:10000/home.html. This will open your website using your own tiny web server. To stop your tiny web server, press control + c in cygwin. Include a screenshot below of your web page working in a browser. C Code: //Tiny web server code