Ccna configuracion y comandos

Download Ccna configuracion y comandos

Post on 06-May-2015

312 views

Category:

Technology

1 download

Embed Size (px)

TRANSCRIPT

<ul><li>1.Reference for commands for Cisco productshttp://www.cisco.com/univercd/home/home.htmCLI Password ConfigurationCisco IOS Software Command HelpIOS stores the commands that you type in a history buffer, storing ten commands by default. You canchange the history size with the terminal history size x user exec command, where x is the number ofcommands for the CLI to recall; this can be set to a value between 0 and 256. You then can retrievecommands so that you do not have to retype the commands.</li></ul><p>2. Key Sequences for Command Edit and RecallIOS enables enhanced editing mode by default and has for a long time. However, you can turn off thesekeystrokes with the no terminal editing exec command, and turn them back on with the terminalediting command.CLI Configuration Mode Versus Exec Modes 3. Cisco Router Memory TypesLocations for Copying and Results from Copy OperationsConfiguration show CommandsGetting into Setup Mode 4. The Cisco IOS Software Boot Sequence1. The router performs a power-on self-test (POST) to discover and verify the hardware.2. The router loads and runs bootstrap code from ROM.3. The router finds the IOS or other software and loads it.4. The router finds the configuration file and loads it into running config.Three OS Categories for RoutersTwo configuration tools tell the router what OS to load:X The configuration registerX The boot system configuration command 5. On most Cisco routers, the default Configuration Register setting is hexadecimal 2102.Binary Version of Configuration Register, Value Hex 2102The boot field is the name of the low-order 4 bits of the configuration register. This field can be considereda 4-bit value, represented as a single hexadecimal digit. (Cisco represents hexadecimal values by precedingthe hex digit[s] with 0xfor example, 0xA would mean a single hex digit A.) If the boot field is hex 0,ROMMON is loaded. If the boot field is hex 1, RXBOOT mode is used. For anything else, it loads a full-featured IOS. But which one?The second method used to determine where the router tries to obtain an IOS image is through the use ofthe boot system configuration command. If the configuration register calls for a full-featured IOS (bootfield 2-F), the router reads the startup-configuration file for boot system commands. If there are no bootsystem commands, the router takes the default action, which is to load the first file in Flash memory. Table7-6 summarizes the use of the configuration register and the boot system command at initialization time,when the boot fields value implies that the router will look for boot commands.The Boot System CommandsImpact of the boot system Command on Choice of IOS: Boot Field Between 2 and F 6. Operating Cisco LAN Switches2950 Front Panel and LEDs2950 Switch LEDs and Meaning 7. Basic Router Configuration andOperationConfiguring IP AddressesIP Configuration Commands 8. IP EXEC Commands 9. Basic Administrative ConfigurationOn most routers, you would configure at least the following:X A host name for the routerX Reference to a DNS so that commands typed on the router can refer to host names instead of IP addressesX Set a password on the console portX Set a password for those Telnetting to the routerX Set the enable secret password to protect access to privileged modeX Create a banner stating an appropriate warning, depending on the security practices at that companyTo make the router ask for a password at the console, you need the login console subcommand; thepassword console subcommand tells the router what password is required at the console. Similar logicapplies to the login and password vty subcommands.Two other things that you might want to configure habitually on routers are the console timeout and thesynchronization of unsolicited messages. The exec timeout minutes seconds command sets the inactivitytimeout. Also, unsolicited informational messages and output from the IOS debug command both show upat the console by default. These same messages can be seen at the aux port or when Telnetting into a routerby using the terminal monitor command. The logging synchronous line subcommand tells the routernot to interrupt the output of a show command with these unsolicited messages, letting you read the output 10. of the command that you typed before the router displays the other messages. logging synchronous canmake your life a lot easier when using a router.Syslog messages also can be sent to another device. Two alternatives exist: sending the messagesto a syslog server, and sending the messages as SNMP traps to a management station. Thelogging host command, where host is the IP address or host name of the syslog server, is usedto enable sending messages to the external server. After SNMP is configured, the snmp-serverenable traps command tells the IOS to forward traps, including syslog messages.Configuring IP AddressesThe ip address interface subcommand configures the IP address for each interface. Because each interfacehas an IP address, the interface configuration command precedes each ip address command, identifyingto IOS the interface to which the IP address should be assigned.Prefix NotationThis notation, called prefix notation, denotes the subnet mask in terms of the number of 1 bits in the subnetmask. The number of bits of value binary 1 in the mask is considered to be the prefix. Prefix notation issimply a shorter way to write the mask. If you prefer to see the subnet masks instead of the prefix, simply use the terminal ip netmask-formatdecimal exec command.Seeding the Routing Table with Connected IP RoutesThe Cisco IOS routes IP packets by defaultin other words, you do not need to type any commands to tellthe router to enable IP routing. Before the router will route packets in or out an interface, the interface musthave an IP address.The problem with the configurations shown so far is that the routers do not know routes to all the subnets inthe network. The ultimate solution to this problem is to configure a dynamic routing protocol.Routers add routes to their routing tables for the subnets associated with their own physical interfaces.The show ip route command lists routes to the subnets connected to the router. The output from thecommand lists a C in the first column, which, according to the notes at the beginning of the commandoutput, means connected. In other words, this router is connected directly to these subnets.The show ip interfaces brief command lists one line per interface, with IP address information andinterface status.The show interfaces {interface} command lists more details about a single interface, with most of thosedetails about the interface itself. Finally, the show ip interfaces {interface} command showsdetailed information about the IP protocol running over interface.IOS adds connected routes to the routing table that meet the following requirements:X The interface has been configured with a valid IP address.X The interface is in an up and up status according to the various interface-oriented show commands.All three of the show commands that list interface status information use two designations of up and up.The first status keyword (the first of the two ups in this case) generally refers to OSI Layer 1 status. Thesecond status word generally refers to the status of OSI Layer 2.Another instance in which a router might put an interface in status up and down is when the router does notreceive keepalive messages on a regular basis. Cisco routers send, and expect to receive, proprietarykeepalive messages on each interface. The purpose of the keepalives is to know whether the interface isusable. You can disable keepalives with the no keepalive interface subcommand, or you can change thetimer with the keepalive interval interface subcommand. 11. To bring down an interface for administrative reasons and, as a side effect, remove the connected routefrom the routing table, you can use the shutdown interface subcommand. The no shutdown commandbrings the interface back up.Bandwidth, Clock Rate, and Serial Lines in the LabTo use a back-to-back WAN connection, one router must supply the clocking. The clock rate commandsets the rate in bits per second on the router that has the DCE cable plugged into it. If no cable has beenplugged in, the IOS accepts the command. If a DTE cable has been plugged in, IOS rejects the command. Ifyou do not know which router has the DCE cable in it, you can find out by using the show controllerscommand.The bandwidth command tells IOS the speed of the link, in kilobits per second, regardless of whether therouter is supplying clocking. The bandwidth setting does not change anything that the router does at Layer1; instead, this setting is used by IOS software for other purposes. bandwidth defaults to T1 speed onserial interfaces. There is no default for clock rate, even with a DCE cable plugged init must beconfigured.IP Troubleshooting FeaturesInternet Control Message ProtocolTCP/IP includes a protocol specifically to help manage and control the operation of a TCP/IP network,called the Internet Control Message Protocol (ICMP). The ICMP protocol provides a wide variety ofinformation about the health and operational status of a network. The ICMP messages sit inside an IPpacket, with no transport layer header at allso it is truly just an extension of the TCP/IP network layer.ICMP Message TypesICMP Echo Request and Echo ReplyThe ICMP echo request and echo reply messages are sent and received by the ping command.The echo request includes some data that can be specified by the ping command; whatever data is sent inthe echo request is sent back in the echo reply.Destination Unreachable ICMP MessageThe ICMP Destination Unreachable message is sent when a message cannot be delivered completely to theapplication at the destination host. Because packet delivery can fail for many reasons, there are fiveseparate unreachable functions (codes) using this single ICMP unreachable message. All five code typespertain directly to an IP, TCP, or UDP feature.ICMP Unreachable Codes 12. Codes That the ping Command Receives in Response to Its ICMP Echo RequestIP Naming CommandsIP Naming Commands 13. Telnet and SuspendThe telnet IOS exec command enables you to Telnet from one Cisco device to another; in practical use, itis typically to another Cisco device. One of the most important features of the telnet command is thesuspend feature.Telnet Command OptionsCisco Discovery ProtocolThe Cisco Discovery Protocol (CDP) discovers basic information about neighboring routers and switches,without needing to know the passwords for the neighboring devices. CDP supports any LAN, HDLC,Frame Relay, and ATM interfacein fact, it supports any interface that supports the use of SNAP headers.The router or switch can discover Layer 2 and Layer 3 addressing details of neighboring routers withouteven configuring that Layer 3 protocolthis is because CDP is not dependent on any particular Layer 3protocol.Devices that support CDP advertise their own information and learn information about others by listeningfor their advertisements. On media that support multicasts at the data link layer, CDP uses multicast; onother media, CDP sends a copy of the CDP update to any known data-link addresses. So, any CDP- 14. supporting device that shares a physical medium with another CDP-supporting device can learn about theother device.CDP discovers several useful details from the neighboring device:X Device identifierTypically the host nameX Address listNetwork and data-link addressesX Port identifierText that identifies the port, which is another name for an interfaceX Capabilities listInformation on what type of device it isfor instance, a router or a switchX PlatformThe model and OS level running in the deviceCDP is enabled in the configuration by default. The no cdp run global command disables CDP for theentire device, and the cdp run global command re-enables CDP. Likewise, the no cdp enable interfacesubcommand disables CDP just on that interface, and the cdp enable command switches back to thedefault state of CDP being enabled.The show cdp command has four options. THe show cdp neighbor command lists each neighbor, withone line of output per neighbor. The show cdp entry fred command lists the details learned by CDP aboutthe neighbor whose host name is fred. Another command that lists the detailed information is the showcdp neighbor detail command, which is in the same format as show cdp entry but lists the informationfor every neighbor.Turning off CDPno cdp run (general)no cdp enable (para una interface)Gathering CDP Timers and Holdtime Informationshow cdpcdp timercdp holdtimeGathering Neighbor Informationshow cdp neighborshow cdp neighbor detailshow cdp entry *Gathering Interface Traffic Informationshow cdp trafficGathering Port and Interface Informationshow cdp interfaceManaging Configuration Filescopy source destinationThe source and the destination parameters can be running-config, startup-config,ortftp for RAM, NVRAM, and a TFTP server respectively.Two commands can be used to erase the contents of NVRAM. These are the write erasecommand, which is the older command, and the erase startup-config command, which is thenewer command.Verifying Flash Memoryshow flashBacking Up the Cisco IOS 15. copy flash tftpRestoring or Upgrading the Cisco IOS Softwarecopy tftp flashthe router must be reloaded.Backing Up and Restoring the Cisco Configurationcopyrun startcopyrunning-config tftpcopystartup-config tftpshowrunning-configStatic Routingip route destination_ip_address subnet_mask { ip-address | interface } [distance ]Verifying Routing Tablesshow ip routeclear ip routeConfiguring OSPFThe commands used to configure OSPF are:router ospf &lt; process_number &gt;where process_number is a number local to the router. This command configures OSPF as the routing protocol on the router.network network_number wildcard_mask defines the networks that are to participate in the OSPF updates and the area that they reside in.interface loopback &lt; interface_number &gt; ip address &lt; ip_address &gt; &lt; subnet_mask &gt;defines a loopback interface, which is a virtual interface, on the router. ip ospf cost &lt; cost &gt; sets the default cost for the router. auto-cost reference-bandwidth changes the OSPF cost formula.Note: The ip ospf cost command overrides the auto-cost reference-bandwidthcommand.Configuring EIGRPThe commands used to configure EIGRP on a Cisco router are consistent with the other IProuting protocolcommands. The EIGRP commands are: router eigrp autonomous_system_number configures EIGRP as the routing protocolon the router. network network_number [ wildcard_mask ] defines the networks that are toparticipate in the EIGRP updates. The [ wildcard_mask ] optional parameter identifieswhich interfaces are running EIGRP. no network network_number [ wildcard_mask ] disables EIGRP. no autosummary turns off automatic summarization.ip summary address eigrp autonomous_system_number ip_address subnet_mask configures sum...</p>