Powered by Blogger.
Showing posts with label CISCO. Show all posts
Showing posts with label CISCO. Show all posts

CCNA- How to configure Cisco IOS Banners

Cisco IOS devices support a number of banners that are presented to users when they use the console line or when they connect remotely using telnet or SSH. They are often used to inform users about their legal rights. It might be a good idea to present a banner to users who are trying to connect to your device, here are some items you might want to think about:
  • To show that only authorized users are allowed to connect.
  • That all traffic will be monitored.
  • That there is no expectation of privacy.
  • Don’t use anything that says “welcome”.
  • Don’t add any contact information or information about the router in the banner.
here’s a good example on the website of the California Technology Agency that gives you more information about what a good banner should contain and some sample texts. Before you implement any banners, make sure to check your legal council first. Having said that, let’s look at the different banners…

Different Banners

Cisco IOS routers support a number of banners, here they are:
  • MOTD banner: the “message of the day” banner is presented to everyone that connects to the router.
  • Login banner: this one is displayed just before the authentication prompt.
  • Exec banner: displayed before the user sees the exec prompt.
  • Incoming banner: used for users that connect through reverse telnet.
We’ll take a look at how to configure these different banners now.

MOTD Banner

We’ll start with the message of the day banner that will be presented to anyone accessing the router:
R1(config)#banner motd #
Enter TEXT message.  End with the character '#'.
Authorized users only, violaters will be shot on sight! #
The # symbol is a start and stop character. You can use any other character if you want. This is what the MOTD banner looks like:
R1#exit

R1 con0 is now available

Press RETURN to get started.

Authorized users only, violaters will be shot on sight!
A nice and welcome banner that everyone will see…let’s move on to the login banner now.

Login banner

The login banner is presented to users that access the router remotely using telnet or SSH:
R1(config)#banner login $ Authenticate yourself! $
Let’s try it out:
R1#telnet 1.1.1.1
Trying 1.1.1.1 ... Open

Authorized users only, violaters will be shot on sight!  Authenticate yourself!
Above you see that the login banner is displayed after the MOTD banner. It would have been better if I added some empty lines so that the login banner would show up below the MOTD banner.

Exec banner

The exec banner is shown just before the exec prompt:
R1(config)#banner exec #
Enter TEXT message.  End with the character '#'.
You are connected to line $(line) at router $(hostname)
#
This time I added an extra line in the banner and I also used some operators like $(line) and $(hostname). Let’s see what that looks like:
R1#exit

R1 con0 is now available

Press RETURN to get started.

Authorized users only, violaters will be shot on sight!
You are connected to line 0 at router R1
As you can see it shows to which line I am connected (line 0 is the console) and the hostname of my router (R1). One more banner to go!

Banner incoming

The last banner is used for reverse telnet connections. Reverse telnet can be used to access the console of another device by connecting the AUX port of the router to the console port of another router. This allows you to ‘telnet’ into the console port of another router.
R1(config)#banner incoming $
Enter TEXT message.  End with the character '$'.
This is a banner for Reverse Telnet
$
We’ll have to configure the AUX port in order to test it:
R1(config)#line aux 0
R1(config-line)#transport input telnet
We will enable telnet on the aux port, now we’ll have to check what line our AUX port uses:
R1#show line 
*Mar  1 01:48:09.495: %SYS-5-CONFIG_I: Configured from console by console
R1#show line 
   Tty Typ     Tx/Rx    A Modem  Roty AccO AccI   Uses   Noise  Overruns   Int
*     0 CTY              -    -      -    -    -      2       1     0/0       -
     97 AUX   9600/9600  -    -      -    -    -      0       0     0/0       -
     98 VTY              -    -      -    -    -      2       0     0/0       -
     99 VTY              -    -      -    -    -      0       0     0/0       -
    100 VTY              -    -      -    -    -      0       0     0/0       -
    101 VTY              -    -      -    -    -      0       0     0/0       -
    102 VTY              -    -      -    -    -      0       0     0/0       -
Now we can reverse telnet to the AUX port like this:
R1#telnet 1.1.1.1 6097
Trying 1.1.1.1, 6097 ... Open

Authorized users only, violaters will be shot on sight! 
This is a banner for Reverse Telnet
As you can see it presents us the “incoming banner”. I hope this has been helpful to you to understand the banners!
This great, post has been taken from Rene Molenaar website. Please visit and do support his awesome and brilliant website: http://networklessons.com/network-management/how-to-configure-cisco-ios-banners/

General: Understanding Ethernet Jumbo Frames


Today i am posting an awesome post link from www.routerfreak.com it related to Understanding Ethernet Jumbo Frames. Here is the link to the article: http://www.routerfreak.com/understanding-ethernet-jumbo-frames/



Some of the things discussed in this article are:

Standard Ethernet Framce
Jumbo Frames
Why do we need Jumbo Frames
Problems with Jumbo Frames
How to use Jumbro Frames
Advantages of Jumbo Frames

SYSLOGs


SYSLOG or system logging is one of many interesting concepts in Cisco world. Log messages monitoring and audit is one of the main parts of a network engineer life. Log messages are displayed in real time on the route, once we make some changes in the network, or if any issue happens to our network devices. We can also send these log messages from the router to a centralized NMS for monitoring in a Network Operations Center.  IOS can log messages to :

  • Console
  • Monitor (VTY, AUX) usually enabled via terminal monitor command in global config mode.
  • Buffer
  • Trap (SYSLOG) to send logs to an NMS


One important thing to understand is the concept of logging levels. Logging levels simply specify the type of log messages we want to send to our desired logging buffer/terminal/server.  Different logging levels can be set via logging console command:



Let understand severity level concept:


Severity level 3 means 0, 1 , 2, 3 ( severity level  0/1/2/3 enabled), and the router will send all corresponding severity level log messages to our desired destinations.
If we don’t want to mention the severity level # , we can specifity the name of the logging severity, for which we want the router to send all updates, for example if we want to send all Critical Condition logs, we can enable it via the following command :

R1(config)#logging console critical

The severity level command comes in handy, when we want to enable different types of logging in one go. 

In the second part of this article, i will discuss the practical implementation of SysLog in GNS3.


CIDR - Classless Inter-domain Routing



PART I:

CIDR (RFC: 4632): Classless inter domain routing. In simple words, CIDR is like supernetting route summarization and VLSM at the ISP end that’s why it is called Classless inter domain routing. Confusing? Okay let us discuss it via an example; it will help us picture the whole concept. As we learned in route summarization, instead of advertising each address, a router makes a block of addresses and advertise it, it minimizes load on routers and enhances network efficiency.

Instead of assigning addresses according to the Classful subnet boundaries, the ISPs begun to assign IP addresses in the form of blocks. Then it was the duty of the ISPs to assign smaller blocks to its customers from the Big block. In CIDR the routers were given the ability to process the IP addresses according to the classless subnet prefix instead of the starting 0 and 1s in each IP address. Or in the other words, the routers were programmed to understand the prefix through which it can decide to which domain (major block of IPs) these addresses are assigned.  

If the a whole Class A, B or C address is assigned to an organization, there is a chance of the wastage of IP addresses, so IP address conservation was one of the main reasons behind CIDR development by IANA. IANA suggested assignment of IPs address ranges other than the conventional class paradigm. These policies not only helped in preserving the wastage of IP addresses but also reduced the load of the global routing tables.  So the two goals behind CIDR creation by IANA were:

  • To reduce the global routing table size
  • To preserve the IP address space

Let understand the first point via an example. Suppose we have a block of addresses are below:

192.168.20.0/24
192.168.21.0/24
192.168.22.0/24
192.168.23.0/24

We can summarize this address as:
Our block size is 4, so our best subnet choice at 3rd octet is 256-4 = 252, so we can summarize the above network IDs with following subnet IP:

192.168.20.0
255.255.252.0 OR

192.168.20.0/22

Have you noticed one interesting thing, we have moved backward from standard Class C boundary. We have an IP address 192.168.20.0 with the prefix 22 which represents a block of 4 IP addresses of 24 subnets. Now the router will only advertise with /22 addresses and the same process are repeated from our side to our ISP. Our ISP does the same route aggregation and advertises a single block to higher networks and the process goes on.  Without this process we would have millions of routing tables for the global IP traffic! And how the IP addresses are conserved? Well they are conserved when a specific block of IP addresses is assigned to customers. 

An ISP will never assign a Classful address to any corporation, as a lot of addresses will go waste and the ISP can’t take back the non-used addresses. For the solution of this problem, IP address Ownership an IP address Lending scheme was introduced but they are still in review amidst much heated debate on it.

Network Address Translation II



Static NAT: static NAT is a one to one mapping of internal addresses with the global IP addresses. In network design, static NAT is best if we are going to host some server inside our network and want it to be accessible from global internet.

Some of the terminology of NAT worth remembering:

  • Inside Local: the host address inside the network that we want to translate
  • Outside Local: translated address of the outside hosts, as seen inside their network
  • Inside Global: the addresses used to translate the inside addresses
  • Outside Global: addresses of outside hosts as seen on the outside
A few more terminologies of NAT:

  • Policy based NAT
  • Port redirection (one to one mapping for a single port, also called Static PAT)
  • NVIs or NAT virtual interfaces (a newer method of NAT configuration in which there is no need for inside/outside definition on an interface. NAT table is maintained on per interface basis)

I think we have covered enough of the terminology regarding Network Address translation, now it’s time to practically implement all of the above concepts for getting a strong technical grasp of above concepts.

For practical implementation of NAT on a Cisco router, follow the following three steps:

  • Designate the interfaces for inside/outside NAT
  • Define an ACL for the local host IPs
  • Implemented NAT from the global configuration mode
In VoIP packets, as it’s not possible to modify the source header, for this we had to enable some special services of NAT to support SIP or Skinny protocols etc. there are also some other issues that might arise by changing the IP in a packet as it will change the packet checksum value, encapsulated data and hence breaking the meaning of the application.

For an interesting demonstration of NAT, please check http://www.cisco.com/image/gif/paws/6450/nat.swf URL.

--to be continued-- 

Static to Dynamic IPsec configuration


!
ip subnet-zero
!

!--- These are the IKE policies.

crypto isakmp policy 1

!--- Defines an Internet Key Exchange (IKE) policy.
!--- Use the crypto isakmp policy command
!--- in global configuration mode.
!--- IKE policies define a set of parameters to be used
!--- during the IKE phase I negotiation.

 hash md5
authentication pre-share

!--- Specifies pre-shared keys as the authentication method.

crypto isakmp key Chris123 address 165.228.212.83

!--- Configures a pre-shared authentication key,
!--- used in global configuration mode.

!

!--- These are the IPSec policies.

crypto ipsec transform-set rtpset esp-des esp-md5-hmac

!--- A transform set is an acceptable combination
!--- of security protocols and algorithms.
!--- This command defines a transform set
!--- that has to be matched on the peer router.

!
crypto map rtp 1 ipsec-isakmp

!--- Creates a crypto map and indicates that IKE will be used
!--- to establish the IPSec SAs for protecting
!--- the traffic specified by this crypto map entry.


set peer 165.228.212.83

!--- Use the set peer command to specify an IPSec peer in a crypto map entry.

set transform-set rtpset

!--- Configure IPSec to use the transform set "rtpset"
!--- that was defined previously.

 match address 115
 exit

!--- Include the private-network-to-private-network traffic
!--- in the encryption process.

interface Ethernet 0
 description --- Ethernet LAN ---
 ip address 192.168.0.254 255.255.255.0

 ip virtual-reassembly
 ip tcp adjust-mss 1420

!
!
ip dhcp excluded-address 192.168.0.251 192.168.0.254
!
ip dhcp pool lan
network 192.168.0.0 255.255.255.0
default-router 192.168.0.254
dns-server 192.168.0.254
lease infinite

interface ATM0
 description --- Telsra ADSL ---
 no ip address
 no shutdown
 no atm ilmi-keepalive
 pvc 8/35
  tx-ring-limit 3
  encapsulation aal5snap
  pppoe-client dial-pool-number 1


interface Dialer0
 description --- Telsra ADSL ---
 ip address negotiated
 ip mtu 1460
 ip nat outside
 ip virtual-reassembly
 encapsulation ppp
 ip tcp adjust-mss 1420
 dialer pool 1
 dialer-group 1
 ppp chap hostname tareet0@direct.telsra.net
 ppp chap password 233981
 crypto map rtp

ip nat inside source list NAT interface Dialer0 overload

ip nat inside source route-map nonat interface Dialer0 overload

How to set Secure CRT as default terminal in GNS3


Step # 1 Download Secure CRT from : http://thepiratebay.se/torrent/7438817/VanDyke.SecureCRT.v7.0.0.326-ZWT(x86)
Install the software according to its default directory setting.

Step # 2 Open your GNS3 Edit --- > Preference Box menu , from here go to General --- > Terminal Settings


Step # 3 Select the Secure CRT according to your OS from Preconfigurated terminal commands drop down box


In my case , as i am using 64-bit OS, i have selected SecureCRT(Windows 64-bit), once selected, click the Use button and you are good to use CRT! Great..

As a demonstration, i have opened my all routers in a single sweet looking window of Secure CRT :


I hope this post was helpful for you. Please let me know your feedback, your questions are welcomed in the comments box below.

All things about CISCO IOS



We will cover all important points regarding CISCO IOS- Cisco Internetworking Operating System, that are commonly asked on a CCNA exam. So let`s start from the beginning: 

When you log into a CISCO router:

Router>
User EXEC mode
Router#
Privileged EXEC mode
Router(config)#
Configuration mode
Router(config-if)#
Interface level (within configuration mode)
Router(config-router)#
Routing engine level (within configuration mode)
Router(config-line)#
Line level (vty, tty, async) within configuration mode

Running configurations reside on RAM, we issue copy running-config startup-config command to move the configs from RAM to NVRAM or in simple words to save it. To load configs from a TFTP server we use copy TFTP: running-config command.

When you turn the router on, it runs through the following boot process. The Power-On Self Test (POST) checks the router’s hardware. When the POST completes successfully, the System OK LED indicator comes on.

The router checks the configuration register to identify where to load the IOS image from. A setting of 0×2102 means that the router will use information in the startup-config file to locate the IOS image. If the startup-config file is missing or does not specify a location, it will check the following locations for the IOS image:

1. Flash (the default location)
2. TFTP server
3. ROM (used if no other source is found)

The router loads the configuration file into RAM (which configures the router). The router can load a configuration file from:

+ NVRAM (startup-configuration file)
+ TFTP server

If a configuration file is not found, the router starts in setup mode.
Okay, in this micro post one more thing, we need to see is what can “show version” command tells us about CISCO IOS:

Software Version
- IOS software version (stored in flash)
Bootstrap Version
- Bootstrap version (stored in Boot ROM)
System up-time
- Time since last reboot
System restart info
- Method of restart (e.g. power cycle, crash)
Software image name
- IOS filename stored in flash
Router Type and Processor type
- Model number and processor type
Memory type and allocation (Shared/Main)
- Main Processor RAM
- Shared Packet I/O buffering
Software Features
- Supported protocols / feature sets
Hardware Interfaces
- Interfaces available on router
Configuration Register
- Bootup specifications, console speed setting, etc.

The following is a sample output of a show version command.

Router# show version
Cisco Internetwork Operating System Software
IOS (tm) 3600 Software (C3640-J-M), Version 11.2(6)P, SHARED PLATFORM,
RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1997 by cisco Systems, Inc.
Compiled Mon 12-May-97 15:07 by tej
Image text-base: 0x600088A0, data-base: 0x6075C000

ROM: System Bootstrap, Version 11.1(7)AX [kuong (7)AX], EARLY DEPLOYMENT
RELEASE SOFTWARE (fc2)

Router uptime is 1 week, 1 day, 38 minutes
System restarted by power-on
System image file is "flash:c3640-j-mz_112-6_P.bin", booted
via flash
Host configuration file is "3600_4-confg", booted via tftp
from 171.69.83.194

cisco 3640 (R4700) processor (revision 0x00) with 107520K/23552K bytes
of memory.
Processor board ID 03084730
R4700 processor, Implementation 33, Revision 1.0
Bridging software.
SuperLAT software copyright 1990 by Meridian Technology Corp).
X.25 software, Version 2.0, NET2, BFE and GOSIP compliant.
TN3270 Emulation software.
Primary Rate ISDN software, Version 1.0.
2 Ethernet/IEEE 802.3 interface(s)
97 Serial network interface(s)
4 Channelized T1/PRI port(s)
DRAM configuration is 64 bits wide with parity disabled.
125K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read/Write)

Configuration register is 0x2102

Commands execution hierarchy on IOS is like :


some other interesting commands worth knowing on a CISCO IOS are :


R1#show file systems
File Systems:

     Size(b)     Free(b)      Type  Flags  Prefixes
           -           -    opaque     rw   archive:
           -           -    opaque     rw   system:
       57336       57051     nvram     rw   nvram:
           -           -    opaque     rw   null:
           -           -   network     rw   tftp:
*   16777212    16777212     flash     rw   flash:
           -           -     flash     rw   slot0:
           -           -    opaque     wo   syslog:
           -           -    opaque     rw   xmodem:
           -           -    opaque     rw   ymodem:
           -           -   network     rw   rcp:
           -           -   network     rw   pram:
           -           -   network     rw   ftp:
           -           -   network     rw   http:
           -           -   network     rw   scp:
           -           -   network     rw   https:
           -           -    opaque     ro   cns:



R1#show inventory
NAME: "2691 chassis", DESCR: "2691 chassis"
PID:                   , VID: 0.1, SN: XXXXXXXXXXX


R1#show diag
2691 Backplane EEPROM:
        PCB Serial Number        : XXXXXXXXXXX
        Processor type           : 66
        Top Assy. Part Number    : 800-09616-02
        Board Revision           : F0
        Fab Part Number          : 28-4226-06
        Deviation Number         : 65535-65535
        Manufacturing Test Data  : FF FF FF FF FF FF FF FF
        RMA Number               : 255-255-255-255
        RMA Test History         : FF
        RMA History              : FF
        Chassis Serial Number    : XXXXXXXXXXX
        Chassis MAC Address      : c000.1310.0000
        MAC Address block size   : 32
        Field Diagnostics Data   : FF FF FF FF FF FF FF FF
        Hardware Revision        : 0.1
        Number of Slots          : 1
        EEPROM format version 4
        EEPROM contents (hex):
          0x00: 04 FF C1 8B 58 58 58 58 58 58 58 58 58 58 58 09
          0x10: 66 40 02 58 C0 46 03 20 00 25 90 02 42 46 30 85
          0x20: 1C 10 82 06 80 FF FF FF FF C4 08 FF FF FF FF FF
          0x30: FF FF FF 81 FF FF FF FF 03 FF 04 FF C2 8B 58 58
          0x40: 58 58 58 58 58 58 58 58 58 C3 06 C0 00 13 10 00
          0x50: 00 43 00 20 C5 08 FF FF FF FF FF FF FF FF 41 00
          0x60: 01 01 01 FF FF FF FF FF FF FF FF FF FF FF FF FF
          0x70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
Slot 0:
        C2691 Mother board 2FE(TX)-3W Port adapter, 2 ports
        Port adapter is analyzed
        Port adapter insertion time unknown
        EEPROM contents at hardware discovery:
        PCB Serial Number        : XXXXXXXXXXX
        Processor type           : 66
        Top Assy. Part Number    : 800-09616-02
        Board Revision           : F0
        Fab Part Number          : 28-4226-06
        Deviation Number         : 65535-65535
        Manufacturing Test Data  : FF FF FF FF FF FF FF FF
        RMA Number               : 255-255-255-255
        RMA Test History         : FF
        RMA History              : FF
        Chassis Serial Number    : XXXXXXXXXXX
        Chassis MAC Address      : c000.1310.0000
        MAC Address block size   : 32
        Field Diagnostics Data   : FF FF FF FF FF FF FF FF
        Hardware Revision        : 0.1
        Number of Slots          : 1
        Product (FRU) Number     : C2691-2FE
        EEPROM format version 4
        EEPROM contents (hex):
          0x00: 04 FF C1 8B 58 58 58 58 58 58 58 58 58 58 58 09
          0x10: 66 40 02 58 C0 46 03 20 00 25 90 02 42 46 30 85
          0x20: 1C 10 82 06 80 FF FF FF FF C4 08 FF FF FF FF FF
          0x30: FF FF FF 81 FF FF FF FF 03 FF 04 FF C2 8B 58 58
          0x40: 58 58 58 58 58 58 58 58 58 C3 06 C0 00 13 10 00
          0x50: 00 43 00 20 C5 08 FF FF FF FF FF FF FF FF 41 00
          0x60: 01 01 01 FF FF FF FF FF FF FF FF FF FF FF FF FF
          0x70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

 One other things, mostly a CCNA student like me is confuse. Its the value of config register. The simple philosophy behind it is if config register value is 0x2102, router will look for configuration in NVRAM:

R1#show version | include register
Configuration register is 0x2102

If we change the config register valure form global configuration to 0x2142, any configuration in NVRAM will be ignored if a router is rebooted and it will enter into initial configuration mode. Please reread the last sentence multiple times to solidify the concept. 

(Please note, i will keep on updating this post to add more fresh information into it, so you dont need to studty different dumps again and again :) Please leave your comments and suggestion, it would really help me to learn more and more)

Memory and Flash on CISCO router




Before you install a new Cisco IOS Software image on your router, check if your router meets the memory requirements for that image. For this, issue theshow version command on your router, and look for these lines:
...
cisco RSP4 (R5000) processor with 65536K/2072K bytes of memory
...
16384K bytes of processor board System flash (Read ONLY)
The first line tells you how much Dynamic RAM (DRAM) and Packet memory are installed in your router. Some platforms use a fraction of their DRAM as Packet memory. The memory requirements take this into account, so you have to add both numbers to find the amount of DRAM available on your router (from a memory requirement point of view).

Example 1: Separate DRAM and Packet Memory

... 
cisco RSP4 (R5000) processor with 65536K/2072K bytes of memory
...
The 4000, 4500, 4700, and 7500 routers have separate DRAM and Packet memory, so you only need to look at the first number. This shows that the router has 65536 K (or 64 M) of DRAM.

Example 2: Combined DRAM and Packet Memory

... 
cisco 2611 (MPC860) processor (revision 0x202) with 29696K/3072K bytes of memory 
...
The 1000, 1600, 2500, 2600, 3600, and 7200 routers use a fraction of DRAM as Packet memory, so you need to add both numbers to find out the real amount of DRAM. In this example, the router has 2969 K + 3072 K = 32768 K (or 32 M) of DRAM.

Example 3: Available Flash Memory

...
cisco RSP4 (R5000) processor with 65536K/2072K bytes of memory
...
16384K bytes of processor board System flash (Read ONLY)
The bottom line tells you how much Flash memory is available. Some of it might already be in use. In order to find out the amount of free Flash memory, issue a show flash command:
Router#show flash 

System flash directory: 
File   Length   Name/status 
  1    8407884  c2600-io3s56i-mz.121-6 
[8407948 bytes used, 8369268 available, 16777216 total] 
16384K bytes of processor board System flash (Read/Write)
Variants of the show flash command can be used to inspect different specific Flash devices on the platform. Refer to the show flash command definitionfor information on how to use these variants.
You need to satisfy both the DRAM and the Flash requirements to be able to use the software you choose. If you do not meet the requirements, you can either add more Flash or more DRAM in the router, or choose another Cisco IOS Software release. You may also consider a reduced feature set or an older release, since they have less features, and therefore fewer requirements.

(Courtesy : http://www.cisco.com/en/US/products/sw/iosswrel/ps1834/products_tech_note09186a00800fb9d9.shtml)

GLBP Gateway Load Balancing Protocol


I was working on an assignment involving GLBP implementation for Network Redundancy. I was totally un aware of this Protocol. Although i had some exposure to HSRP but was not aware of GLBP! This was totally an alien concept for me. Thankful to Mr Keith Barker! Who has made an outstanding video on Youtube, covering all the basics of GLBP and giving a detailed overview of its configurations. In this video Keith has covered almost all of the major components related to GLBP. A must watch video for a Network Engineer.







Quick Facts:

  • GLBP uses 224.0.0.102 UDP/3222
  • GLBP default Hello interval is 3 seconds
  • GLBP has virtual MAC 0007.b4xx.xxyy with xx being group number and yy being forwarder number
  • GLBP allows up to 4 virtual MAC address per group
  • Elected Active Virtual Gateway (AVG) assigns/revokes virtual MAC to/from group members
  • Each gateway is an Active Virtual Forwarder (AVF) and answers own ARP request