Sep 29, 2009

Basics of Router and Switch. What they are?


The Router

A Router is a layer 3 network device that moves data between different network segments and can look into a packet header to determine the best path for the packet to travel. Routers can connect network segments that use different protocols. They also allow all users in a network to share a single connection to the Internet or a WAN. It is used to improve network performance by:-

• segmenting the network and creating separate collision & broadcast domains.
• reducing competition for bandwidth.
• Broadcasts are not forwarded to other network segments.
• Increases security by using Access Lists.


The Network Switch
A network switch commonly refers to a Network bridge that processes and routes data at the Data link layer (layer 2) of the OSI model. Switches that additionally process data at the Network layer (layer 3 and above) are often referred to as Layer 3 switches or Multilayer switches.
Some more facts about switches are:-
• Switches don’t look at IP address information.
• Switches only sends traffic to the devices that are the destination for that traffic, saving bandwidth.
• Each device connected to the switch gets the full bandwidth of the switch port because the switch prevents collisions
• There are many types of switches, managed, unmanaged, chassis-based, and layer 3.

Basic Configuration Modes of a Cisco Router / Switch


Configuration Modes of a Cisco Router / Switch
The Cisco IOS software CLI defines different configuration modes for different tasks. These modes are structured in a hierarchical fashion, and each mode allows a group of specific commands.
The basic modes of  Cisco Command Line Interface (CLI) are:-
• User mode
• Privileged mode
• Global Configuration Mode
• Setup mode
• Rom Monitor Mode
User Exec Mode
When a Cisco router is powered-on, this is the first mode that appears. User exec mode allow you to perform basic tests and list some system information. This mode is indicated by “[hostname]>” sign.
Privileged Mode
To configure a cisco device, you enter into privileged mode from user exec mode. All The commands available in user exec mode are also available in  Privileged mode. Privileged exec commands can be used to make major system changes, set operating parameters, perform a detailed examination of the router's status, test and debug router operation, access global and other included configuration modes. This mode is indicated by “[hostname]
#” sign.
Global Configuration Mode
From Privileged mode you can enter global configuration mode. This gives you access to configuration commands that affect the system as a whole, and to other configuration modes.
You can access many other specific configuration modes from Global Configuration mode that allow complex configurations to be performed. This mode is shown by [hostname] 
(config) # sign.
Interface configuration Mode
This mode is accessed from Global config mode, and is used for configuring the interfaces of device. The command to access this mode from global config mode is:
[hostname] (config)# interface serial 0/0. This mode is shown by
[hostname] ( config-if )# sign.

======================================
======================================

Setup and Rom Monitor modes are special Cisco CLI configuration modes which are used for very specific configuration tasks. Further description is given below:
Setup Mode
 When powered-on, if the Cisco router does not have a configuration file, it will ask to enter the Setup mode or not. Setup mode is a step-by-step process which presents you with a prompted dialog (called the system configuration dialog) in which you establish basic configuration. For better learning, experts recommend to use IOS CLI instead of setup mode for all configurations.
Rom Monitor Mode
If the router does not find a valid operating system image, or if you interrupt the boot sequence, the system may enter ROM monitor mode. From ROM monitor mode you can boot the device or perform diagnostic tests.

Internal Components of a Cisco Router / Switch


Cisco Router Internal Components


--- ROM 
 
ROM is used to store the router's bootstrap startup program (which searches for a suitable system image when the router is switched on), operating system software, and power-on diagnostic tests programs. In order to perform ROM upgrades you remove and replace pluggable chips on the motherboard.


--- Flash Memory
Flash is a variation of Electrically Erasable Programmable Read-Only Memory (EEPROM). It holds operating system image(s). Flash memory is erasable, reprogrammable ROM. You can perform Cisco® IOS software upgrades without having to remove and replace chips. Flash content is retained when you switch off or restart the router.

--- RAM
RAM (Random Access Memorys ) is used to store operational information such as routing tables, router's running configuration file. RAM also provides caching and packet buffering capabilities. Its contents are lost when you switch off or restart the router. All configuration changes are saved to this file unless you explicitly save the changes to the NVRAM.

--- NVRAM
NVRAM (NonVolatile Random Access Memory) is used to store the router's startup configuration file. It does not lose data when power is switched off. So the contents of the startup configuration file are maintained even when you switch off or restart the router. The router looks for the configuration information in the NVRAM unless the router is configured to load the configuration file from some other source.

--- NETWORK INTERFACES
The network interfaces provide network connectivity to the router. The may be located on the motherboard or on separate interface modules. It may have many interfaces for LAN (Local Area Network) and WAN (Wide Area Network) connectivity. Network interfaces are diacussed in greater in next posts.