Cisco - Routing Fundamentals

Routing Theory:

1. To enable inter-VLAN routing.
2. Identify the best path.
- Know the destination
- Identify sources for more information
- Discover possible routes
- Determine the best path.
3. Router must learn the destinations which are not directly connected.
4. Static Route
- Manual.
- Router doesn't have to learn by itself. Thus, CPU resources are not required (Pros)
- If you don't put a route to a particular network, nothing can pass through it. Thus it is always secured.
- You have to enter all possible routes manually. (cons)

5. Dynamic Route
- No administrative overhead. (Pros)
- Router will not be making error. (Pros)
- More CPU resources required (cons)
- More bandwidth required; but yet negligible(cons)

RIP - Sends out the whole routing table (1000 lines long)
Then you may have things like incremental routing update.

To configure two routers for connectivity, make sure that both have to be configured properly so that traffic can travel both directions.

"Complete route" -
ip route [network ID] [subnet mask] [next hop IP]
ip route 7.0.0.0 255.0.0.0 8.0.0.1

"Default routes" - only used on "stub network" (only physical interface for point of entry and exit) Means enter from one place and have to exit from the same place.
--> ip route 0.0.0.0 0.0.0.0 [adjacent hop]


Configure static route (Practical):
"sh ip route"
C 1.0.0.0/8 is directly connected, Serial0
S 2.0.0.0/8 [1/0] via 1.0.0.1
S 3.0.0.0/8 [1/0] via 1.0.0.1
C 4.0.0.0/8 is directly connected, Serial1
S 5.0.0.0/8 [1/0] via 1.0.0.1
[1/0] via 2.0.0.1
S 6.0.0.0/8 [1/0] via 3.0.0.1
S 7.0.0.0/8 [1/0] via 1.0.0.1
[1/0] via 2.0.0.1
S 8.0.0.0/8 [1/0] via 2.0.0.1
S 9.0.0.0/8 [1/0] via 2.0.0.1
S 11.0.0.0/8 [1/0] via 2.0.0.1

[1/0] = [adminstrative distance/matrix]
matrix = hops count

"sh ip route static" --> show only those manually entered route.

Routing protocol and routed protocol
- how to move from routing protocol to routed protocol.

- routing protocol - RIP, IGRP (interior gateway protocol)
- routed protocol - IP, Appletalk

"Autonomous System" = Domain of administration.
Jaring and Streamxy communicate via EGP (a BGP is an EGP) - two different autonomous system to communicate together.

For CCNA level, we will only look at IGP(Internal Gateway protocol).

Distance vector (RIP, IGRP)
- Find the fatest path
- Classfull routing protocol (with the same subnet)

Link state (OSPF - Open shortest path first)
- Find the shortest path.
- Classless routing protocol

Hybrid protocol
- Both (classless and classful)

Classfull routing protocol
- Do not send across network mask information (becoz it assumes that everbody are having the same subnet mask.)
- It will assume that everybody are in the same subnet.

Ranking routes based on "administrative distance". The lower the administrative distance, the better the preference.

Logical Interfaces (or sub interfaces):

If there is no encapsulation provided for creating logical vlan trunk(logical interfaces), then it will be regarded as default trunk - so called "management" trunk.

you can have up to 4.2 billion logical interfaces.

Router don't have the luxury of having many ports to cater for vlan as switches have.

Distance Vector Routing:
RIP - uses hop count (how many jumps to get to the destination)
IGRP - Composite matrix (bandwidth, delay, load, reliability, link)

Routing Loop Problems:
Looping will happen when there are inconsistency in the countdown timers (for updating routing tables). Before one routing table is informed that a particular network is down, the hop count will keep mounting up until it reaches infinity. This is a theorized bug.

- Use maximum hop count - RIP has a maximum hop count of 16
- Split horizon - you cannot send back information from where it came from.
- Route poisoning - Immediately set the hop count to 16 (in case of RIP). A matter of tagging information.
- Holddown timers - Give your network some time to actually converge.
- Triggered updates - If network down, I inform you that the network is down.

Link-state routing protocols:
Link-state and hybrid.

For CCNA, Area 0 will only be of the concern.
Area 0 - Transit Area.

- Routers know the topoloy on real time basis. (and not based on "outdated" neighbors)
- A lot of resources(memory and CPU) are "eaten" (cons)

Balanced Hybrid Routing:- can find the fastest and shortest path.

RIP:
- based on hop count. (it assumes the shorter the hop count, the faster it is) it will not consider the line speed which then renders the conclusion to be inaccurate.
- Since there is a maximum of 16 hop counts, thus you can't have a topoloy with > 15 routers.

Summarization:
172.16.10.0 /28
172.16.10.16 /28
172.16.10.32 /28
172.16.10.48 /26

.0 = 00 000000
.16 = 00 010000
.32 = 00 100000

Thus, the first two bits are similar. Therefore, the subnet mask is thus 11000000 = /26

can be summarized as 172.16.10.0 /26

Using RIP, no need to enter all routes manually, just need to advertise adjacent networks.

Enabling RIP (practical):

1. how to enable RIP.
1a. start RIP.
"router RIP"
1b. Advertise your adjacent network.
"network [network ID of which you are directly connected]"

2. view status.
"show ip protocols" --> Opposite of static route.

You will notice --> Routing Protocol is "rip"

3. Remove your static route.

4. "sh ip routes"

C 1.0.0.0/8 is directly connected, Serial0
R 2.0.0.0/8 [120/1] via 1.0.0.1, 00:00:02, Serial0
R 3.0.0.0/8 [120/1] via 1.0.0.1, 00:00:02, Serial0
C 4.0.0.0/8 is directly connected, Serial1
S 5.0.0.0/8 [1/0] via 2.0.0.1
R 6.0.0.0/8 [120/2] via 1.0.0.1, 00:00:02, Serial0
S 7.0.0.0/8 [1/0] via 1.0.0.1
R 8.0.0.0/8 [120/4] via 1.0.0.1, 00:00:02, Serial0
R 9.0.0.0/8 [120/5] via 1.0.0.1, 00:00:02, Serial0
R 11.0.0.0/8 [120/5] via 1.0.0.1, 00:00:02, Serial0

C= directly connected
R= RIP enabled.
"RIP" uses 120 for "administrative distance".

5. "debug ip rip"

5a. how to see "routing poisoning" at work.

03:17:15: RIP: received v1 update from 1.0.0.1 on Serial0
03:17:15: 2.0.0.0 in 1 hops
03:17:15: 3.0.0.0 in 1 hops
03:17:15: 5.0.0.0 in 16 hops (inaccessible)
03:17:15: 6.0.0.0 in 2 hops
03:17:15: 7.0.0.0 in 16 hops (inaccessible)
03:17:15: 8.0.0.0 in 16 hops (inaccessible)
03:17:15: 9.0.0.0 in 16 hops (inaccessible)
03:17:15: 11.0.0.0 in 16 hops (inaccessible)

6. "un all" --> stop debugging.
By defaut, we are using RIPv1. how to change to version 2, to detect classless protocol.
"conf t"
"router rip"
"version 2"

However, the default is:
send (packets) = using version 1
recieve (packets) = using version 1 or 2
To enable default, do the following.
labD(config)#router rip
labD(config-router)#no version 1
labD(config-router)#no version 2

Sample Exam questions:
I run RIP and IGRP, how come I don't see the RIP routes ?
--> Because IGRP has lower "administrative distance".

The tough part is fine-tuning the routes.

IGRP - Proprietary to Cisco
- You have to talk about "autonomous system".
- Compared to RIP, which can only load balance between equal cross-path.
- Composite metric in order: bandwithd, delay. IGRP also picks the lowest matrix.
- by default: variance of IGRP = 1
Variance is useful to open up all other path for evaluations.

for instance, if you have 3 paths with metrics of 10,30 and 50.
Thus, with default variance, only the first path with composite metric = 1 will be chosen. Thus, to open up the second path, you need to change the variance to 3 (so that when 3 x 10 = 30), the first two path will be considered valid. To open up the third path, have to change variance to 5.

This is known as "load balancing"

IGRP (Practical):

1. start routing protocol.
"router igrp [autonomous number]

autonomous number = globally significant number.
In order for igrp to work, autonomous number must be the same.

two criterias:
1a. autonomous number must be the same.
1b. k-values must be the same

IGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0

2. advertise your adjacent network.
"network [adjacent network]"
~if you advertise the ethernet port, then you will create another route for your route. For instance, if your ethernet is connected to the network of 172.16.0.0, by advertising it under the a particular igrp. Then you will see a difference from "sh ip route"

3. "sh ip protocols"
- check out your k-values
4. "sh ip route"

IGRP - is obsolete. Newest router with new IOS will not be supporting IGRP. Thus, only RIP will work for them.

5.To view "route poisoning".
5a. "debug ip igrp transactions"
5b. "debug ip igrp events"

IGRP metric is a 32 bit= 2^32 = 4294967295

Troubleshooting:
1. if you advertised wrongly. the route will be interupted.
2. if you choose the wrong protocol such as the newer protocol eIGRP.

Remove RIP and IGRP
-------------------
1. "conf t"
2. "no router rip"
3. "no router igrp"

Comments