Monday 25 March 2013

How to create a ad-hoc network

Many times we need to connect two or more computers may be for gaming purposes or public data transfers for that we need a adhoc network i.e. the computer to computer network.

For creating a ad-hoc network simply follow the steps below:

1 Open network and sharing center in you computer.
2.click on set up a new connection or network.



3. now choose set up a wireless ad hoc network.
4. give a name to your network, and password if you want.
5. your ad-hoc is ready , and starts waiting for other users to connect.

Thursday 21 March 2013

How to upgrade the IOS version in CISO switch/Router

Let's say we have one CISCO 2950 switch having IOS version

"c2950-i6q4l2-mz.121-22.EA4.bin"


Step 1
======

Upload the updated IOS image file on TFTP server

In our case we have upload the IOS image "c2950-i6q4l2-mz.121-22.EA8.bin" on our TFTP server.


Step 2
======

Establish the connectivity between TFTP server and your Switch.

In our case switch IP is 192.168.1.2  and TFTP server IP is 192.168.1.100


Step 3
======

Take the access of switch

switch>en
switch#copy tftp: flash:
Address or name of remote host []? 192.168.1.100
Source filename []? c2950-i6q4l2-mz.121-22.EA8.bin
Destination filename [c2950-i6q4l2-mz.121-22.EA8.bin]?

Accessing tftp://192.168.1.100/c2950-i6q4l2-mz.121-22.EA8.bin...
Loading c2950-i6q4l2-mz.121-22.EA8.bin from 192.168.1.100: !!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 3117390 bytes]

3117390 bytes copied in 1.892 secs (1647669 bytes/sec)
Switch#


Step 4
======

Now check weather your new IOS image is uploaded in flash memory or not?

switch#sh flash
Directory of flash:/

    1  -rw-     3058048          <no date>  c2950-i6q4l2-mz.121-22.EA4.bin
    2  -rw-     3117390          <no date>  c2950-i6q4l2-mz.121-22.EA8.bin

64016384 bytes total (57840946 bytes free)
Switch#


Step 5
======

Configure switch to boot with new IPS image next time

Switch#
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#boot system c2950-i6q4l2-mz.121-22.EA8.bin
Switch(config)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console

Switch#


Step 6
======

Reboot the switch and confirm that weather switch is booting from new image or still with old image?

Switch#reload
Proceed with reload? [confirm]
%SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.
yC2950 Boot Loader (C2950-HBOOT-M) Version 12.1(11r)EA1, RELEASE SOFTWARE (fc1)
Compiled Mon 22-Jul-02 18:57 by miwang
Cisco WS-C2950-24 (RC32300) processor (revision C0) with 21039K bytes of memory.
2950-24 starting...
Base ethernet MAC Address: 0001.9654.2413
Xmodem file system is available.
Initializing Flash...
flashfs[0]: 2 files, 0 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 64016384
flashfs[0]: Bytes used: 6175438
flashfs[0]: Bytes available: 57840946
flashfs[0]: flashfs fsck took 1 seconds.
...done Initializing Flash.

Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4


Loading "flash:/c2950-i6q4l2-mz.121-22.EA8.bin"...
########################################################################## [OK]
              Restricted Rights Legend



That's it.........

Friday 8 March 2013

How to Break CISCO Router Password

Step 1
======

Reboot  the router.

At the time of rebooting press Ctrl + Break keys
                                             
Step 2
======

rommon 1 >confreg 0x2142
rommon 2 >reset



Step 3
======

Now router will skip the startup-confg file and reload without the password

Now you can change the password of your  router  from below commands


Change Console Password
=======================

router>en
router#conf t
router(config)#line console 0
router(config-line)#password CCNA
router(config-line)#login
router(config-line)#exit
router(config)#



Change enable mode Password
===========================
router>en
router#conf t
router(config)#enable secret CCNA



Step 4
======

Save the running-config into startup-config

router#copy running-config startup-config


Step 5
=======

Again change the configuration register value.

router#conf t
router(config)#config-register 0x2102
router(config)#exit
router#reload



That's it.

Friday 1 March 2013

How to configure SSH access in CISCO devices

Run the below mention commands on your CISCO device.

Router>enable
Router#conf t
Router(config)#line vty 0 4
Router(config-line)#transport input ssh
Router(config-line)#exit
Router(config)#ip domain-name ms.com
Router(config)#crypto key generate rsa
Router(config)#

(Note: we assume that we have already created user account in CISCO device. And you can chose different domain name in your configuration instead of ms.com)

How to configure Static IP in Linux

With the below commands you can configure the Static IP address in a Linux machine.

Configure IP address and Subnetmask:

#sudo ifconfig eth0 192.168.1.2 netmask 255.255.255.0

Configure Default Gateway/Router:

#sudo route add default gw 192.168.1.2

Configure DNS addresses:

Under Linux / UNIX / BSD operating system, you need to edit the /etc/resolv.conf file and add the line:

#vi /etc/resolv.conf

Modify or enter nameserver as follows:

nameserver 4.2.2.2
nameserver 4.2.2.1


(Note in your network you should  use your ISP or your local DNS server addresses instead of 4.2.2.2 and 4.2.2.1)