Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/emulab/exp16.2.php on line 2

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/emulab/exp16.2.php on line 2

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/emulab/exp16.2.php on line 3

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/emulab/exp16.2.php on line 4

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/emulab/exp16.2.php on line 5

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/emulab/exp16.2.php on line 8

 

 


Douglas E. Comer


Computer Science Department
Purdue University
West Lafayette, IN 47907

webmaster: W. David Laverell


Companion Topics

Home

Book Information

Purpose of Site

Getting Started

Students

Faculty

"What's New"

"Coming Attractions"

"C Pointers"

Acknowledgements

 

 
Hands-On Networking: Experiment 16.2 (An Emulab Approach) Home > Student > Experiments > Emulab > 16.2

Chapter 16: Experiment 16.2 - Configure A Squid Cache

I found Squid in 5 minutes to be very helpful on this experiment although it took me longer than 5 minutes.

This experiment follows Experiment 16.1 in a very natural way. I set up an experiment with three nodes formed in a line, ie, with links between node0 and node1, and between node1 and node2. I made node2 the web server exactly as in 16.1 and set up the squid cache on node1. Again I used the FC4-STD image and did the following:

  1. sudo yum -y install squid
  2. sudo /sbin/chkconfig squid on
  3. sudo /sbin/service squid start

After installing squid, I had some configuration to do. In the file /etc/squid/squid.conf I

  1. Uncommented the line "http_port 3128"
  2. Uncommented the lines
    1. acl our_networks 192.168.2.0/24
    2. http_access allow our_networks

Of course, I put in the correct network and mask when identifying "our_networks". It is very important to put that line ahead of the line "http_access deny all".

Now the only thing to do on node0 was to get wget to go through the proxy. You accomplish this by setting an environment variable. In bash you type, "export http_proxy="http://ip_address_of_proxy:3128". Then you run the wget command. I know I was getting the page from the proxy because I made errors that resulting in the connection being refused before finally doing the configuration correctly.



This site is maintained by W. David Laverell of the Computer Science Department at Calvin College. For assistance or corrections, please contact him at lave@calvin.edu.