Skip to content

CCNP ROUTE – ch3

CCNP ROUTE OSPF

 

> router-id  sonradan değiştirildiğinde "clear ip ospf process" komutunun girilmesi gerekir.

> ospf te default ta loopback interface leri network type olarak loopback olarak geliyor ve network sınıf olarak anons edilse bile /32 li anonslar yapıyor. Bunu değiştirmek için loopback interface altında "ip ospf network point-to-point" girilerek loopback lerin network olarak anons edilmesi sağlanabilir.

> inter area networkler O IA olarak routing table da gözükür.

> nbma larda hub ın DR olması önemlidir. Diğer routerların DR/BDR seçimine katılmaması için interface altında "ip ospf priority 0" komutu girilebilir.

> "show ip ospf interface" komutu ile network type ve hello - dead timer değerleri görülebilir. Interface altında "ip ospf hello-interval" ve "ip ospf dead-interval" komutları ile değerler değiştirilebilir.

OSPF  states

down state

init state

two-way state   ------  establish neighbor adjacencies

ExStart state

Exchange state

Loading state   ------ Synchronize OSPF databases

Full state

> mtu ların tutmaması durumunda komşuluğun ExStart state de kalır.

> "show ip ospf" çıktısında spf algoritmasının kaç defa executed edildiği görülebilir.

>  ospf altında "auto-cost reference-bandwidth " komutu ile referans bandwidth değeri değiştirilebilir.

R1(config-router)#auto-cost reference-bandwidth ?

<1-4294967>  The reference bandwidth in terms of Mbits per second

R1(config-router)#auto-cost reference-bandwidth 10000

% OSPF: Reference bandwidth is changed.

Please ensure reference bandwidth is consistent across all routers.

> Bir interface in bandwidth değerini değiştirmek için interface altında "bandwidth X" komutu girilebilir .

>  Bandwidth komutuna alternatif olarak interface e cost değerini verilebilir. Interface altında "ip ospf cost X" şeklinde komut girilebilir. Bu komut bandwidth e göre daha önceliklidir.

> Inter-area rotanın cost unun daha düşük olması halinde bile loopa sebep olmamak adına ospf  intra-area rotaları tercih eder.

> ABR da summarization yapılan networkler için null 0 lı route lar gelir. Bunun sebebi default route olması durumunda loop olması ihtimalidir.

ABR(config-router)#area 2 range 192.168.20.0  255.255.252.0

ABR(config-router)#area 3 range 192.168.32.0  255.255.248.0

> asbr da summarization yapmak için önce ASBR' a 4 static route ekleyelim ve bu network leri ospf e duyuralım :

ASBR(config)#ip route 40.0.0.0 255.0.0.0 loopback 0

ASBR(config)#ip route 41.0.0.0 255.0.0.0 loopback 0

ASBR(config)#ip route 42.0.0.0 255.0.0.0 loopback 0

ASBR(config)#ip route 43.0.0.0 255.0.0.0 loopback 0

ASBR(config)#router ospf 1

ASBR(config-router)#redistribute static

% Only classful networks will be redistributed

Diğer router ların bu networkleri “O E2” li olarak öğrenirler. Database de type-4 ve type-5 lsa lar görülebilir.

Şimdi ASBR' da summarization yapalım :

ASBR(config)#router ospf 1

ASBR(config-router)#summary-address 40.0.0.0  252.0.0.0

OSPF Virtual - link  

R5(config-router)# area 2 virtual-link 1.1.1.1

R1(config-router)#area 2 virtual-link 5.5.5.5

>  Virtual-link içeren area stub yapılamaz.

>  Area 3 ü stub yapmak için :

ABR(config-router)#area 2 stub

R1(config-router)#area 2 stub

Burada dikkat edilmesi gereken, inter-area route lar hala daha stub area ya gelecektir. Lakin external route lar yerine default route gözükecektir. Gelen default route ın "O*IA  0.0.0.0/0" şeklinde gözükür. Default-information originate yapıldığında ise default route "O*E2" şeklinde gözükmektedir. Artık stub yapılan R3 te type 4 ve type 5 lsa ların kaybolacaktır.

>  Area 3 ü totally stub yapalım. ABR da "area 3 stub no-summary" komutunun girilmesi gerekir. Stub router da no-summary girmeye gerek yoktur.

Burada dikkat edilmesi gereken, intra-area route lar dışında inter-area ve external route lar yerine default route gelmektedir. Gelen default route ın "O*IA  0.0.0.0/0" şeklinde gözükür. Default-information originate yapıldığında default route "O*E2" şeklinde gözükür.

ABR(config-router)#area 3 stub no-summary

> ABR default olarak stub router lara default route anons ederken cost değerini 1 yapar. Stub ve nssa lar için default route anonslarının cost değerini değiştirmek için ospf altında "area 3 default-cost X" komutu girilebilir. Bu uygulama stub area ların backbone area ya birden fazla çıkış olması durumunda (2 ayrı ABR) anlamlı olmaktadır.

ABR(config-router)#area 3 default-cost 333

Default route propagation

> "default-information originate always" ile kullanıldığında routing table da default route olmasa bile anons edilir.

> "default-information originate metric" komutu ile default u 1 olan cost değeri değiştirilebilir.

ABR(config-router)#default-information originate always metric 99

> OSPF te bir area yı nssa yapmak için :

ABR(config-router)#area 2 nssa

R2(config-router)#area 2 nssa

> NSSA ya ABR' dan default route duyurmak için :

ABR(config-router)#area 2 nssa default-information-originate

>  OSPF te bir arayı Totally NSSA yapmak için :

ABR#area 2 nssa no-summary

OSPFv3

OSPFv3 LSA Types

LSA 1 - Router LSA

LSA 2 - Network LSA

LSA 3 (eski adı Network Summary LSA) - Interarea Prefix LSA : Type 3 LSAs advertise internal networks to routers in other areas (interarea routes). Type 3 LSAs may represent a single network or a set of networks summarized into one advertisement. Only ABRs generate summary LSAs. In OSPF for IPv6, addresses for these LSAs are expressed as prefix/prefix length instead of address and mask. The default route is expressed as a prefix with length 0.

LSA 4 (eski adı ASBR Summary LSA) - Interarea Router LSA : Type 4 LSAs advertise the location of an ASBR. Routers that are trying to reach an external network use these advertisements to determine the best path to the next hop. ASBRs generate Type 4 LSAs.

LSA 5 - AS-External LSA

LSA 6 - Group Membership LSA

LSA 7 - NSSA External LSA

The two new LSA types are as follows:

LSA 8 - Link LSA : Type 8 LSAs have local-link flooding scope and are never flooded beyond the link with which they are associated. Link LSAs provide the link-local address of the router to all other routers attached to the link. They inform other routers attached to the link of a list of IPv6 prefixes to associate with the link. In addition, they allow the router to assert a collection of option bits to associate with the network LSA that will be originated for the link.

LSA 9 - Intra-area Prefix LSA :

Area flooding scope. Associate prefix when a transit network references a Network-LSA. 2 associate prefix when a router or stub references a Router-LSA. Multiple instances for each router or transit network distinguished by their Link State ID.

OSPFv3 for IPv4 and IPv6

OSPFv3 does not only support exchange of IPv6 routes, but it also supports exchange of IPv4 routes. The newest OSPFv3 configuration approach utilizes a single OSPFv3 process. It is capable of supporting IPv4 and IPv6 within a single OSPFv3 process. OSPFv3 builds a single database with LSAs that carry IPv4 and IPv6 information. The OSPF adjacencies are established separately for each address family. Settings that are specific to an address family (IPv4/IPv6) are configured inside that address family router  configuration mode. Running single OSPFv3 for both IPv4 and IPv6 is supported since Cisco IOS Software Release 15.1(3)S.

R1(config)#router ospfv3 1

R1(config-router)#router-id 1.1.1.1

R1(config)#interface ser 3/3

R1(config-if)#ospfv3 1 ipv4 area 2

R1(config-if)#ospfv3 1 ipv6 area 2

R1(config-if)#inter loop 2

R1(config-if)#ospfv3 1 ipv4 area 2

R1(config-if)#ospfv3 1 ipv6 area 2

R1(config-if)#inter loop 0

R1(config-if)#ospfv3 1 ipv4 area 0

R1(config-if)#ospfv3 1 ipv6 area 0

R1(config-if)#interface fa 1/0

R1(config-if)#ospfv3 1 ipv4 area 0

R1(config-if)#ospfv3 1 ipv6 area 0

R1(config-if)#interface fa 1/1

R1(config-if)#ospfv3 1 ipv4 area 3

R1(config-if)#ospfv3 1 ipv6 area 3

R2(config)#router ospfv3 1

R2(config-router)#router-id 2.2.2.2

R2(config)#interface serial 3/3

R2(config-if)#ospfv3 1 ipv4 area 2

R2(config-if)#ospfv3 1 ipv6 area 2

R2(config)#interface range loop 0-3

R2(config-if-range)#ospfv3 1 ipv4 area 2

R2(config-if-range)#ospfv3 1 ipv6 area 2

R3(config)#router ospfv3 1

R3(config-router)#router-id 3.3.3.3

R3(config)#interface fastEthernet 1/1

R3(config-if)#ospfv3 1 ipv4 area 3

R3(config-if)#ospfv3 1 ipv6 area 3

R3(config)#interface range loopback 0-7

R3(config-if-range)#ospfv3 1 ipv4 area 3

R3(config-if-range)#ospfv3 1 ipv6 area 3

R4(config)#router ospfv3 1

R4(config-router)#router-id 4.4.4.4

R4(config)#int fa 1/0

R4(config-if)#ospfv3 1 ipv4 area 0

R4(config-if)#ospfv3 1 ipv6 area 0

R4(config-if)#inter loop 0

R4(config-if)#ospfv3 1 ipv4 area 0

R4(config-if)#ospfv3 1 ipv6 area 0

R1#sh run | sec router ospfv3

router ospfv3 1

router-id 1.1.1.1

!

address-family ipv4 unicast

exit-address-family

!

address-family ipv6 unicast

exit-address-family

R1#show ospfv3 neighbor

OSPFv3 1 address-family ipv4 (router-id 1.1.1.1)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface

4.4.4.4           1   FULL/BDR        00:00:32    4               FastEthernet1/0

2.2.2.2           0   FULL/  -        00:00:37    11              Serial3/3

3.3.3.3           1   FULL/BDR        00:00:34    5               FastEthernet1/1

OSPFv3 1 address-family ipv6 (router-id 1.1.1.1)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface

4.4.4.4           1   FULL/BDR        00:00:35    4               FastEthernet1/0

2.2.2.2           0   FULL/  -        00:00:31    11              Serial3/3

3.3.3.3           1   FULL/BDR        00:00:37    5               FastEthernet1/1

R1#sh ip route ospf    komut çıktısında bir şey gözükmez

R1#sh ip route ospfv3

192.168.4.0/32 is subnetted, 1 subnets

O        192.168.4.1 [110/1] via 192.168.14.4, 00:17:58, FastEthernet1/0

192.168.20.0/32 is subnetted, 1 subnets

O        192.168.20.1 [110/64] via 192.168.12.2, 00:20:42, Serial3/3

192.168.21.0/32 is subnetted, 1 subnets

O        192.168.21.1 [110/64] via 192.168.12.2, 00:20:42, Serial3/3

192.168.22.0/32 is subnetted, 1 subnets

O        192.168.22.1 [110/64] via 192.168.12.2, 00:20:42, Serial3/3

192.168.23.0/32 is subnetted, 1 subnets

O        192.168.23.1 [110/64] via 192.168.12.2, 00:20:42, Serial3/3

192.168.32.0/32 is subnetted, 1 subnets

O        192.168.32.1 [110/1] via 192.168.13.3, 00:19:15, FastEthernet1/1

192.168.33.0/32 is subnetted, 1 subnets

O        192.168.33.1 [110/1] via 192.168.13.3, 00:19:15, FastEthernet1/1

192.168.34.0/32 is subnetted, 1 subnets

O        192.168.34.1 [110/1] via 192.168.13.3, 00:19:15, FastEthernet1/1

192.168.35.0/32 is subnetted, 1 subnets

O        192.168.35.1 [110/1] via 192.168.13.3, 00:19:15, FastEthernet1/1

192.168.36.0/32 is subnetted, 1 subnets

O        192.168.36.1 [110/1] via 192.168.13.3, 00:19:15, FastEthernet1/1

192.168.37.0/32 is subnetted, 1 subnets

O        192.168.37.1 [110/1] via 192.168.13.3, 00:19:15, FastEthernet1/1

192.168.38.0/32 is subnetted, 1 subnets

O        192.168.38.1 [110/1] via 192.168.13.3, 00:19:15, FastEthernet1/1

192.168.39.0/32 is subnetted, 1 subnets

O        192.168.39.1 [110/1] via 192.168.13.3, 00:19:15, FastEthernet1/1

R1#sh ipv6 route ospf

IPv6 Routing Table - default - 27 entries

O   2001:192:168:3::/64 [110/2]                via FE80::3, FastEthernet1/1

O   2001:192:168:4::/64 [110/2]                via FE80::4, FastEthernet1/0

O   2001:192:168:20::/64 [110/65]           via FE80::2, Serial3/3

O   2001:192:168:21::/64 [110/65]           via FE80::2, Serial3/3

O   2001:192:168:22::/64 [110/65]            via FE80::2, Serial3/3

O   2001:192:168:23::/64 [110/65]           via FE80::2, Serial3/3

O   2001:192:168:32::/64 [110/2]              via FE80::3, FastEthernet1/1

O   2001:192:168:33::/64 [110/2]              via FE80::3, FastEthernet1/1

O   2001:192:168:34::/64 [110/2]              via FE80::3, FastEthernet1/1

O   2001:192:168:35::/64 [110/2]             via FE80::3, FastEthernet1/1

O   2001:192:168:36::/64 [110/2]             via FE80::3, FastEthernet1/1

O   2001:192:168:37::/64 [110/2]             via FE80::3, FastEthernet1/1

O   2001:192:168:38::/64 [110/2]             via FE80::3, FastEthernet1/1

O   2001:192:168:39::/64 [110/2]             via FE80::3, FastEthernet1/1

> ABR da summarization yapmak için :

ABR(config)#router ospfv3 1

ABR(config-router)#address-family ipv4 unicast

ABR(config-router-af)#area 2 range 192.168.20.0 255.255.252.0

ABR(config-router-af)#area 3 range 192.168.32.0  255.255.248.0

ABR(config-router-af)#exit

ABR(config-router)#address-family ipv6 unicast

ABR(config-router-af)#area 2 range 2001:192:168:20::/62

ABR(config-router-af)#area 3 range 2001:192:168:30::/60

> ASBR da summarization yapmak için :

ASBR(config)#router ospfv3 1

ASBR(config-router)#address-family ipv4 unicast

ASBR(config-router-af)#redistribute static

ASBR(config)#router ospfv3 1

ASBR(config-router)#address-family ipv4 unicast

ASBR(config-router-af)#summary-prefix 40.0.0.0 252.0.0.0

> Area 2 yi stub yapalım :

ABR(config)#router ospfv3 1

ABR(config-router)#address-family ipv4 unicast

ABR(config-router-af)#area 2 stub

R2(config)#router ospfv3 1

R2(config-router)#address-family ipv4 unicast

R2(config-router-af)#area 2 stub

> Area 2 yi totally stub yapalım :

ABR(config)#router ospfv3 1

ABR(config-router)#address-family ipv4 unicast

ABR(config-router-af)#area 2 stub no-summary