Redoing the Main Site

January 28th, 2008 by admin

I have given this site a lot of thought lately. I have decided to go with an open Wiki. I will be copying some of the contents of this site to the Wiki. I will also be working on gathering more information for host on the wiki as well as allowing others to post scripts on the site.

This should be a better way for everyone to communicate and allow for those that wish to publish any of there scripting or HotTo’s as well.


Humor in IM

November 27th, 2007 by admin

(11:44:06 AM) Mark: move xarno right
(11:44:19 AM) Mark: aye i saw that
(11:44:39 AM) Mark: that gallery belongs to Mark a friend of JB who is a coworker
(11:44:50 AM) altpptla: kewl
(11:45:50 AM) Mark: should be don
(11:45:52 AM) Mark: err done
(11:46:32 AM) altpptla: nt yet
(11:47:07 AM) Mark: yes it is
(11:47:16 AM) Mark: you just have to flush your dns ceshe
(11:47:28 AM) Mark: my ping worked fine
(11:47:32 AM) Mark: but i haven’t hit it yet
(11:47:39 AM) altpptla: cmds???
(11:47:55 AM) Mark: cmds?
(11:48:03 AM) altpptla: commands to clear cache?
(11:48:08 AM) Mark: xarno.dekalbhabitat.org
(11:48:58 AM) Mark: ipconfig /flushdns
(11:49:52 AM) altpptla: the requested operation requires elevation???
(11:50:13 AM) altpptla: i got it
(11:50:15 AM) altpptla: :)
(11:50:31 AM) altpptla: have to run as admin… i really like that feature… some people hate it… but i like it
(11:50:45 AM) Mark: what do you mean?
(11:50:49 AM) Mark: in vista?
(11:50:59 AM) altpptla: yeah…
(11:51:01 AM) Mark: yeah Ubuntu has been doing that for a few years now
(11:51:10 AM) altpptla: …and?
(11:51:14 AM) Mark: you have to sudo or gsudo to get admin commands to work
(11:51:20 AM) altpptla: i’ve not been using ubuntu for years
(11:51:21 AM) Mark: just saying it is not new
(11:51:31 AM) altpptla: in windows it is
(11:51:33 AM) Mark: Vista is so old school
(11:51:40 AM) altpptla: i suppose…
(11:51:47 AM) altpptla: i’m still not getting it
(11:52:45 AM) Mark: maybe because you have to wait for your DNS server to update it
(11:52:50 AM) Mark: that could take a while
(11:53:01 AM) Mark: you could edit your hosts files and force it

, ,


Upgrading Ubuntu

October 22nd, 2007 by Mouseclone

I had bad experiences in the the past with upgrading Ubuntu. This time I did it a little differently. I downloaded the alternate CD and did the upgrade from the CD with the latest patches. This worked out great. It was flawless and the best experience that I have ever had upgrading any OS even MS Windows.

What made this so great? It cleaned up packages that were no longer supported. It checked for updates to software that was supported and I never lost a beat. My VPN and keyring stayed in tact. All of my settings were the same. The only thing that got uninstalled was Beryl. I did go though and install the Compiz-Fusion though, and after a short time I was back where I started from with desktop effects.

I wish everything went as well as this upgrade did. I will warn everyone though, this took a while, quite a few hours. Why so long? You have to think of the number of people that were trying to download all of the patches and updates and CDs. It took me a while to get a server that wasn’t filled up to even start the download. What does this mean? Ubuntu and friends need to upgrade their bandwidth on release day. Heck if I knew that it wouldn’t fry my bandwidth usage on this server I would host it. I’m not so sure how 1and1 would feel about me doing that, nor how the people on my shared server would respond to their sites being slow.

It is all good though. The upgrade went well and I didn’t even have down time. I just played a few arcade games while waiting for the install. Best of luck to everyone on this upgrade.

, , ,


Ubuntu 7.10 Released

October 18th, 2007 by Mouseclone

Ubuntu 7.10 has been released today. You can get your copy via direct download or you can use Linuxtracker.org to get the BitTorrent. I will see how the upgrade goes today when I get home. Should be interesting to see some of the new features that they have put into it.

, , ,


Using a Simple Expect Script to make Cisco Router Changes - Solution

October 1st, 2007 by Mouseclone

Now that we know what steps need to be taken we have to write some code. This script is easy for the user and kinda complex, though not as complex as some scripts can get. I will try my best to explain the steps. Some should just be obvious.

First lest take a look at that bash script that is used to execute the expect script.

#!/bin/bash

#fixed vars
b=10.200.1

#Questions
echo “What is the IP address of the remote router? ”
read rip
echo “What is the DLCI for the PVC? ”
read dlci

#build the multiplyer from the dlci
multi=`echo $dlci | cut -c2-3`

# Math
subnet=$(($multi* 4))
host=$(($subnet+1))
host=$b.$host
remote=$(($subnet+2))
remote=$b.$remote

echo “Host: $host”
echo “Remote: $remote”

expect ./cisco.exp $rip $remote $host $dlci password1 password2

The fixed vars section of this script give us the first 3 octets of the WAN IP address. This is so we don’t have to type it a few times and we can do a join later on.

The Questions section is just asking 2 questions. The first question is really self explanatory, What router are you connection to first. The second question is up to you. Our DLCIs the same as our sub interfaces in our router. We are also using this number to subnet the ip address range. Nifty right?

In “building the multiplier” we need to take only the last 2 digits of the DLCI. If the DLCI is 100 then 4 x 0 = 0. Then we take the 0 and add 1 for the host and add 2 for the remote. When joined to the fixed var b we get an IP address of 10.200.1.1 and 10.200.1.2. If you know something about sub-netting then we have a range of ips from 10.200.1.0-4. Where 10.200.1.0 is the network and 10.200.1.4 is the broadcast. So we have the ip address that we need to modify in the routers.

That was simple enough. I just put in an echo to see the IP address. They can be removed or you could see if they are correct or not and put n an error correction there.

Then we run the expect script with all of our vars passed to it.

#!/usr/bin/expect -f

#######################################
## This reason for this script is to ##
## adjust the router IP address so ##
## that they are all on the same ##
## subinterface corisponding with ##
## the 3rd octect in the IP address ##
#######################################

# set variables
set rip [lindex $argv 0]
set rsip [lindex $argv 1]
set hsip [lindex $argv 2]
set dlci [lindex $argv 3]
set pw1 [lindex $argv 4]
set pw2 [lindex $argv 5]

spawn telnet $rip
expect {
“Password: ” {
send “$pw1\r”
send “en\r”
send “$pw2\r”
}
}
expect {
“#” {
send “conf t\r”
send “int s0/0.100 point\r”
send “ip address $rsip 255.255.255.252\r”
}
}
send “end\r”
send “exit\r”
expect eof

spawn telnet 10.1.1.4
expect {
“Password: ” {
send “$pw1\r”
send “en\r”
send “$pw2\r”
}
}
expect {
“#” {
send “conf t\r”
send “int mfr1.$dlci point\r”
send “ip address $hsip 255.255.255.252\r”
}
}
send “end\r”
send “exit\r”
expect eof

First we are setting the vars from where we passed them to the expect script respectively. Then we spawn a Telnet session, and the expect script is waiting until it sees Password: , then it will pass information to the telnet session. This will happen again after the passwords are passed and to make sure that the session is in the right spot we expect a # and pass the rest of the information to the session. This session will have to time out before the script will continue, takes about 10 seconds.

Then we telnet to the host router and make the changes respectively. That is it. Both routers have been updated in a matter of seconds. We let the computer do the work for us.

Also when using this script I noticed a down time of less that 30 seconds before the routers had rebuilt routes.

, , ,