How to reset the 3750 to factory default

config t
write erase
yes to confirm
then reload the switch
If you have VLAN's on the switch you will also have to delete the vlan.dat file
delete flash:vlan.dat
yes to confirm


Or

Steps to reset switches to default are are available at
http://www.cisco.com/en/US/products/hw/switches/ps607/products_tech_note09186a00800c4546.shtml
Đọc thêm..

How to Remove 169.254.0.0 route from CENTOS/RHEL/Fedora

How to Remove 169.254.0.0 route from CENTOS/RHEL/Fedora

On CentOS and RHEL, both ship with zeroconf (zero configuration networking) its used primarily for DHCP environments but for server installs where you assign a static ip address, its still one extra ultra minor performance hit that you do not need


How to check if zeroconf is enabled?
at the command line type in
#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.50     0.0.0.0        255.255.255.248 U     0      0        0 eth1
10.20.1.50     0.0.0.0          255.255.255.192 U     0      0        0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1
10.0.0.0        10.20.1.1       255.0.0.0       UG    0      0        0 eth0
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1

Every time networking is started, either at bootup or when you restart the network service,  the zeroconf route is added to your routing table. While this is great for most, its not ideal for the rest of us.
To disable this kick ass annoying feature from making your routing table look like something a that was face rolled over  you need to edit the following file
/etc/sysconfig/network
and add the following at the bottom of the file
NOZEROCONF=yes
if you are in a hurry, hate vi or just plain lazy type in
#echo NOZEROCONF=yes >>/etc/sysconfig/network
then you can either restart networking
/etc/init.d/network restart or you can reboot, which ever makes you feel all warm and fuzzy
afterwords, check the routing table again
route -n
Like magic, the zeroconf’s routes are gone
Đọc thêm..

A script to check free RAM and reboot if it is less than a limit

A script to check free RAM and reboot if it is less than a limit 
 ################
#!/bin/bash
mem=$(free -mo | awk '/Mem/ { print $4 }')
if [ $mem -lt "410" ] ; then
echo "reboot"
fi

######################

Crontab to auto check
Đọc thêm..

sane.d tutorial

Sharing SANE on the network

About this tutorial...

This tutorial was written based on numerous notes that had been made getting scanners shared out over a LAN on Ubuntu 11.11. These directions should work for most ubuntu systems version 10 and up. Some additional information is below:

sane.d Support under Ubuntu

Sane.d is well supported under Ubuntu linux.

Why sharing

By sharing the scanner over the network, we can allow many other devices to access a scanner or scanners , without having to do nearly as much configuration work. This is especially helpful if you have other versions of linux on your network that may need to access this scanner, but do not have a current version of sane available (e.g. RHEL 6.2).

Assumptions

We made a number of assumptions while writing this tutorial. Watch for these, as you may need to adjust them to fit your situation.
  • Your network is 192.168.0.1
  • Your scanner is already working locally
  • Your scanner server (the machine the scanner is local to) is located at 192.168.0.15
  • Your scanner server is running Ubuntu 11.11 - 12.10

How to share scanners via sane.d

The following step-by-step guide to setting up sane.d should work for the vast majority of scanners. If you need to add scanner specific information, please try and do so on the scanners wiki page.

Step 1: Set up your scanner on sane first

In order to make network scanning work, you first need to get sane working with your scanner. If your scanner is USB scanner DO NOT PROCEED TO STEP 2 until it is correctly scanning via USB.
If your scanner is a network attached scanner, you need to get it working on your saned server BEFORE you try and share it out on the network.

Step 2: Tell sane to run as a server (saned)

  1. We need to edit the file /etc/default/saned to tell the computer to start the saned server. To do that, we will run the following command from a terminal:
$ sudo gedit /etc/default/saned
  1. Look for the section that reads:
# Set to yes to start saned
RUN=no
  1. Edit that so that it reads:
# Set to yes to start saned
RUN=yes
  1. Save, and close gedit

Step 3: Tell saned who to share with

  1. We need to edit the file /etc/sane.d/saned.conf to tell saned who to share with. To do that, we will run the following command from a terminal:
$ sudo gedit /etc/sane.d/saned.conf
  1. Look for the section that reads:
 ## Access list
  1. Since we are on a small office or home network, and we do not need to control access, we will add the line " 192.168.0.0/24" (share with everyone on the local network) after "## Access list"
 ## Access list
 192.168.0.0/24
  1. Find the line that reads
 #data_portrange = 10000 - 10100
  1. Edit that line to read
 data_portrange = 10000 - 10100
  1. Save the file and close gedit

Step 4: Clean up tasks

1. Restart the saned service to get the new configurations by running the following command in a terminal:
$ sudo service saned restart
2. Tell the computer to start saned automatically when the computer boots up by running the following command in a terminal:
$ sudo update-rc.d saned defaults
3. Check to make sure the saned service is up and running
$sudo service saned status
It should return something along the lines of:
       saned start/running, process 804
If it does not, see the section on troubleshooting.

Set up sane clients

Now that you have your server set up, its time to set up your clients.

Step 1: Set up your Linux clients to use this shared scanner

1. We need to tell the client computer where to find the saned server we want to connect with. To do that, we have to edit the file /etc/sane.d/net.conf by running the following command:
$ sudo gedit /etc/sane.d/net.conf
2. Find the line that reads
 ## saned hosts
3. After that line, you need to add a line with the address of the ubuntu box we installed the server on. That line will look like this:
 ## saned hosts
 192.168.0.15
4. Find the line that reads
 # connect_timeout = 60
5. and change it so that it reads:
 connect_timeout = 60
6. Save the file and close gedit.
7. From a terminal, run
$ xsane
and you should see you scanner.

Step 2: Set up your MAC/Windows clients

It is often best to use the scanner drivers that shipped with your scanner for Mac and Windows clients and connect directly to the scanner. If that is not an option, the following solutions are available:

Windows

The easiest method of connecting Windows computers to SANE scanners is to use SANEWinDS [http://en.landdownload.com/sanewin.html]. SANEWin allows windows computers to connect to SANE servers, and provides a TWAIN interface, allowing you to use any Windows scanning application to acquire and manage your scans.
The saneTWAIN bridge is a most popular method for using sane network scanners in a Windows system. For more information on this project, see [http://sanetwain.ozuzo.net/]

Mac

Twain-sane is a bridge for the MAC platform (10.6, 10.7) that allows you to use a sane shared scanner with any twain enabled Mac program. For more on this project, see http://www.ellert.se/twain-sane/ If you really need to, sane front ends are available for these platforms.

Trouble-shooting

If your network scanner does not work, the following procedures may be of help. Try to follow these steps in order.

Make sure your scanner works locally

From the server that is sharing out the scanner, make sure you can scan. If it doesn't work locally, it won't work remotely.

Make sure the saned service is running

From the server sharing out saned, run the following command:
$ sudo service saned status
it should show the saned service as up and running.

Test if the server can reach its own saned on localhost

Instead of using the scanner directly, try and access it via the localhost interface. IF this doesn't work, it won't work across the network.
To access the scanner via the local saned server,

Export the scanner to localhost

  1. Edit the saned.conf file by running the following command:
$ sudo gedit /etc/sane.d/saned.conf
  1. Look for the section that reads:
 ## Access list
and add the following lines:
 ## Access list
 localhost
 127.0.0.1
Save the file and close gedit.

Tell sane to use localhost

From the command line, run the following command to open net.conf in gedit:
$ sudo gedit /etc/sane.d/net.conf
Look for the section that reads:
 ## saned hosts
We need to add a line to tell sane to use localhost for a host:
 ## saned hosts
 localhost
 127.0.0.1

Fire up xsane to test it out...

From the command line, run:
$ xsane
You should now see two copies of your scanner. Make sure both can actually scan.

Check using xsane and command line options

From the command line, run the command
xsane [driver]:net"192.168.0.15
Assuming that your scanner uses the epson2 backend, the command would be:
xsane epson2:net:192.168.0.15

Check the local connection with telnet

IF the above procedure doesn't work, you need to make sure you can connect to the saned server with telnet. We also should log what happens. We can do that by running the following commands:
$ sudo netstat -tulpn | egrep '(:6566|saned)' saned-test.log
$ telnet localhost 6566

Manually check other configuration files (advanced)

Their are a number of configuration files that may cause a problem. Please attempt all other solutions before doing down this path (including asking for help!)

/etc/services

Check to make sure the following services are present:
sane-port       6566/tcp                # SANE Control Port
sane-port       6566/udp                # SANE Control Port

/etc/hosts.allow & /etc/hosts.deny

Try temporarily commenting out any entries in these files. If you can scan after doing this, then you will need to specifically add your host or hosts to the /etc/hosts.allow file. The following entry will give access to saned to the local network:
saned  192.168.0.

If all else fails...

If these steps have failed, its time to visit the folks on the sane-devel@lists.alioth.debian.org mailing list. They should be able to help.
Đọc thêm..

HOWTO: Share a scanner on your network in Karmic Koala/Lucid Lynx

Assumptions:


  • Your scanner is installed properly and fully function. If you need to install your scanner first, have a look at the ScanningHowTo. To check if your scanner is connected and installed properly you can use the command "scanimage -L".
  • The machine we're configuring to use as the scanner server has the ip address 192.168.1.1 and subnet-mask 255.255.255.0. This means that this machine is on the 192.168.1.0/24 (CIDR notation) network/subnet.



Preparation:

Install the package sane-utils:
Code:
sudo apt-get install sane-utils
Server-side setup:

Open /etc/default/saned with a text editor:
Code:
gksudo gedit /etc/default/saned
Set RUN to yes and save and exit the file.
The file should look like this:
Code:
# Defaults for the saned initscript, from sane-utils

# Set to yes to start saned
RUN=yes

# Set to the user saned should run as
RUN_AS_USER=saned
open /etc/sane.d/saned.conf with a text editor:
Code:
gksudo gedit /etc/sane.d/saned.conf
Find the following section and modify it using the ip and netmask settings of your scanner server. Also amend if you only want certain hosts to be able to use the scanner:
Code:
## Access list
# A list of host names, IP addresses or IP subnets (CIDR notation) that
# are permitted to use local SANE devices. IPv6 addresses must be enclosed
# in brackets, and should always be specified in their compressed form.
#
# The hostname matching is not case-sensitive.

#scan-client.somedomain.firm
#192.168.0.1
192.168.1.0/24
#[2001:7a8:185e::42:12]
#[2001:7a8:185e::42:12]/64
(Re)start the saned daemon:
Code:
sudo service saned restart
Add the saned user to the lp group so it can access the scanner:
Code:
sudo adduser saned lp
Client-side setup:

On each client computer you want to give access to the scanner, open the /etc/sane.d/net.conf with a text editor:
Code:
gksudo gedit /etc/sane.d/net.conf
and add the ip-address or hostname to the end of the file.
it should look something like this:
Code:
## saned hosts
# Each line names a host to attach to.
# If you list "localhost" then your backends can be accessed either
# directly or through the net backend.  Going through the net backend
# may be necessary to access devices that need special privileges.
# localhost
192.168.1.1
You should now be able to access the scanner using Simple Scan, XSane, etc.


Web interface:

In order to provide a web interface for your scanner (which could be useful for guests), install the packages netpbm tesseract-ocr-eng apache2:
Code:
sudo apt-get install netpbm tesseract-ocr-eng apache2
Configure the web server:

Setup Apache2 to allow CGI scripts to run:
Code:
echo 'AddHandler cgi-script .cgi' | sudo tee -a /etc/apache2/apache2.conf
Allow CGI scripts to be executed in /var/www/:
Code:
sudo sed -i.bak 's/FollowSymLinks MultiViews/FollowSymLinks MultiViews ExecCGI/g' /etc/apache2/sites-available/default
Restart the apache2 web server:
Code:
sudo service apache2 restart
Installing scanner server:

Change to the /var/www/ folder:
Code:
cd /var/www
Download the scan server archive:
Code:
sudo wget http://www.openubuntu.com/downloads/ftp/PHP-Server-Scanner-1.2-3.tar.bz2
Unzip the archive:
Code:
sudo tar xvf scan*.tar
Delete the archive:
Code:
sudo rm scan*.tar
Connecting to scanner server:

You can access the server using its ip address following by /scan. In our case:
Code:
http://192.168.1.1/scan
Links:

Đọc thêm..