Archive for October, 2011

Cisco DDNS with namecheep

Posted in HowTo on 14/10/2011 by Undersys

First make sure you have correctly set up DDNS in the name cheep console.
You can test it with the following simple URL :-

Where :-
HOSTNAME = the host name of the machine eg
DOMAINNAME = the domain name eg
PASSWORD = the API password from namecheep, not your namecheep password
IPADDRESS = IP address you want to send to namecheep

Once you get a success message back from browsing to that URL you are ready to configure the Cisco IOS.

You need to parts, one on the external interface and one to set up the DDNS provider.

First we set up the provider section :-
I use the IP address as I do not have DNS configured on the Cisco, I use an internal BIND server.
Also note :-
ip=<a> is a Cisco substition for the interface’s IP.
The “method” can be called anything you want.
I want it to update every 15 minutes hence the interval command.

# conf t
ip ddns update method namecheap
 interval maximum 0 0 15 0

Second part is we add it to the external interface, in my case Dialer 0.

# conf t
ip ddns update namecheap

Exit from the config syntax.
Turn on debugging :-
# debug ip ddns update

Restart the physical interface that the Dialer is bound to. FastEthernet0 in my case. :-

# clear pppoe int Fa0

Check the logs and see what happens, if you entered everything right it should be up and running.
You can also check that IOS has parsed everything right by issuing this command :-
# show ip ddns update method

OpenVMS remove expired licences from LMF

Posted in Code, HowTo on 06/10/2011 by Undersys

If your renewing your OpenVMS PAK’s you will need to remove the expired licences.

I found a nice DCL script for this :-
LMF clean up

Hear is the DCL script :-

$! Procedure to remove expired keys from the LMF database.
$! Use this at your own risk!
$! 25-Nov-2001	J. Malmberg	Original
$pid = f$getjpi("","PID")
$temp_file = "sys$scratch:lmf_cleanup_''pid'.temp"
$on control_y then goto all_exit
$! Backup the LMF database in case of oops
$copy/log lmf$license: sys$scratch:lmf_backup.ldb
$write sys$output "lmf$license backed up to sys$scratch:lmf_backup.ldb"
$write sys$Output "You can delete this file after verifying the cleanup."
$! Dump out the LMF records
$if f$search(temp_file) .nes. "" then delete 'temp_file';*
$license list/full/out='temp_file'
$today = f$cvtime("","COMPARISON","DATE")
$pak_issuer = ""
$open/read/end=loop_end tf 'temp_file'
$   read tf line_in/error=loop_end
$   line_in = f$edit(line_in,"COMPRESS,TRIM,UPCASE")
$   key = f$edit(f$element(0, " ", f$element(0, ":", line_in)),"TRIM")
$   value = f$edit(f$element(1, ":", line_in),"TRIM")
$   if key .eqs. "ISSUER"
$   then
$	pak_issuer = value
$	pak_authorization = ""
$	pak_product = ""
$	pak_producer = ""
$	pak_term = ""
$   endif
$   if key .eqs. "AUTHORIZATION" then pak_authorization = value
$   if key .eqs. "PRODUCT" then pak_product = value
$   if key .eqs. "PRODUCER" then pak_producer = value
$   if key .eqs. "PAK"
$   then
$!	write sys$output "''pak_product', Date= ''value'"
$       if value .eqs. "(NONE)" then goto loop
$	pak_term = f$cvtime(value,"COMPARISON","DATE")
$!	show sym pak_term
$!	show sym today
$	if pak_term .lts. today
$	then
$	    write sys$output "Deleting License = ''pak_product', Date= ''value'"
$	    license delete 'pak_product'/auth='pak_authorization'-
$	endif
$   endif
$   goto loop
$! Clean up and exit
$if f$trnlnm("tf", "LNM$PROCESS_TABLE", "SUPERVISOR") .nes. ""
$   close tf
$!if f$search(temp_file) .nes. "" then delete 'temp_file';*

Past this into a new file and execute it. If you get a message about unrecognized verb that's ok.

OpenVMS 8.3 Starting out..

Posted in HowTo on 06/10/2011 by Undersys

When you first boot OpenVMS after the install you must enter PAK’s.
This can be done via the serial console  to get the base and network PAK’s installed. You can then later install the additional PAK’s via SSH.

The to PAK’s you need are (IA64) :-

This will get the base system and networking online.
To register,view and edit new or existing PAK’s you can use the following command ensure you are logged in as “system”:-
select option “1” to add new PAK’s and use the information in the PAK file.
select option “4” to view the installed PAK’s best to select “FULL” detail.
Now that we have base line PAK’s installed lets set up the network.
Ensure you have started the que manager first.

Start the Que manager:-

You can check the Que manager via :-
Queue manager SYS$QUEUE_MANAGER, running, on IA64::

Use the following command to set up your network and network interfaces:-
$ @sys$startup:tcpip$startup

Start the que manager:-
You can check the cue manager via :-
Queue manager SYS$QUEUE_MANAGER, running, on IA64::

* To edit an existing TCP/Ip config and set DHCP client to start on boot run the TCP config again and select option 2.

* Since HP have done a lot of work on the TCP/Ip stack you can use “ifconfig -a” to see all interfaces. Or you can use the traditiona l”SHOW INTERFACE” under the TCPIP menu.

$ ifconfig -a

inet netmask ffffff00 broadcast ipmtu 1500

inet netmask ff000000 ipmtu 4096

TN0: flags=80<NOARP>

TN1: flags=80<NOARP>

or :-

$ tcpip

Interface   IP_Addr         Network mask          Receive          Send     MTU

IE0             523            16    1500
LO0                   4             4    4096

TCPIP> exit

Now that we have the network up , ssh into the openVMS box. (ensure you started SSH in the tcp services menu) .
You will need to set  terminal type on first log in:-

Now create a file to copy the rest of the PAK’s into :-
Copy all the contents of the PAK file into this file.
save the file.

Run the DCL :-