Sei sulla pagina 1di 8

CCNA Exploration 2

Init configuration: // Router will ask for password1 Router > en // Router will ask for password2 Router # conf t Enter configuration commands, one per line. End with CNTL/Z. Router (config) # host R1 R1 (config) # banner motd #Logon banner!# R1 (config) # enable secret password2 // if secret keyword is not allow use password R1 (config) # enable password password2 R1 (config) # line vty 0 4 R1 (config-line) #password password1 R1 (config-line) # login R1 (config-line) # line console 0 R1 (config-line) # secret password1 // if secret keyword is not allow use password R1 (config-line) # login // Router will ask for username and password: R1 (config) # username admin secret cisco R1 (config) # line vty 0 4 R1 (config-line) # login local

// if secret keyword is not allow use password

R1 (config) # int fa0/0 R1 (config-if) # ip address 192.168.2.1 255.255.255.0 R1 (config-if) # description LAN1, Marketing R1 (config-if) # no sh %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up R1 (config) # int s0/0/0 R1 (config-if) # ip add 192.168.1.1 255.255.255.252 R1 (config-if) # description Connection R1-R2 R1 (config-if) # clock rate 64000 // Only for DCE side ;) R1 (config-if) # no sh R1 # ping 192.168.1.5 R1 (config) # ip host R2 192.168.1.5 R1 # ping R2 R1 # show ip interface brief R1 # show interfaces description R1 # show run R1 # show ip route Static routes: R1 (config) # ip route 172.16.1.0 255.255.255.0 s0/0/0 // exit interface - usable ONLY for point-point // (when there is only one possible destination) R1 (config) # ip route 172.16.2.0 255.255.255.0 192.168.1.2 // next hop ip address - universal way ;) Default route: R1 (config) # ip route 0.0.0.0 0.0.0.0 s0/0/0 R1 (config) # ip route 0.0.0.0 0.0.0.0 192.168.1.2

R1 # copy run start Destination filename [startup-config]? Building configuration... [OK]

// or just R1 # write

Cisco Discovery Protocol (CDP) layer 2 protocol CDP provides the following information about each CDP neighbor device: Device identifiers - For example, the configured host name of a switch Address list - Up to one Network layer address for each protocol supported Port identifier - The name of the local and remote port-in the form of an ASCII character string such as ethernet0 Capabilities list - For example, whether this device is a router or a switch Platform - The hardware platform of the device; for example, a Cisco 7200 series router Router # show cdp neighbors Router # show cdp neighbors detail Router (config) # no cdp run // globally disable CDP Router (config-if) # no cdp enable // turn off CDP for particular interface I. RIP Routing Information Protocol, RFC 1058
Feature Advertises routes for... RIP messages use these Layer 3/4 protocols UDP Port Use Distance Vector Default Administrative distance Supports VLSM Can perform automatic summarization Uses Split Horizon Uses Poison Reverse 30 second periodic full updates Uses triggered updates Uses Hop Count metric Metric meaning infinity Supports route tags Multicast / Broadcast Update destination Authentication RIP-1 IPv4 IPv4, UDP 520 Yes 120 No Yes Yes Yes Yes No Yes 16 No 255.255.255.255 N/A RIP-2 IPv4 IPv4, UDP 520 Yes 120 Yes Yes Yes Yes Yes Yes Yes 16 Yes 224.0.0.9 RIP-specific RIPng IPv6 IPv6, UDP 521 Yes 120 Yes N/A Yes Yes Yes Yes Yes 16 Yes FF02::9 uses IPv6 AH/ESP

R2 (config) # router rip version 2 R2 (config-router) # network 192.168.1.0 255.255.255.0 R2 (config-router) # passive-interface fa0/0 R2 (config-router) # redistribute static R1 (config-router) # default-information originate R2 (config-router) # no auto-summary R # show ip route R # show ip interface brief R # show ip protocols R # debug ip rip R # ping / tracert R # show run

// redistribute all static routes // redistribute only default route

II. The routing table: A closer look Hierarchy structure: (parent - child relationship) Level 1 route is a route with a subnet mask equal to or less than the classful mask of the network address Level 2 route is a route that is a subnet of a classful network address Level 1 routes are: Default route - A default route is a static route with the address 0.0.0.0/0. Supernet route - A supernet route is a network address with a mask less than the classful mask. Network route - A network route is a route that has a subnet mask equal to that of the classful mask A level 1 parent route is a network route that does not contain a next-hop IP address or exit interface for any network. A level 2 route is a route that is a subnet of a classful network address. An ultimate route is a route that includes either a next-hop IP address (another path) and/or an exit interface. Searching in routing table algorithm: longest-match (the most specific route / the route with the biggest subnet mask) Administrative Distance (lower-better) Metric (lower-better) Classful or Classless behavior - searching process: 1. Network route 2. Parent-Child route 3. Router with classful behavior - drop the packet 4. Supernet routes (default route).

III. EIGRP - Enhanced IGRP (EIGRP) Metric: Diffusing Update Algorithm (DUAL) - Bandwidth, Delay, Load and Reliability Default K-values: k1=1, k2=0, k3=1, k4=0, k5=0 or metric = bandwidth + delay metric = [K1 * bandwidth + (K2 * bandwidth) / (256 - load) + K3 * delay] * [K5 / (reliability + K4)] use Reliable Transport Protocol (RTP) - L4 protocol, instead of TCP or UDP Backup routes (for fast convergence / DUAL) Unequal cost load-balancing // unique feature !!! Multicast IP: 224.0.0.10, protocol 88, MAC Multicast 01-00-5E-00-00-0A Administrative distance: 5 summary route, 90 Internal, 170 External FSM Finite State Machine Combines best of Distance Vector and Link State Bounded Updates Establishing Adjacencies Neighbor, Topology and Routing Tables 5 packets: o Hello - form relationship o Update - send updates o Query - ask about routes o Reply - response to a query o Ack - acknowledges the update, query and reply massages Router (config) # router eigrp 5 // autonomous-system GLOBAL! Router (config-router) # no auto-summary // the first command you should enter Router (config-router) # network 192.168.5.0 or Router (config-router) # network 192.168.5.192 0.0.0.63 // for CCNA exams - wild card mask is optional, not necessary !!! Router (config-router) # metric weights tos k1 k2 k3 k4 k5 Router (config-router) # redistribute static D*EX 0.0.0.0/0 [170/3651840] via 192.168.10.6, 00:01:08, Serial0/1 Manual summarization (command per interface): Router (config-if) # ip summary-address eigrp as-number network-address subnet-mask Router (config-if) # ip summary-address eigrp 117 192.168.0.0 255.255.128.0 Router (config-if) # bandwidth 1544 // set link bandwidth speed in kilobits Router (config-if) # ip bandwidth-percent eigrp as-number percent Router (config-if) # ip bandwidth-percent eigrp 117 50 // default: 50% of link bandwidth Router (config-if) # ip hello-interval eigrp as-number seconds Router (config-if) # ip hold-time eigrp as-number seconds R1 (config) # key chain EIGRP_KEY R1 (config-keychain) # key 1 R1 (config-keychain-key) # key-string cisco1 R1 (config-keychain-key) # accept-lifetime 00:00:00 Jan 1 2010 00:00:00 Feb 1 2011 R1 (config-keychain-key) # send-lifetime 00:00:00 Jan 1 2010 00:00:00 Feb 1 2011 R1 (config-keychain) # key 2 R1 (config-keychain-key) # key-string cisco2 R1 (config-keychain-key) # accept-lifetime 00:00:00 Jan 28 2010 infinite R1 (config-keychain-key) # send-lifetime 00:00:00 Jan 28 2010 infinite // it is need NTP if we want to specify time / duration.

R1 (config) # interface s0/0/0 R1 (config-if) # ip authentication mode eigrp 17 md5 R1 (config-if) # ip authentication key-chain eigrp 17 EIGRP_KEY R1 (config) # router eigrp 17 R1 (config-router) # network 10.0.0.0 R1 (config-router) # network 192.168.0.0 0.0.255.255 R1 (config-router) # no auto-summary Router # show ip eigrp topology Router # show ip eigrp topology all-links Router # show ip eigrp topology 192.168.1.0 DUAL Feasible Distance (FD) how far is destination for as Reported Distance (RD) or Advertised Distance (AD) how far away is the destination for your neighbor Successor primary choose to destination (preferred neighbor to the destination ) Feasible Successor (FS) to be considered a feasible successor, the AD must be less than the FD of the successor Active Route (bad) Passive Route (good) Feasible Condition or Feasibility Condition (FC)

IV.

OSPF Link-state routing protocol Cost: No define metric in RFC, in Cisco IOS Bandwidth Multicast IP: 224.0.0.5 & 224.0.0.6, protocol 89 MAC Multicast 01-00-5E-00-00-05 or 01-00-5E-00-00-06 Administrative distance 110 Neighbor, Topology and Routing Tables Use Dijkstra's Shortest Path First (SPF) algorithm Send triggered updates to announce network changes Send periodic updates (LS refresh) on long intervals (def: 30 minutes) Areas - All areas must connect to Area 0 (backbone area). All routers in the same area have the same topology table (Best practice: no more then 50 routers in one area) 5 packets: Hello, Database Description, Link-State Request, Link-State Update, LSAck

Router (config) # router ospf 3 // process-id , 1-65535 Router (config-router) # network 192.168.1.128 0.0.0.127 area 0 // area-id process-id Router (config-router) # passive-interface fa0/0 Router (config-router) # no auto-summary Router (config-router) # default-information originate Router (config-router) # redistribute eigrp 2 // only classful networks will be redistributed! Router (config-router) # redistribute eigrp 2 subnets // all networks will be redistributed with correct slash Router # clear ip ospf process // restart OSPF process without restarting router ;) router-id: ( DR BDR) Router (config-if) # ip ospf priority 100 // More-better; 0-255; 0 never become DR/BDR 1. Router (config) # router ospf 1 Router (config-router) # router-id 192.168.1.0 2. Router (config) # interface loopback number Router (config-if) # ip address ip-address subnet-mask 3. Router (config) # interface // The physical interface with greatest IP address which is up-up Router (config-if) # ip address ip-address subnet-mask 1. Router (config) # interface serial 0/0/0 Router (config-if) # ip ospf cost 1562 2. Router (config) # interface serial 0/0/0 Router (config-if) # bandwidth bandwidth-kbps 3. Router (config) # router ospf 1 Router (config-router) # auto-cost reference-bandwidth 10000 // 1-4294967 Mbits per sec

Router (config-if) # ip ospf hello-interval seconds Router (config-if) # ip ospf dead-interval seconds Secure OSPF: R1 (config) # interface s0/0/0 R1 (config-if) # ip ospf authentication message-digest R1 (config-if) # ip ospf message-digest-key 1 md5 cisco R1 (config) # router ospf 1 R1 (config-router) # area 8 authentication message-digest R1 (config-router) # network 10.0.0.0 0.0.0.255 area 8 R1 (config-router) # network 192.168.0.0 0.0.255.255 area 8

Requirement Interfaces primary IP addresses must be in same subnet. Must not be passive on the connected interface. Must be in same area. Hello interval/timer, plus either the Hold (EIGRP) or Dead (OSPF) timer, must match. Router IDs must be unique. IP MTU must match. Must pass neighbor authentication (if configured). K-values (used in metric calculation) must match. Must use the same ASN (EIGRP) or process-ID (OSPF) on the router configuration command.

OSPF Yes Yes Yes Yes Yes Yes Yes N/A No

EIGRP Yes Yes N/A No No No Yes Yes Yes

ios: http://www.cisco.com/en/US/products/hw/routers/ps259/products_tech_note09186a008015bf9e.shtml rommon (Ctrl + Break)


The following variables IP_ADDRESS: IP_SUBNET_MASK: DEFAULT_GATEWAY: TFTP_SERVER: TFTP_FILE: are The The The The The REQUIRED to be set for tftpdnld: IP address for this unit subnet mask for this unit default gateway for this unit IP address of the server to fetch from filename to fetch

The following variables are OPTIONAL: TFTP_VERBOSE: Print setting. 0=quiet, 1=progress(default), 2=verbose TFTP_RETRY_COUNT: Retry count for ARP and TFTP (default=7) TFTP_TIMEOUT: Overall timeout of operation in seconds (default=7200) TFTP_CHECKSUM: Perform checksum test on image, 0=no, 1=yes (default=1) Command line options: -r: do not write flash, load to DRAM only and launch image -u: upgrade the rommon, system will reboot once upgrade is complete rommon rommon rommon rommon rommon rommon 16 17 18 19 20 21 > > > > > > IP_ADDRESS=171.68.171.0 IP_SUBNET_MASK=255.255.254.0 DEFAULT_GATEWAY=171.68.170.3 TFTP_SERVER=171.69.1.129 TFTP_FILE=c2600-is-mz.113-2.0.3.Q tftpdnld 171.68.171.0 255.255.254.0 171.68.170.3 171.69.1.129 c2600-is-mz.113-2.0.3.Q

IP_ADDRESS: IP_SUBNET_MASK: DEFAULT_GATEWAY: TFTP_SERVER: TFTP_FILE:

Invoke this command for disaster recovery only. WARNING: all existing data in all partitions on flash will be lost! Do you wish to continue? y/n: [n]: y Receiving c2600-is-mz.113-2.0.3.Q from 171.69.1.129 !!!!!.!!!!!!!!!!!!!!!!!!!.!! File reception completed. Copying file c2600-is-mz.113-2.0.3.Q to flash. Erasing flash at 0x607c0000 program flash location 0x60440000 rommon 22 > reset

Configuration Register Setting 0x102 0x1202 Ignores break 9600 console baud 1200 baud rate

Router Behavior

0x2101

Boots into bootstrap Ignores break Boots into ROM if initial boot fails 9600 console baud rate Ignores break Boots into ROM if initial boot fails 9600 console baud rate default value for most platforms Boots into ROMmon 19200 console speed Ignores break Boots into ROM if initial boot fails 19200 console baud rate NetBoot Ignores break Boots into ROM if initial boot fails 19200 console speed Ignores break Boots into ROM if initial boot fails 9600 console baud rate Ignores the contents of Non-Volatile RAM (NVRAM) (ignores configuration) Ignores break Boots into ROM if initial boot fails 4800 console baud rate Ignores break Boots into ROM if initial boot fails 38400 console baud rate Ignores break Boots into ROM if initial boot fails 57600 console baud rate Ignores break Boots into ROM if initial boot fails 2400 console baud rate Ignores break Boots into ROM if initial boot fails 115200 console baud rate

0x2102

0x2120

0x2122

0x2124

0x2142

0x2902

0x2922

0x3122

0x3902

0x3922

username password, , : rommon (Ctrl + Break) rommon 1 > confreg 0x2142 // Ignores the contents of NVRAM (ignores configuration) rommon 2 > reset , , , Router # copy start run, , startup-config "R1(config)#config-register 0x2102" nvram-a

Potrebbero piacerti anche