Tuesday, November 29, 2011

Monitoring Internet Connection using IP SLA

Our company may have two connection to the internet through 2 ISPs. If we want to use one connection as primary and other as backup, we can use IP SLA to monitor the link. It detects the link failure even if the connection between modem and ISP fails. So it helps to switch over to the backup path automatically as soon as the primary path is down.

ip sla router

Step1 : Configuring SLA process

R1(config)#ip sla 1

R1(config-ip-sla)#icmp-echo 8.8.8.8

R1(config-ip-sla-echo)#frequency 5 (Means, every 5 second send icmp-echo packet to the ip 8.8.8.8. This can by any reliable IP on internet)

R1(config-ip-sla-echo)#exit

Step2: Scheduling SLA process

R1(config)#ip sla schedule 1 start-time now life forever (Means, start the sla process now and don’t end)

Note: we can check the process using the following command

R1#show ip sla statistics

Step3: Create a track object to track the change. It is used to inform the router about the current condition

R1(config)#track 10 rtr 1 reachability (this will inform the router if any reachability problem occurs. rtr is the old name of IP SLA)

R1(config-track)#exit

Step4: Create two static route two both ISPs with some tweaks

R1(config)#ip route 0.0.0.0 0.0.0.0 fastEthernet 0/0 track 10

R1(config)#ip route 0.0.0.0 0.0.0.0 fastEthernet 0/1 2

Now router will select ISP1 as primary path because of administrative distance is lower. If the link to ISP1 is down, then router automatically switch the connection to ISP2

Monday, November 28, 2011

ASA static/Default Routing configuration

ASA STATIC DEFAULT ROUTING
Syntax of static route configuration is :
Route <interface-name> <ip address> <netmask> <gateway ip> [distance]
Objects:
  • Configure static routing to inside interface
ASA1(config)#route inside 172.30.10.0 255.255.255.0 172.30.30.2 1
ASA1(config)#route inside 172.30.20.0 255.255.255.0 172.30.30.2 1
  • Configure default route to internet
ASA1(config)#route outside 0.0.0.0 0.0.0.0 192.168.1.2
Note: we can use the command “route outside 0 0 192.168.1.2” for default route, both are same.

Saturday, November 26, 2011

Network Time Protocol (NTP) configuration

One time updatentp

If you want to synchronize with NTP server just now, then execute the following command:

$ sudo ntpdate 1.in.pool.ntp.org

Here 1.in.pool.ntp.org is the NTP server we are synchronizing with. You can find closer NTP server to your country from www.pool.ntp.org

NTP automatic synchronization through service

$ sudo apt-get install ntp

$ sudo service ntp start

If you want to synchronize with more closer NTP servers, then edit ntp.conf file by replacing the existing NTP servers with closer servers.

$ sudo nano /etc/ntp.conf

now change ntp servers if you want and save the file and restart the service

$ sudo service ntp restart

NOTE: if you are running other distributions than Ubuntu, then login as root and run the command without “sudo” in front of it

Friday, November 25, 2011

automatic login Ubuntu 11.10

sudo nano /etc/lightdm/lightdm.conf

now under [SeatDefaults], add the following

autologin-user=binoy

Note: here username is “binoy” . change it to your user name

Wednesday, November 23, 2011

Linux/Unix file system Hierarchy

/ root directory
/bin command binaries
/boot boot loader
/dev devices
/etc configuration files
/home user home directories (MacOSX uses ‘USERS’ directory to store home directories of users)
/lib library files for executables
/proc virtual file system (information about current running system)
/root root user home directory
/sbin system binaries (binaries that should run by system not users)
/tmp temporary file storage
/usr user binaries , often read only; (install by user like open office)
/var variable files, log, mail
/media mount place for removable media

/mnt

legacy location for removable media

Sunday, November 6, 2011

createrepo rpm installation problem – solution

Error:

[root@server1 Packages]# rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm
warning: createrepo-0.9.8-4.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
    deltarpm is needed by createrepo-0.9.8-4.el6.noarch
    python-deltarpm is needed by createrepo-0.9.8-4.el6.noarch

Solution:

rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm deltarpm* python-deltarpm*

Friday, November 4, 2011

Installing GNS3 on CentOS 6.x/RHEL 6.x/Fedora 15


  1. Login as root then do the following steps:
    yum install python python-devel xorg-x11-proto-devel libXext-devel gcc-c++ libXrender*

  2. Download and install Qt
    #wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.4.tar.gz
    #tar -xzf qt-everywhere-opensource-src-4.7.4.tar.gz
    #cd qt-everywhere-opensource-src-4.7.4
    #./configure -nomake examples -nomake demos -qt-gif -no-exceptions -debug -qt3support
    #gmake
    #gmake install
    #PATH=/usr/local/Trolltech/Qt-4.7.4/bin:$PATH
    #export PATH

  3. Download and install sip
    #wget http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.13.tar.gz
    #tar -xvf sip-4.13.tar.gz
    #cd sip-4.13.tar
    #python configure.py
    #make
    #make install

  4. Download and install PyQt
    #wget http://ftp.pardus.org.tr/pub/source/2009/PyQt-x11-gpl-4.8.4.tar.gz
    #tar xvf PyQt-x11-gpl-4.8.4.tar.gz
    #cd PyQt-x11-gpl-4.8.4
    #python configure.py -q /usr/local/Trolltech/Qt-4.7.4/bin/qmake
    #make
    #make install

  5. Download GNS3
    #wget http://downloads.sourceforge.net/project/gns-3/GNS3/0.7.4/GNS3-0.7.4-src.tar.gz
    #tar -xvf GNS3*.tar.gz && rm GNS3*.tar.gz
    #cd GNS3-0.7.4-src
    #mkdir Dynamips IOS Project Cache Temp

  6. Download Dynamips depending up on OS (64-bit/32-bit)
    #cd dynamips
    #wget http://downloads.sourceforge.net/gns-3/dynamips-0.2.8-RC2-amd64.bin?download (for 64-bit OS)
    #wget http://downloads.sourceforge.net/gns-3/dynamips-0.2.8-RC3-community-x86.bin?download (for 32-bit OS)
    #chmod +x dynamips-0.2.8-RC2-amd64.bin (if we use 32-bit version, use the name of that file)

  7. Creating Quick launch with gns3 icon
    #wget http://www.noahbeach.com/wp-content/uploads/2011/08/gns3.png
    Now right click on the panel and select add to panel > custom launcher > select the gns3 location and press on the icon button to locate the icon just downloaded. ok
    Now if we press that icon in the panel, gns3 will run...!!!