Showing posts with label CCNA. Show all posts
Showing posts with label CCNA. Show all posts

Tuesday, December 30, 2008

First Glance

Recently I started CCNA on American International University Bangladesh (AIUB). Although my first impression about CCNA was that it is a hard nut to crack, as I went through the course, it seemed that it’s quite interesting and a little careful understanding is all it takes, thanks to the wonderful online material that CISCO offers. When I was preparing for the final exam, I tried to make simple notes about the topics so that I need to remember very little of things and solve all the problems analytically. So here is my beginners guide to CCNA.

At this moment, CCNA is divided into two curricula:
• CCNA Discovery - for general computer users
• CCNA Exploration – for students in IT and networking
I will be discussing CCNA Exploration but as CCNA discovery deals with the same concepts with less technical and engineering stuff, so it should be equally appropriate.

CCNA Exploration is dived into four major parts:
• Network Fundamentals
• Routing Protocols and Concepts
• LAN Switching and Wireless
• Accessing the WAN

Network Layer:

The network layer gets transport layer segment, adds ip address of source and destination and creates a PDU called packet. The ip address is used to forward data at routers and distribute it among the users.
Network layer is connectionless, so it has no headache to see data is delivered or not. That’s the responsibility of the transport layer.

Two common protocols of network layer are
IPv4: Now used with 32bit ip address
IPv6: Limited usage, with 128 bit ip, it provides better security and supports more users than IPv4

Apart from ip address, some other information are added to network layer packet. They are TTL (time to live)= how many routers the packet can pass before they are dropped
TOS (Type of service)=the info that routers use to give priority to packets like VIPs
Transport layer Protocols: TCP: 06, UDP: 17
MF (More fragment): Several fragments need to be added to form the packet
DF (Don’t Fragment): Delicate packet, don’t make pieces.

A router is a layer 3 (network) device. When several networks are connected through routers, the routers exchanges information by routing protocol. So each router knows which network is connected to which router or the shortest path to a distant network. When a router gets a frame (layer 2 PDU) it decapsulates the frame and then checks the ip address in the packet and finds the network address by binary ANDing the ip address and the subnet mask. If the destined network is connected to the router it delivers the packet. Otherwise it encapsulates the packet again and resends the packet to another router which is the next hop for the desired network.

Data Link Layer:

The job of data link layer is divided into two sub-layers
Logical Link Control (LLC):
It communicates with the upper layer and finds the network layer protocol being used.
Encapsulating the packet from network layer with some header information it creates the data link layer PDU, frame.
Media Access Control (MAC):
It adds the host and destination MAC (physical address) to the frame.
The MAC is used in only inside the local network. So a network connected to a router uses its own MAC as source MAC and the MAC of the default gateway as destination MAC. The router uses the MAC of its fast Ethernet port as source MAC and the fast Ethernet port of another router as destination MAC, when transmitting the same data packet. So it’s important to note that MAC is valid inside the local network.

Media Access Control is done in two ways:
• Controlled: Each device connected to a network has its own time to send data like token passing.
• Contention based: The device senses if there is any data ion the media (physical wire), if there is not any device can communicate any time.

Two common contention based methods are:
CSMA/CD: Ethernet uses it
CSMA/CA: Wireless networks use it. It senses the media, if available then sends a signal that tells other devices that one device is transmitting.

If several device transmits at the same type then collision occurs. When collision occurs then the connected hosts send Jam signal so that the amplitude of the voltage increases and other hosts refrain from transmitting. Also all the hosts wait a random amount of time (called Back off time) after which they try to communicate again.

The data link layer PDU contains a field called Frame check sequence to determine if there’s any error in the data. It only detects error, not correct them. If error detected then the frame is dropped.

Data Link Layer Protocols:
Ethernet: 802.3
Wi-fi: 802.11
Wi-max: 802.16

Physical Layer:

It consists of physical media like copper wires, optical fiber. It modulates the data link layer data with necessary encoding like NRZ/Manchester and transmits data onto the media. It may use amplitude or frequency modulation technique. It uses several code groups called symbol like 4B/5B so that number of 0s and 1s remains balanced. Otherwise there might be power loss. The bandwidth depends on media, the type of connectors used etc.

There are several forms of media like:
10 Base T: 10Mbps using Manchester encoding. Cu media
100 Base TX: 100Mbps Cu media.
1000 Base TX: 1Gbps Cu media.
1000 Base SX/LX: 1Gbps Multi mode Optical Fiber.
1000 Base ZX: 1Gbps Single Mode Optical Fiber.

The copper cables are
UTP: Unshielded, twisted so that to reduce interference
STP: Shielded not used commonly due to high cost

Configuring Router:

A router can be configured in many ways. It might be connected to PC using a rollover cable and Console Port of the router. It is the most basic way in which no initial setup is necessary. The AUX port can also be used to configure. The telnet or SSH can also be used to configure although they need initial configuration.

The CISCO router has several modes like
User Exec Mode: Only permits to use the router.
Privileged Exec Mode: It allows to see the router configuration
Global Configuration Mode: Used to configure parameters used in all over the router
Specific Configuration Mode: Used for specific part configuration.

Some useful routing Codes:

Go to Privilege exec mode:
Router>enable
Router#

Go to configure mode:
Router# configure terminal
Router(config)#

Give hostname:
Router(config)# hostname {name}
name(config)#

Give password:
Router(config)# enable password {password}
Router(config)# enable secret {password} // Encrypted password

Create username and password:
Router(config)# username {name} password {ps}
Router(config)# line console 0
Router(config)# no password
Router(config)# login local

Set console password:
Router(config)# line console 0
Router(config-line)# password {password}
Router(config-line)# login

Set vty password (Telnet):
Router(config)# line vty {start port} {end port}
Router(config-line)# password {ps}
Router(config-line)# login

Set ip address to fast-ethernet ports:
Router(config)# interface fa 0/0
Router(config-if)# ip address {ip} {subnet mask}
Router(config-if)# no shutdown