Saturday, June 7, 2008

IPMP in solaris 10

Link-based IPMP on Solaris 10


However if you are running Solaris 10 and you have a NIC that supports it you can use link-based IPMP. Link-based failure detection works by the NIC driver monitoring the link state and notifying the network subsystem in case of a failure.

The great thing about this is it does not need a test address and the setup of IPMP is very simple. For example if I have two interfaces (qfe0 and qfe4) that I want to operate in a active-standby configuration, all that would need to be done is create the two files below in /etc.

hostname.qfe0
hostname group groupname up

hostname.qfe4
group groupname up

That's it! Now you have failover for all IP addresses, including virtual, on qfe0. Also if you have zones set up with qfe0 as a physical interface the zone's IP addresses will now also failover

Monday, December 3, 2007

IE Clearing cache form Command line

Another way would be to open the command line and type the following commands:

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255 (Deletes ALL History)
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1 (Deletes History Only)
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2 (Deletes Cookies Only)
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8 (Deletes Temporary Internet Files Only)
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16 (Deletes Form Data Only)
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32 (Deletes Password History

Wednesday, November 7, 2007

Windows Tips

Repair Internet Explorer 6
A number of XP users have reported situations with Internet Explorer 6 becoming corrupted and reporting a number of different errors. While there is certainly no guarantee, the two procedures listed below have restored functionality to IE6 for many users experiencing problems.
Note: Both methods listed require that the Microsoft Windows XP CD-ROM be available.
Method 1: Microsoft Internet Explorer 6.x Repair for Windows XP
• From the Start menu, select Run.
• In the Open field, type sfc /scannow (Note: There is a space between sfc and /scannow)
• Select the OK button.
• Follow the prompts throughout the System File Checker process.
• Reboot the computer when System File Checker completes.
Method 2: Microsoft Internet Explorer 6.x Repair for Windows XP
• From the Start menu, select Search, select All Files and Folders.
• Select More Advanced Options and place a checkmark beside Search Hidden Files and Folders option.
• Ensure that Search System Folders and Search Subfolders are also checked.
• In the All or Part of the File Name box, type ie.inf
• In the Look In drop-down menu, select C: or the letter of the hard drive that contains the Windows folder.
• Click the Search button.
• In the search results pane, find the ie.inf file located in Windows\Inf folder.
• Right click the ie.inf file and click Install on the context menu.
• Reboot the computer when the file copy process is complete.
Method 2: Reinstall Windows XP by starting your computer from the Windows XP CD
To reinstall Windows XP by starting your computer from the Windows XP CD, follow these steps:
1. Insert the Windows XP CD into your computer's CD-ROM or DVD-ROM drive, and then restart your computer.
2. When the "Press any key to boot from CD" message appears on the screen, press a key to start your computer from the Windows XP CD.

Note Your computer must be configured to start from the CD-ROM or DVD-ROM drive. For more information about how to configure your computer to start from the CD-ROM or DVD-ROM drive, see your computer's documentation or contact your computer manufacturer.
3. You receive the following message on the Welcome to Setup screen that appears:
This portion of the Setup program prepares Microsoft Windows XP to run on your computer:

To setup Windows XP now, press ENTER.

To repair a Windows XP installation using Recovery Console, press R.

To quit Setup without installing Windows XP, press F3.
Press ENTER to set up Windows XP.
4. On the Windows XP Licensing Agreement screen, press F8 to agree to the license agreement.
5. Make sure that your current installation of Windows XP is selected in the box, and then press R to repair Windows XP.
6. Follow the instructions that appear on the screen to reinstall Windows XP. After you repair Windows XP, you may have to reactivate your copy of Windows XP.

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
310064 How to troubleshoot Windows XP Setup problems when you upgrade from Windows 98 or Windows Millennium Edition


Method 2: Tricking Windows into letting you reinstall IE6
Since you already have Internet Explorer 6 installed the operating system will not allow you to reinstall over the existing installation. Due to this we are required to trick the operating system into thinking IE 6 is not installed. Please note that in order to use this method we are required to edit the registry. Incorrect editing of the registry can cause serious harm to your operating system so it is advised you proceed with extreme caution.
Follow these steps for repairing Internet Explorer 6:
1. Click on the Start button and then click on the Run option.
2. In the Open field type regedit and press the OK button.
3. Navigate to the key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{89820200-ECBD-11cf-8B85-00AA005B4383}
4. Under that key you will see a entry named IsInstalled. Right click on that entry and left click on Modify.
5. Change the Value from 1 to 0.
6. Exit regedit.
Follow these steps for repairing Outlook Express:
1. Click on the Start button and then click on the Run option.
2. In the Open field type regedit and press the OK button.
3. Navigate to the key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{44BBA848-CC51-11CF-AAFA-00AA00B6015C}
4. Under that key you will see a entry named IsInstalled. Right click on that entry and left click on Modify.
5. Change the Value from 1 to 0.
6. Exit regedit.
If you would like to repair both Outlook Express and Internet Explorer 6 then do both fixes above.
When you are done modifying the registry for the application you would like to reinstall, download and install Internet Explorer 6.

Tuesday, November 6, 2007

Netscreen Port Forwarding

Netscreen -5XP port Forwarding
my setup is very straight forward and simple, I have a Netscreen 5xp with 3 pcs conected total. my emule and torrent apps are running on 192.168.2.1 and the 5xp is 192.168.2.1. and it is running in trust- untrust mode. how to forward ports for emule or bit torrent or azureus;
login to your netscreen
go to; Objects > Services > CustomClick newAnd create custom service and list all ports you will have to use for bit torrentName this;
bit torrent
TCP src port: 1-65535, dst port: 56969-56969
TCP src port: 1-65535, dst port: 56881-56881
UDP src port: 1-65535, dst port: 56881-56881
TCP src port: 1-65535, dst port: 6885-6892
UDP src port: 1-65535, dst port: 6885-6892
Hit OK
then go to network>interface>
and then edit untrustthen VIP > add new vip
servicepick new service virtual ip; (your outside ip that is assigned automatically by your ISP, this should be filled in automatically)
map to service; ( pick the custom service that you just made, bit torrent)map to IP; (the box that you are running your service on, mine is 192.168.2.14)
hit OK
then go to wizards> policypick untrust to trust
then nextDestination Address:pick VIP(untrust) under address book
nextservicepick the service that you defined in the custom section action permit nextenable nat- don’t do anything here just click next
enable logging check that off and Enable count of traffic passed via the policy (this is so you can check to see the traffic- turn this off after you are happy with everything and it is all working)
nextAuthentication Optionsclick nonenextSchedule:nonenext finish-------------*****This step you must do- everyone forgets this step, forwarding will not work otherwise!!!*****then you have to telnet into the netscreen in windows go to start> run> then type in;
CMDblack box will open and then
type; telnet then enterthen;
open 192.168.2.1(the 192.168.2.1 is the address of my 5gt)then enter in the user name and passwordand then type this command; set vip multi-portthen it will return you to;
ns5gt->then type;reset
then type;y
and again;y
In reset ...close the black box.and you are good to go, in a couple of minutes! It will take 3-5 minutes for everything to start working. Fire up the apps and then log in to the 5gt and go reports> policies> and click on the grid thing to see the traffic. If this is not working after 10-15 mins try the telnet commands again and if still not working update firmware and clear all policies, VIP’s, and custom services.

Tuesday, October 23, 2007

Mutiple Terminals in linux

GNU Screen is a fantastic terminal “window manager” in that it lets you handle multiple terminals from within one. From a purely aesthetic point of view, Screen can consolidate multiple terminal windows into one. Not only that, but what you run under Screen can be shared with other users or used remotely if you start a Screen session at home and then ssh into your home box from work and resume the Screen session.
Screen provides a number of options and features, many of which are customizable via configuration files. The default configuration file is ~/.screenrc, but you can tell Screen to load alternate configuration files.
Suppose you use Mutt for your e-mail and sit on IRC via Irssi. Both are text-mode clients and are ideal to run under Screen. You can automate the launching of both clients under Screen quite easily, without disrupting default Screen behavior.
To begin, create a shell script and save the contents below as ~/bin/start-screens:
#!/bin/sh
/usr/bin/screen -O -S screens -c ~/.screenrc-startscreens
Next, create the file ~/.screenrc-startscreens with the following contents:
startup_message off
chdir
autodetach on
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
screen -t shell0 0
screen -t irssi 1 /usr/bin/irssi
screen -t mutt 2 /usr/bin/mutt
This configuration file will start three Screen windows: the first is a standard shell window, the second starts Irssi, and the third starts Mutt. The other options control Screen behavior; the hardstatus line is always present and shows the names of the open windows, the hostname, and the current date/time.
Now simply execute
~/bin/start-screens to begin the Screen session, which will open a terminal at screen 0, Irssi at screen 1, and Mutt at screen 2.
To switch between screens, press [Ctrl]a and the screen number; for example, pressing [Ctrl]a and then 2 will take you to the Mutt screen (Note: the letters are case-sensitive). You can cycle through screens by pressing [Ctrl]a and then [Ctrl]n to move forward in the list or [Ctrl]a and then [Backspace] to move back in the list. To move back to the previous screen, press [Ctrl]a and then [Ctrl]a — a great way to flip between two screens.
You can also create a new screen by pressing [Ctrl]a and then c, and kill existing screens with [Ctrl]a and then k. To change the name of a screen, press [Ctrl]A and then A. In the above example, the name associated with the Mutt screen is mutt and the name associated with the initial shell is shell0. Pressing [Ctrl]A and then A will change these names, which are shown in the hardstatus line. Note that these shortcuts are case-sensitive. To send an actual [Ctrl]a to the screen, simply send [Ctrl]a and then a.
As well, the [Ctrl]a trigger can be customized; if you find [Ctrl]a is a key command not to your liking, you can modify the screenrc to change it:escape ^gg

Saturday, October 20, 2007

Solaris tips

Concatenation across 6 disks using Solstice DiskSuite

/usr/sbin/metainit d80 1 6 c2t8d0s2 c2t9d0s2 c2t10d0s2 c2t11d0s2 c2t12d0s2 c2t13d0s2 -i 32k
/usr/sbin/metainit d90 1 6 c3t8d0s2 c3t9d0s2 c3t10d0s2 c3t11d0s2 c3t12d0s2 c3t13d0s2 -i 32k
Raid 5 across 6 disks

/usr/sbin/metainit d90 -r c3t8d0s2 c3t9d0s2 c3t10d0s2 c3t11d0s2 c3t12d0s2 c3t13d0s2

Monday, October 15, 2007

tar copy through ssh

tar cvlpfX - exclude_file . | ssh hostname "cd /path/ ; tar xlpf -"

tar - copy all files in one directory to another on local server

tar - copy all files in one directory to another on local server
Description

To copy all files in one directory to another on local server:

# cd olddir; tar cf - . | (cd newdir; tar xvpf -)
Example

cd olddir; tar cf - . | (cd newdir; tar xvpf -)