Pages

Monday, December 29, 2014

Cisco TCL Ping script

TCL scripting is a useful tool during the lab and it be use to perform connectivity test by creating a simple ping script.

Go into the TCL shell by issuing the command

tclsh
Script
R1(tcl)#foreach address {
+>(tcl)#192.168.1.1
+>(tcl)#192.168.2.2
+>(tcl)#192.168.3.3
+>(tcl)#10.1.1.1
+>(tcl)#10.1.2.2
+>(tcl)#} { ping $address
+>(tcl)#}

Results

image

Sunday, December 28, 2014

INE-CCNP ROUTE-IP Routing Overview

Personal notes regarding Frame Relay

Each of the connection need to be manually mapped

R2 static route points to s0/0 will need additional DLCI mapping under the serial0/0 interface. Map each of the routes individually to work. Using the debug command will show the encapsulation failure.

*Mar  1 01:31:26.115: Serial0/0:Encaps failed--no map entry link 7(IP).

Commands

# show frame-relay map - equivalent to show arp
# show frame-relay pvc xxx
# debug frame-relay packet
# debug frame-relay detail

Topology

image

Frame Relay switching

image

Configurations

R1

!
frame-relay switching
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Serial0/0
ip address 10.0.0.1 255.255.255.0
encapsulation frame-relay
clock rate 2000000
frame-relay map ip 10.0.0.2 103 broadcast
frame-relay map ip 10.0.0.3 103 broadcast
!
ip route 2.2.2.2 255.255.255.255 10.0.0.2
ip route 3.3.3.3 255.255.255.255 10.0.0.3

R2

!
frame-relay switching
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Serial0/0
ip address 10.0.0.2 255.255.255.0
encapsulation frame-relay
clock rate 2000000
frame-relay map ip 1.1.1.1 203
frame-relay map ip 10.0.0.3 203 broadcast
frame-relay map ip 10.0.0.1 203
!
ip route 0.0.0.0 0.0.0.0 Serial0/0

R3

!
frame-relay switching
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial0/1
ip address 10.0.0.3 255.255.255.0
encapsulation frame-relay
clock rate 2000000
frame-relay map ip 10.0.0.2 302 broadcast
frame-relay map ip 10.0.0.1 301 broadcast
!
ip route 1.1.1.1 255.255.255.255 10.0.0.1
ip route 2.2.2.2 255.255.255.255 10.0.0.2

Tuesday, December 9, 2014

GNS3 – New GUI and Icons

After fresh install of the GNS3, the welcoming screen which display the helpful links

Getting Started, Documentation, User Groups

Also the new Charcoal style (theme)

image

The New Project window popup

image

With the new Charcoal style, the icons are new as well.

image

GNS3 – Installing GNS3 1.2.1

Installing GNS3 1.2.1 is pretty straight forward and the following are the screen captures.

GNS3 1.2.1 Change logs : https://community.gns3.com/docs/DOC-1920

Download GNS3 1.2.1 here [ LINK ]

image

image

image

image

image

Depending on your machine, the installation would detect the WinPcap already been installed. You can cancel and skip it if you wish.

image

Downloading of Wireshark from the internet

image

image

Downloading of Solarwinds ResponseTimeViewer

image

image

image

image

GNS3 installation is done

image

image

Sunday, November 16, 2014

Please create RSA keys (of atleast 768 bits size) to enable SSH v2

When the router booted up it already had a key pair generated, but our newly created keypair (1024) has a different name.

The ip ssh rsa keypair-name command was also introduced in Cisco IOS Release 12.3(4)T so that you can enable an SSH connection using the RSA keys that you have configured. Previously, SSH was linked to the first RSA keys that were generated (that is, SSH was enabled when the first RSA key pair was generated). The behavior still exists, but by using the ip ssh rsa keypair-name command, you can overcome that behavior. If you configure the ip ssh rsa keypair-name command with a key pair name, SSH is enabled if the key pair exists, or SSH will be enabled if the key pair is generated later. If you use this command to enable SSH, you are not forced to configure a hostname and a domain name, which was required in SSH Version 1 of the Cisco IOS software.

R1#sh crypto key mypubkey rsa
% Key pair was generated at: 00:02:15 UTC Mar 1 2002
Key name: R1.mydomain.com
Storage Device: private-config
Usage: General Purpose Key
Key is not exportable.
Key Data:
<--- ommited --->
% Key pair was generated at: 00:00:05 UTC Mar 1 2002
Key name: R1.mydomain.com.server
Temporary key
Usage: Encryption Key
Key is not exportable.
Key Data:
<--- ommited --->
% Key pair was generated at: 00:03:28 UTC Mar 1 2002
Key name: R1.gns3.com
Storage Device: not specified
Usage: General Purpose Key
Key is not exportable.
Key Data:
<--- ommited --->

R1(config)#ip ssh rsa keypair-name R1.gns3.com
R1(config)#
*Mar  1 00:05:09.039: %SSH-5-DISABLED: SSH 1.5 has been disabled
*Mar  1 00:05:09.055: %SSH-5-ENABLED: SSH 1.99 has been enabled
R1(config)#ip ssh version 2
R1(config)#do sh ip ssh
SSH Enabled - version 2.0
Authentication timeout: 120 secs; Authentication retries: 3

Sunday, August 17, 2014

Rebuild python-vmcloud from source

The information found here are mainly my own personal technical notes, whatever/however you use it is solely you decision !

Rebuild the python-vmcloud from source

/var/lib/dpkg/info/python-vmcloud.*

Create a working directory named "python-vmcloud", the folder structure will be as below

*** copy all the file listed in python-vmcloud.list !
*** cp -a --- copying of subfolders
*** mkdir -p --- create directory with subdirectory

python-vmcloud/
----DEBIAN/
--------control
--------postinst
--------postrm
--------prerm
----etc/
----usr/
----var/

the files under DEBIAN folder are plain text files. "control" file content is as below but without the "###"

### start of control file ####
Package: python-vmcloud
Priority: optional
Section: python
Installed-Size: 307948
Maintainer: vmcloud-dev <vmcloud-dev@cisco.com>
Architecture: all
Source: vmcloud
Version: 0.5.4-1
Replaces: python-vmcloud-st
Depends: python2.7, python (>= 2.7.1-0ubuntu2), python (<< 2.8), python-pexpect, python-lxml, python-libxml2,
virtinst, libvirt-bin, qemu-kvm, mkisofs, genisoimage, python-bottle, python-paste
Conflicts: python-vmcloud-st
Conffiles:
/etc/vmcloud/internal_config f038aed945325df744cd2d68c35b4705
/etc/vmcloud/vmcloudrc dcd847aae42f25b9982735701c45071b
/etc/init/vmcwebsvc.conf aea48c35713d76fb1894e7ae4385d2d7
 
Description: Cisco Network Device Emulator Orchestration Tool
### end of control file ####

When all the files/folders are ready, execute the command to rebuild the .deb

# dpkg-deb -b python-vmcloud

Installation of VMcloud

# dpkg -i python-vmcloud.deb

because there are some dependencies, run the command to auto install them

# sudo apt-get -f install

Redo the dpkg installation again

# dpkg -i python-vmcloud

Set the SUID for the file /usr/bin/vmcnet
# sudo chmod 4775 /usr/bin/vmcnet

*** This allow the application to run as root.

Change the ownership to "root"
# chown root:root /usr/bin/vmcloud
# chown root:root /usr/bin/vmcnet
# chown root:root /usr/bin/vmcwebsvc

Testing the installation

Edit the VIRL configuration (3node.virl) to remove out below parameters

# nano /usr/share/vmcloud/data/examples/3node/3node.virl

<entry key="import files" type="String">/usr/share/vmcloud/data/examples/3node/router1.p12</entry>

Run the topology from the template

# vmcloud netcreate -v /usr/share/vmcloud/data/examples/3node/3node.virl 3NODE

Using default configuration: /etc/vmcloud/vmcloudrc
Launching NDE network ...
Created domain: labguide.3NODE.router1 (console=127.0.0.1 3533, aux=127.0.0.1 3534)
Created domain: labguide.3NODE.router2 (console=127.0.0.1 3535, aux=127.0.0.1 3536)
Created domain: labguide.3NODE.router3 (console=127.0.0.1 3537, aux=127.0.0.1 3538)
NDE network launch: Success

Thursday, August 14, 2014

Change Linux command line output color

By default the color when we remotely connect to a Linux shell, the color of folder is signified by the color Navy BLUE. Which is hard to make out from a black color background.

A bit of customizing and you can change it.

# cp /etc/DIR_COLORS ~/.dir_colors

# nano .dir_colors

Scroll down till the DIR and edit the color parameter

Blue = 34
Green = 32
Light Green = 1;32
Cyan = 36
Red = 31
Purple = 35
Brown = 33
Yellow = 1;33
white = 1;37
Light Grey = 0;37
Black = 30
Dark Grey= 1;30

image

log off from the shell and login back

image

Sunday, August 3, 2014

Checkpoint R76 SmartConsole prerequisites installation

Checkpoint SmartConsole has some dependencies which will need to be fullfill before it will install.

OS : Windows XP SP3

  1. Windows Installer version 3.1 or higher is required to perform this installation. [LINK]
  2. Microsoft .NET Framework 2 SP2 [LINK]
  3. Microsoft .NET Framework 4 [LINK]
  4. Microsoft Visual C++ 2010 Redistributable Package [LINK]
  5. Windows Imaging Component [LINK]

Monday, July 28, 2014

Expanding VMDK disk under VirtualBox

Was trying to resize a VMDK disk and found out that the VBoxManage does not support VMDK as of yet (or my version of VirtualBox didn’t support it)

Important thing to take note when trying to resize !

  1. Resizing does not work if the guest has snapshots (prior to version 4.3.*)
  2. It will NOT work on Fixed drives
  3. VDI disk ONLY

*** after resize you NEED TO expand the partition using tools such as GParted !

image

Solution

  1. Shutdown the virtual machine
  2. Remove the virtual disk
  3. vboxmanage clonehd original.vmdk clone.vdi --format vdi
  4. vboxmanage modifyhd clone.vdi --resize 40960
  5. vboxmanage clonehd clone.vdi newdisk.vmdk --format vmdk

Finally download GParted Live CD and boot it up. Resize the partition and format it.

Done.

Sunday, July 20, 2014

Missing mandatory statement: ‘root-authentication’

After a fresh install of the JUNOS and assign an IP address on a interface and tried to execute “commit” but encounter an error:

Missing mandatory statement: 'root-authentication'

image

Junos OS requires configuration of the root password before it accepts a commit operation.

Assign the root password:

# set system root-authentication plain-text-password

image

The password set need to meet the requirements.

Now commit again.

image

The journey begins.

[ref] http://www.juniper.net/techpubs/en_US/junos14.1/topics/task/configuration/root-password.html

INIT: Id “T0” respawning too fast: disabled for 5 minutes

After you installed the Brocade vRouter, you would notice the error message which keep popping up.

INIT: Id “T0” respawning too fast: disabled for 5 minutes

image

/etc/inittab

image

Solution, issue this command witin vRouter

# sudo sed -i 's/T0/#T0/' /etc/inittab

Install Brocade 5400 vRouter in VirtualBox

Brocade v5400
VirtualBox 4.2.8

Start VirtualBox and create a new virtual machine

image

Give the virtual machine a Name and type Linux , Version

image

The minimum RAM size needed to run a vRouter is 1 GB.

image

Create a new hard disk for this installation

image

Select VMDK disk type

image

Select the dynamic disk type @ thin install

image

Allocate the disk space

image

After creation, right click and select Settings

image

Add the vRouter ISO file in the CD/DVD Drive

image

Locate the ISO file

image

Power the virtual machine up and you will see the Vyatta logo

image

After finish booting you will be at the live CD login prompt

image

Login using the following credentials

Username : vyatta

Password : vyatta

image

Install the Brocade vRouter onto the virtual harddisk

# install image

image

image

image

image

image

image

Note down the password you enter during installation !

image

image

Shut the virtual machine down and remove the ISO from the virtual CDROM. The boot the virtual machine up.

image

Upon boot up, login using the password you set during installation process

image

Done. Brocade vRouter installed