Lab Sheets Computer Networks - ecce.lsbu.ac.uk.docx

上传人:rrsccc 文档编号:8837522 上传时间:2021-01-19 格式:DOCX 页数:49 大小:1.12MB
返回 下载 相关 举报
Lab Sheets Computer Networks - ecce.lsbu.ac.uk.docx_第1页
第1页 / 共49页
Lab Sheets Computer Networks - ecce.lsbu.ac.uk.docx_第2页
第2页 / 共49页
Lab Sheets Computer Networks - ecce.lsbu.ac.uk.docx_第3页
第3页 / 共49页
Lab Sheets Computer Networks - ecce.lsbu.ac.uk.docx_第4页
第4页 / 共49页
Lab Sheets Computer Networks - ecce.lsbu.ac.uk.docx_第5页
第5页 / 共49页
点击查看更多>>
资源描述

《Lab Sheets Computer Networks - ecce.lsbu.ac.uk.docx》由会员分享,可在线阅读,更多相关《Lab Sheets Computer Networks - ecce.lsbu.ac.uk.docx(49页珍藏版)》请在三一文库上搜索。

1、Lab Sheets Computer NetworksSchool of EngineeringLab sheets: 2016/17Computer NetworkingLab 1: Cisco IOS Command Line Interface (CLI) (Sheet for Week 10 & 11)The aim of this lab session is to understand how to configure a Cisco router and to learn the Ciscos Internetworking Operating System (IOS) com

2、mands. Equipments:A PC with Cisco Packet Tracer installed. Logbook.Objectives Set up a new Cisco 1841 Integrated Services Router (ISR). Connect a computer to the router console interface. Configure HyperTerminal so that the computer can communicate with the router and observe the router start-up seq

3、uence. Display router configuration information using the show running-config and show startup-config commands and restart the router using the reload command. Display router system, Cisco IOS software and configuration register information using the show version command. Exploration of the IOS Comm

4、and Line Interface (CLI)Exercise Part 1: Using Packet Tracer to create a logical connection diagram for this workshop.The bottom left-hand corner of the Packet Tracer screen displays eight icons that represent device categories or groups, such as Routers, Switches, or End Devices. Moving the cursor

5、over the device categories will show the name of the category in the box. To select a device, first select the device category. Once the device category is selected, the options within that category appear in the box next to the category listings. Select the device option that is required.(a) Select

6、 End Devices from the options in the bottom left-hand corner. Drag and drop one generic PC onto the design area. Click on the PC, from the window, select the Config tab and rename them to PC0 (if it is not).(b) Select routers from the options in the bottom left-hand corner. Add one generic router on

7、to the design area. Rename it to testRouter.(c) Select Connections from the bottom left-hand corner. Choose a Console cable type to connect PC0 (RS232) and testRouter (Console port)The creating testing system should like the following figure 1.Part 2: Configure HyperTerminal so that the computer can

8、 communicate with the router and Routers Boot up processAlthough by clicking on the testRouter Router in the Packet tracer environment, you can monitor how the Cisco IOS works. In the practical work, the first step to boot up and set up a router is through the PC which connects to the router by cons

9、ole cable.(a) Click on the PC0, a window like the following figure 2 will pop up. Click on the Desktop tab, several simulation software are is available. Click terminal icon, a simulation HyperTerminal will be running for you to remotely configure a network device like router. You must first configu

10、re the terminal emulation parameters as follows: 9600 baud 8 data bits no parity 1 stop bit no flow control and no parity By clicking on OK you will be able to move to the HyperTerminal window displayed in Figure 3Figure 2 Simulation software available for Packet Tracer End DevicesFigure 3 Router St

11、art up Message(b) Observe the startup messages as they appear in the terminal emulation program window. While these messages are appearing, do not press any keys on the keyboard. Pressing a key interrupts the router startup process. Some examples of startup messages displayed are the amount of main

12、memory installed and the image type of the Cisco IOS software that the router is using. Can you find these example startup messages in the following figure? (c) The figure shows that there is 114 MB of memory installed on this router, and the Cisco IOS image type is C1841-ADVSECURITYK9-M. Startup me

13、ssages are generated by the operating system of the router. The messages vary depending on the software installed on the router. These messages scroll by quickly and take a few minutes to stop. When the router is finished starting up, the following system messages appear in the terminal emulation wi

14、ndow: - System Configuration Dialog - Would you like to enter the initial configuration dialog? yes/no: no Would you like to terminate autoinstall? yes: Press RETURN to get started! (d) After pressing Return (Enter) to get started, several system messages regarding the interface and line status appe

15、ar. If the router is in its default configuration, the user mode prompt Router is displayed. Note: It may be necessary to press Enter after the interface status messages are displayed. Part 3: Displaying Router Information using show Commands Step 1: Display the router running configuration. From th

16、e router user prompt, enter privileged mode using the enable command, and then issue the show running-config command to see the current router configuration in RAM. If the router is in default configuration, the output is similar to that shown below. The default host name is Router, and none of the

17、interfaces have IP addresses. This 1841 router has two built-in Fast Ethernet interfaces (0/0 and 0/1). In the default configuration, all interfaces are shutdown. In addition, there are no passwords set. Routerenable Router#show running-config Building configuration.Current configuration : 357 bytes

18、!version 12.4no service password-encryption!hostname Router!ip ssh version 1!interface FastEthernet0/0 no ip address duplex auto speed auto shutdown!From the router privileged mode prompt, issue the configure terminal command to enter configuration mode. Change the router name using the hostname com

19、mand, and then end configuration mode with the end command. Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname testRouter testRouter(config)#end testRouter# %SYS-5-CONFIG_I: Configured from console by console testRouter# c. What is the rout

20、er prompt now? _ d. From the router privileged mode prompt, issue the show running-config command again. How does the output differ from the first time you issued this command? _ Step 2: Display the router startup configuration. From the router privileged mode prompt, issue the show startup-config c

21、ommand to see the startup file stored in NVRAM. Is the output from this command the same as that from the show running-config command issued in Step 1d? _Router#show startup-config Step 3: Save the running-config to the startup-config. When the router is booted up, the startup-config file is loaded

22、into router RAM and becomes the running-config file. Changes made to the running-config take effect immediately, but do not affect the startup-config. To make running-config changes permanent, they must be copied to the startup-config using the copy running-config startup-config command. From the ro

23、uter privileged mode prompt, issue the copy running-config startup-config command to make the changes permanent. When prompted for the destination filename, press Enter to accept the default name of startup-config. testRouter#copy running-config startup-config Destination filename startup-config? Bu

24、ilding configuration. OK testRouter# From the router privileged mode prompt, issue the show startup-config command again. Is the output from this command the same as that from the show running-config command issued in Step 1d? _ To restart the router, from the router privileged mode prompt, issue th

25、e reload command. This performs a software restart and loads the startup-config file from NVRAM. What is the router prompt now? _ Step 4: Display the router system information using the show version command. The show version command displays useful information about the router internal components, i

26、ncluding the amount of RAM, Cisco IOS software version, the number and type of interfaces installed, and the configuration register, which controls how the router boots up. By default, the config register is set to hexadecimal 2102 (0x2102), which causes the router to load the operating system (Cisc

27、o IOS) from flash memory. The information displayed by the show version command is displayed as part of router bootup. Your output may vary, depending on the router model, Cisco IOS software version, and internal components installed. From the router privileged mode prompt, issue the show version co

28、mmand and answer the following questions: 1. What is the Cisco IOS software version number? _ 2. How long has the router been up (uptime)? _ 3. What is the name of the system image file? _ 4. How many and what types of interfaces does this router have? _ _ 5. How many bytes of NVRAM does the router

29、have? _ 6. How many bytes of flash (RAM) memory does the router have? _ 7. What is the configuration register setting? _ Part 4: Router Connection and Exploration of the IOS Command Line Interface (CLI)(a) As you have known from the previous operations, access to the IOS command line interface is ge

30、nerally referred to as an EXEC session. As a security feature, Cisco IOS separates EXEC session into two different access levels user EXEC level which will have a right arrow () in the prompt and privileged EXEC level which has a sharp key (#) in the prompt. Privileged EXEC level allows a person to

31、access all router commands and can be password protected. You can use “enable” and “disable” commands to switch between these two levels. (b) Switch between the two levels and use “?” to show all the commands in these two levels. Copies these commands to your logbook and compare what are missing in

32、the user EXEC level. Figure 4 shows the IOS CLI hierarchy.Figure 4 - IOS CLI hierarchyCLI Editor Features(c) Cisco IOS CAI offers two types of context sensitive help word help and command syntax help. Word help can be used to obtain a list of commands that begin with a particular character sequence.

33、 To use word help, type in the characters in question followed immediately by the question mark(?), the router will display list of commands that start with the characters that were entered. Try to run the command “ co?” to see what happens(d) Command syntax help can be used to obtain a list of comm

34、and, keyword, or argument options that available based on the syntax the user has already entered. Try run the command “configure ?” to see what will happen ( attention: there is a space between the command and ? mark).Router Configuration(e) Entering ConfigurationsMake sure you are on the privilege

35、d level to implement the following operations. Follow the commands of the left column step by step to set up your router. Here the “Router” is the hostname you give to the router. You can change to the name you like by using the hostname command in the configuration status. Router enable - switches

36、to privileged EXEC level Router# configure terminal - switches to global configuration levelRouter(config)# enable secret cisco- configures router with an enable secret (global)Router(config)# ip route 0.0.0.0 0.0.0.0 20.2.2.3 - configures a static IP route (global)Router(config)# interface FastEthe

37、rnet0/0 - switches to configure the ethernet0 interface Router(config-if)# ip address 10.10.x.1 255.255.0255.0 - configures an IP address on ethernet0 (interface)Router(config-if)# no shutdown- activates ethernet0 (interface)Router(config-if)# exit - exits back to global configuration levelRouter(co

38、nfig)# interface VLan1- switches to configure the serial0 interfaceRouter(config-if)# ip address 10.10.10.1 255.255.255.0- configures an IP address on serial0 (interface)Router(config-if)# no shutdown- activates serial0 (interface)Router(config-if)# description Cisco DHCPRouter(config-if)# ip dhcp p

39、ool ciscoRouter(dhcp-config)# network 10.10.10.0 255.255.255.0Router(dhcp-config)#dns-server 192.168.1.10Router(config-if)# default-router 10.10.10.1Router(dhcp-config)#exit- DHCP setupRouter(config-if)# exit - exits back to global configuration levelRouter(config)# router rip- switches to configure

40、 RIP routing engineRouter(config-router)# network 10.0.0.0- adds network 10.0.0.0 to RIP engine (routing engine)Router(config-router)# network 20.0.0.0- adds network 20.0.0.0 to RIP engine (routing engine)Router(config-router)# exit- exits back to global configuration levelRouter(config)# exit- exit

41、s out of configuration levelRoute(config)# line console 0Router(config)# password passwordRouter(config)# loginActivates Console accessRoute(config)# line vty 0 4Router(config)# password passwordRouter(config)# loginRouter# copy running-config startup-configSet up the network connection to the route

42、rSetup the password for telnet accessActivates the telnet connectionRouter# disable - disables privileged EXEC levelRouter - indicates user is back to user EXEC level(f) Removing Commands / Resetting Default ValuesIOS provides an easy way to remove commands from a configuration. To remove a command

43、from the configuration, simply navigate to the proper location and type no followed by the command to be removed. The following example displays how to remove an IP address from the ethernet0 interface.( leave to the last steps to implement these examples)Router enable - switches to privileged EXEC

44、levelRouter# configure terminal - switches to global configuration level Router(config)# interface ethernet0 - switches to configure the ethernet0 interfaceRouter(config-if)# no ip address- removes IP addressRouter(config-if)# exit- exits back to global configuration levelRouter(config)# exit- exits

45、 out of configuration levelRouter# disable- disables privileged EXEC levelRouter- prompt indicates user is back to user EXEC levelRouter Management(g) IOS supports many different types of show commands. To display the running-configuration, type the following command in privileged EXEC mode:Router#s

46、how running-configTo display the startup-configuration that is stored in NVRAM, type the following command in privileged EXEC mode:Router#show startup-configWriting down the output of these two configuration informations.(h) To display the version, type the following command in privileged EXEC mode:Router# show version(i) To view information about a particular interface, use the show interface command. The

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 社会民生


经营许可证编号:宁ICP备18001539号-1