Showing posts with label distance vector. Show all posts
Showing posts with label distance vector. Show all posts

Monday, January 3, 2011

OSPF advantange, cost and adjecency states

There are some advantages dividing routers into different OSPF areas which are:

1. Router processing is less because of smaller routing tables
2. Limit LSA traffic, more bandwidth effecient

OSPF has an AD of 110 and uses costs as metrics. The formula for OSPF costs formula are (100,000,000/BW in bps), where the path with lower costs is preferred. To change cost use the command:
(config-if)#bandwidth

To change the cost by changing the reference use the command:
(config)#router ospf
(config-router)#auto-cost reference-bandwidth

There are several reasons why OSPF is better than RIP such as:

1. OSPF metric is more accurate about the actual distance to a remote network (based on speed), where RIP uses hop counts only.
2. OSPF networks are always reachable, compared to RIP's maximum hop count of 15, to combat loop infinity.
3. OSPF has VLSM, whereas RIP not. This is an advantange because of the more efficient utilization of IP addresses.
4. OSPF has better network bandwidth utilization (less broadcasts and does not update the full routing table)
5. OSPF converges more quickly

OSPF adjacency process has several states:

- Down : No hellos received from that neighbor
- Attempt : Hello packets are sent to neighbors, which are seen only in NBMA networks, since they configure neighbors
- Init : First Hello packet has been received from the neighbor, but does not have the RID in it
- 2-Way : Each router on the end of the link has received a Hello packet with each own RID meaning that the routers are sycnchronized.
- Exstart : Exchange process of the link state database information starting with the highest OSPF RID router
- Exchange : Database Descriptor (DBD) packets which contain a description of the link state database are exchanged.
- Loading : Routers are sending Link State Requests (LSR) packets to the potential neighbor
- Full : Router databases are synchronized and the adjecency is finally formed.

All DROTHERS will be in the 2 way state as the final state. Only the DR and BDR will have a full state adjecency to all the other routers, because a DROTHER cannot send an LSA to another DROTHER so therefore not necessary for DROTHER to go to this state.

-- 4 January 2010 --

Sunday, January 2, 2011

Link state Routing Protocol

Link state routing protocol is one of the two protocols (the other is distance vector routing protocol), used in packet switching networks. Link state routing uses the Dijkstra or Shortest Path First (SPF) algorithm. The protocol works as each node makes a connectivity map of the network in the form of a graph that shows where the node connects to which neighboring node. The protocol will then calculate the best logical path to each destination node and adds it to its routing table. Examples of link state routing protocols are OSPF and IS-IS.

The contrast with link state routing and distance vector routing is that link state routing shares only the information about the connectivity with its neighbors, whereas distance vector routing shares the full routing table of the node with its neighbors. Another one is that after the initial exchange of LSAs are made, link state protocols do not exchange information anymore until there is a change in the network topology. However, it will advertise all its LSAs every 30 minutes, whereas distance vector protocols sends full routing table and process it every 30 or 90 seconds. Compared to DV, LS is therefore more bandwidth and resource efficient.

The first process in creating a routing link is that the routers must be neighbors first by forming an adjacency. To form this adjacency, the routers must agree on the area number, the hello and dead timer settings, and stub area and link authentication configuration. All of this must be the same on both sides of the link or this adjacency will not be formed. The default Hello timer is 10 seconds, and the default dead timer is 40 seconds.

To check router's adjacency type the command "#show ip ospf neighbor" or "#show ip ospf interface"

After this adjacency is formed, the routers will send then Link State Updates (LSUs) which contains Link State Advertisements (LSAs). LSA contains e.g. subnet masking information. LSA will be processed by the receiving router and placed into the link state database and the SPF algorithm is applied to this database to create the OSPF routing table.

To see the database type the command: "#show ip ospf database"

LSA contains sequence numbers which will be checked upon arrival on the destination router. This router will then compare its sequence number (from the previous LSA) to the current LSA. There are 3 possible actions that can happen:

1. If the sequence number is the same, the LSA is ignored by the receiving router

2. If the sequence number is lower than the sequence number the router has, than the router will ignore the update and sends the LSU back to the sending router.

3. If the sequence number is higher, the LSA is accepted an will be added to its database. Afterwards, the receiving router will send an LSA acknowledgment back to the sending router. It will the flood that LSA and will run the SPF algorithm to update its own routing table and holds therefore the most updated route.

To config OSPF type the command:
(config)#router ospf
(config-router)#network area
(config-router)#network area

Configure it on both ends of the link and an adjacency should be formed. We can show it using : #show ip ospf neighbor

To see the ospf database: #show ip ospf database

To see the interface running ospf: #show ip ospf interface

-- 3 Januari 2011 --

Tuesday, December 21, 2010

Distance Vector routing, RIPv1, RIPv2, IGRP, EIGRP

Distance vector routing protocol is a routing protocol that allows the router route an arriving packet to its distance. Distance vector uses Bellman-Ford Algorithm where it uses 2 methods to send the packet:

1. It calculates its distance to the destination by hop counting
2. It uses its vector to direct the router where to send its packet to (the next router or hop) in order to reach the destination

The DV protocol is suitable for smaller and stable environment because a DV protocol takes a long time to converge which is a drawback. Also a drawback is that DV cannot distinguish speeds of the lines. Therefore, a directly connected E1 line or a directly connected 56 kbps line will be considered the same. Another disadvantange is that RIP and IGRP broadcasts its routing table every 30 seconds and 90 seconds whether there is a change in the network topology or not. This behavior will waste unnecessary bandwidth. However, DV has its advantages which is less overhead and less computation.

To shorten the convergence of the networks and possible looping occurrences, route poisoning is applied. By using route poisoning, the maximum hop counts is limited to 15. When the hop count is 16, the packet will be dropped. Also, when a router is down, it will set the destination to it as infinity (16 hops) and will 'poisen' the route to that router.

Protocols that uses distance vector routing is RIPv1, RIPv2, IGRP and EIGRP.

The characteristics of RIPv1 are:

- updates broadcasts every 30 sec to 255.255.255.255 despite there is a change it its topology or not.
- uses classfull protocol thus not supporting VLSM
- equal cost sharing is set as a default feature
- max hop counts = 15 hops (16 hops is considered as infinite)
- does not support clear-text or MD5 authentication
- route max = 25 routes. For more than 25 routes, another packet must be generated.

The characteristics of RIPv2 are:

- updates multicasts every 30 sec to 224.0.0.9 despite there is a change it its topology or not.
- uses classless protocol thus supports VLSM
- equal cost sharing is set as a default feature
- max hop counts = 15 hops (16 hops is considered as infinite)
- does support clear-text or MD5 authentication. MD5 authentication is recommended since the password is encrypted.
- route max = 25 routes. For more than 25 routes, another packet must be generated.

The characteristics of IGRP are:

- updates broadcasts every 90 sec to 255.255.255.255 despite there is a change it its topology or not.
- uses classfull protocol thus not supporting VLSM
- this protocol is Cisco proprietary protocol
- equal cost can be enabled with variance command

The characteristics of EIGRP are:

- updates multicasts to 224.0.0.10. A full routing table multicast will be sent when an adjecency is formed. When there is a change in the network, only the change of the topology will be updated.
- uses DUAL algorithm
- equal cost can be enabled with variance command


-- 22 December 2010 --