Router Basics รศ. ดร. อนันต์ ผลเพิ่ม Asso. Prof. Anan Phonphoem, Ph.D. anan.p@ku.ac.th Intelligent Wireless Network Group (IWING Lab) http://iwing.cpe.ku.ac.th Computer Engineering Department Kasetsart University, Bangkok, Thailand
Router as a Computer Basic purpose of a router Computers that specialize in sending packets over the data network Routers are the network center generally have 2 connections: -WAN connection (Connection to ISP) -LAN connection
Router as a Computer Data is sent in form of packets between 2 end devices Routers are used to direct packet to its destination
Router functions examine a packet’s destination IP address find the best path
Router (Hardware components) Router components
Router components CPU (Executes operating system instructions) Random access memory (RAM) Read-only memory (ROM) Non-volatile RAM (NVRAM) Flash memory Interfaces (multiple physical interfaces)
Internal Components RAM NVRAM Flash ROM Console Interfaces Auxiliary
RAM Running copy of configuration file RAM content is lost on power down Stores... Routing tables ARP cache Fast switching cache Packet buffering Packet hold queues
ROM Contains POST A bootstrap program (loads the Cisco IOS) diagnostic software: Power On Self Test A bootstrap program (loads the Cisco IOS) And operating system software Backup, trimmed down version of the IOS Upgrades require installing new chip set
NVRAM Non-volatile RAM Stores backup/startup configuration files IP addresses, Routing protocol, Hostname of router Content is not lost when router is powered down or restarted.
Flash EEPROM Holds the Cisco IOS Electronically Erasable Programmable Read-Only Memory Holds the Cisco IOS Allows updating of software without replacing the Flash chip Store Multiple versions of IOS Retained on power down
Router Interface a physical connector that enables a router to send or receive packets Each interface connects to a separate network Consist of socket or jack found on the outside of a router Attached to the motherboard or as separate modules Examples of interface types: Ethernet / fast Ethernet interfaces Serial interfaces / DSL / ISDN Management interfaces
Major Router Interfaces LAN Interfaces: connect router to LAN network has a layer 2 MAC address can be assigned a Layer 3 IP address usually consist of an RJ-45 jack
Major Router Interfaces WAN Interfaces: connect routers to external networks that interconnect LANs depending on the WAN technology, a layer 2 address may be used. uses a layer 3 IP address
Router boot-up process
Verify router boot-up process “show version” Platform model number Image name & IOS version Bootstrap version stored in ROM Image file name & where it was loaded from Number & type of interfaces Amount of NVRAM Amount of flash Configuration register
Using the Router Understand the Basics of Router's Command Line Interface (CLI). Demonstrate How to Log into the Router. Demonstrate How to Enter Router Modes. Demonstrate Ability to Discern Different Router Modes and Commands
Router User Interface
User Interface To config: router console user mode—Typical tasks include those that check the router status. In this mode, router configuration changes are not allowed. privileged mode—Typical tasks include those that change the router configuration.
Means you’re in user mode User EXEC Modes User mode (Limited mode) Checking the routers status, looking at routing tables, etc. You cannot configure the router Prompt = “>” Password: Router> Means you’re in user mode
Means you’re in privileged mode Privileged EXEC Modes Privileged mode Does everything User mode does Full power to configure the router In user mode, you enter the command “enable” and then the privileged password Router> enable Password: Router# Means you’re in privileged mode
Command Lists To get a list of commands available in either user mode or privileged mode, enter a ? at the prompt. Router> ? Router# ?
Getting Help on a Command The ? can be used with a partial command To use this help feature, enter the partial command, then tap the space bar, then type ? For example... ip flash: interfaces ipx version parser Router# show ? The Router returned all the available commands for “show”
More-- you can continue viewing onto the next available screen by pressing the space bar Typing a question mark (?) displays a handy list of commonly used commands.
To access privileged mode, type enable (or the abbreviation ena) To access privileged mode, type enable (or the abbreviation ena) . You will be prompted for a password.
Use help to check the syntax for setting the clock Use help to check the syntax for setting the clock. The help output shows that the set keyword is required Press Ctrl-P (or the up arrow key) to repeat the previous command entry automatically. The caret symbol (^) and help response indicate an error. To list the correct syntax
Error Indicator a carat (^) symbol will indicate where the error occurred. For example... Router# show runing-config ^ % Invalid input detected at the ‘^’ marker
The Show Command
Internetwork Operating System Router Status Commands Router#show interfaces Router#show version Router#show flash RAM NVRAM Flash Internetwork Operating System Backup Configuration File Operating Systems Interfaces Programs Active Configuration File Tables and Buffers Router#show startup-config Router#show config Router#show processes CPU Router#show protocols Router#show running-config Router#write term Router#show mem Router#show stacks Router#show buffers
Show Commands show version show running-config show startup-config show interfaces show memory show flash show processes show protocols show stacks show buffers
show version
Main Topology
Routers and the Network Layer use destination IP address to forward packets The path a packet takes is determined after a router consults information in the routing table. After router determines the best path Packet is encapsulated into a frame Frame is then placed on network medium in form of Bits
Router as a Computer Routers Operate at Layers 1, 2 & 3 Router receives a stream of encoded bits Bits are decoded and passed to layer 2 Router de-encapsulates the frame Remaining packet passed up to layer 3 -Routing decision made at this layer by examining destination IP address Packet is then re-encapsulated & sent out outbound interface
Configure Devices and Apply Addresses Implementing Basic Addressing Schemes When designing a new network or mapping an existing network you must provide the following information in the form of a document: -Topology drawing that Illustrates physical connectivity Address table that provides the following information: Device name Interfaces used IP addresses Default gateway
Configure Devices and Apply Addresses Basic Router Configuration A basic router configuration should contain the following: -Router name - Host name should be unique -Banner - At a minimum, banner should warn against unauthorized use -Passwords - Use strong passwords -Interface configurations - Specify interface type, IP address and subnet mask. Describe purpose of interface. Issue no shutdown command. If DCE serial interface issue clock rate command. After entering in the basic configuration the following tasks should be completed -Verify basic configuration and router operations. -Save the changes on a router
Configure Devices and Apply Addresses
Configure Devices and Apply Addresses Verify Basic Router Configuration -Issue the show running-config command -Save the basic router configuration by Issuing the copy running-config startup-config command -Additional commands that will enable you to further verify router configuration are: Show running-config - Displays configuration currently in RAM Show startup-config - Displays configuration file NVRAM Show IP route - Displays routing table Show interfaces - Displays all interface configurations Show IP int brief - Displays abbreviated interface configuration information