Friday, April 06, 2007

Day 15 : Managing telnet and console session

show line - command will show status of all Console, AUX and VTY (telnet) lines (* denotes an active connection on the particular line).

show user - command will show currently active users. If the user is using telnet, it will also show the IP address of the users' host.

clear line [line-number] - command will stop current active user. If the user is using telnet session, the session will be terminated.

show session - command will show all outbound telnet sessions from a router.

disconnect [session-number] - command will stop existing outbound telnet session

Day 15 : Managing OS and Configuration

OS file and Configuration file

Operating System use in Cisco routers and switches is called IOS (Internetwork Operating System). IOS is a monolithic, single-file OS. IOS file is stored in Flash file system.
IOS file can also be saved on a TFTP server.

Configuration on a Cisco router is kept in Non-volatile RAM (nvram). NVRAM retain configuration when the router is power off.
When a router is power on, configuration also stays in RAM. Changes made to configuration only stays in RAM and it is important to save the configuration to NVRAM so that it will not be lost when a router is power cycled.
Configuration can also be saved on a TFTP server.

Configuration in RAM is referred in IOS command as -> running-config.
Configuration in NVRAM is referred in IOS command as -> startup-config.

Command equivalent
write memory (copy running-config startup-config)
write terminal (show running)
write network (copy running-config tftp)

Password recovery (when password is forgotten)

1. Power cycle the router
2. Enter control+break key when the router is starting up (the router will go to ROM Monitor with rommon > prompt)
3. Enter (confreg 0x2142) - to bypass startup configuration where password is kept)
4. Enter "reset" command or power cycle the router
5. After boot is completed, enter "no" at initial startup configuration.
6. Go to Enable mode.
7. Copy configuration from NVRAM to RAM (copy startup-config running-config)
8. Change the forgotten password(s)
9. Change configuration-register value back to 0x2102
10. Save the config.

Day 15 : ISDN Reference Points

Equipment

TE1 - Terminal Equipment type 1 (devices has built-in IDSN connection)
TE2 - Terminal Equipment type 2 (devices that do not understand ISDN standard)
TA - Terminal Adapter (connectes TE2 to ISDN network)

Reference Points

R - ref point between non-ISDN device (TE2) and TA
S - ref point between ISDN device and NT2
T - ref point between NT2 and NT1
U - ref point between NT1 and ISDN network

* In North America and Japan, ISDN devices has U interface. Customer equipment (CPE) has NT1.
** In Europe, ISDN devices has S/T interface. Service provider provide NT1 service in central office equipment.

Day 13 & 14 : OSPF

OSPF uses bandwidth to calculate shortest path. The formula for OSPF cost is 100Mbps/bandwidth.

Every router in OSPF autonomous system advertise link state. Link state advertisement (LSA) contains IP address of the link (interface), netmask, cost, network type. Unlike DV protocols, intermediate router relay LSA to the neighbors without modifying it.

There are 4 OSPF network types.
1. point-to-point (e.g HDLC)
2. broadcast (e.g Ethernet)
3. NBMA
4. virtual-link

Before neighboring OSPF routers exchange LSA, they have to become neighbor first using Hello protocol. To become an OSPF neighbor, both routers must agree on certain criteria (IP address/mask, OSPF area, network type etc.)
OSPF router maintains neighbors in adjacency database. Neighbor routers exchange Hello packets to make sure neighbors are alive. If a neighbor router does not send Hello for a while (Dead timer), the router is marked as dead and removed from adjacency database.
(10 seconds Hello, 40 seconds Dead - for Broadcast and point-to-point network)
(30 seconds Hello, 120 seconds Dead - for NBMA network)
** Dead timer is 4 times of Hello interval.

All LSA are kept in link-state database.
OSPF router runs SPF algorithm against link-state database and produce shortest path tree. The shortest route from the tree is used in routing table.

Once the LSAs are exchanged and SPF algorithm is computed on all the routers, all OSPF routers stopped exchanging LSA except for low overhead Hello between neighbor. OSPF routers refresh LSA database every 30 minutes.
Bandwidth requirement for OSPF routing protocol traffic is minimal as compared to DV protocols.

To minimize OSPF link-state database size, OSPF routers can be separated into different areas. Area 0 is required and it is called backbone area. Non-backbone areas MUST touch backbone area.
A router in area 0 is called a backbone router.
A router which is configured with more than 1 area is called ABR (area border router).
A router inside a router is called an internal router.

In broadcast network and NBMA topology, OSPF elect DR (designated router) and BDR (backup designated router) to minimize number of neighbor relationships which in turn minimize Hello protocol updates and LSA updates.
All routers establish adjacency with only DR and BDR regardless of number of routers.
DR/BDR election a tie breaker process is based on OSPF priority value and highest routerID. OSPF priority value 0 means the router will not participate in DR/BDR election process.

Loopback addresses are prefered over physical address for routerID and it is a good practice to configure loopback interface on the router running OSPF.

Monday, April 02, 2007

Day 11 & 12 : Distance Vector Routing Protocols

RIP, RIPv2 and IGRP are distance vector routing protocols.
DV routing protocols use hop count (except IGRP) as the metric to find the best path.

DV routing protocols advertise the whole routing table to the adjacent neighbors as periodic updates.

DV routing protocols do not send subnet mask in routing updates and uses default subnet mask based on IP address class. That is why they are know as classful routing protocols.
* RIPv2 does send subnet mask in routing updates and hence it is a classless routing protocol.

DV routing protocols are subject to routing loops.

DV routing protocols have very slow network convergence time.

Maximum hop count is used to limit the size of the network. (RIP uses 15 as maximum, IGRP as 255)

Due to periodic nature of DV routing protocols, there are several timers.
1. Update timer (time between successive routing updates)
2. Hold timer (time that a router keeps a route without routing updates from neighbor)
3. Flush timer (time that a router keeps before a router deletes the route)

RIP - 30/180/240 (same for RIPv2)
IGRP - 90/280/630

Routing Loop Prevention in DV Routing Protocols
1. Split Horizon (do not advertise a route back to the incoming interface)
2. Triggered update (sends a routing update as soon as the router detects a link failure)
3. Route Poisoning (send a route with metric of 16 when a router detects a route failure)
4. Poison Reverse (split horizon update with route poisoning)

Day 9 & 10 : Intro to Routing Protocols

Static routes are not scalable in large networks. Routing protocols automatically adveertised routing information throughout the network. Routers dynamically learn new routes and remove failed routes.

There are 2 categories of routing protocols based on their use.
1. Interior Gateway Protocols (used in a single organization/autonomous system)
(a) RIP (Routing Information Protocol)
(b) IGRP (Interior Gateway Routing Protocol)
(c) EIGRP (Enhanced IGRP)
(d) OSPF (Open Shortest Path First)
(e) IS-IS (Intermtediate system to Intermediate System)

2. Exterior Gateway Protocols (used for Inter autonomous system/the Internet)
(a) BGP (Border Gateway Protocol)

Routing protocols are also categorized based on their computational algorithm.
1. Distance Vector Protocol
(a) RIP
(b) RIP version 2
(c) IGRP
2. Link State Protocol
(a) OSPF
(b) IS-IS
3. Hyprid (mix of DV and LS)
(a) EIGRP
4. Path Vector
(a) BGP

- Algorithm used in EIGRP is called DUAL (Diffused Update Algorithm)
- IGRP and EIGRP are Cisco proprietary algorithm
- Algorithm used in OSPF and IS-IS is called Dijkstra's Shortest Path First (SPF) algorithm

- DV routing protocols (except RIPv2) do not send subnet mask information in routing updates. Those protocols use default subnet mask based on class of IP address. For that reason, DV routing protocols are called Classful routing protocols.
Classful routing protocols do not support VLSM (variable length subnet mask)

- All routing protocols, except RIP and IGRP, send subnet mask information in routing updates. These routing protocols are known as Classless routing protocols.
Classless routing protocols support VLSM.

Day 7 & 8 : WAN Protocols

WAN protocols specifications are defined in lower layers of OSI protocols, most of them at physical and data link layer and some at network layer.

Physical layer specifications define speed and channel. There are
1. Unchannelized circuits
2. Channelized circuits (ISDN PRI, ISDN-BRI)

Both channelized and unchannelized circuits are available at different speed. Minimum speed is 64Kbps and is known as DS0 speed.
DS1, also known as T1, has 24 times of DS0 channel and thus operates at 1.54Mbps.
DS3, also known as T3, has 30 times of DS1 channel and thus operates at 45Mbps
More information about T career
Up to DS3 circuit is delivered over copper cabling. Speed higher than DS3 circuits are delivered over optical cable. More information about Optical career

Data link layer specifications define framing. For example,
1. HDLC (proprietary to Cisco equipment)
2. PPP
3. Frame Relay
4. LAPD (framing for ISDN D channel)

ISDN
ISDN stands for Intergrated Services Digital Network. ISDN protocols define lower 3 layers of OSI protocol.
ISDN BRI has 2 data channels and 1 control channel. Data channel is called B channel and control channel, D channel. ISDN BRI is also called 2B1D. Each B channel has 64Kbps and can carry either a voice conversation or 64Kbps of data. D channel has 16Kbps.
ISDN PRI has 23 data channels and 1 control channel and thus it is called 23B1D. Each B channel has 64Kbps and D channel also has 64Kbps. ISDN PRI is mainly used in PBX systems.