Wednesday, March 29, 2006

IPSEC from Nortel contivity to Juniper netscreen

I was having difficulties in getting an IPSEC tunnel shifted from a Cisco VPN Concentrator onto a Nortel Contivity router . Well it turned out that there were lots of options that needed to be changed with respect to the encryption settings in the Contivity.The default settings for each manufacturer is quite different.Anyway I got a document to configure the tunnel to a Juniper Netscreen (That was the other endpoint) from a Nortel Contivity device and once the settings were done , it worked fine.
I was also able to configure a User tunnel on the Contivity .It was rather simple , I just created a user account in the profiles -> users section of the gui for it and then assigned a IP address pool for the user and lo that did it.The connection was established . Then I had to open the firewall rules for people accessing the network through the tunnel.

Tuesday, March 28, 2006

Packet drops on an RF link

This has been bugging me for so many days now. A small percentage of packet drops and remote connections become a nightmare.Well this time it seems the signals from the RF transmitter on top of the ISP's tower were weak because the alignment of the transmitter had changed and the signal strength to our ISP base station had become low and thus the packet drops.
The ISP guys aligned the transmitter and now the link is fine
Well on other occasions the reasons for packet drops were duplex setting mismatch, choking etc

Samba suddenly stopped working

My Samba server with ADS authentication suddenly stopped working .
When I gave wbinfo -u and getent passwd it was all working fine.
Then i tried kinit username@domain.tld and it gave the error
kinit(v5): Cannot find KDC for requested realm while getting initial credentials
I set dns_lookup_kdc = true in krb5.conf
Next it gave the error
kinit(v5): Clock skew too great while getting initial credentials
For some reason the ntp synchronization with my Windows AD had stopped.
I went to system-config-time and reconfigured the ntp server as the AD and it worked.
Well later I figured out that the first error was because I gave lower case in the domain name in the kinit statement and the actual problem was not that.Anyway with the dns_lookup_kdc = true in the krb5.conf lower case also seems to work....................:-)

Monday, March 27, 2006

Misc Tips for Linux

The First Collection
To sort the union of two files removing duplicate lines. Suppose a and b contain the files. Do just this:
cat a b | sort -u -k 2
-u means unique, -k 2 selects the second field as sorting key.

Need to "watch" everything a user does? The following watches donkey.
$ watch lsof -u donkey
Or, to see what in going on in directory "/work/junk"
$ watch lsof +D /work/junk

To view text output of a binary file
strings /bin/ls

strace can also be used to trace an already started program.
Usage: strace -p pid (where pid is the process id of the program)

To find files opened by a process
ls -al /proc/process-id/fd/

*Find package which gives library
rpm -q --whatprovides /usr/lib/libreadline.so.4

Files being used by diff processes
/usr/sbin/lsof
to check how much swap is under use type "cat /proc/meminfo" at a console.

MOUNTS
mount -t smbfs -o workgroup=domain.tld,uid=user,password=password //192.168.21.14/share /mnt/mountpoint

GUI Problems
* panel disappears suddenly - killall -9 panel ; /usr/bin/gnome-panel ;

CREATE A SWAP FILE INSTEAD OF PARTITION
# dd if=/dev/zero of=swapfile bs=1024 count=65536
---> this creates a 64Mb file with the name "swapfile"
# mkswap swapfile ---> to make it a swap file
# swapon swapfile ----> this will add the file as a swapfile
# cat /proc/meminfo ---> to check the new swap size
If you are done using the swap file, you can swapoff the file:
# swapoff swapfile ----> to remove the swap file

Using a CORAID box as LVM :
Include this line in /etc/lvm2/lvm.conf
under the devices section
types = [ "aoe" ,16 ]
modprobe aoe
vgscan
vgchange -a y

In the name of Allah ,Most Gracious , Most merciful

I am not a regular diary writer and so I wasn't much interested in blogging but then I thought OK I will post on this everyday whatever troubleshooting I do in my work and some misc tips - might be handy for me later or for somebody else.And some other thoughts that come across my mind during my day's work or while browsing the net.

If at all any of it helps you at any point of time , please put in a comment in here.
If you have got any doubts about it also , feel free to put it across to me ,we'll sit and sort it out.
And of course If you see any mistakes please point that out also.

I will begin by putting up a few of my favourite tips that I have compiled over the past year