Cisco – Tunnel Async Data

Tunnel Async Data

VER A 7/23/03
As an example, assume that async RS-232 devices are to be connected by leased line modems. Instead, the leased line modems are replaced with Cisco comm servers. Plug the RS-232 devices into async lines on the Cisco comm servers and connect the comm servers via an arbitrary topology IP network.  In this sample configuration, one side is the caller and the other side is the called. It is presumed that the caller side is more persistent in its desire to send data.
Assumptions:
The caller side has an IP address of 10.224.8.3 and is using Line 2.
The called side has an IP address of 10.226.x.1 and is using Line 3.

Caller Side

ip host ORDQW 20xx 10.226.x.1         ! ORDQW is just an example, please use city name.

busy-message ORDQW                       ! ORDQW is just an example, please use city name.

service tcp-keepalives-out

line x                                                       ! Whatever Async port you are using.

no motd-banner

no exec-banner

no vacant-message

autocommand telnet ORDQW /stream                ! This is have to match the ip host name.

autohangup

no flush-at-activation

no activation-character

escape-character NONE

exec

special-character-bits 8

exec-timeout 0 0

session-timeout 0 o

no modem inout

no autobaud

speed 19200                                          ! What ever the port speed needs to be.

stopbits 1

flowcontrol NONE

transport input NONE

Called Side

aaa authentication login ORDQW none                             ! ORDQW is just an example, please use city name.

no banner incoming

service tcp-keepalives-in

line x                                                                       ! Whatever Async port you are using.

no exec

no exec-banner

no vacant-message

login authentication ORDQW                                              ! Have to be the same as the login name above

modem DTR-active

no autobaud

speed x                                                                  ! What ever the port speed needs to be.

stopbits 1

flowcontrol NONE

transport input telnet

  • Share/Bookmark

Installing CentOS 5.4 using NetInstall

This document explains HOWTO use CentOS NetInstall to install CentOS using a FTP server.

Download : CentOS NetInstall and CentOS 5.4 DVD

CentOS NetInstall is basically installing from a very small downloaded ISO.

  • Download CentOS NetInstall and burn it to a CD
  • Download Cent)S 5.4 DVD and unzip it to c:\centos
  • On your Windows machine install FileZilla (FileZilla Wiki)
  • Create the following user “centos” with password “centos”
  • Set the user Home Directory to c:\centos
  • Now boot-up the server with the NetInstall CD
  • Choose FTP option
    • pic2.jpg
  • Choose to manually change the IP address to an address on your network
    • pic3.jpg
  • Enter in the IP address you want the server to have
    • pic3a.jpg
  • Now enter in the FTP Server address and the folder of where the “unzip” ISO is located.  Mine is located in a folder name “/64bit”
    • pic5.jpg
  • Now enter in the user name you created on the FTP server, I use user “centos” and password “centos”
    • pic6.jpg
  • Then the files will start copying over
    • pic7.jpg
  • Once all files are copied over you will see the following screen
    • inst3.jpg
  • Follow this HOWTO to complete the installing CentOS5
  • Share/Bookmark

AppSnap

AppSnap
AppSnap is an application that simplifies installation of software. It automatically figures out the latest version, downloads the installer and then installs the software in one seamless step. AppSnap is primarily designed for Windows which does not have any decent package manager such as APT and RPM as in the Linux world.

Features
* Detect latest and installed version of supported applications
* Download, install, upgrade and uninstall supported applications
* Uninstall applications registered with Add/Remove Programs facility
* Fully functional GUI and CLI supporting localization
* Manage installed and upgradeable applications
* Manage AppSnap updates from within itself
* Update growing application database from central repository
* Create single application repository to be used by AppSnap on an intranet
* Support proxy configurations
* Parallel downloads with progress information
* Filter applications by category and keywords
* Free and Open Source

  • Share/Bookmark

Finding a computer connected to a CAT OS Switch

If you know the MAC address use the following format:

sh cam 00-30-48-66-5A-D6

If you do not know the MAC address use the following to find it:

sh cam dynamic

If you know the VLAN and to make your search a little easier user the following:

sh cam dynamic 20

20 is the VLAN your machine is connected to.

  • Share/Bookmark

Linux Mint – Best OS?

109902-1One of my buddies was installing about three diffrent type of Linux OS a day. Yes, he like that :) .

He came upon Linux Mint and it was the best looking Linux we’ve see, not only did it look good, all my hardware worked right after install.

Linux Mint is an Ubuntu-based distribution whose goal is to provide a more complete out-of-the-box experience by including browser plugins, media codecs, support for DVD playback, Java and other components. It also adds a custom desktop and menus, several unique configuration tools, and a web-based package installation interface. Linux Mint is compatible with Ubuntu software repositories.

Source : DistroWatch.com

So I decided to give it a try at home. Every two months I had to rebuild my 16 year old daughter’s XP laptop(guess why) SpyWare problems(you have to love myspace). So I had her do the install of Linux Mint by herself (she’s not into computers at all). She did it and everything works, even the PCMCIA Wireless Card(this laptop is about 7 years old).

So she tried:
myspace – everything works
youttube – everything works
yhaoo mail – everything works
Writing a Word Doc – everything works (Open Office)
Guess what, I haven’t rebuild her laptop in over 8 months.
I have to look at installing GTKPod so she can have access to her iPOD. (not sure if that is the best one out there).

I’m running Linux Mint with Virtual Box running Windows XP in seamless mode (runs great, my Laptop does have 4GB of RAM).
Also use it in the same mode at work with my Vista 64 BIT Desktop.

I honestly have to save that Linux Mint is the most user-friendly distributions on the market – complete with a custom desktop and menus, several unique configuration tools, a web-based package installation interface, and a number of different editions.

  • Share/Bookmark

Openfire – Does your company need a private Instant Messanger Server

Openfire

Installing Openfire on CentOS 5.5

The install process takes less than 15 minutes.

  1. Do a basic install of CentOS with mySQL support and any other packages you want.
  2. Installing Java:
    1. If you don’t have Java install do the following:
    2. Download Java from (java.com) and do the following:
    3. mkdir /usr/java
    4. cp jre-6u13-linux-i586-rpm.bin /usr/java
    5. cd /usr/java
    6. sh jre-6u13-linux-i586-rpm.bin
    7. rpm -iv jre-6u13-linux-i586-rpm.bin
  3. affiliate_link

  4. Installing Openfire 3.6.4:
    1. (At the time of writing this document 3.6.4 was the current version)
    2. wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-3.6.4-1.i386.rpm
    3. rpm -ivh openfire-3.6.4-1.i386.rpm
    4. service openfire reload
    5. Now open a http session http://localhost:9090
      1. This will take you through the install procedure.
      2. Our BaseDN: OU=Users,DC=NY,DC=SIFIZM,DC=com
      3. Our AdminDN: CN=sifizm,OU=IT,OU=Users,DC=NY,DC=SIFIZM,DC=com
      4. Complete the install, once that is completed you have to reboot the server. (This is due to a bug in this version)
    6. Once the server starts, let’s check to make sure that Openfire is running.
    7. service openfire status
    8. Now open a http session http://localhost:9090
    9. Login with the Domain Admin account allowed access to.
  • Share/Bookmark

Openfiler — Openfiler Community

Openfiler is a powerful, intuitive browser-based network storage software distribution. Openfiler ScreenshotsOpenfiler delivers file-based Network Attached Storage and block-based Storage Area Networking in a single framework.

Openfiler is built on the rPath Linux metadistribution and is distributed as a stand-alone Linux distribution. The entire software stack interfaces with third-party software that is all open source.

File-based networking protocols supported by Openfiler include: NFS, SMB/CIFS, HTTP/WebDAV and FTP. Network directories supported by Openfiler include NIS, LDAP with support for SMB/CIFS encrypted passwords, Active Directory in native and mixed modes and Hesiod. Authentication protocols include Kerberos 5.

Openfiler includes support for volume-based partitioning, iSCSI (target and initiator), scheduled snapshots, resource quota, and a single unified interface for share management which makes allocating shares for various network file-system protocols a breeze.

via Openfiler — Openfiler Community.

screenshots

screenshots

  • Share/Bookmark

NMIS (Network Management Information System) on CentOS 5.3

This is my version for installing NMIS on CentOS 5.3
Some of this documentation came from http://www.sins.com.au/nmis

NOTES:
Root User information:
root/password
NMIS User information:
nmis/password
SSH enable
Security Disable (Firewall and SELinux)

  • OS Install :
    1. Default CentOS install
      1. PERL 5.6.0 or higher – http://www.cpan.org/ports/index.html
      2. Apache – http://www.apache.org/dist/
        1. Starting httpd @ startup
        2. service httpd status (most install it’s stopped)
        3. chkconfig –level 345 httpd on
        4. chkconfig –list httpd
        5. service httpd start
  • Required Packages :
    1. Devel Library
      1. yum install cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel
    2. PERL Mods (cpan)
      1. Time::HiRes
      2. Time::ParseDate
      3. Statistics::Lite
      4. Net::SNPP
      5. Net::SMTP
      6. Net::DNS
      7. Tie::RegexpHash;
      8. Cache::Mmap
      9. Proc::Queue
    3. RRDtool 1.0.33 or higher – http://oss.oetiker.ch/rrdtool/
    4. SNMP Session – http://www.switch.ch/misc/leinen/snmp/perl/dist/
  • Software Installation
    1. RRDtool – I recommend that you install rrdtool from source, even if it is available as an optional binary package for operating system distribution. This is because NMIS expects that you’ve built and installed RRDTOOL something like this, and NMIS expects to find the rrdtool libraries under /usr/local/rrdtool/. This also installs RRDs,  the shared-library perl module supplied with rrdtool.
      1. wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.0.x/rrdtool-1.0.45.tar.gz
      2. $ gzip -dc rrdtool-1.0.45 | tar -xof –
      3. $ cd rrdtool-1.0.45
      4. $ ./configure –enable-shared –prefix=/usr/local/rrdtool
      5. $ make install site-perl-install
        1. The ’site-perl-install’ tag is not so important for NMIS, but I use as it makes the rrdtool perl modules available to all perl scripts.  (See above.)
    2. SNMP Session – This package contains Perl 5 modules SNMP_Session.pm, BER.pm and SNMP_util.pm, which, when used together, provide access to remote SNMP (v1/v2) agents.  SNMP Session can be downloaded from the FTP directory ftp://ftp.switch.ch/software/sources/network/snmp/perl/.
      1. gzip -dc SNMP_Session-0.95 | tar -xof –
      2. cd SNMP_Session-0.95
      3. perl Makefile.PL
      4. make
      5. make test
      6. make install
    3. PERL modules – These are all installed the same way. I prefer the CPAN build process, as then any dependencies are picked up and installed for you.
      1. You can install them using the CPAN shell like this:
        1. LANG=en_US
        2. export LANG
        3. perl -MCPAN -e “shell”
        4. At the $cpan> enter in the following commands
          1. install Time::HiRes
          2. install Time::ParseDate
          3. install Statistics::Lite
          4. install Net::SNPP
          5. install Net::SMTP
          6. install Net::DNS
          7. install GD::Graph
  • NMIS Install
  1. Create nmis users and groups
    1. groupadd nmis
    2. useradd -g nmis -p ‘password’ nmis
    3. usermod -G nmis apache    # add apache user to group nmis, so the web interface can read/write conf files
  2. Create folder and set permissions
    1. mkdir /usr/local/nmis
    2. chown nmis:nmis /usr/local/nmis
    3. chmod g+ws /usr/local/nmis
  3. Uncompress and unpack the distribution
    1. gzip -dc nmis-3-2-0.tar.gz | tar -xof –
    2. Copy the files to the directory base
    3. cp -R nmis-3-2-0/* /usr/local/nmis/
  4. Change all file ownership and permissions to nmis
    1. chown -R nmis:nmis /usr/local/nmis/
    2. chmod -R 0775 /usr/local/nmis/
  5. Change nmis.pl  to the version of RRDtool you have install (for my example I’m using 1.0.45)
    1. vi +51 /usr/local/nmis/bin/nmis.pl
    2. use RRDs 1.000.450;
  6. Setting up web access – Apache should already be working, easiest thing to do is add aliases for the relevant directories, as should have produced by the above command, ie:
    1. Alias /nmis/ “<BASE>/htdocs/”
    2. ScriptAlias /cgi-nmis/ “<BASE>/cgi-bin/”
    3. vi /etc/httpd/conf/httpd.conf
    4. service httpd restart
  7. Automate the whole lot with CRON
    1. crontab -e (as root)
    2. Paste the following into the vi window:

# mail any errors to root
MAILTO=root@mydomain.com
######################################################
# Run the Reports Weekly Monthly Daily
######################################################
54 23 * * * /usr/local/nmis/bin/run-reports.sh day health
55 23 * * 0 /usr/local/nmis/bin/run-reports.sh week health
5 0 1 * * /usr/local/nmis/bin/run-reports.sh month health
5 0 1 * * /usr/local/nmis/bin/run-reports.sh month avail
0 18 * * * /usr/local/nmis/bin/run-reports.sh day response
57 23 * * 0 /usr/local/nmis/bin/run-reports.sh week outage
######################################################
# Run Statistics Collection
*/5 * * * * /usr/local/nmis/bin/nmis.pl type=collect
######################################################
# Run the update once a day and then update the links file
30 20 * * * /usr/local/nmis/bin/nmis.pl type=update
30 21 * * * /usr/local/nmis/bin/nmis.pl type=links
#####################################################
# Run the interfaces 4 times an hour with Thresholding on!!!
*/15 * * * * /usr/local/nmis/bin/nmis.pl type=threshold
######################################################
# Check to rotate the logs 7am every day
0 7 * * * /usr/sbin/logrotate /usr/local/nmis/conf/logrotate.conf
##################################################
# save some stuff for backup every day
0 8 * * * crontab -l > /usr/local/nmis/conf/crontab.root
0 8 * * * diff /etc/httpd/httpd.conf /etc/httpd/httpd.conf.default > /usr/local/nmis/conf/httpd.conf.backup
0 8 * * * cat /etc/syslog.conf > /usr/local/nmis/conf/syslog.conf.backup

  • Share/Bookmark

Learning Perl with SNMP Part I

Ok my first stab at it was great (snmp.pl)

#!/usr/bin/perl

$SNMP_GET_CMD = “snmpget -v1 -c public -Ovq”;
$SNMP_TARGET = “1.1.1.2″;

chomp($model = `${SNMP_GET_CMD} ${SNMP_TARGET} 1.3.6.1.2.1.1.3.0`);
chomp($serial = `${SNMP_GET_CMD} ${SNMP_TARGET} 1.3.6.1.2.1.1.4.0`);

$model =~ s/\”//g;      # Ditch the quotes.
$serial =~ s/\”//g;

print <<END;
APC UPS                         ${SNMP_TARGET}
Model: ${model}         Serial No: ${serial}
END

The output:

APC UPS                         1.1.1.2
Model: 33:17:35:52.07         Serial No: NOC 555-555-5555

Basically I’m using snmp-get from a command line in Perl

Script two I try to do more of a loop (snmp2.pl)

#! /usr/bin/perl
use strict;
use Net::SNMP;

my ($session, $error) = Net::SNMP->session(
-hostname  => shift || ‘1.1.1.1′,
-community => shift || ‘public’,
-port      => shift || 161
);

if (!defined($session)) {
printf(“ERROR: %s.\n”, $error);
exit 1;
}

my $sysUpTime = ‘1.3.6.1.2.1.1.3.0′;
my $sysContact = ‘1.3.6.1.2.1.1.4.0′;

my $result = $session->get_net(
-varbindlist => [$sysUpTime], [$sysContact]
);

if (!defined($result)) {
printf(“ERROR: %s.\n”, $session->error);
$session->close;
exit 1;
}

printf(“sysUpTime for host ‘%s’ is %s\n”,
$session->hostname, $result->${sysUpTime[0]}
);

$session->close;

exit 0;

The output:

sysInfo for host 1.1.1.1 is it-5-6509
sysInfo for host 1.1.1.1 is 254 days, 03:19:36.4

Now I’m looping through 2 OIDS and printing them line by line.

Part II will be putting them in an array.

  • Share/Bookmark

Diffrent Linux flavors

This is what my buddy MikeRoo said about the different Linux flavors:
Thin (slack/debian), there’s normal (mint/cent), there’s thick (pclinuxos) then there’s obese (fedora/suse).

  • Share/Bookmark