Показаны сообщения с ярлыком CCNA Exploration 2. Показать все сообщения
Показаны сообщения с ярлыком CCNA Exploration 2. Показать все сообщения

вторник, 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


Chapter 10. Resume. Link-state routing protocols


CCNA Exploration 2.
Routing protocols and Consepts.
RESUME. Chapter 10.  Link-state routing protocols

Link-state routing protocols are also known as shortest path first protocols and built around Edsger Dijkstra's shortest path first (SPF) algorithm.


1. Each router learns about its own links, its own directly connected networks. This is done by detecting that an interface is in the up state.

2. Each router is responsible for meeting its neighbors on directly connected networks. Similar to EIGRP, link state routers do this by exchanging Hello packets with other link-state routers on directly connected networks.

3. Each router builds a Link-State Packet (LSP) containing the state of each directly connected link. This is done by recording all the pertinent information about each neighbor, including neighbor ID, link type, and bandwidth.

4. Each router floods the LSP to all neighbors, who then store all LSPs received in a database. Neighbors then flood the LSPs to their neighbors until all routers in the area have received the LSPs. Each router stores a copy of each LSP received from its neighbors in a local database.

5. Each router uses the database to construct a complete map of the topology and computes the best path to each destination network. Like having a road map, the router now has a complete map of all destinations in the topology and the routes to reach them. The SPF algorithm is used to construct the map of the topology and to determine the best path to each network. 

Each router learns about its own links, its own directly connected networks 

With link-state routing protocols, a link is an interface on a router. As with distance vector protocols and static routes, the interface must be properly configured with an IP address and subnet mask and the link must be in the up state before the link-state routing protocol can learn about a link. Also like distance vector protocols, the interface must be included in one of the network statements before it can participate in the link-state routing process. 

Each router is responsible for meeting its neighbors on directly connected networks. 

Similar to EIGRP's Hello packets, when two link-state routers learn that they are neighbors, they form an adjacency. These small Hello packets continue to be exchanged between two adjacent neighbors which serve as a "keepalive" function to monitor the state of the neighbor. If a router stops receiving Hello packets from a neighbor, that neighbor is considered unreachable and the adjacency is broken. 

Each router builds a Link-State Packet (LSP) containing the state of each directly connected link.

Once a router has established its adjacencies, it can build its link-state packets (LSPs) that contain the link-state information about its links. 

Each router floods the LSP to all neighbors, who then store all LSPs received in a database.

Each router uses the database to construct a complete map of the topology and computes the best path to each destination network. 

There are several advantages of link-state routing protocols compared to distance vector routing protocols:
~ Builds a Topological Map
~Fast Convergence
~Event-driven Updates. OSPF routers do flood their own link-states every 30 minutes.

~Hierarchical Design


Modern link-state routing protocols are designed to minimize the effects on memory, CPU, and bandwidth. The use and configuration of multiple areas can reduce the size of the link-state databases. Multiple areas can also limit the amount of link-state information flooding in a routing domain and send LSPs only to those routers that need them.



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

Chapter 9. EIGRP

CCNA Exploration 2.
Routing protocols and Consepts.
RESUME. Chapter 9.  EIGRP

      Enhanced Interior Gateway Routing Protocol (EIGRP) is a distance vector, classless routing protocol that was released in 1992 with IOS 9.21.

      EIGRP includes several features that are not commonly found in other distance vector routing protocols like RIP (RIPv1 and RIPv2) and IGRP. 
These features include:
              ~  Reliable Transport Protocol (RTP)
              ~  Bounded Updates
              ~  Diffusing Update Algorithm (DUAL)
              ~  Establishing Adjacencies
              ~  Neighbor and Topology Tables
The destination address is set to the multicast 224.0.0.10. If the EIGRP packet is encapsulated in an Ethernet frame, the destination MAC address is also a multicast address.
          The Autonomous System (AS) Number specifies the EIGRP routing process.
     The EIGRP parameters message includes the weights that EIGRP uses for its composite metric. By default, only bandwidth and delay are weighted. Both are equally weighted, therefore, the K1 field for bandwidth and the K3 field for delay are both set to 1. The other K values are set to zero. 
        EIGRP has the capability for routing several different protocols including IP, IPX, and AppleTalk using protocol-dependent modules (PDM). PDMs are responsible for the specific routing tasks for each Network layer protocol. 

        Reliable Transport Protocol (RTP) is the protocol used by EIGRP for the delivery and reception of EIGRP packets. EIGRP was designed as a Network layer independent routing protocol; therefore, it cannot use the services of UDP or TCP because IPX and Appletalk do not use protocols from the TCP/IP protocol suite. 
                        
        EIGRP Packet Types
  • Hello packets are used by EIGRP to discover neighbors and to form adjacencies with those neighbors. EIGRP hello packets are multicasts and use unreliable delivery. EIGRP Hello packets are discussed in a later section.
  • Update packets are used by EIGRP to propagate routing information. Update packets are sent only when necessary. EIGRP updates contain only the routing information needed and are sent only to those routers that require it. 
  • Acknowledgement (ACK) packets are sent by EIGRP when reliable delivery is used. RTP uses reliable delivery for EIGRP update, query, and reply packets. EIGRP acknowledgement packets contain a nonzero acknowledgment number and always are sent by using a unicast address.
  • Query and reply packets are used by DUAL when searching for networks and other tasks. Queries and replies use reliable delivery. Queries use multicast, whereas replies are always sent as unicast. 

EIGRP uses the term partial or bounded when referring to its update packets. 

The term partial means that the update only includes information about the route changes. EIGRP sends these incremental updates when the state of a destination changes, instead of sending the entire contents of the routing table. 

The term bounded refers to the propagation of partial updates sent only to those routers that are affected by the change. The partial update is automatically "bounded" so that only those routers that need the information are updated. 


Diffusing Update Algorithm (DUAL) is the convergence algorithm used by EIGRP instead of the Bellman-Ford or Ford Fulkerson algorithms used by other distance vector routing protocols, like RIP. 
Like other routing protocols, EIGRP can be configured for authentication. RIPv2, EIGRP, OSPF, IS-IS, and BGP can all be configured to encrypt and authenticate their routing information.


Note: Authentication does not encrypt the router's routing table.

An autonomous system (AS) is a collection of networks under the administrative control of a single entity that presents a common routing policy to the Internet. 
Router(config)#router eigrp autonomous-system

The network command in EIGRP has the same function as in other IGP routing protocols: 
1. Any interface on this router that matches the network address in the network command will be enabled to send and receive EIGRP updates.
2. This network (or subnet) will be included in EIGRP routing updates.
Router(config-router)#network network-address

To configure EIGRP to advertise specific subnets only, use the wildcard-mask option with the network command:
Router(config-router)#network network-address [wildcard-mask] 
To calculate the inverse of the subnet mask, subtract the subnet mask from 255.255.255.255:

  255.255.255.255 
- 255.255.255.252
Subtract the subnet mask
---------------
    0.  0.  0.  3  - Wildcard mask

Use the show ip eigrp neighbors command to view the neighbor table and verify that EIGRP has established an adjacency with its neighbors. 
Note: EIGRP automatically includes a null0 summary route as a child route whenever both of following conditions exist:
----There is at least one subnet that was learned via EIGRP.
----Automatic summarization is enabled.


EIGRP uses the following values in its composite metric to calculate the preferred path to a network:
 Router(config-router)#metric weights tos k1 k2 k3 k4 k5
  • Bandwidth                                                                                                Modifying the bandwidth value does not change the actual bandwidth of the link.       Router(config-if)#bandwidth kilobits
  • Delay
  • Reliability                                                                                                          By default, EIGRP does not use reliability in its metric calculation.
  • Load                                                                                                                Load (load) reflects the amount of traffic utilizing the link.
A successor is a neighboring router that is used for packet forwarding and is the least-cost route to the destination network. 
Feasible distance (FD) is the lowest calculated metric to reach the destination network. 
A feasible successor (FS) is a neighbor who has a loop-free backup path to the same network as the successor by satisfying the feasibility condition.
 The feasibility condition (FC) is met when a neighbor's reported distance (RD) to a network is less than the local router's feasible distance to the same destination network.

The show ip eigrp topology all-links command shows all possible paths to a network including successors, feasible successors, and even those routes that are not feasible successors. 


Задаем № Autonomous System.На всех Rx AuSys он должен быть одинаковый.
теперь необходимо объявить непосредственно подключенные сети.
R1(config)# router eigrp 1
Включение EIGRP на интерфейсах:
R1(config-router)# network <network> [wildcard mask]
<network> — непосредственно присоединенная сеть к маршрутизатору.
Если в route table есть default static route, то можно его распространить :
R1(config-router)# redistribute static [metric]
Маршрут по умолчанию EIGRP:
R1(config)# ip default-network <network-number>
Отключить автосуммирование:R1(config-router)#no auto-summary
Суммарный маршрут настраивается на интерфейсе:
R1(config-if)#ip summary-address eigrp <AS-number> <address> <mask> [admin-distance]
Изменения интервала hello-пакетов:
router(config-if)# ip hello-interval eigrp <asn> <seconds>
Изменения hold-интервала:
router(config-if)# ip hold-time eigrp <asn> <seconds>
R1(config-if)# bandwith (Kbps)
Настройка % bandwidth, к-й будет исп-вать EIGRP:
R1(config-if)#ip bandwidth-percent eigrp <AS-number> <percent>

TROUBLESHOOTING
R1#sh ip eigrp neighbors:
R1#sh ip eigrp neighbors detail
R1# sh ip route eigrp
R1#sh ip protocols
R1#sh ip eigrp interfaces
R1#sh ip eigrp topology
R1# debug ip eigrp





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.












вторник, 28 февраля 2012 г.

RIPv2. EIGRP. OSPF


RIP v 2 224.0.09
EIGRP 224.0.0.10
OSPF 224.0.0.5 224.0.06
Базовые настройки
router(conf)# router rip
router(conf-router)# version 2
router(conf-router)# network <классовая сеть> Команда network указывает только на каких интерфейсах включить RIP, а фактическая сеть и маска будет взята из настроек интерфейса.
Маршрут по умолчанию
R1(config-router)# default-information originate [route-map <map-name>]
Если в route table есть default static route, то можно его распространить :
R1(config-router)# redistribute static [metric <metric>] [route-map <map-name>]
Настройка суммарного маршрута:
R1(config-if)# ip summary-address rip n.add SM
Удалить можно все маршруты:
router# clear ip route *

Triggered extension to RIP — дополнительный функционал, который позволяет R  IP отправлять полную информацию о всех маршрутах только один раз и после этого не отправлять её. Функция разработана для demand circuit и описана в RFC 2091. Включается на интерфейсе командой ip rip triggered.

TROUBLESHOOTING
R1# show ip rip database
R1# show ip route
R1# show ip protocols
Задаем № Autonomous System.На всех Rx AuSys он должен быть одинаковый.
теперь необходимо  объявить непосредственно подключенные сети.
R1(config)# router eigrp 1
Включение EIGRP на интерфейсах:
R1(config-router)# network <network> [wildcard mask]
<network> — непосредственно присоединенная сеть к маршрутизатору.
Если в route table есть default static route, то можно его распространить :
R1(config-router)# redistribute static [metric
Маршрут по умолчанию EIGRP:
R1(config)# ip default-network <network-number>
Отключить автосуммирование:
R1(config-router)#no auto-summary

Суммарный маршрут настраивается на интерфейсе:
R1(config-if)#ip summary-address eigrp <AS-number> <address> <mask> [admin-distance]
Изменения интервала hello-пакетов:
router(config-if)# ip hello-interval eigrp <asn> <seconds>
Изменения hold-интервала:
router(config-if)# ip hold-time eigrp <asn> <seconds>
R1(config-if)# bandwith (Kbps)
TROUBLESHOOTING
R1#sh ip eigrp neighbors:
R1#sh ip eigrp neighbors detail
R1# sh ip route eigrp
R1#sh ip protocols
R1#sh ip eigrp interfaces
R1#sh ip eigrp topology
R1# debug ip eigrp
Настройка % bandwidth, к-й будет исп-вать EIGRP:
R1(config-if)#ip bandwidth-percent eigrp <AS-number>  <percent>
Сами прописываем 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>
TROUBLESHOOTING
R1# show ip route ospf
R1# show ip ospf interface
R1# show ip ospf interface brief
R1# show ip ospf database

Настройка аутентификации type 1 для зоны 1 (пароль надо задавать на интерфейсах):
R1(config-router)# area 1 authentication