Week 10 - Commands, Static Routing and Dynamic Routing Protocols (1).pptx
Document Details
Uploaded by GreatAntigorite
Full Transcript
Week 10: CLI Structure, Commands, Static and Dynamic Routing Protocols NTWK8021 – Network Planning What we covered last lecture • Subnetting • VLSM Subnetting • Practical Assignment Q/A Any Questions? Welcome to Week 10! This week, we are going to cover the Cisco CLI structure, device command...
Week 10: CLI Structure, Commands, Static and Dynamic Routing Protocols NTWK8021 – Network Planning What we covered last lecture • Subnetting • VLSM Subnetting • Practical Assignment Q/A Any Questions? Welcome to Week 10! This week, we are going to cover the Cisco CLI structure, device commands, and static and dynamic routing After this lecture, you should be able to… • • • • • Understand the CLI structure and modes of Cisco routers and switches Understand basic commands Understand how routers handle data with destinations in different networks, including those not directly connected Understand Static and Dynamic Routing, including the differences between them How to confiture static and dynamic routing on Cisco Routers Part 1: CLI Structure NTWK8021 – Network Planning CLI Structure There are three modes on Routers and Switches when it comes to configuration. 1) User Mode 2) Privileged Exec Mode 3) Global Configuration Mode CLI Structure Overview User Mode • User Mode is the default mode when logging into a router or switch • Limited privileges and limited access to view operational status and configuration • Commonly used commands: ping and traceroute • Example prompt. Router> More User Mode Commands (Router) Privileged Exec Mode • Also known as Enable Mode or Privileged Mode • Offers higher privileges and control over the router or switch • Accessible from User Mode using the enable command • A password is typically set to prevent unauthorized users from accessing this mode • Commonly used commands: show running-config, debug, copy • Example prompt. Router# More Privileged Exec Commands (Router) Global Configuration Mode • Offers access to configure global device settings • Accessible from Privileged Exec Mode using the configure terminal command • Used to configure interfaces, routing, security, and more Global Configuration Mode (cont) • Commands entered in this mode change the device's configuration. • Commonly used commands are interface, ip address, hostname, enable password, enable secret • Example prompt: Router(config)# More Global Configuration Commands Summary of the three modes • User Mode: Basic operational commands, limited access • Privileged Exec Mode: Advanced operational commands, limited configuration • Global Configuration Mode: Full access to configuration Q/A Any Questions? Part 2: Device Commands NTWK8021 – Network Planning Device Commands • In Week 4, commands were given to you to use for Practical Lab 2 • This week, we are going to discuss what the commands accomplish • We will also be going over the commands to setup a router as a DHCP server Setting a hostname Setting the device hostname of R1 Router(config)#hostname R1 What CLI mode do we need to be in to set a hostname? Setting Passwords Setting an enable password of cisco: (For entering privileged exec mode) Router(config)#enable password cisco Stores the password as plain-text Setting an enable secret password of cisco: (For entering privileged exec mode) Router(config)#enable secret cisco Stores the password using a one-way hash (md5) Setting Line Passwords: Router(config)#line vty 0 15 Router(config-line)#password cisco Router(config-line)#login Used for setting a password for telnet access Enable Password Differences Do you notice a difference between how the password is displayed? Configuring Interfaces Navigates to interface FastEthernet 0/0 configuration Router(config)#interface fastethernet 0/0 Setting an IP address on FastEthernet 0/0 Router(config-if)#ip address 192.168.1.1 255.255.255.0 Powering on an interface: Router(config-if)#no shutdown Verifying Interfaces Router#show interface fastethernet0/0 FastEthernet0/0 is up, line protocol is down (Interface problem or other end not configured) FastEthernet0/0 is up, line protocol is up (Interface is up and working) FastEthernet0/0 is administratively down, line protocol is down (Interface is not enabled) DHCP • To enable DHCP on a router, you can use the below commands • This creates a scope with a default gateway in the 192.168.1.0 network Router(config)#ip dhcp pool LAN Router(dhcp-config)#network 192.168.1.0 255.255.255.0 Router(dhcp-config)# default-router 192.168.1.1 Saving Configuration and Verifying Changes Saving Configuration: Router#copy running-config startup-config (Copies the running-config to NVRAM on the device) Verifying Configuration: Router#show running-config Router#show startup-config (Shows the device configuration) Importance of Saving Configurations • Saving your configuration is very important on Routers and Switches • If the configuration is not saved after changes and the device restarts or loses power, you will lose unsaved changes Cisco CLI Tips and Tricks • To remove parts of your configuration, add no to the front of the command Example: Router(config-if)#no shutdown (Removes shutdown from the config, allowing the interface to turn on) Cisco CLI Tips and Tricks (contd) • You can use short forms for commands. Example: Router#copy run start What is the full version of this command? Cisco CLI Tips and Tricks (contd) • You can also tab out commands to have them autofill • Feel free to test this out with various commands • As you get used to the command line you may find other shortcuts you can use • Important: For certification exams, make sure you know the full version of the commands Q/A Any Questions? Part 3: Static and Dynamic Routing NTWK8021 – Network Planning Routing • The role of a Router is to route data between networks • The Router completes this by using it’s routing table • To view the routing table on a router you can use the below command Router#show ip route Routing (contd) • In Practical Lab 2, PC1 (192.168.1.10/24) was able to send a ping across to PC2 (192.168.2.10/24) using the Router • If there is more than one hop (Router) between destinations, things get more complicated Routing (contd) • Routers, by default, only know about their directly connected networks • If you want a router to learn about networks more then one hop away you need to add routes to your routing table Adding routes There are two ways to add routes to your routing table.. 1) Static Routing 2) Dynamic Routing Static Routing • Network administrators manually configure static routes • Routing decisions are explicitly defined and do not change unless modified by network administrators • Common use cases: Basic networks, specific traffic paths, default routes. Static Routing Advantages and Disadvantages • Advantages – Elimination of routing update traffic • Disadvantages – The additional administrative effort required to create the routes by using the ip route command – The need to manually react to outages and changes in the network by manually editing the routing table when problems arise Adding Static Routes • To add Static Routes to a router, you need to use the ip route command • Important: Static Routes need to be added on both sides of the connection. This will be shown in the demonstration later Using the IP route command Router(config)# ip route ip route <network ID> <subnet mask> <next hop ip address> <network ID> is the network ID or network number of the destination network <subnet mask> is the subnet mask of the destination network. <next hop ip address> is the IP address of the interface of the next directly connected router to which a packet should be sent to reach this network. Static Routing Example R1(config)#ip route 15.0.0.0 255.0.0.0 192.18.5.6 R2(config)#ip route 15.0.0.0 255.0.0.0 172.165.0.7 Verifying the Routing Table R1#show ip route Codes: I - IGRP derived, R - RIP derived, O - OSPF derived, C - connected, S – static <output omitted> C 10.0.0.0 is directly connected, FastEthernet 0/1 C 192.18.5.0 is directly connected, FastEthernet 0/2 S 15.0.0.0/8 via 192.18.5.6 Static Routing Demonstration • We will now go through a demonstration of setting up a basic network with two routers and two different LANs • We will use static routes to allow both LANs to communicate with two routers inbetween Dynamic Routing • Dynamic routing protocols automate the process of updating and managing routing tables. • Routers exchange routing information to dynamically learn about network topology changes. • Common dynamic routing protocols: RIP, OSPF, EIGRP. Dynamic Routing Advantages and Disadvantages • Advantages – Automation: Adapts to changes in network topology without manual intervention – Redundancy: Automatically adjusts routes if a link or router fails • Disadvantages – Additional Traffic: Routing Protocol traffic adds some overhead to the network Understand Routing Protocols Common Routing Protocols • There are three common routing protocols – RIPv2 – OSPF – EIGRP • In this course, we are going to discuss RIPv2 • You will learn more about the other protocols in NTWK8031 RIPv2 • Distance Vector Protocol: Updates are based on the hop count between the source and destination of a route • Max of 15 Hops • Supports Classless Inter-Domain Routing (CIDR) and variable-length subnet masks • Limited ability for expansion and slower convergence due to periodic updates. • Suitable for small to medium-sized networks with simple topologies due to the low amount of hops Configuring Routing Protocols 1. Enable the routing protocol 2. Define the interfaces on which the protocol is operation 3. Verify the routing table Enabling RIPv2 Router(config)#router rip Router(config-router)#version 2 Router(config-router)# Defining the Interfaces on Which the Protocol is Operational Router(config-router)#network <net ID> e.g. network 192.168.5.0 RIPv2 Example R1(config)#router rip R1(config)#version 2 R1(config-router)#network 10.0.0.0 R1(config-router)#network 192.18.5.0 R2(config)#router rip R2(config)#version 2 R2(config-router)#network 192.18.5.0 R2(config-router)#network 172.165.0.0 R3(config)#router rip R3(config)#version 2 R3(config-router)#network 172.165.0.0 R3(config-router)#network 15.0.0.0 Router#show ip route Dynamic Routing Demo • We will now go through a demonstration of setting up a basic network with two routers and two different LANs • We will use RIPv2 to allow both LANs to communicate with two routers in-between Q/A – End of Lecture Any Questions?