Показаны сообщения с ярлыком Routing protocols and Consepts. Показать все сообщения
Показаны сообщения с ярлыком Routing protocols and Consepts. Показать все сообщения

вторник, 13 марта 2012 г.

Chapter 11.OSPF


CCNA Exploration 2.
Routing protocols and Consepts.
RESUME. Chapter 11. OSPF
OSPF is a classless routing protocol that uses the concept of areas for scalability. 
The data portion of an OSPF message is encapsulated in a packet. 
Each packet serves a specific purpose in the OSPF routing process:
1. Hello - Hello packets are used to establish and maintain adjacency with other OSPF routers. The hello protocol is discussed in detail in the next topic; are used to:
           ~Discover OSPF neighbors and establish neighbor adjacencies.
           ~Advertise parameters on which two routers must agree to become neighbors.
           ~Elect the Designated Router (DR) and Backup Designated Router (BDR) on multiaccess networks       like Ethernet and Frame Relay.
2. DBD - The Database Description (DBD) packet contains an abbreviated list of the sending router's link-state database and is used by receiving routers to check against the local link-state database. 
3. LSR - Receiving routers can then request more information about any entry in the DBD by sending a Link-State Request (LSR). 
4. LSU - Link-State Update (LSU) packets are used to reply to LSRs as well as to announce new information. LSUs contain seven different types of Link-State Advertisements (LSAs). LSUs and LSAs are briefly discussed in a later topic.
5. LSAck - When an LSU is received, the router sends a Link-State Acknowledgement (LSAck) to confirm receipt of the LSU.
 
Before two routers can form an OSPF neighbor adjacency, they must agree on three values: Hello interval, Dead interval, and network type. The OSPF Hello interval indicates how often an OSPF router transmits its Hello packets. By default, OSPF Hello packets are sent every 10 seconds on multiaccess and point-to-point segments and every 30 seconds on non-broadcast multiaccess (NBMA) segments.
Each OSPF router maintains a link-state database containing the LSAs received from all other routers. Once a router has received all of LSAs and built its local link-state database, OSPF uses Dijkstra's shortest path first (SPF) algorithm to create an SPF tree. 
          OSPF can be configured for authentication. 
Note: Authentication does not encrypt the router's routing table. 
The cost of an OSPF route is the accumulated value from one router to the destination network. 
A multiaccess network is a network with more than two devices on the same shared media.
Multiaccess networks can create two challenges for OSPF regarding the flooding of LSAs:
         1. Creation of multiple adjacencies, one adjacency for every pair of routers.
         2. Extensive flooding of LSAs (Link-State Advertisements).
OSPF defines five network types:
          ~ Point-to-point 
          ~  Broadcast Multiaccess 
          ~  Nonbroadcast Multiaccess (NBMA) 
          ~  Point-to-multipoint 
          ~  Virtual links
The solution to managing the number of adjacencies and the flooding of LSAs on a multiaccess network is the Designated Router (DR). 
A Backup Designated Router (BDR) is also elected in case the Designated Router fails. 
All other routers become DROthers (this indicates a router that is neither the DR or the BDR).
Criteria of election DR/BDR:
     1. DR: Router with the highest OSPF interface priority.
     2. BDR: Router with the second highest OSPF interface priority. 
     3. If OSPF interface priorities are equal, the highest router ID is used to break the tie.
When the DR is elected, it remains the DR until one of the following conditions occurs:
             ~The DR fails.
             ~The OSPF process on the DR fails.
             ~The multiaccess interface on the DR fails.
The reference bandwidth can be modified to accommodate these faster links by using the OSPF command auto-cost reference-bandwidth

Настройка OSPF:
Сами прописываем cost  на интерфейсе:
R1(config-if)#ip ospf cost < >
Назначаем приоритет на интерфейсе:
R1(config-if)#ip ospf  priority <0-255 >
Router ID назначаем сами:
R1(config-router)#router-id <ip-address>
Если RID не был назначен нами, то он выбирается авт-ки, в зависимости от настроек роутера, по таким правилам:
1. Настроен один loopback-интерфейс и несколько интерфейсов с различными адресами:
     IP address loopback 0=Router ID.
2. Настроены Lo1, Lo2…Lo9  с IpAdd1,ApAdd2… 
    Наибольший IpAdd Lo = Router ID.
3. Настроены неск-ко интерфейсов с Ip Add:
    Наибольший Ip Add из всех акт.интерфейсов= RID.
Включить OSPF на интерфейсах в соответствующих сетях:
R1(config)# router ospf <process-id>
R1(config-router)# network <network> <wildcard mask> area <area-id>
Команда network  
1) включает OSPF на интерфейсе, IP-адрес которого совпадает с указанной сетью и маской,
2)  анонсирует сеть этого интерфейса через другие интерфейсы, на которых включен OSPF.
Если в route table есть default static route, то можно его распространить :
R1(config-router)# default-information originate
Включение OSPF на интерфейсах:
R1(config-if)# ip ospf <process-id> area <area-id>
Изменение hello-интервала:
R1(config-if)# ip ospf hello-interval <sec>
Изменение dead-интервала:
R1(config-if)# ip ospf dead-interval <sec>
Настройка аутентификации type 1 для зоны 1 (пароль надо задавать на интерфейсах):
R1(config-router)# area 1 authentication

TROUBLESHOOTING
R1# show ip route ospf
R1# show ip ospf interface
R1# show ip ospf interface brief
R1# show ip ospf database


воскресенье, 11 марта 2012 г.

Chapter 8. The Routing table. A closer look



CCNA Exploration 2. 
Routing protocols and Consepts. 
Chapter 8. Resume. The Routing table. A closer look 


The sample routing table in the figure consists of route entries from the following sources:

  • Directly connected networks
  • Static routes
  • Dynamic routing protocols
A level 1 route is a route with a subnet mask equal to or less than the classful mask of the network address.
A level 1 route can function as a:
     ~ Default route - A default route is a static route with the address 0.0.0.0/0.
     ~Supernet route - A supernet route is a network address with a mask less than the classful mask. 
    ~Network route - A network route is a route that has a subnet mask equal to that of the classful mask. A network route can also be a parent route. 
         An ultimate route is a route that includes:
                                    ~  either a next-hop IP address (another path)
                                    ~   and/or an exit interface 
A level 1 parent route is a network route that does not contain a next-hop IP address or exit interface for any network. 
A parent route is actually a heading that indicates the presence of level 2 routes, also known as child routes.
Level 2 child routes are also considered ultimate routes because they will contain the next-hop IP address and/or exit interface.



Although the parent/child relationship uses a classful structure to display networks and their subnets, this format can be used with both classful and classless addressing. Regardless of the addressing scheme used by the network (classless or classful), the routing table will use a classful scheme.
The parent route states that the child routes are "variably subnetted".


The Route Lookup Process
Step 1.
The router examines level 1 routes, including network routes and supernet routes, for the best match with the destination address of the IP packet.
Step 1a.
If the best match is a level 1 ultimate route - a classful network, supernet, or default route - this route is used to forward the packet.
Step 1b.
If the best match is a level 1 parent route, proceed to Step 2.
Step 2.
The router examines child routes (the subnet routes) of the parent route for a best match.
Step 2a.
If there is a match with a level 2 child route, that subnet will be used to forward the packet.
Step 2b.
If there is not a match with any of the level 2 child routes, proceed to Step 3.Click Step 3.Is the router implementing classful or classless routing behavior?
Step 3a.
Classful routing behavior: If classful routing behavior is in effect, terminate the lookup process and drop the packet.
Step 3b.
Classless routing behavior: If classless routing behavior is in effect, continue searching level 1 supernet routes in the routing table for a match, including the default route, if there is one.
Step 4.
If there is now a lesser match with a level 1 supernet or default routes, the router uses that route to forward the packet.
Step 5.
If there is not a match with any route in the routing table, the router drops the packet.
Classful and classless routing behavior will be discussed in more detail in a later section.

Note: A route referencing only a next-hop IP address and not an exit interface must be resolved to a route with an exit interface. A recursive lookup is performed on the next-hop IP address until the route is resolved to an exit interface.

The route with the most number of equivalent left-most bits, or the longest match, is always the preferred route.




 If the router is using classful routing behavior, no other routes will be searched and the packet will be discarded. Classful routing behavior was the default routing behavior on Cisco routers prior to IOS 11.3. Classful routing behavior can be implemented using the no ip classless command.

Starting with IOS 11.3 classless routing behavior became the default. If there is a match with a parent route but none of the child routes, the routing table process will continue to search other routes in the routing table including a default route should one exist. Classless routing behavior is implemented by using the ip classless command.












воскресенье, 26 февраля 2012 г.

CCNA Expl 2.Chapter 7. RIP v. 2

CCNA Exploration 2.Routing protocols and Consepts.
RESUME. 
Chapter 6. RIPv2














RIP v.1
RIP v.2
Distance vector routing protocol
classful routing protocol
classless routing protocol
do not include the subnet mask with the network address in routing updates, which can cause problems with discontiguous subnets or networks that use Variable-Length Subnet Masking (VLSM).
subnet masks are included in the routing updates
following features and limitations:
~ Use of holddown and other timers to help prevent routing loops.
~ Use of split horizon or split horizon with poison reverse to also help prevent routing loops.
~ Use of triggered updates when there is a change in the topology for faster convergence.
~ Max. hop count limit of 15 hops, with the hop count of 16 signifying an unreachable network.


A loopback interface is a software-only interface that is used to emulate a physical interface.
 -  ideal for simulating multiple networks attached to the same router.





Null Interface -

R2(config)#ip route 192.168.0.0 255.255.0.0 Null0

R2(config-router)#redistribute static      
                                                             - Redistribution involves taking the routes from one routing source
                                                               and  sending those routes to another routing source.
R2# debug ip rip 
The show ip protocols command verifies that R2 is configured for RIPv1 but receives RIP messages for both versions.

By default, RIPv2 automatically summarizes networks at major network boundaries, just like RIPv1. 

R3(config-router)#no auto-summary  - To modify the default RIPv2 behavior of automatic summarization (RIPv2).

Because classless routing protocols like RIPv2 can carry both the network address and the subnet mask, they do not need to summarize these networks to their classful addresses at major network boundaries. Therefore, classless routing protocols support VLSM. 

There are several ways to verify and troubleshoot RIPv2. Many of the same commands used for RIPv2 can be used to verify and troubleshoot other routing protocols. 
1. Make sure all of the links (interfaces) are up and operational.
2. Check the cabling. 
3. Check to make sure you have the correct IP address and subnet mask on each interface.
4. Remove any unnecessary configuration commands that are no longer necessary or have been replaced by other commands.
                R# show ip route 

                R# show ip interface brief 
                R# show ip protocols
                R# debug ip rip
                R# ping
                R# show running-config


The network statement does two things:
1. It enables the routing protocol to send and receive updates on any local interfaces that belong to that network.
2. It includes that network in its routing updates to its neighboring routers.


If there is a need or expectation for sending specific subnets and not just summarized routes, make sure that automatic summarization has been disabled.

A security concern of any routing protocol is the possibility of accepting invalid routing updates.
RIPv2, EIGRP, OSPF, IS-IS, and BGP can be configured to authenticate routing information.
=> Routers will only accept routing information from other routers that have been configured with the same password or authentication information. 







CCNA Expl 2. Chapter 6.VLSM and CIDR

CCNA Exploration 2.Routing protocols and Concepts
RESUME. 
Chapter 6. VLSM and CIDR


Classful IP addressing.
Class
Start
End
network portion of the address
Hosts per network
Networks
Class A
     0.0.0.0
127.255.255.255
8 bits
160777214
128
Class B
128.0.0.0
191.255.255.255
16 bits
65534
16384
Class C
192.0.0.0
223.255.255.255
24 bits
254
2097152
Multicast
224.0.0.0
239.255.255.255



Experimental
240.0.0.0
255.255.255.255



     
       RIPv1 summarizes subnets to a single major network classful address when sending the RIPv1 update out an interface that belongs to another major network.



In 1993, IETF introduced Classless Inter-Domain Routing, or CIDR (RFC 1517).
CIDR allowed for:
      ~  More efficient use of IPv4 address space
      ~  Prefix aggregation, which reduced the size of routing tables
        
      -   RIPv2, EIGRP, OSPF, IS-IS and BGP

The network portion of the address is determined by the network subnet mask, also known as the network prefix, or prefix length (/8, /19, etc.). 
       CIDR uses Variable Length Subnet Masks (VLSM) to allocate IP addresses to subnets according to individual need rather than by class.
        The ability for routes to be summarized as a single route helps reduce the size of Internet routing tables. 
        A supernet summarizes multiple network addresses with a mask less than the classful mask. 
        Classless routing protocols include the subnet mask with the network address in the routing update.

A supernet is always a route summary, but a route summary is not always a supernet


суббота, 25 февраля 2012 г.

CCNA Expl 2. Chapter 4. Distance vector routing protocols

CCNA Exploration 2.Routing protocols and Concepts.
RESUME. 
Chapter 4.  Distance vector routing protocols.


RIP
~ Hop count is used as the metric for path selection. 
~ If the hop count for a network is greater than 15, RIP cannot supply a route to that network.
~ Routing updates are broadcast or multicast every 30 seconds, by default. 

IGRP
Bandwidth, delay, load and reliability are used to create a composite metric
~ Routing updates are broadcast every 90 seconds, by default. 
~ IGRP is the predecessor of EIGRP and is now obsolete.

EIGRP
~ It can perform unequal cost load balancing. 
~ It uses Diffusing Update Algorithm (DUAL) to calculate the shortest path. 
~ There are no periodic updates as with RIP and IGRP. Routing updates are sent only when there is a change in the topology.

Distance vector routing protocols share certain characteristics.

  • Periodic Updates are sent at regular intervals (30 seconds for RIP and 90 seconds for IGRP). Even if the topology has not changed in several days, periodic updates continue to be sent to all neighbors.
  • Neighbors are routers that share a link and are configured to use the same routing protocol.      Routers using distance vector routing are not aware of the network topology.
  • Broadcast Updates are sent to 255.255.255.255.
  • Entire Routing Table Updates are sent, with some exceptions  periodically to all neighbors.
The algorithm used for the routing protocols defines the following processes:
  • Mechanism for sending and receiving routing information.
  • Mechanism for calculating the best paths and installing routes in the routing table. 
  • Mechanism for detecting and reacting to topology changes.
When a router cold starts or powers up, it knows nothing about the network topology. The only information that a router has is from its own saved configuration file stored in NVRAM.

If a routing protocol is configured, the routers begin exchanging routing updates. Initially, these updates only include information about their directly connected networks. Upon receiving an update, the router checks it for new information. Any routes that are not currently in its routing table are added.



The speed of achieving convergence consists of:

  • How quickly the routers propagate a change in the topology in a routing update to its neighbors. 
  • The speed of calculating best path routes using the new routing information collected.

A network is not completely operable until it has converged, therefore, network administrators prefer routing protocols with shorter convergence times.


RIP Timers
1. Update timer
2. Invalid timer
     If an update has not been received to refresh an existing route after 180 seconds (the default),
     the route is   marked as invalid by setting the metric to 16. The route is retained in the routing table until
     the    flush timer expires.

3. Flush timer
    By default, the flush timer is set for 240 seconds, which is 60 seconds longer than the invalid timer. 
    When the flush timer expires, the route is removed from the routing table.
4. Holddown timer
    Once a route is marked as unreachable, it must stay in holddown long enough for all routers in the topology
     to learn about the unreachable network. By default, the holddown timer is set for 180 seconds. 


Чтобы посмотреть таймеры используем команды : "show ip route", "show ip protocols".
___________________________________________________________

EIGRP sends bounded updates about a route when a path changes or the metric for that route changes.

            EIGRP uses updates that are:
                 ~ Non-periodic because they are not sent out on a regular basis.
                 ~ Partial updates sent only when there is a change in topology that influences routing information.
                 ~ Bounded, meaning the propagation of partial updates are automatically bounded so that only
                       those routers that need the information are updated.


To speed up the convergence when there is a topology change, RIP uses triggered updates.
Triggered updates are sent when one of the following occurs:
              ~An interface changes state (up or down)
              ~A route has entered (or exited) the "unreachable" state
              ~A route is installed in the routing table.

There are two problems with triggered updates:
1. Packets containing the update message can be dropped or corrupted by some link in the network.
2. The triggered updates do not happen instantaneously. It is possible that a router that has not yet received the triggered update will issue a regular update at just the wrong time, causing the bad route to be reinserted in a neighbor that had already received the triggered update.

Sending updates at the same time is known as the synchronization of updates. Synchronization can become a problem with distance vector routing protocols due to their usage of periodic updates.



A routing loop is a condition in which a packet is continuously transmitted within a series of routers without ever reaching its intended destination network. 

The loop may be a result of:
  • Incorrectly configured static routes
  • Incorrectly configured route redistribution (redistribution is a process of handing the routing information from one routing protocol to another routing protocol and is discussed in CCNP-level courses)
  • Inconsistent routing tables not being updated due to slow convergence in a changing network
  • Incorrectly configured or installed discard routes 
To eventually stop the incrementing of the metric, "infinity" is defined by setting a maximum metric value. For example, RIP defines infinity as 16 hops - an "unreachable" metric.
Чтобы  остановить увеличивающиеся метрики, "бесконечность"определяется путем установления максимального значения метрики.RIP - 16 прыжков.

Holddown timers are used to prevent regular update messages from inappropriately reinstating a route that may have gone bad.

Holddown timers work in the following way:
          1. A router receives an update from a neighbor indicating that a network that previously was accessible is now no longer accessible.
          2. The router marks the network as possibly down and starts the holddown timer.
          3. If an update with a better metric for that network is received from any neighboring router during the holddown period, the network is reinstated and the holddown timer is removed.
          4. If an update from any other neighbor is received during the holddown period with the same or worse metric for that network, that update is ignored. Thus, more time is allowed for the information about the change to be propagated.
          5. Routers still forward packets to destination networks that are marked as possibly down. This allows the router to overcome any issues associated with intermittent connectivity. If the destination network truly is unavailable and the packets are forwarded, black hole routing is created and lasts until the holddown timer expires.

  1. The split horizon rule says that a router should not advertise a network through the interface from which the update came.
  2. Route poisoning is used to mark the route as unreachable in a routing update that is sent to other routers. 
  3. The rule for split horizon with poison reverse states when sending updates out a specific interface, designate any networks that were learned on that interface as unreachable.
Time to Live (TTL) is an 8-bit field in the IP header that limits the number of hops a packet can traverse through the network before it is discarded. 
Purpose of the TTL field is to avoid a situation in which an undeliverable packet keeps circulating on the network endlessly. 

For distance vector routing protocols, there really are only two choices: RIP or EIGRP
Factors of choice: 
          1. Size of the network
          2. Compatibility between models of routers
          3. Administrative knowledge required.

    



воскресенье, 12 февраля 2012 г.

CCNA Expl 2. Chapter 3. Dynamic routing protocols

CCNA Exploration 2.
Routing protocols and Consepts.
Chapter 3. Resume. Dynamic routing protocols 
Routing protocols determine the best path to each network which is then added to the routing table. 

Primary benefits to using a dynamic routing protocol:  
             Routers exchange routing information whenever there is a topology change.
             => routers  automatically learn about new networks 
             => find alternate paths when there is a link failure to a current network.

The purpose of a routing protocol includes:
          ~ Discovery of remote networks
          ~ Maintaining up-to-date routing information
          ~ Choosing the best path to destination networks
          ~ Ability to find a new best path if the current path is no longer available

In general, the operations of a dynamic routing protocol can be described as follows: 
          1.The router sends and receives routing messages on its interfaces.
          2. The router shares routing messages and routing information with other routers that are using the 
              same routing protocol.
          3. Routers exchange routing information to learn about remote networks. 
          4. When a router detects a topology change the routing protocol can advertise this change to other 
              routers.

Static routing advantages:
Static routing disadvantages:
·        Minimal CPU processing.
·        Easier for administrator to understand.
·        Easy to configure.                                                  
Ё Configuration and maintenance is time-consuming.
Ё Configuration is error-prone, especially in large networks.
Ё Administrator intervention is required to maintain changing route information.
Ё Does not scale well with growing networks; maintenance becomes cumbersome.
Ё Requires complete knowledge of the whole network for proper implementation.
Dynamic routing advantages:
Dynamic routing disadvantages:
·        Administrator has less work maintaining the configuration when adding or deleting networks.
·        Protocols automatically react to the topology changes.
·        Configuration is less error-prone.
·        More scalable, growing the network usually does not present a problem.
ЁRouter resources are used (CPU cycles, memory and link bandwidth).
Ё More administrator knowledge is required for configuration, verification, and troubleshooting.
An autonomous system (AS) - otherwise known as a routing domain - is a collection of routers under a common administration. 

Interior Gateway Protocols (IGP) are used for intra-autonomous system routing - routing inside an autonomous system.

Exterior Gateway Protocols (EGP) are used for inter-autonomous system routing - routing between autonomous systems.
Interior Gateway Protocols (IGPs):
Distance vector routing protocols 
Routes are advertised as vectors of distance and direction.
Distance is defined in terms of a metric.

work best:
1.    The network is simple and flat and does not require a special hierarchical design.
2.    The administrators do not have enough knowledge to configure and troubleshoot link-state protocols.
3.    Specific types of networks, such as hub-and-spoke networks, are being implemented.
4.    Worst-case convergence times in a network are not a concern.
Link-state routing protocols
Router can create a "complete view" or topology of the network by gathering information from all of the other routers.


work best:
1.    The network design is hierarchical, usually occurring in large networks.
2.    The administrators have a good knowledge of the implemented link-state routing protocol.
3.    Fast convergence of the network is crucial.

       Classful routing protocols do not send subnet mask information in routing updates.  
Classful routing protocols cannot be used when a network is subnetted using more than one subnet mask,
        L imitations to classful routing protocols 
                          ~  do not support variable length subnet masks (VLSM)
                          ~  do not  support discontiguous networks.

Classless routing protocols include the subnet mask with the network address in routing updates. 
                         ~  support for VLSM, discontiguous networks 

     The network has converged when all routers have complete and accurate information about the network. Convergence time is the time it takes routers to share information, calculate best paths, and update their routing tables.     
       Each routing protocol uses its own metric.The metric is used to determine which path is most preferable when there are multiple paths to the same remote network.    
Metrics used in IP routing protocols include:
  • Hop count - A simple metric that counts the number of routers a packet must traverse
  • Bandwidth - Influences path selection by preferring the path with the highest bandwidth
  • Load - Considers the traffic utilization of a certain link
  • Delay - Considers the time a packet takes to traverse a path
  • Reliability - Assesses the probability of a link failure, calculated from the interface error count or previous link failures
  • Cost - A value determined either by the IOS or by the network administrator to indicate preference for a route. Cost can represent a metric, a combination of metrics or a policy. 
Load balancing is in effect if two or more routes are associated with the same destination.
The packets are forwarded using all equal-cost paths. 

Administrative distance (AD) defines the preference of a routing source. The lower the value the more preferred the route source. An administrative distance of 0 is the most preferred. Only a directly connected network has an administrative distance of 0, which cannot be changed. 

The show ip rip database command shows all RIP routes learned by R, whether or not the RIP route is installed in the routing table.
Directly connected networks appear in the routing table as soon as the IP address on the interface is configured and the interface is enabled and operational.