Wednesday, December 31, 2008

TROUBLESHOOT DHCP

DHCP Stands for the Dynamic Host Configuration protocol and it is used to assign the IP addresses to the network computers dynamically. It saves the lot of time and the administrative efforts of the network administrators by providing the TCP/IP configurations such as IP address, subnet mask, default gateway address, DNS, router, proxy server and the settings to the client computers.

With the DHCP, the process of connecting the new client computer with the server is very easy. Just imagine that if you are assigned a task of provide the IP addresses and other TCP/IP configurations to1000 client computers manually then how lengthy and tiring task it can be. DHCP sever assigns the IP addresses from its predefined fixed pool of the IP addresses.

In the DHCP pool, you can define the range, leased duration and map the IP addresses with the specific computers. The IP addresses allocation can be manual, automatic and dynamic. Sometimes in the computer networks, DHCP failure occur due to several reasons and in this situation the client computer will not be able to connect to the server and get the server resources. The problems may arise at the client end or the DHCP server end.


DHCP Client Troubleshooting
Many Client Computers are unable to get the IP Addressees from the DHCP Server

It can be due to the reason that the IP address of the DHCP server has been changed and the client computers are not able to connect to the DHCP server. Additionally the client computers are located behind the firewall or are connected to the DHCP server through the router. It is also possible that the multiple DHCP servers exist in the same LAN.

The solutions of these problems are to make sure that the DHCP server’s IP address fall in the same range of the IP addresses as the scope it is serving. For a DHCP server to provide the IP address to the remote subnets, the router should act as DHCP relay. Make sure that you are not configuring the multiple DHCP servers on the same LAN with the same scope of the IP addresses as it can cause the conflicts in the IP addresses.

The DHCP client does not have IP addresses configured

It can happen due to the reason that the client computer is unable to connect to the DHCP server and obtain the IP address from it or the DHCP server is unavailable. To resolve this issue, you need to make sure that the client computer has connectivity with the DHCP server and the network cable and network connections are accurate. Then try to ping the DHCP server and make sure that you are getting reply from the server.

DHCP client has automatically assigned IP address to itself

In the Windows 98, XP Professional and the Windows ME sometimes the client computers are unable to connect to the DHCP server so they assign the IP addresses automatically through the IP auto configuration.

DHCP Server Troubleshooting

Sometimes if the multiple client computers are experiencing problems in leasing the IP address from the DHCP server then the problem is most likely with the DHCP server itself. The common problems that can arise in the DHCP server are the following.

DHCP server has been stopped

You need to check the log files and the system event files for details about this problem. These log files will provide the detailed information, causes and the solution of this problem.

One of Two DHCP Server is not serving the client

If this happens and if the server is a domain member then you need to authorize the DHCP server in the Active directory.

DHCP Server’s data is corrupted.

The DHCP server’s data has been corrupted or missing and possibly it generates the JET database errors. You need to use the DHCP data recovery options to recover the lost data and correct any of the generate errors. You can also use the reconcile feature in the DHCP console to verify and reconcile any inconsistencies in the database.

If you specific issue is not mentioned above then you need to visit the Microsoft’s website and review the DHCP troubleshooting articles for more details.

Testinside-ccna-640-802-v35

Exam Number/Code: 640-802
Exam Name: CCNA

"CCNA 's Cisco Certified Network Associate", also known as 640-802 exam, is a Cisco certification.
Preparing for the 640-802 exam? Searching 640-802 Test Questions, 640-802 Practice Exam, 640-802 Dumps?
With the complete collection of questions and answers, TestInside has assembled to take you through 200 questions to your 640-802 Exam preparation. In the 640-802 exam resources, you will cover every field and category in CCNA helping to ready you for your successful Cisco Certification.
http://www.youthgeneration.net/forum/index.php?topic=79.0

Sunday, December 14, 2008

Dell Wireless and Ubuntu Hardy Heron


I have a Dell Inspiron 1520 with the Dell Wireless 1390 WLAN Mini-Card, one that has given many Linux users big headaches.

After trying many different approaches suggested all over the web, and gathering clues in many Ubuntu forum posts, I finally worked out this solution:

First of all you must check if you have the correct card:

lspci -nn | grep 14e4

Result: 05:00.0 Network controller [0280]: Broadcom Corporation BCM94311MCG wlan mini-PCI [14e4:4311 (rev 01)]

Then proceed to the first step:

1. blacklist bcm43xx

echo blacklist bcm43xx | sudo tee -a /etc/modprobe.d/blacklist

2. install ndiswrapper and related files

sudo apt-get install ndiswrapper-common ndiswrapper-utils-1.9 ndisgtk

3. download http://ftp.us.dell.com/network/R174291.exe

this is a ridiculous bit of bloat, but the most complete INF for 43xx devices

4. Unzip the drivers.

5. go into folder DRIVER_US inside the result of what you did above

6. use ndiswrapper to install bcmwl5.inf

System -> Administration -> Windows Wireless Drivers -> Install New Driver -> Select bcmwl5.inf from ~/R151517/DRIVER_US

7. Modify rc.local

gksudo gedit /etc/rc.local

Insert these lines ABOVE “exit 0″ line:

modprobe -r b44
modprobe -r ssb
modprobe -r ndiswrapper
modprobe ndiswrapper
modprobe ssb
modprobe b44

8. Restart or simply paste one by one the following lines:

$ sudo rmmod b44
$ sudo rmmod ssb
$ sudo rmmod ndiswrapper
$ sudo modprobe ndiswrapper
$ sudo modprobe ssb
$ sudo modprobe b44

You should see the WiFi led on and you are good to go.

Easy switching network settings (home & office)

You can easily switch your network settings using the netsh command, instead of installing a lot of unnecessary software. Here are two examples, one for dhcp settings, and one for a static address. You can put it into a .bat file:

netsh interface ip set address "Net" source=dhcp
netsh interface ip set address "Net" static 192.168.0.xx 255.255.255.0 192.168.0.1 1

192.168.0.xx is your ip address, followed by the netmask and gateway. The last 1 is the metric. Optionally you can adjust your DNS values as well using set DNS instead of set address. This command helped me switching easily between my home network settings using dhcp and my office where there is a static address.

SSH login without password

If you want to make a bakup script like the one I showed you yesterday, you may need to set your machines to login remotely without asking for a password everytime. This is done by sharing between them the public rsa keys generated by the openssh server.

Login as the user you will use for the transfer script and run:

ssh-keygen -t rsa

Answer the questions but do not enter a password because otherwise you will still need to to pass it when the script runs. You should then have two new files in ~/.ssh, id_rsa and id_rsa.pub. Open id_rsa.pub with your favorite editor and copy everything (there is only one line actually) into the ~/.ssh/authorized_keys on the second machine (the one in which you need to copy).

Now try to login and if everything was set properly it won’t ask you for a a password anymore.

Simple script to backup virtual machines in linux

Currently I am using a small VMWare Server hosting 4 virtual machines, and i found my self in the position of backing them up. But the virtual machines need to be stopped before you can copy them somewhere else. Using the getstate() output of the vmware-cmd you can find the state of each virtual machine. using the following script you can set a cron job to backup your vitual machine:


#!/bin/sh
PATH="/srv/vmware-server/Contabilitate/Windows XP Professional.vmx"
CMD=$(vmware-cmd "$PATH" getstate)

case $CMD in
"getstate() = on")
vmware-cmd "$PATH" suspend
rsync -avz --stats --progress -e ssh /srv/vmware-server/Contabilitate root@192.168.0.3:/mnt/bak/04
rsync -avz --stats --progress -e ssh /srv/vmware-server/Contabilitate root@192.168.0.9:/var/bak/04
vmware-cmd "$PATH" start
;;
*)
esac

Export CSV from MySql Database via SSH

There is a time when you need to export a specific table from a mysql database. Through SSH this is made very easy using the following command:

echo “select * from table_name;” | mysql -u root -pyourpassword database_name | sed -e ’s/^Mn/r/g’ > /home/exported.csv

Of course you can make a small script that adds the date or other usefull information to the filename:

#!/bin/bash
#This scripts adds date to the exported CSV
NOW=$(date +”%m_%d_%Y_%H_%M_%S”)
echo “select * from table_name;” | mysql -u root -pyourpassword database_name | sed -e ’s/^Mn/r/g’ > /home/exported_$NOW.csv

Save this script as export_csv.sh and make it executable, and that’s it.

Wednesday, December 3, 2008

VPN for Linux Installation

VPN for Linux
Installation

These steps have been tested on recent versions of RedHat, Fedora, Ubuntu, and Slackware.

1. Obtain the IPSec Group Name and IPSec Password for either on campus use or off campus use by clicking the following link: VPN Account Information.
2. If prompted, enter your SacLink User ID and Password. If you have not created your account or have forgotten your account ID or password, see SacLink Information for details.
3. Obtain the VPN client from the Software Distribution Web Site by clicking the following link: http://software.csus.edu/
4. Click on the Obtain Software link in the left navigation bar.
5. Read and agree to the terms of distribution by clicking the I Agree link at the bottom of the page.
6. Log in using your SacLink username and password.
7. Locate the Cisco VPN Client for your operating system and click the Download link.
8. Click the Download Now button.
9. Save the file to your home directory. The file could take a few minutes to download depending on your connection speed.
10. Once the file is downloaded, close your browser.
11. Open a terminal session. How this is done depends on your distribution of Linux and whether or not you are running X windows.
12. Change directory to where you downloaded the file. If you downloaded the file to your home directory, simply type cd
13. Unpack the file that you have downloaded by typing
tar xvzf vpnclient-linux-4.0.1.A-k9.tar.gz
14. Change directory to the newly unpacked directory
cd vpnclient
15. You need to be the root user (superuser) to run the install script.
Type su and press enter.
16. Enter the root password.
17. To install the client type: ./vpn_install
18. Accept all the default selections by pressing the Enter key.
19. Restart your computer, or type (as root)
/etc/rc.d/init.d/vpnclient_init start
to start the vpn client without restarting.

Configuration

The following instructions assume you are using the vi (vee-eye) text editor. But you can use any text editor, such as emacs or pico (the instructions will vary slightly depending on your choice of editor).

1. Open a terminal session and become root (superuser).
2. Type su and press enter. Enter the root password.
3. Create a User Profile for the VPN Client. The default location of the sample profile is /etc/CiscoSystemsVPNClient/Profiles/.
4. Type cd /etc/CiscoSystemsVPNClient/Profiles/
5. Type ls
6. You must copy the sample.pcf file and rename it. To do so, type
cp sample.pcf oncampus.pcf
(offcampus.pcf for off campus connections).
7. Typevi oncampus.pcf
8. Using the arrow keys on the keyboard, place the cursor after the = sign at the Description prompt.
9. Press the esc key and then the x key, to delete the previous information.
10. Press the esc key and then the i key, to enter the new information.
11. Type Sac State On Campus VPN Connection or Sac State Off Campus VPN Connection at the prompt for the Description.
12. Using the arrow keys on the keyboard, place the cursor after the = sign at the Host prompt.
13. Press the esc key and then the x key, to delete the previous information.
14. Press the esc key and then the i key, to enter the new information.
15. Type vpn.csus.edu at the prompt for Host.
16. Using the arrow keys on the keyboard, place the cursor after the = sign at the GroupName prompt.
17. Press the esc key and then the x key, to delete the previous information.
18. Press the esc key and then the i key, to enter the new information.
19. Type the IPSec Group name you obtained from the VPN Account Information document.
20. Using the arrow keys on the keyboard, place the cursor after the = sign at the Username prompt.
21. Press the esc key and then the x key, to delete the previous information.
22. Press the esc key and then the i key, to enter the new information.
23. Type your SacLink login name at the Username prompt. The file should look like the On Campus or Off Campus sample.
24. Save the new profile by pressing the esc key followed by a colon and letters wq and then press enter (esc :wq enter).

Running the Client

1. Connect to the Internet.
2. Open a terminal session.
3. Type the following:
vpnclient connect profile
(where profile for on campus connections is: oncampus; and for off campus connections is: offcampus ).
4. It will prompt you to enter the group password.
5. It will display your SacLink user name.
6. At the password prompt, type your SacLink password.
7. The VPN services should now be enabled.
8. Connect to the Internet.
Your Ad Here