Tuesday, 5 August 2014

How to Connect to Cisco Console Port with MINICOM

If you are a linux user user you must learn how to connect to your Cisco router or switch using roll-over cable (the cable that comes with your device).
Step1Installing Minicom
Linux users will use application called ‘minicom’.  If you are Ubuntu user you can install it using either ‘Synaptic Package Manager’ or type in the following in your terminal window:
$ sudo apt-get install minicom
Once it is installed, you must configure the ‘minicom’ to communicate with the console port of your router/switch.
Step 2 – Connection to Console Port
Power up your router/switch and connect the roll-over cable to your computer’s serial port (DB-9) and to the ‘console’ port of your router/switch (RJ-45).
Step 3 – Configure Minicom
Open your Terminal window (Applications ==> Accessories ==> Terminal) and type in:

$ minicom -s


Scroll down to ‘Serial Port Setup’ and hit Enter:
Pic. 1
Choose ‘A’ to set up the serial port of your computer (here the first serial port is referenced as ttyS0) so it reads as highlighted below. Then hit Enter again to accept the change:
Pic. 2
Next, press ‘E’ and then ‘C’ again to access the transmission speed and change it to ’9600′ value (no apostrophies). You should see values like highlighted below:
Pic. 3
Then hit Enter twice to get back to the first screen (Pic.1)
The last thing is to save this configuration (you can choose ‘dfl’ to be the default template or with some other name).
Pic. 4
 
If you chose ‘dflp and then, ‘Exit from Minicom’, you can try out your work now. Type in:
$ minicom
and hit Enter
You should see the console prompt of your router/switch. If you want to leave the minicom use CTRL-A keystroke and then type ‘x’ and confirm you want to leave the application.

Navigation in Cisco IOS

Once, you have connected to your Cisco switch or router console port, and power up the device you will see some information displayed during the start of the device. If the device has no initial configuration you are presented with:
Pic. 1 – System Configuration Dialog
You can safely cancel this request as its capability to configure the device is not very impressive. Instead, you are going to do things all professionals do: command after command.
What follows is bunch of messages sent to the screen and after hitting the Enter key few times you get something like this (here is the router, but a switch would introduce itself as … Switch> ):
Router>
IOS Modes (contexts)
This prompt of the device tells you in which ‘context’ you are, and the one above with the ‘>’ character is known as ‘user exec mode‘ or ‘privilege level 1 mode‘. You can’t configure much in this mode of operation. It is designed as a ‘monitoring’ mode not a ‘configuration’ one. Also, the monitoring capability is limited. For instance, you can’t see the running configuration of the device.
Type in the following command:
Router>enable
Router#
The prompt changes to ‘#’ which is called ‘privileged exec mode‘, ‘enabled mode‘ or sometimes ‘privilege level 15 mode‘. I would like to draw your attention to two things here. Both modes of operation (or contexts, if you like) have two things in common:
  1. They are used primarily to monitor the device (you will be using ‘show‘ and ‘debug‘ commands in those modes).
  2. They are context for immediate execution of your commands. If the syntax is correct, system executes the command immediately.
Those two modes differ from one another as well:
  1. User Exec Mode – is limited in terms of what information will be available.
  2. Enabled Exec Mode – gives the operator ALL information (like root or Administrator account on a computer).
Question Mark
As the commands take many attributes your best friend is the question mark ‘?‘. This help is known as the ‘context-sensitive help‘. This means that depending on which context you use, while typing a question mark (?) the system is going to list the commands that can be executed in that particular mode of operation. See more in the attached video.
Configurations
In order to configure things in Cisco IOS (except for some minor changes), you must enter the ‘global configuration mode‘ first which is characterized by the following prompt:
Router(config)#
This context can be accessed by typing the following command in the ‘privileged exec mode‘:
Router#configure terminal
Whatever you configure this particular mode it is going to be applied to the device as a whole unit (e.g. hostname, default gateway on a switch etc.).
If you want to enter the context of the interface to configure it with some parameters like ip address, speed, duplex, description etc. , you must enter that interface from the global configuration mode like the one below:
Router(config)#interface fastethernet1/0
If you do not know what interfaces your device has, type the following command in the enabled mode:
Router#show ip interface brief
As you see, in the ‘global configuration mode’ I did the following actions in order to access the context of the interface:
  1. Entered the interface type (here: Fast Ethernet).
  2. Referenced the module number (here: 1)
  3. Referenced the port number in the module 1 (here: 0)
Please, note that routers count ports starting from 0, switches starting from 1.
You’ll learn other contexts as we go through numerous labs and video presentations.
Abbreviations
You don’t have to type in the full words of the commands and certain attributes that follow the commands. For instance, instead of typing:
Router#configure terminal
Router(config)#
You can type:
Router#conf t
Router(config)#
As long as the abbreviation uniquely describes which command you want to use, the system has no problem accepting it.
Shortcuts And Keystrokes
When you type enough of the characters that uniquely identify the command in a given context you can use ‘tab‘ key and the system is going to complete the command on the screen for you (just like in Linux).
I often use the following keystrokes while editing the commands:
  • CTRL-z – takes the cursor back to the ‘enabled exec’ mode from any other context
  • CTRL-a – takes the cursor to the beginning of the line
  • CTRL-e – takes the cursor to the end of the line
  • CTRL-k – erases everything to the right of the cursor
  • CTRL-u – erases everything to the left of the cursor
  • Upper Arrow or CTRL-P – displays previous command from the history buffer
  • Lower Arrow or CTRL-N – displays next command from the history buffer
System keeps the record of up to ten (default) commands you typed in. You can increase/decrease the history buffer up to 256 commands.
If you want to check the history buffer size, type in:
Router#show terminal | include history
Changing the buffer size can be accomplished with the following command in the ‘enabled mode’
Router#terminal history size 256
The above command  will increase the size of the history buffer to 256 commands.
If you want to see the buffer (which commands were typed) use this command:
Router#show history
Please, take a look at the video I posted below to see most of those things in action. Practice them until you are confident with the content of this lesson before you proceed to the next one.
Next lesson is going to be about creating an initial configuration of our router and/or switch

OSI Reference Model by quontra solutions

Before OSI it was difficult for the vendors to create network products OSI, why U need to study, its a structured approach to troubleshoot

Each has independent model
Before considering how to configure Cisco routers and switches, you must be introduced to basic networking concepts you’ll need to understand in order to grasp the advanced concepts discussed in later chapters

ISO developed the seven-layer.
Application Layer, Presentation Layer And Session Layers are Both called Upper Layer.

And Transport Layer, Network Layer, Data Link Layer And Physical Layers are both called Lower Layer.

Application Layer :- Top (seventh) layer of the OSI Reference Model is the application layer. It provides the user interface. Examples of TCP/IP applications include telnet, FTP, HTTP, HTTPS, SMTP, SNMP, DNS, ICMP And all of browser.
This layer deal with networking applications.
Examples:
Email
Web browsers
Presentation :- The Presentation layer gets its name from its purpose: It presents data to the Application layer and is responsible for data translation and code formatting
Exam Watch The presentation layer determines how data is represented to the user. Examples of presentation layer protocols and standards include ASCII, BMP, GIF, JPEG, WAV, AVI, and MPEG.
ASCII (the American Standard Code for Information Interchange, used by most devices today) uses seven bits to represent characters. EBCDIC (Extended Binary-Coded Decimal Interchange Code, developed by IBM)
PICT A picture format used by Macintosh programs for transferring QuickDraw graphics.
TIFF Tagged Image File Format; a standard graphics format for high-resolution, bitmapped images.
JPEG Photo standards brought to us by the Joint Photographic Experts Group. Other standards guide movies and sound:
MIDI Musical Instrument Digital Interface (sometimes called Musical Instrument Device Interface), used for digitized music.
MPEG Increasingly popular Moving Picture Experts Group standard for the compression and coding of motion video for CDs. It provides digital storage and bit rates up to 1.5Mbps.
QuickTime For use with Macintosh programs; manages audio and video applications.
RTF Rich Text Format, a file format that lets you exchange text files between different word processors, even in different operating systems.

This layer is responsible for presenting the data in the required format which may include:
Code Formatting
Encryption
Compression
Session :-   Exam Watch The session layer is responsible for setting up and tearing down network connections. Examples include RPCs and NFS.
The actual mechanics of this process, however, are implemented at the transport layer. To set up connections or tear down connections, the session layer communicates with the transport layer. Remote Procedure Call (RPC) is an example of an IP session protocol; the Network File System (NFS), which uses RPC, is an example application at this layer.

This layer establishes, manages, and terminates sessions between two communicating hosts.
Creates Virtual Circuit
Coordinates communication between systems
Organize their communication by offering three different modes
Simplex
Half Duplex
Full Duplex
Example:
·  Client Software
( Used for logging in)

Transport :-
This layer breaks up the data from the sending host and then reassembles it in the receiver.
It also is used to insure reliable data transport across the network.
Can be reliable or unreliable
Sequencing
Acknowledgment
Retransmission
Flow Control
Windows
Protocol Port
PDU – Segments
Data Link :-
This layer provides reliable transit of data across a physical link.
Performs Physical Addressing.
Combines bits into bytes and bytes into frames.
Preamble is sequence of 1’s and 0’s signifies the beginning of a frame.
Error detection, not correction.
FCS is used for error detection.
Access to media using MAC address.
LLC and MAC.
CRC run on the data field and and the values is kept in FCS.
Logical Link Control performs Link establishment.
MAC Performs Access method.
OSI (Open Systems Interconnection) Reference Model:
This is a protocol suit, and it follows Department of defense model.
The seven layers of OSI layer.
Application Layer
[NNTP • SIP • SSI • DNS • FTP • Gopher • HTTP • NFS • NTP • SMPP • SMTP • SNMP • Telnet • DHCP • Netconf • RTP • SPDY • etc.]
Presentation Layer
[MIME • XDR • TLS • SSL]
Session Layer
[Named Pipes • NetBIOS • SAP • L2TP • PPTP • SOCKS]
Transport Layer
[TCP • UDP • SCTP • DCCP • SPX]
Network Layer
[IP (IPv4, IPv6) • ICMP • IPsec • IGMP • IPX • AppleTalk]
Data Link Layer
[ATM • SDLC • HDLC • ARP • CSLIP • SLIP • GFP • PLIP • IEEE 802.3 • Frame Relay • ITU-T G.hn PPP •DLL • X.25 • Network Switch •]
Physical Layer
[EIA/TIA-232 • EIA/TIA-449 • ITU-T V-Series • I.430 • I.431 • POTS • PDH • SONET/SDH • PON • OTN • DSL • IEEE 802.3 • IEEE 802.11 • IEEE 802.15 • IEEE 802.16 • IEEE 1394 • ITU-T G.hn PHY • USB • Bluetooth • Hubs]

Cabling Networking cables

Networking cables are used to connect one network device to other network devices or to connect two or more computers to share printer, scanner, Router, Switch, Hub etc. Different types of network cables like Optical fiber cable, Coaxial cable, Twisted Pair cables are used reckon on network’s size, topology and protocol.

10 MBps Ethernet (IEEE 802.3)
Specification 10Base5 10Base2 10BaseT
No of segment 500m 185m 100m
Highest segment number 5 5 1024
Highest segment node 3 3 1024
Number of nodes per segment 100 30 2
Tap distance 2.5km - -
Highest hub connectivity 4 - -
Repeater distance 2.5km 925m -
Topology Bus Bus Star
Cabling Thick coaxial Thin coaxial UTP
Transmission Half duplex Half duplex Half duplex

100 MBps Ethernet (fast Ethernet)

Specification 100BaseT4(802.3u) 100BaseT2(802.3y) 100BaseTX(802.3u)
Cabling Cat3 UTP Cat3 UTP Cat5 UTP
Topology Star Star Star
Bandwidth 100mbps 100mbps 100mbps
Transmission mode Half duplex Full duplex Full duplex
Area coverage 100m 100m 100m

1000 mbps Gigabit Ethernet

Name Cabling Topology Transmission Bandwidth Area
100BaseT(802.3ab) Cat5 or Cat5e UTP Star Full duplex 1000mbps 100m
1000BaseTX(802.3ab) Cat6 or higher UTP Star Full duplex 1000mbps 100m
1000BaseLX(802.3z) 1270-nm Fiber optic Star Full duplex 2000mbps 550m(multimode) 5km(single mode)
1000BAseSX(802.3z) 770nm or 860nm Fiber optic Star Full duplex 1000mbps 220 or 550m
1000BAseLH(802.3z) 1300nm or 1310nm Fiber optic Star Full duplex 1000mbps 10km
1000BaseZX 1550nm Fiber optic Star Full duplex 1000mbps 70km

what is Encapsulation

The term “encapsulation” is used to describe a process of adding headers and trailers around some data. For example, when you send an email using your favourite email program (like Outlook or Thunderbird) that email is sent from the Application layer to the Transport layer. The Transport layer encapsulates the data and adds its own header (with its own information, such as which port will be used) and passes the data to the Internet layer, which again encapsulates the received data and adds its own header, usually with information about the source and destination IP addresses. The Internet layer than passes the data to the Network Access layer. This layer is the only layer that adds both a header and a trailer. The data is then sent through a physical network link.
Each layer adds its own information:
encapsulation
The term “decapsulation” refers to the process of removing headers and trailers as data passes from lower to upper layers. This process happens on a computer that is receiving data.

Frame, packet, segment

 
Frame – the term “frame” refers to the encapsulated data defined by the Network Access layer. A frame can have a header and a trailer that encapsulate a data section.
 
Packet – the term “packet” is used to describe the encapsulated data defined by the Internet layer. A packet can have a header with the source and destination IP addresses.
 
Segment – the term “segment” describes encapsulated data defined by the Transport layer. A segment can have a header with informations such as source and destionation port numbers, sequence and acknowledgment numbers, etc.

What is Ethernet ?

Ethernet is the most used networking technology for LANs today. It defines wiring and signaling for the Physical layer of the OSI model. For the Data Link layer, it defines frame formats and protocols.
 
Ethernet is described as IEEE 802.3 standard. It uses Carrier Sense Multiple Access with Collision Detection (CSMA/CD) access method and supports speeds up to 100 Gbps. It can use coaxial, twisted pair and fiber optic cables. Ethernet uses frames to with source and destination MAC addresses to deliver data.

Explanation of MAC & IP addresses

MAC address

A Media Access Control (MAC) address is a 48-bit address that is used for communication between two hosts in an Ethernet environment. It is a hardware address, which means that it is stored in the firmware of the network card.
 
A MAC address is supposed to be globaly unique. Each network card vendor gets its share of addresses (represented by the first 24 bits).
 
The address is written in the form of 12 hexadecimal digits. For example, consider the following MAC address:
 
D8-D3-85-EB-12-E3
 
Every hexadecimal character represents 4 bits, so the first six hexadecimal characters represent the vendor (in this case, Hewlett Packard).

How to find out your own MAC address?

If you are using Windows, enter the Command Prompt (Start – Programs – Accessories – Command Prompt). Type the ipconfig/all command and you should see a field called Physical address under the Ethernet adapter settings:
  
ipconfig/all command
 
If you are using Linux, type the ifconfig command. You should see your MAC address referred to as HWaddress.
 
ifconfig mac address

IP address

An IP address is a 32-bit number that identifies a host on a network. It is usually written in the form of four decimal numbers seperated by periods (e.g. 10.0.50.1).    
 
In contrast to MAC address, an IP address is a logical address. Any device that wants to communicate with other device using TCP/IP needs to have an IP address. It can be configured manually or it can be obtained from a DHCP server.
 
The term “IP address” is usually used for IPv4, which is the fourth version of the IP protocol. A newer version exists, IPv6, and uses 128-bit addressing.
 
Private IP addresses
 
There are three ranges of addresses that can be used in a private network (e.g. your home LAN). These addresses are not routable through the Internet.
 
Private addresses ranges:
 
10.0.0.0 – 10.255.255.255
172.16.0.0 – 172.31.255.255
192.168.0.0 – 192.168.255.255
How to find out your IP address
 
Windows users:
 
Enter the Command Promt (Start – Programs – Accessories – Command Prompt). Enter ipconfig. You should see a field called IP address.
 
ipconfig