Cisco Router Commands Introduced During CNAP Semesters 2, 3, 4 For CCNA Certification Examination
Cisco Router Commands Introduced During CNAP Semesters 2, 3, 4 For CCNA Certification Examination
Updated 02-20-2001 by Leon Schram [email protected] Berkner High School Richardson Independent School District Richland College Dallas County Community College
This reference manual is compiled by Leon Schram from information provided by the Cisco Networking Academy Program curriculum and the Sybex CCNA Study Guide. CCNA (Cisco Certified Network Associate) Study Guide, Second Edition by Todd Lammle Published 2000 by Sybex ISBN: 0-7821-2647-2 This reference guide may be freely copied and distributed by Cisco instructors to students enrolled in any Cisco Networking Academy Program.
Do not be surprised if various commands are repeated in different sections. This router reference guide has tried to place commands in the same sequence as they are introduced during your CNAP course. At the same time the commands are grouped in some logical manner, which means that some commands will belong to multiple groups.
Bootup work station and go to Hyper Terminal folder Execute HyperTerminal program Connection Description window Select connection name and a connection icon Phone Number window Enter indicated settings: You are not creating a phone dial-up connection
Save the new connection: It is recommended to drag the router icon to the desktop for convenient future router access. Start a router session: Execute HyperTerminal: Connect to the router
Click <HyperTerminal> Click <File-Open> and select Router icon Press <Enter> You should see user-exec prompt like Router> Cisco Router & Switch Commands Page 6
Logging into the Router Keywords <enable> help <?> <^Z> <exit>
Correct, initial, router connection should provide user-exec mode prompt. The user-exec mode provides minimal router command access, which is mostly of the read-only variety. Router configurations cannot be changed in user mode. To display a list of available user-exec commands: To enter privileged-exec mode: The privileged-exec mode provides maximum router command access. A password prompt may not be seen the first time that a router is activated. You must provide the password for future logins. To display a list of available privileged-exec commands: To enter global configuration mode: (t is short for terminal) Return to privileged mode with <Ctrl-Z>: You can also return to privileged mode with exit: Return the router to user-exec mode: Note: Cisco routers automatically disconnect after an inactive time period. It will be necessary to repeat the login. If a user-exec prompt does not appear, try pressing the <Enter> key. Cisco Router & Switch Commands Page 7 Router>
Router# ? Router# config t Router(config)# Router(config)#^Z Router# Router(config)# exit Router# Router#disable
Using Clock and Getting Cisco Router Command Help Keywords <clock> <set> <show> <?>
The ? can be used to display a list of available options after a partial router command entry. To set the clock and only knowing the clock command: Router responds with: Enter the next step and ask for more help: Router responds with: Now enter new time: Router responds with: Ask for additional help: Router responds with: Add day and month information and ask for more help: Router responds with: Enter the complete clock command: To display date and time information: Router# clock ? set Set the time and date Router# clock set ? hh:mm:ss Current Time (hh:mm:ss) Router# clock set 10:29:30 % Incomplete command Router# clock set 10:29:30 ? <1-31> Day of the month MONTH Month of the year Router# clock set 10:29:30 10 October ? <1993-2035> Year Router# clock set 10:29:30 10 October 1999 Router# show clock 10:30:01.543 UTC Sun Oct 10 1999
Cisco Router Editing Commands Keywords <show> <terminal> <editing> <history> <size>
Move to the beginning of the command line: Move to the end of the command line: Move forward one character: Move backward one character: Repeat the entire (last) previous command: Most recent command recall: Move backward one word: Move forward one word: Show history of commands in the buffer: Set the history buffer size (up to 256): Disable advanced editing features: Enable advanced editing features: Completing a partial command with <tab> key: Router responds with: Typing a partial, but recognizable, command <Ctrl-A> <Ctrl-E> Right-Arrow or <Ctrl-F> Left-Arrow or <Ctrl-B> Up-Arrow or <Ctrl-P> Down-Arrow or <Ctrl-N> <Esc-B> <Esc-F> Router> show history Router> terminal history size Router> no terminal editing Router> terminal editing Router# show run <tab> Router# show running-config Router# sho clo
Configuration Modes and Prompts Keywords <config> <interface> <subinterface> <line> <router> <ipx>
User EXEC mode for limited examination of the router Privileged EXEC mode for detailed examination of the router, debugging, debugging, file manipulation and remote access All router configurations start by changing to the global configuration mode. This example changes to the configuration-interface mode for the e0 interface of the router: Note: The remainder of the example include a variety of Cisco router configuration modes. You will not know the meaning of many of these commands. Right now that does not matter. The main point is that many commands do not work because they are not entered from the correct configuration mode. Router> Router#
Router# config t Router(config)# Router(config)# int e0 Router(config-if)# Router(config)# int e0.100 Router(config-subif)# Router(config)# router rip Router(config-router)# Router(config)# line vty 0 4 Router(config-line)# Router(config)# ipx router rip Router(config-ipx-router)# Router(config)# map-list Qwerty Router(config-map-list)# Router(config)# map-map Secure 10 Router(config-rout-map)#
RXBOOT mode used to recover from lost passwords or accidental flash erasure SETUP mode prompted dialog to enter router configuration
Router Status Commands Keywords <show> <version> <processes> <mem> <stacks> <flash> <run> <start> <int>
Displays system configuration, software version, file names and the boot image: Displays information about the active processes: Displays the configured protocols: Monitors stack use, interrupt routines, and last system reboot: Displays buffer statistics: Displays flash memory information: Displays the active configuration file in RAM: This is one of the most useful router commands Displays the startup (backup) configuration file in NVRAM: Router#show interfaces Displays statistics for all router interfaces: Note: All command examples are shown in the privileged mode. Many of the show commands are also available in the user mode. Cisco Router & Switch Commands Page 11 Router#show version Router#show processes Router#show protocols Router#show stacks Router#show buffer Router#show flash Router#show running-config (usually just show run) Router#show startup-config (usually just show start)
Lab-B
219.17.100.1 199.6.13.1 (DCE) 201.100.11.2 255.255.255.0 219.17.100.0 199.6.13.0 223.8.151.1 204.204.7.1 199.6.13.2 255.255.255.0 223.8.151.0 204.204.7.0 210.93.105.1 Not configured 204.204.7.2 255.255.255.0 210.93.105.0 204.204.7.0 210.93.105.2 Not configured 255.255.255.0 210.93.105.0
201.100.11.0
Lab-C
199.6.13.0
Lab-D
Lab-E
Cisco Discovery Protocol Keywords <cdp> <interface> <neighbors> <detail> <entry> <enable> <traffic>
Show packets and holdtime: Shows information about the routers interface status, such as CDP timers, packets and encapsulation: Displays information about directly connected routers, such as device identifiers, address lists, port idenmtifiers and version: Router#show cdp neighbors detail Displays additional detailed information about directy connected routers, including their ip addresses: Router#show cdp entry * Displays the same information as the show cdp neighbors detail command: Router#show cdp entry LAB-B Displays information for a specified neighbor: Enabling CDP on a specified interface, which begins CDPs dynamic discovery and starts the exchange of CDP frames: Displays the amount of packets sent and received among router neighbors: Router#config t Router(config)#int s0 Router(config-if)#cdp enable Router#show cdp traffic Router#show cdp Router#show cdp interface Router#show cdp neighbors
Router Testing Keywords <telnet> <exit> <disconnect> <return> <sessions> <users> <ping> <trace> <ip route> <clear> <counters>
Starting a virtual terminal session with an IP address: Starting a virtual terminal session with a host name: Finish a telnet session connected to LAB-A router: Return to original router without terminating telnet session: Resume earlier telnet session: Displays open telnet sessions: Displays routers connected by telnet: Test end-to-end connectivity using ip address: Test end-to-end connectivity host name: Test each step from source to destination: Abort continuous trace attempts: Check if a router has a routing table: Check if a specific interafce is operational and display statistics since the last time counter were cleared: To reset counters which helps to get a current router picture: Router#telnet 172.16.50.1 Router#telnet Lab-A Lab-A#exit Lab-A#<Ctrl><Shift><6> Lab-A#return Router#show sessions Router#show users Router#ping 172.16.50.1 Router#ping LAB-A Router#trace 172.16.50.1 <Ctrl><Shift><6> Router#show ip route Router#show intyerfaces s1 Router#clear counters
Commands related to Router Startup and Configurations Keywords <run> <run> <reload> <setup> <write> <erase> <term>
Display running configuration in RAM: Cisco IOS 10.3 and earlier: Display startup (backup) configuration in NVRAM: Cisco IOS 10.3 and earlier: Erase the startup configuration in NVRAM: Cisco IOS 10.3 or earlier: Restart the entire startup process with start-up configuration: Enter router-prompted running configuration sequence: Copy the running configuration to the startup configuration: Cisco IOS 10.3 or earlier: Copy the startup configuration to the running configuration: Cisco IOS 10.3 or earlier: Router#show running-config (or show run) Router#write term Router#show startup-config (or show start) Router#show config Router#erase start-up config (or erase start) Router#write erase Router#reload Router#setup Router#copy run start Router#write mem Router#copy start run Router#config mem
Note: the setup command can be used only for creating a minimal router configuration. Many configurations cannot be entered or altered with setup
Setting Cisco Router Passwords Keywords <config> <enable> <secret> <password> <line> <vty> <aux> <con> <login> <service> <password-encryption>
Setting the privileged password: Used for non-encrypted privileged mode and older IOS All password settings must be done in global configuration Setting the privileged-exec mode password: Setting the virtual terminal password: This password is used for telnet sessions into your router. line vty 0 4 specifies that up to 5 telnet sessions are allowed: Setting the auxiliary password: This password is used to control access to the router through the aux port via a modem for remote console connections. Setting the console password: This password controls access to the router through the standard con router port Manually encrypting all password configurations that follow: Router# config t Router(config)# enable password cisco Router(config)# enable secret class Router(config)# line vty 0 4 Router(config-line)# login Router(config-line)# password cisco Router(config)# line aux 0 Router(config-line)# login Router(config-line)# password cisco Router(config)# line con 0 Router(config-line)# login Router(config-line)# password cisco Router(config)#service password-encryption
You can add a banner that will be displayed with login. The motd commands stands for message of the day. Start with the command with a delimiting charcter, like # Both end and <Ctrl-Z> return to the priviliged mode:
Router#config t Router(config)#banner motd # Enter TEXT message: End with the chracter # Have a nice day# Router(config)#end Router# Router(config)#^Z Router#
Upload running configuration to a tftp server: Upload startup configuration to a tftp server: Download running configuration from a tftp server: Download startup configuration from a tftp server:
Router>enable Router#copy start run Router#config t Router(config)#config-register 0x2102 Router#copy run start Router#reload Router#show run Routershow version
Configuring router ports Keywords <description> <int> <ip address> <no> <shutdown> >clock rate>
Enter specific port interface Ethernet 0: Provide optional comment for router port: Enter ip address for e0 followed by subnet mask: Activate e0 port from default down to up: Change to port interface Ethernet 1: Provide optional comment for router port: Enter ip address for e1 followed by subnet mask: Activate e1 port from default down to up: Change to port interface Serial 0: Provide optional comment for router port: Enter ip address for s0 followed by subnet mask: Enter clockrate for DCE serial interface: Activate s0 port from default down to up: Removing an ip address: Change an interface from up to down: Lab-A(config)#int e0 Lab-A(config-if)#description E0 link to Sales LAN Lab-A(config-if)#ip address 192.5.5.1 255.255.255.0 Lab-A(config-if)#no shutdown Lab-A(config-if)#int e1 Lab-A(config-if)#description E1 link to switch Lab-A(config-if)#ip address 205.7.5.1 255.255.255.0 Lab-A(config-if)#no shutdown Lab-A(config-if)#int s0 Lab-A(config-if)#description S0 WAN link (DCE) to Lab-B Lab-A(config-if)#ip address 201.100.11.1 255.255.255.0 Lab-A(config-if)#clock rate 56000 Lab-A(config-if)#no shutdown Lab-A(config-if)#no ip address Lab-A(config-if)#shutdown Cisco Router & Switch Commands Page 21
Router#clear arp
Host Name to address mapping and Name server configuration Keywords <ip host> <hosts> <domain> <lookup> <name-server>
Set up host name, address mapping on Lab-A router: Lab-A(config)#ip host Lab-A 205.7.5.1 201.100.11.1 192.5.5.1 Lab-A(config)#ip host Lab-B 219.17.100.1 201.100.11.2 199.6.13.1 Lab-A(config)#ip host Lab-C 199.6.13.2 223.8.151.1 204.204.7.1 Lab-A(config)#Ip host Lab-D 204.204.7.2 210.93.105.1 Lab-A(config)#ip host Lab-E 210.93.105.2 Lab-B(config)#ip host Lab-A 205.7.5.1 201.100.11.1 192.5.5.1 Lab-B(config)#ip host Lab-B 219.17.100.1 201.100.11.2 199.6.13.1 Lab-B(config)#ip host Lab-C 199.6.13.2 223.8.151.1 204.204.7.1 Lab-B(config)#Ip host Lab-D 204.204.7.2 210.93.105.1 Lab-B(config)#ip host Lab-E 210.93.105.2 Lab-A#show hosts Or Lab-A#show run Remove mapping for router Lab-B on router Lab-A: Turn on ip domain lookup (turned on by default): Set the IP address of the DNS server: Append the domain name to the hostname: (will also include mappings)
Note: you can enter a maximum of eight addresses Display the list of host name, address mappings:
Lab-A(config)#no ip host Lab-B Router(config)#ip domain-lookup Router(config)#ip name-server 192.168.0.70 Router(config)#ip domain-name schnook.com
Router(config)#no ip route 0.0.0.0 0.0.0.0 172.16.49.2 Router(config)#router rip Router(config-router)#router rip Router(config-router)#network 172.16.0.0 Router(config-router)#network 192.168.17.0 Router(config-router)#ip default network 192.168.17.0
Cisco Router & Switch Commands Introduced During CNAP Semester 3 Used For Semester 3 Lab Exam
Students are responsible for knowing all routing commands that were introduced during semester 2 in addition to the new routing and switching commands introduced during semester 3.
Semester 3 introduced switch commands. Switches can be configured with menu driven selections or command line interface (CLI) commands. The CCNA exam tests switch CLI commands for the 1900 switch only, which is what will be presented in this reference guide.
NOTE The Catalyst 1900 Switch, upgraded with the Enterprise Edition IOS, can be configured using both menu selection options and Command Line Interface (CLI). CLI commands are very similar to routing commands. You can also use the same type of abbreviations that you used with the router commands, like ena for enable. The CCNA 640-507 Exam 2.0 will test only CLI commands for the testing objectives listed on this page.
Bootup work station and go to Hyper Terminal folder Execute HyperTerminal program Connection Description window Select connection name and a connection icon Phone Number window Enter indicated settings: You are not creating a phone dial-up connection
Setting Catalyst 1900 Switch passwords Keywords <enable> <config> <password> <level> <secret> <show run>
Execute hyper terminal and initiate a Switch session: 1 user(s) now active on Management Console User Interface Menu [M] [K] [I] Change from Menu Selection mode to the CLI: (Command Line Interface) Menus Command Line IP Configuration K
Enter Selection:
CLI session with the switch is open. To end the CLI session, enter [Exit]. > >enable #config t (config)#enable password level 1 cisco (config)#enable password level 15 class (config)#enable secret class #show run
Enter privileged mode: (If this is the first time a password is not required) Enter global configuration mode: Set the user mode password: Set the enable (privileged) mode password: (non encrypted) Set the secret enable (privileged) mode password: (encrypted) View the passwords in the switch configuration: (note that the user and enable passwords are visible)
Important Catalyst 1900 Switch password notes: Passwords must be between 4 and 8 characters. The enable and secret passwords can be the same.
Setting a Catalyst 1900 Switch Host Name and IP Information Keywords <hostname> <show ip> <ip address> <ip default-gateway>
Go to privileged mode: Go to global configuration mode: Set the host name for the switch: >enable #config t (config)#hostname Switch-A Switch-A(config)#
Note: The hostname on a switch, as well on a router, is only locally significant. This means that it does not have any function on the network or name resolution whatsoever. However, it is helpful to set a hostname on a switch so that you can identify the switch when connecting to it. Display the default ip address and gateway: Switch-A#show ip IP Address: 0.0.0.0 Subnet Mask: 0.0.0.0 Default Gateway: 0.0.0.0
Note there will be additional information displayed like VLAN Management, Domain name and other details. Setting ip address on the switch: Setting the default gateway on the switch: Note: On a switch you set ip information so that the switch can be accessed via Telnet or if the switch needs to be configured with different VLANs Switch-A(config)#ip address 172.16.10.16 255.255.255.0 Switch-A(config)#ip default-gateway 172.16.10.1 Switch-A#show ip IP Address: 172.16.10.16 Subnet Mask: 255.255.255.0 Default Gateway: 172.16.10.0
Configuring Switch Interfaces Keywords <int> <0/1-27> <ethernet> <fast> <description> <show>
Note: Configuring switch interfaces is a combination of a slot number/port number. The 1900 switch only has one slot, which will always be 0. Configuring 10BaseT interfaces: Or use abbreviation: Configuring 100Mbps interfaces: Or use abbreviation: (fast ethernet ports are only 26 and 27 even if the switch has a total of 14 ports) Setting a port description: (Note that the description must be one word) View interface information: The main intention is to show the description of the port. You will also see additional information that you will not Understand right now. Keep in mind that switch configuration is only introduced At the CCNA level, and is not fully investigated until the CCNP program. Switch-A(config)#int ethernet 0/1 Switch-A(config)#int e0/1 Switch-A(config)#int fast 0/26 Switch-A(config)#int f0/26
Switch-A(config-if)#description Marketing_VLAN Switch-A#show int e0/1 Ethernet 0/1 is Suspended-no-linkbeat Hardware is Built-in 10Base-T Address is 0001.96DF.78C1 MTU 1500 bytes, BW 10000 Kbits 802.1d STP State: Forwarding Forward Transitions: 1 Port Monitoring : Disabled Unknown unicast flooding: Enabled Unregistered multicast flooding: Enabled Description: MARKETING VLAN Duplex setting: Half duplex Back pressure: Disabled
Configuring the Port Duplex Keywords <int> <0/1-27> <fast> <duplex> <auto> <full> <full-flow-control> <half>
Change to Ethernet port 0/1 Configuring the port duplex mode for an ethernet port: Options are: auto full full-flow-control half Configure port for half-duplex mode: (default for 10BaseT ports) Attempt to configure ports for auto or full-flow-control. Even though the question mark specified these options they will only work with fast ethernet ports. Switch-A(config)#int e0/1 Switch-A(config-if)#duplex ? auto Enable auto duplex configuration full Force full duplex configuration full-flow-control Force full duplex with with flow control half Force half duplex operation Switch-A(config-if)#duplex half
Switch-A(config-if)#duplex auto Error: Invalid configuration for this interface Switch-A(config-if)#duplex full-flow-control Error: Invalid configuration for this interface Switch-A(config-if)#int f0/26 Switch-A(config-if)#duplex auto Switch-A(config-if)#int f0/27 Switch-A(config-if)#duplex full-flow-control
Change to Fast Ethernet port 0/26: Configure port for auto-negotiation mode: (default for fast ethernet ports) Change to second Fast Ethernet port 0/27: Configure for full-flow-control to prevent buffer overflow:
Test connectivity to an ip address with telnet: Note it is not possible to telnet from a switch, like you have done with a router. However, it is possible to telnet into a switch from a router.
Managing the MAC Address Table Keywords <mac-address-table> <permanent> <restricted> <static> <show> <version>
Display the switch MAC address table: Switch-A#show mac-address-table Number of permanent addresses : 0 Number of restricted static addresses : 0 Number of dynamic addresses : 0 Switch-A#clear mac-address-table Switch-A#clear mac-address-table ? dynamic Clear 802.1d dynamic address permanent Clear 802.1d permanent address restricted Clear 802.1d restricted static address Switch-A#clear mac-address-table dynamic Switch-A(config)#mac-address-table permanent 00A0.2448.60A5 e0/4
Clear all the entries in the mac-address-table: Clear specific types of entries:
Clear dynamic mac-address-table entries: Configure a permanent mac address to port 4 The mac-address-table had three options: dynamic permanent restricted Restricting a path for source hardware address. In this case port 0/5 is restricted to sending frames only to port 0/2. Display basic information about a switch, like how long the switch has been running, IOS version, and base MAC address:
Switch-A#show version
Changing the LAN Switch Type Keywords <int> <0/1-27> <ethernet> <fast> <description> <show> <duplex> <delete> <nvram> <port> <switching-mode> <fragment-free> <store-and-forward>
Display the current switching mode: (this is the default switching mode) Display the switching-mode options: Switch-A(config)#switching-mode ? fragment-free Fragment Free mode store-and-forward Store-and-Forward mode Change the switching mode to store-and-forward: Change switching mode to fragment-free: Switch-A(config)#switching-mode store-and-forward Switch-A(config)#switching-mode fragment-free Switch-A#show port system Switching mode: FragmentFree Use of store and forward for multicast: disabled
Switching-Mode Warning If you change the LAN switch type, you change it for all ports on the switch. Configuring VLANs Keywords <vlan> <name> <vlan-membership> <static>
Cisco Router & Switch Commands Page 38
Note: A switch can be configured for static or dynamic VLAN membership. THE CCNA exam objectives only require static configuration.
Check the VLAN number options: Number 1 is reserved for the default VLAN. The Inter-Switch Link routing number identifies the VLAN. Make VLAN 2 Production Make VLAN 3 Marketing Make VLAN 4 Accounting Change to port e0/2: Display the vlan-membership options: Switch-A(config)#vlan ? <2-1001> ISL VLAN index Switch-A(config)#vlan 2 name Production Switch-A(config)#vlan 3 name Marketing Switch-A(config)#vlan 4 name Accounting Switch-A(config)#int e0/2 Switch-A(config-if)#vlan-membership ? dynamic set VLAN membership as dynamic static set VLAN membership as static Switch-A(config-if)#vlan-membership static 2 Assign the three VLANs (Production, Marketing and Accounting) to specif ports using the vlan index numbers: Switch-A(config-if)#int eo/4 Switch-A(config-if)#vlan-membership static 3 Switch-A(config-if)#int e0/5 Switch-A(config-if)#vlan-membership static 4 Switch-A#show vlan Display all the VLANs assigned to their respective ports: Display VLAN 2 information only: Display VLAN information along with static or dynamic info: Switch-A#show vlan 2 Switch-A#show vlan-membership
Configuring trunk ports Keywords <trunk> <auto> <desirable> <nonnegotiate> <off> <on> <trunk-allowed>
Note that trunking is only available on FastEthernet ports running Dynamic Inter-Switch Link (DISL) encapsulation. Configuring trunking with DISL set to AUTO: (trunk port if connected device is on or desirable) Configuring trunking with DISL set to DESIRABLE: (trunk port if connected device is on, desirable or auto) Configuring trunking with DISL set to NONEGOTIATE: (becomes permanent ISL trunk port; will not negotiate with any attached device) Configuring trunking with DISL set to OFF: (interface is disabled from running trunking) Configuring trunking with DISL set to ON: (becomes permanent ISL trunk port; can negotiate with a connected device to convert to trunk mode) Display the trunk ports: Display trunking on interface 26: Display trunking on interface 27: Display allowed VLANs on a trunked port a: Clearing a VLAN 5 from being communicated on a trunked line: Switch-A(config)#int f0/26 Switch-A(config-if)#trunk auto Switch-A(config-if)#trunk desirable Switch-A(config-if)#trunk nonnegotiate
Switch-A#show trunk Switch-A#show trunk a Switch-A#show trunk b Switch-A#show trunk a allowed-vlans Switch-A#no trunk-vlan 5
Configuring Interior Gateway Routing Protocol (IGRP) Keywords <router> <igrp> <network> <ip route> <protocol> <events> <transactions>
Activate IGRP routing protocol with AS number 10 (0-65535): Specify attached network addresses: Router(config)#router igrp 10 Router(config-router)#network 172.16.0.0 Router(config-router)#network 172.25.0.0 Router#show ip route Router#show protocol Router#show ip protocol Router#debug igrp events Router#debug igrp transactions Router#un all
Check IGRP routing table information: Useful command to see ip addresses for each interface and determine if routing protocol is enabled: Verifying which routing protocol is active: Display a summary of IGRP routing information: Display message requests and broadcasts: Turn off all debugging:
Configuring multiple IPX frame types using a secondary address: Configuring multiple IPX frame types using subinterfaces: Note: use the following Cisco keywords novell-ether (default) sap arpa snap Ethernet_802.3 Ethernet_802.2 Ethernet_II Ethernet_snap
Configuring standard IP access lists Keywords <access-list> <deny> <permit> <hosts> <any> <in> <out> <access-group>
Deny any packets from host 172.16.30.2 Permit access to all other ip addresses: Change to interface mode: Attach access list 10 to Ethernet 0 outgoing: Permit any packets from network 172.16.0.0: Permit any packets from subnet 172.16.4.0: Permit only host 172.16.30.2 using wild card: Deny only host 200.23.45.78: Permit all other addresses using wild cards: Permit all other addresses using any: Permit only even-numbered hosts of network 220.100.50.0: Permit only ip addresses in the range 172.16.16.0 through 172.16.19.0: Permit only ip addresses in the range 172.16.16.0 through 172.16.23.0: Permit only ip addresses in the range 172.16.32.0 through 172.16.63.0: Router(config)#access-list 10 deny host 172.16.30.2 Router(config)#access-list 10 permit any Router(config)#int e0 Router(config-if)#ip access-group 10 out Router(config)#access-list 20 permit 172.16.0.0 0.0.255.255 Router(config)#access-list 30 permit 172.16.4.0 0.0.0.255 Router(config)#access-list 40 permit 172.16.30.2 0.0.0.0 Router(config)#access-list 50 deny host 200.23.45.78 Router(config)#access-list 50 permit 0.0.0.0 255.255.255.255 same as: Router(config)#access-list 50 permit any Router(config)#access-list 60 permit 220.100.50.0 0.0.0.254 Router(config)#access-list 70 permit 172.16.16.0 0.0.3.255 Router(config)#access-list 80 permit 172.16.16.0 0.0.7.255 Router(config)#access-list 90 permit 172.16.32.0 0.0.31.255
Controlling VTY (Telnet) access and viewing access lists Keywords <line vty 0 4> <access-class>
Create a standard access list permitting only 172.16.10.3: Change to telnet line mode: Apply the access list to the VTY line: Display all the access lists: Display only access list 75: Shows only the IP access lists: Shows which interfaces have access lists: Shows the access lists and which interfaces have access lists: Router(config)#access-list 50 permit 172.16.10.3 Router(config)#line vty 0 4 Router(config-line)#access-class 50 in Router#show access-list Router#show access-list 75 Router#show ip access-list Router#show ip interface Router#show run
Configuring extended ip access lists Keywords <access-list> <deny> <permit> <eq> <any> <ftp> <telnet>
Deny acces from any source to host 172.16.10.5 Deny access from any ftp and any telnet source to host 172.16.10.5 Same access list as above, but using port names (ftp and telnet) in place of numbers (21 and 23) Permit access from source network 150.50.0.0 to destination network 200.1.1.0 Router(config)#access-list 110 deny ip any host 172.16.10.5 Router(config)#access-list 120 deny tcp any host 172.16.10.5 eq 21 Router(config)#access-list 120 deny tcp any host 172.16.10.5 eq 23 Router(config)#access-list 120 permit ip any any Router(config)#access-list 120 deny tcp any host 172.16.10.5 eq ftp Router(config)#access-list 120 deny tcp any host 172.16.10.5 eq telnet Router(config)#access-list 120 permit ip any any Router(config)#access-list 130 permit ip 150.50.0.0 0.0.255.255 200.1.1.0 0.0.0.255
Configuring IPX Access Lists Keywords <access-list> <permit> <deny> <ipx access-group> <in> <out>
Standard IPX access list, which permits IPX packets from IPX network 20 out inetrface e0 to IPX network 40 Router(config)#access-list 810 permit 20 40 Router(config)#int e0 Router(config-if)#ipx access-group 810 out
Cisco Router Commands Introduced During CNAP Semester 4 Used For Semester 4 Lab Exam
Students are responsible for knowing all routing & switching commands that were introduced during semesters 2 & 3 in addition to the new routing commands introduced during semester 4.
Router#show int s0 Serial0 is up, line protocol is up Hardware is HD64570 Internet address is 172.16.20.1/24 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255 Encapsulation PPP, loopback not set, keepalive set (10 sec)
Change to serial 0 router interface: Enable Frame Relay encapsulation for Cisco routers: Enable Frame Relay IETF encapsulation for non-cisco routers or one cisco router connected to a non-cisco device: (Internet Engineering Task Force)
Permanent virtual circuits (PVCs) like Frame Relay virtual circuits are identified by Data Link Connection Identifiers (DLCIs). Check available DLCI numbers for interface s0: Configure DLCI number 16 to the interface: The Local Management Interface (LMI) is a signaling standard responsible for managing and maintaining status between a CPE router and a frame switch. Beginning with IOS 11.2 the LMI type is auto-sensed. There are three LMI types. Determine the three LMI types: Router(config)#int s0 Router(config-if)#frame-relay lmi-type ? cisco ansi q933a Router(config-if)#frame-relay lmi-type q933a Router(config)#int s0 Router(config-if)#frame-relay interface-dlci ? <16-1007> Define a DLCI as part of the current subinterface Router(config-if)#frame-relay interface-dlci 16
Configuring Subinterfaces for Frame Relay Keywords <int s1.?> <multipoint> <point-to-point>
You have multiple virtual circuits on a single serial interface, but each must be treated as a separate interface. This is accomplished by creating subinterfaces. First set Frame Relay encapsulation to a serial interface: Check available subinterface numbers: Create subinterface 16 in Serial 1 interface: Router(config)#int s1 Router(config-if)#encapsulation frame-relay Router(config-if)#int s1.? <0-4294967295> Router(config-if)#int s1.16 Router(config-subif)# Router(config)#int s0.16 ? multipoint Treat as multipoint link point-to-point Treat as point-to-point link Router(config)#int s0.16 multipoint Router(config-subif)#
Determine the two types of subinterfaces: Multipoint is used when the router is at the center of a star of virtual circuits. Point-to-Point is used when a single virtual circuit connects one router to another. Create subinterface 16 with multipoint type: