Powered by Blogger.
Showing posts with label CCNA Notes. Show all posts
Showing posts with label CCNA Notes. Show all posts

Some Random Notes about EIGRP, OSPF, DV Protocols and Linkstate Protocols

Some Random notes, that are still very useful :) 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
EIGRP = Enhance Interior Gateway Routing Protocol
Ok, what are the most common words that I hear about EIGRP?
Neighbor table, Topology table, Routing table, successor (primary route), feasible successor(secondary route), backup routes, DUAL, Diffused Update Algorithm, auto summarization, unequal cost load balancing, easy to configure.
Routing protocol based on: DV plus some features of Link State protocol
Hello sent every 5 seconds = >
Hold down timer = > set according to hello packets received
Have very speedy convergence time and easy on processor.
#router eigrp 10
#network <network to be advertised>  <eigrp wild card bits- optional>
Some commands to remember:
#show ip eigrp neighbors
#show ip eigrp topology
#show ip eigrp route
In EIGRP we can summarize anywhere. Load balance over unequal cost paths. Null0 created automatically to tackle the routing efficiently, in other words null garbage container, to through away the garbage routes.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Distance Vector Routing Protocols, Linkstate routing protocol. Hybrid protocols.
DV protocols send their entire routing table after a specific interval, while linkstate protocols make neighbor adjacencies and event triggered updates are sent.
DV protocols have looping issues
Count down to infinity loop!
Loop preventions mechanism in a CISCO router: like route poisoning, split horizon, hold down timer,
Link state routing protocol: OSPF: not more than 50 routers/area
ABR, ASBR, Backbone router
All routers in an area have the same topology table but they will have different routing table.
Localize updates within an area. Requires a hierarchical design, you must design network keeping in mind the hierarchical design!
Hello messages in ospf: sent every 10 seconds on broadcast/p-2-p links, once every 30 seconds on NBMA networks ie frame relay. Best practice is to tune the hello packet sending time, most case its set to 1 second.
And to make adjacency routers must agree on some specific parameters
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
OSPF general syntax and configurations
Modifying the router ID
#router ospf < processs ID>
#network <Network> <wildcard mask> area <area #>
#show ip ospf
#show ip protocols
#show ip ospf neighbors
To advertise a summary route:

#area <area #>  range  <sumar ip> <mask>

DHCP : Dynamic Host Configuration Protocol



One of the many services that we mostly need in our network is DHCP. The Dynamic Host Configuration Protocol is used to dynamically assigned IP addresses and Default gateway information to the host on a network. In simple words, the DHCP functionality can be expressed as:


As can be seen, our host is acting as a DHCP client on the LAN, it will send DHCP Discover broadcast on the network, and all the relevant data will be provided like IP Address, Subnet Mask, Default Router, DNS Server, to the requesting host. DHCP discovery is a 4 leg process:

  • Discover
  • Offer
  • Request
  • Acknowledge
The client send a Discover message, the DHCP server send a Unicast Offer, the client then sends officially a Request Offer, and an ACK send by DHCP server. It seems ambiguous? Better explained by below diagram:


CISCO IOS can also be configured as a DHCP server and Client. A router can be configured as a

  • DHCP Server
  • DHCP Client
  • DHCP Proxy


Quick Facts about DHCP:

  • UDP 67 is server-side port
  • UDP 68 is client-side port


Redundancy can be created via DHCP safe fail over Protocol using a cluster of DHCP servers in which one server acts as a Primary Server and the second one act as Backup Server on which Backup address pool is configured which could be used in case of failover of the primary DHCP server. So far we have discussed the basic working of DHCP, its packet flow, and how to enable redundancy in DHCP. Now it is time to move into configuration.

Configuration:

We are going to configure DHCP in packet tracer. We have bunch of host connected to a switch, which is connected to a router. The router is acting as DHCP server and all the hosts in the network are assigned IP addresses from our defined IP pool for DHCP. The topology we will be using is as follow:




In the above network, we have enabled Routers0 interface as our DHCP and DNS server. The client are not configured with static IP, instead DHCP option is selected on each host, to get all configuration data from the DHCP server. Once the router is up and Clients are active, the client instantly updates their IP addresses and Default gateways by sending DHCP requests. We have configured a DHCP pool by name of LOCAL_LAN pool on our router; the IP addresses assigned to the hosts are leased from this IP pool. We have also mentioned some of the address which should not be assigned by the DHCP server, using
ip dhcp excluded-address , command as these addresses are already assigned or kept for future use.

The DHCP configurations done on R0 are:


The default router and dns server address is our routers Fast Ethernet 0/0 interface IP address. We have excluded the DHCP server IP and DNS IP from the list of IPs that is going to be assigned by DHCP server. To define router as proxy DHCP server, we use ip helper command under interface config mode, this just relay all DHCP requests to the mentioned DHCP server. Last thing, in dhcp options, we can also define lease time, the time duration till which the address is valid. The address will be renewed after the lease time is elapsed. 



I hope you enjoyed this article. Please do let me know your feedback and comments. 

CIDR II: A little more in depth explanation



PART II:

Suppose our ISP owns an address block: 200.24.0.0/16. What this means?

An address block comprises of different address that the ISP can allocate and sell to its customers. The IP address block 200.24.0.0/16 can represent 2^16 = 65, 536 IP addresses. Suppose from this block it wants to allocate 200.24.15.0/20 address block. So how many addresses is this in reality? Simple, 2^12 = 4096 or 16 /24s, how? The block size is /20 or in other words 255.255.240.0 so our block size can be calculated as 256-240 = 16 , this means the given /20 block comprises of 16 /24 addresses if we are considering a Class full environment.

200.24.15.0
200.24.16.0
200.24.17.0
200.24.18.0
200.24.19.0
200.24.20.0
200.24.21.0
200.24.22.0

200.24.23.0
200.24.24.0
200.24.25.0
200.24.26.0
200.24.27.0
200.24.28.0
200.24.29.0
200.24.30.0

Each address has the capacity to represent 255 addresses so 255*16 = 4096, as already mentioned above.  So if the ISP distributes these among 3 organizations named A, B, C—the distribution would be as follows:

200.24.15.0
200.24.16.0
200.24.17.0 Block size of 4, 256-4=252 so the whole block would be 200.24.15.0/30
200.24.18.0                    IPblock 200.24.15.0/30 will be assigned to the Organization A

200.24.19.0
200.24.20.0
200.24.21.0
200.24.22.0 Block size of 8. 256-8 = 248 so the whole block would be 200.24.19.0/21
200.24.23.0                     IPblock 200.24.19.0/21 will be assigned to organization B
200.24.24.0
200.24.25.0
200.24.26.0


200.24.27.0
200.24.28.0Block size of 4, 256-4=252, so the whole block would be 200.24.27.0/30
200.24.29.0                    IPblock 200.24.27.0/30 will be assigned to organization C
200.24.30.0

Believe me, by doing above process, we have cracked all the route aggregation and summarization at the Global, ISP and Organization level.

You will feel that CIDR has the same look like VLSM. Yes, it’s right to some extent. Both allow us to change the IP dynamics according to our requirements, but VLSM is invisible to the global internet. The VLSM can be felt only in our internal network topology. On the other side, CIDR is visible to the global internet. A global Internet Registry can assign any CIDR block or prefix block to any top level ISP, to a medium level ISP or to any private organization.

Okay now some interesting stuff. If you want to see all this CIDR, route summarization in action, visit MeritRADb the routing asset database online website. This website provides information related to all the routed networks and ASs on the internet up to this moment! For example if we want to dig this IP: 173.194.67.104, we will go to their website: http://www.ra.net/  and will query this IP using Query the RADb box. The output is quite interesting:

route:      173.194.67.0/24
descr:      Google
origin:     AS15169
notify:     radb-contact@google.com
mnt-by:     MAINT-AS15169
changed:    radb-contact@google.com 20121119
source:     RADB

This IP (173.194.67.104) is owned by Google incorporations!! Okay one more IP: 205.134.232.114

route:      205.134.224.0/19
descr:      Corporate Colocation, Inc.
origin:     AS17139
notify:     netops@mzima.net
mnt-by:     MAINT-CORPCOLO
changed:    noc@corporatecolo.com 20071108
source:     RADB

The above IP is somehow part of the major route shown in the RADb output. The Routing Asset Database website is one of a great place to spend your weekend time on!

Please remember that IANA or Internet Assigned Number Authority is the organization responsible for taking care of global IP address allocation and other IP related activities. 

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-- 

ARP / Router CPU History / TTL and DNS

So far during my studies, i came across ARP, Router CPU history, TTL value of a packet and DNS working.

To check ARP table on a CISCO router:

#show ip arp

It will display all the resolved addresses that are present on a router. Cisco router will keep ARP entry for around 4 hours. Off-course you do know ARP stands for Address Resolution Protocol. 

DNS: Domain name System can either use UDP or TCP port 53. If a host is trying to resolve some domain name, it will send request using UDP to port 53 but if DNS doesn't respond, then the host will try sending request using DNS TCP port 53. UDP -- > TCP (53)

TTL (Time to Live) : Yes this field is used in data packet to make its life easy :) Each router through which the packet passes, will decrement the TTL value in data packet ( TTL value starts from 255) by one. Once it reaches zero, the packet will be discarded and hence it (Packet) will not circulate for ever. Just imagine if there was no TTL field in the packets which are roaming wildly the global internet !

MTU: Maximum transmission unite is 1500 bytes. its the maximum packet a router can transmit.

#show processes & #show processes cpu history


R1#show processes
CPU utilization for five seconds: 2%/0%; one minute: 0%; five minutes: 0%
 PID QTy       PC Runtime (ms)    Invoked   uSecs    Stacks TTY Process
   1 Cwe 6001F598            0          2       0 5664/6000   0 Chunk Manager
   2 Csp 609F9CDC            0       2520       0 2524/3000   0 Load Meter
   3 Lwe 611F71B8            8        436      18 5500/6000   0 CEF Scanner
   4 Mwe 61D95244            0          1       023372/24000  0 EDDRI_MAIN
   5 Lst 6001C4B0         6760       1384    4884 5416/6000   0 Check heaps
   6 Cwe 60023228            0          1       0 5656/6000   0 Pool Manager
   7 Mst 60F8C9B4            0          2       0 5496/6000   0 Timers
   8 Mwe 600B448C            0        211       0 5700/6000   0 IPC Dynamic Cach
   9 Mwe 600A59F4            0          1       0 5692/6000   0 IPC Zone Manager
  10 Mwe 600A4C5C           36      12593       2 5608/6000   0 IPC Periodic Tim
  11 Mwe 600A4AAC           44      12593       3 5632/6000   0 IPC Deferred Por
  12 Mwe 600A56CC            0          1       0 5564/6000   0 IPC Seat Manager
  13 Mwe 600AACD0            4          1    4000 5660/6000   0 IPC BackPressure
  14 Mwe 60253CA4            0          1       011664/12000  0 OIR Handler
  15 Mwe 60458374            0          1       023600/24000  0 Crash writer
  16 Msi 6055E184            0        421       0 5492/6000   0 Environmental mo
  17 Mwe 60B669BC            4        213      18 5648/6000   0 ARP Input
  18 Mwe 60BC0B50            0          2       0 5448/6000   0 ATM Idle Timer
  19 Mwe 60F48894            0          2       0 5484/6000   0 AAA high-capacit
  20 Lwe 60F4C6C0            0          1       0 5688/6000   0 AAA_SERVER_DEADT
  21 Mwe 60FB2F60            0          1       011644/12000  0 Policy Manager
 --More--

its quite a detailed command, showing memory utilization for each running process and as you can expect there are a lot of processes running on a CISCO router to enable the magic on it. One more output for your consideration, i would personally recommend below mentioned command, which plot a nice graph of the cpu utilization:

R1#show processes cpu history

R1   03:32:13 AM Friday Mar 1 2002 UTC



    22211111
100
 90
 80
 70
 60
 50
 40
 30
 20
 10
   0....5....1....1....2....2....3....3....4....4....5....5....6
             0    5    0    5    0    5    0    5    0    5    0
               CPU% per second (last 60 seconds)



    112  11 1111 111 111  111 1    1     11 1  1   11     1 213
100
 90
 80
 70
 60
 50
 40
 30
 20
 10
   0....5....1....1....2....2....3....3....4....4....5....5....6
             0    5    0    5    0    5    0    5    0    5    0
               CPU% per minute (last 60 minutes)
              * = maximum CPU%   # = average CPU%



    342
100
 90
 80
 70
 60
 50
 40
 30
 20
 10
   0....5....1....1....2....2....3....3....4....4....5....5....6....6....7..
             0    5    0    5    0    5    0    5    0    5    0    5    0
                   CPU% per hour (last 72 hours)
                  * = maximum CPU%   # = average CPU%

I hope you enjoyed reading above post. Please do comment and let me know your feedback, please also post your questions and confusions in below comments box. Thanks 

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)