You are on page 1of 11

Himalaya College of Engineering (HCE)

Department of Electronics and Computer Engineering

LABORATORY MANUAL
Course No. : CT754
Course Title: Internet and Intranet Lab

Compiled By:
Er. Jeewan Rai
2021
Contents
Report Format ....................................................................................................................................................................... 3
LAB 1: Physical Network Design ........................................................................................................................................ 4
LAB 2: Implement the concept of HTTP GET and POST Methods ................................................................................ 5
LAB 3: Implementation on FTP Server using FileZella Server. ...................................................................................... 6
LAB 4: IP Based and Name Based Virtual Hosting......................................................................................................... 10
Report Format

1. Cover page

2. Lab title

3. Objectives

4. Required tools

5. Theory related to topic

6. Procedures/ Scripts code

7. Outputs Snapshots

8. Conclusions

3
NOTE: Install XAMPP

LAB 1: Physical Network Design


Title: design a network for a college that having 2 departments (BCT and CSIT). Each department has 20
computers. Use routers, switches, firewalls etc.
Tools Required:
a) Paperwork design
Theory:

a) Network design
b) Network Devices: Router, Switch, Firewall
Network Design:

… Attach your network design

Conclusion

4
Computer Network Lab Exercise BCT 7th Semester

LAB 2: Implement the concept of HTTP GET and POST Methods


Tools Required:
(a) XAMPP – apache server
Theory:

(a) HTTP GET and POST methods


Procedures

 HTTP GET Request


/test/demo_form.php?name=value1
Example: demo_form.php
<html lang="en">
<head>
<title>Example of PHP GET method</title>
</head>
<body>
<?php if(isset($_GET["name"])){
echo "<p>Hi, " . $_GET["name"] . "</p>"; }
?>
<form method="get" action="<?php echo $_SERVER["PHP_SELF"];?>">
<label for="inputName">Name:</label>
<input type="text" name="name" id="inputName">
<input type="submit" value="Submit">
</form>
</body>
 HTTP POST Request
POST /test/demo_form.php HTTP/1.1
Host: localhost
name=value1
Example: demo_form.php
<html lang="en">
<head>
<title>Example of PHP GET method</title>
</head>
<body>
<?php if(isset($_POST["name"])){
echo "<p>Hi, " . $_POST["name"] . "</p>"; }
?>
<form method="post" action="<?php echo $_SERVER["PHP_SELF"];?>">
<label for="inputName">Name:</label>
<input type="text" name="name" id="inputName">
<input type="submit" value="Submit">
</form>
</body>
Results:

Conclusion:

5
Computer Network Lab Exercise BCT 7th Semester

LAB 3: Implementation on FTP Server using FileZella Server.


Tools Required:
(a) XAMPP – apache server, filezilla server
Theory:
(a) FPT
(b) File Server
Procedures

 Run XAMPP Control and start Apache and FileZilla service.


 Click on Admin button

 Leave Administration password and press OK button

 FileZilla General Settings

6
Computer Network Lab Exercise BCT 7th Semester

 Make a folder “Documents” in your D:\\ and put some files e.g. images, videos or docx
 Click on User Account icon

 General>Users click Add

7
Computer Network Lab Exercise BCT 7th Semester


 Type user: document and click OK
 Set also Password: document


 Go to Shared folders and click Add


 Select created folder “D://Document”
 Tick to all options of Files and Directories and click OK

8
Computer Network Lab Exercise BCT 7th Semester

 Restart FileZilla service from XAMPP Control


 Open Internet Explorer Browser and Type ftp://<your_IP>/
 Type user: document and password: document and enter

Results

Conclusion

9
Computer Network Lab Exercise BCT 7th Semester

LAB 4: IP Based and Name Based Virtual Hosting


Title: configure two domain “www.test1.com” and “www.test2.com” in IP based virtual hosting
Tools Required:
(a) Apache server
Theory:
- Virtual Hosting
- IP Based Virtual Hosting
- Name Based Virtual Hosting
Procedures:
(1) Create two project folders in htdocs e.g. Test1 and Test2 and create index.php with a text
“Test1 Website” and “Test2 Website”
Name Based Virtual Hosting multiple domain names for the same IP address.
(2) Open httpd.conf file in “xampp\apache\conf\httpd.conf” and write code just below “Listen
80”
<VirtualHost 127.0.0.1:80>
ServerName www.test1.com
DocumentRoot E:/xampp/htdocs/test1
</VirtualHost>
<VirtualHost 127.0.0.1:80>
ServerName www.test2.com
DocumentRoot E:/xampp/htdocs/test2
</VirtualHost>
IP Based Virtual Hosting [show different ip address by running command ipconfig /all e.g.
192.168.2.91] - separate IP for each domain
(3) Open httpd.conf file in “xampp\apache\conf\httpd.conf” and write code just below “Listen 80”
<VirtualHost 127.0.0.1:80>
ServerName www.test1.com
DocumentRoot E:/xampp/htdocs/test1
</VirtualHost>
<VirtualHost 192.168.2.91:80>
ServerName www.test2.com
DocumentRoot E:/xampp/htdocs/test2
</VirtualHost>

(4) Restart apache service


(5) Open hosts file in “C:\Windows\System32\drivers\etc\hosts” as Administrator user
(6) Write code as given below in last line
Name Based Virtual Hosting
127.0.0.1 www.test1.com
127.0.0.1 www.test2.com
IP Based Virtual Hosting
127.0.0.1 www.test1.com
192.168.3.51 www.test2.com

10
Computer Network Lab Exercise BCT 7th Semester

(7) Open browser and type in address bar and enter


www.test1.com
www.test2.com
Results

Conclusions

11

You might also like