LAB
Last updated
Last updated
R5(config)#int fa0/0
R5(config-if)#ip add 15.0.0.5 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#int lo1
R5(config-if)#ip add 5.0.0.5 255.255.255.0
R1#sh ip int brief | exc unassign
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 15.0.0.1 YES manual up up
FastEthernet2/0 13.0.0.1 YES manual up up
Serial5/0 12.0.0.1 YES manual up up
R1#
R2#sh ip int brief | exc unassign
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 23.0.0.2 YES manual up up
FastEthernet2/0 24.0.0.2 YES manual up up
Serial5/1 12.0.0.2 YES manual up up
R3#sh ip int brief | exc unassign
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 13.0.0.3 YES manual up up
FastEthernet2/0 23.0.0.3 YES manual up up
R4#sh ip int brief | exc unassing
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 24.0.0.4 YES manual up up
FastEthernet2/0 46.0.0.4 YES manual up up
R6#sh ip int brief | exc unassign
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 46.0.0.6 YES manual up up
Loopback1 6.0.0.6 YES manual up up
OSPF KONFiGURASYONU
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 12.0.0.0 0.0.0.255 area 0
R1(config-router)#network 13.0.0.0 0.0.0.255 area 0
R1(config-router)#network 15.0.0.0 0.0.0.255 area 2
R1#sh run | sec ospf
router ospf 1
router-id 1.1.1.1
network 12.0.0.0 0.0.0.255 area 0
network 13.0.0.0 0.0.0.255 area 0
network 15.0.0.0 0.0.0.255 area 2
R1#
R3#sh run | sec ospf
router ospf 1
router-id 3.3.3.3
network 13.0.0.0 0.0.0.255 area 0
network 23.0.0.0 0.0.0.255 area 0
R3#
R2#sh run | sec ospf
router ospf 1
router-id 2.2.2.2
network 12.0.0.0 0.0.0.255 area 0
network 23.0.0.0 0.0.0.255 area 0
network 24.0.0.0 0.0.0.255 area 1
R4#sh run | sec ospf
router ospf 1
network 24.0.0.0 0.0.0.255 area 1
network 46.0.0.0 0.0.0.255 area 1
R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
% OSPF: Reload or use "clear ip ospf process" command, for this to take effect
R4#clear ip ospf process
Reset ALL OSPF processes? [no]:
R4#sh run | sec ospf
router ospf 1
router-id 4.4.4.4
network 24.0.0.0 0.0.0.255 area 1
network 46.0.0.0 0.0.0.255 area 1
R4#
R6#sh run | sec ospf
router ospf 1
router-id 6.6.6.6
network 46.0.0.0 0.0.0.255 area 3
network 6.0.0.0 0.0.0.255 area 3
R6#
R5#sh run | sec ospf
router ospf 1
router-id 5.5.5.5
network 15.0.0.0 0.0.0.255 area 2
network 5.0.0.0 0.0.0.255 area 2
R5#sh ip route | inc O
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
O IA 12.0.0.0 [110/65] via 15.0.0.1, 00:00:16, FastEthernet0/0
O IA 13.0.0.0 [110/2] via 15.0.0.1, 00:00:16, FastEthernet0/0
O IA 23.0.0.0 [110/3] via 15.0.0.1, 00:00:16, FastEthernet0/0
O IA 24.0.0.0 [110/4] via 15.0.0.1, 00:00:16, FastEthernet0/0
O IA 46.0.0.0 [110/5] via 15.0.0.1, 00:00:16, FastEthernet0/0
R6#sh ip route | begin Gateway
Gateway of last resort is not set
6.0.0.0/32 is subnetted, 1 subnets
C 6.0.0.6 is directly connected, Loopback1
46.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 46.0.0.0/24 is directly connected, FastEthernet0/0
L 46.0.0.6/32 is directly connected, FastEthernet0/0
R6#
R1#sh ip route | inc O
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
O 5.0.0.5 [110/2] via 15.0.0.5, 00:26:13, FastEthernet0/0
O 23.0.0.0 [110/2] via 13.0.0.3, 00:43:13, FastEthernet2/0
O IA 24.0.0.0 [110/3] via 13.0.0.3, 00:41:46, FastEthernet2/0
R1#
24 netowrkünü Area 1 den öğrenmesi gerekiyor. Öğrenmiş.
Cost değeri 2 çünkü bunlar fastethernet 100 mbps
Burada 46 yı öğrenmemesi gerekiyor. çünkü 46 doğrudan area 0'a bağlı değil.
R2#sh ip route | inc O | begin Gateway
O IA 5.0.0.5 [110/4] via 23.0.0.3, 00:30:13, FastEthernet0/0
O 13.0.0.0 [110/2] via 23.0.0.3, 00:45:58, FastEthernet0/0
O IA 15.0.0.0 [110/3] via 23.0.0.3, 00:45:58, FastEthernet0/0
R2#sh ip route |begin Gateway
Gateway of last resort is not set
5.0.0.0/32 is subnetted, 1 subnets
O IA 5.0.0.5 [110/4] via 23.0.0.3, 00:30:20, FastEthernet0/0
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 12.0.0.0/24 is directly connected, Serial5/1
L 12.0.0.2/32 is directly connected, Serial5/1
13.0.0.0/24 is subnetted, 1 subnets
O 13.0.0.0 [110/2] via 23.0.0.3, 00:46:05, FastEthernet0/0
15.0.0.0/24 is subnetted, 1 subnets
O IA 15.0.0.0 [110/3] via 23.0.0.3, 00:46:05, FastEthernet0/0
23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
// Loopback interfaceyi /32 olarak öğrenmiş gördüğünüz gibi.
Ospf varsayılanda onun ucunda bir şey olmadığını biliyor tek ip adresli bir network
olduğunu biliyor. /32 olarak göstertiyor. Network type değiştirirseniz örnek olarka
point to point yaparsanız düzelir.
R2#tclsh
R2(tcl)#foreach address {
+>(tcl)#15.0.0.5
+>(tcl)#5.0.0.5
+>(tcl)#46.0.0.6} { ping $address
+>(tcl)#}
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 15.0.0.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/50/60 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.0.0.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/53/84 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 46.0.0.6, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R2(tcl)#exit
R5(config)#int lo1
R5(config-if)#ip ospf network point-to-point
R5(config-if)#exit
R5#sh
*Aug 16 09:23:50.663: %SYS-5-CONFIG_I: Configured from console by console
R5#sh ip route
5.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 5.0.0.0/24 is directly connected, Loopback1
L 5.0.0.5/32 is directly connected, Loopback1
R3 routerında dışarı bir anons yaptıralım. Yani dışarı doğru bir static rota
çakalım ve ordan redistribute ettirelim. Bir external rotamız da olsun.
Bir stub area yapıp onu filterelenip filterelenmediğine bakalım.
R3(config)#int lo1
R3(config-if)#ip ad d
*Aug 16 09:29:41.731: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
R3(config-if)#ip add 3.0.0.3 255.255.255.0
R3(config-if)#exit
R3(config)#ip route 80.0.0.0 255.255.255.0 lo1
// Kullanmadığımız bir network uydurduk. 80 networküne gitmek istiyorsan,
loopback 1'e yolla.
R3# sh ip route | inc S
80.0.0.0/24 is subnetted, 1 subnets
S 80.0.0.0 is directly connected, Loopback1
R3(config)#router ospf 1
R3(config-router)#redistribute static subnets
Statik rotamızı yazdık. Redistribute static subnets diye girdik. R1 routerına öğret-
miş mi diye bakalım.
R1#sh ip route | begin 80
80.0.0.0/24 is subnetted, 1 subnets
O E2 80.0.0.0 [110/20] via 13.0.0.3, 00:01:51, FastEthernet2/0
R1#
// external 2 olarak öğretmiş. Burada type 2 olarak öğretti. Metriği 20 oluyor ve
güzargah boyunca aynı kalıyor.
Burada bir stub işlemi yapalım. ve bu rotanın öğretilmediğini gözlemlemeye çalışalım.
R5#sh ip route | begin 80
80.0.0.0/24 is subnetted, 1 subnets
O E2 80.0.0.0 [110/20] via 15.0.0.1, 00:03:53, FastEthernet0/0
R5#
Burada R5i stub yapalım. Area 2yi .
Buradaki border routerımız yani patron R1 oldu :)
R1(config)#router ospf 1
R1(config-router)#area 2 stub
*Aug 16 09:39:11.195: %OSPF-5-ADJCHG: Process 1, Nbr 5.5.5.5 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
R1(config-router)#
// Bunu yapınca R5 de yapmadığımız için komşuluk uçtu.
Bunun geri oturması için R5 in de stub olması gerekiyor.
R5#conf t
R5(config)#router ospf 1
R5(config-router)#area 2 stub
R5(config-router)#
*Aug 16 09:43:59.495: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
Komşuluk geldi.
R1#sh ip route
5.0.0.0/24 is subnetted, 1 subnets
O 5.0.0.0 [110/2] via 15.0.0.5, 00:01:54, FastEthernet0/0
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 12.0.0.0/24 is directly connected, Serial5/0
L 12.0.0.1/32 is directly connected, Serial5/0
13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 13.0.0.0/24 is directly connected, FastEthernet2/0
L 13.0.0.1/32 is directly connected, FastEthernet2/0
15.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 15.0.0.0/24 is directly connected, FastEthernet0/0
L 15.0.0.1/32 is directly connected, FastEthernet0/0
23.0.0.0/24 is subnetted, 1 subnets
O 23.0.0.0 [110/2] via 13.0.0.3, 00:06:48, FastEthernet2/0
24.0.0.0/24 is subnetted, 1 subnets
O IA 24.0.0.0 [110/3] via 13.0.0.3, 00:06:48, FastEthernet2/0
80.0.0.0/24 is subnetted, 1 subnets
O E2 80.0.0.0 [110/20] via 13.0.0.3, 00:06:48, FastEthernet2/0
R1#
R5#sh ip route
O*IA 0.0.0.0/0 [110/2] via 15.0.0.1, 00:01:05, FastEthernet0/0
5.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 5.0.0.0/24 is directly connected, Loopback1
L 5.0.0.5/32 is directly connected, Loopback1
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.0.0.0 [110/65] via 15.0.0.1, 00:01:05, FastEthernet0/0
13.0.0.0/24 is subnetted, 1 subnets
O IA 13.0.0.0 [110/2] via 15.0.0.1, 00:01:05, FastEthernet0/0
15.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 15.0.0.0/24 is directly connected, FastEthernet0/0
L 15.0.0.5/32 is directly connected, FastEthernet0/0
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.0.0.0 [110/3] via 15.0.0.1, 00:01:05, FastEthernet0/0
24.0.0.0/24 is subnetted, 1 subnets
O IA 24.0.0.0 [110/4] via 15.0.0.1, 00:01:05, FastEthernet0/0
R5#
80 rotası gördüğünüz gibi uçtu ve bir tane satır geldi. Default rota.
Stub area'da type 3 ler geçer. Interarealar geçer. External'lar filterelenir.
Filtreleme de ise bir type 3 anonsu olarak default olarak bu arkadaşa öğretilri.
(O*IA 0.0.0.0/0 [110/2] via 15.0.0.1, 00:01:05, FastEthernet0/0)
Bu sayede bu arkadaş o networke ulaşma sanşı olur.
Bunu bir de totally stub'a çekelim. Yani Type 3'lerde uçsun.
Totaly stub konfigurasyonunda tek değişiklik border routerda yapılıyor.
R1(config)#router ospf 1
R1(config-router)#area 2 stub no-summary
// Komşuluk kopmaz. Stub mı stub. Sadece filterleme değişecek. R5 e gelelim routing
tablosuna.
R5# sh ip route
O*IA 0.0.0.0/0 [110/2] via 15.0.0.1, 00:01:20, FastEthernet0/0
5.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 5.0.0.0/24 is directly connected, Loopback1
L 5.0.0.5/32 is directly connected, Loopback1
15.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 15.0.0.0/24 is directly connected, FastEthernet0/0
L 15.0.0.5/32 is directly connected, FastEthernet0/0
R5#
// Gördüğünüz gibi sadece default rota kaldı ve aslında her yere gidebilir durumda.
R5#ping 24.0.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 24.0.0.4, timeout is 2 seconds:
!!!!!
R5#
//Ancak 46 networküne ulaşamıyoruz. Yani bu routing tablousunda default rota olsa
da gidemezsin.
R5#ping 46.0.0.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 46.0.0.6, timeout is 2 seconds:
UUUUU
Success rate is 0 percent (0/5)
R5#
//Unreachable gördüğünüz gibi.
R4#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/DR 00:00:33 24.0.0.2 FastEthernet0/0 0
6.0.0.6 1 FULL/BDR 00:00:38 46.0.0.6 FastEthernet2/0 0
R4#
Gördüğünüz gibi 4 numaralı routerın 6 ile komşuluğu var.
Yani Area hatası komşuluk kurmasını engellemiyor. Sadece ordan gelecek networklerin
öğrenmesini engelliyor.
R6 da bir loopback anonsu var. Bakalım 4 nolu routerda 6'yı öğrenmiş.
R4, area 3 ün bir parçası olduğu için aynı area içindeki tüm routerlar. Öğrenirler.
Ama R4 bunu alıp da R2ye öğretmemesi gerekiyor. Type 1 de O olarak yazar Type 3 de
ise IA olarak yazar. R2 nin routing tablosuna baktığınızda 6 networkü yok.
R4#sh ip route | sec 6
6.0.0.0/32 is subnetted, 1 subnets
O 6.0.0.6 [110/2] via 46.0.0.6, 01:00:17, FastEthernet2/0
O IA 12.0.0.0 [110/65] via 24.0.0.2, 01:31:31, FastEthernet0/0
46.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 46.0.0.0/24 is directly connected, FastEthernet2/0
L 46.0.0.4/32 is directly connected, FastEthernet2/0
Eğer Area 0'a bağlı değilseniz. Kendi areanıza üye olmayan hiçbir routera networklerini
zi öğretemezsiniz. R4, area 3'e üye olduğu için o öğrendi. İntrearea yani kendi areası
içinde olduğu için öğrendi. Ama gidip bunu R2 ye öğretemez çünkü Area0'a bağlı değil.
BU durumda yapılacak şey virtual link konfigurasyonu olacak.
Virtual link konfigurasyonunu Border routerlar arasında yapılır.
R4 areaya 1e bağlı durumda, Diyecekki Area1 bypass et.
Bu case'de karışık geliyor ama arada mesala bir router daha olsaydı. R7 gibi.
O zaman daha az karışık olurdu. R4 ile R2 arasında olur. Ama böyle birbirine komşu olup
bypass ettirme olunca kara karışıklığı oluyor.
Virtual link, de karşılıklı routerların Router id'leri ile yapılır.
Router idleri eğer oturmadıysa yanlış oturduysa sıkıntı çıkar.
R4 routerında bypass işlemi yaptıralım.
Area 1 sonra virtual link sonra karşıdaki routerın router-id'si.
Aynısını R2'de de yapacağız.
R2(config-router)#router ospf 1
R2(config-router)#area 1 virtual-link 4.4.4.4
R4(config-router)#router ospf 1
R4(config-router)#area 1 virtual-link 2.2.2.2
R2#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/DR 00:00:31 23.0.0.3 FastEthernet0/ 0
1.1.1.1 0 FULL/ - 00:00:30 12.0.0.1 Serial5/1
4.4.4.4 0 FULL/ - 00:00:13 24.0.0.4 OSPF_VL0
4.4.4.4 1 FULL/DR 00:00:37 24.0.0.4 FastEthernet2/ 0
Gördüğünüz gibi (OSPF_VL0) bir virtual link oluşturduğunu görüyoruz.
Virtual link de DR ve BDR seçimi olmaz. Buna bağlı olarak da artık rotaları alıyor
olmam lazım.
R3#sh ip route
3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 3.0.0.0/24 is directly connected, Loopback1
L 3.0.0.3/32 is directly connected, Loopback1
6.0.0.0/32 is subnetted, 1 subnets
O IA 6.0.0.6 [110/4] via 23.0.0.2, 00:07:46, FastEthernet2/0
12.0.0.0/24 is subnetted, 1 subnets
O 12.0.0.0 [110/65] via 23.0.0.2, 00:08:01, FastEthernet2/0
[110/65] via 13.0.0.1, 00:08:01, FastEthernet0/0
13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 13.0.0.0/24 is directly connected, FastEthernet0/0
L 13.0.0.3/32 is directly connected, FastEthernet0/0
15.0.0.0/24 is subnetted, 1 subnets
O IA 15.0.0.0 [110/2] via 13.0.0.1, 00:08:01, FastEthernet0/0
23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 23.0.0.0/24 is directly connected, FastEthernet2/0
L 23.0.0.3/32 is directly connected, FastEthernet2/0
24.0.0.0/24 is subnetted, 1 subnets
O IA 24.0.0.0 [110/2] via 23.0.0.2, 00:08:01, FastEthernet2/0
46.0.0.0/24 is subnetted, 1 subnets
O IA 46.0.0.0 [110/3] via 23.0.0.2, 00:07:46, FastEthernet2/0
80.0.0.0/24 is subnetted, 1 subnets
S 80.0.0.0 is directly connected, Loopback1
R3#
R6 routerını interarea olarak öğrenmiş.
R5# sh ip route
5.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 5.0.0.0/24 is directly connected, Loopback1
L 5.0.0.5/32 is directly connected, Loopback1
15.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 15.0.0.0/24 is directly connected, FastEthernet0/0
L 15.0.0.5/32 is directly connected, FastEthernet0/0
R5#
Totaly stub da anonslar gelmez.
R1#ping 6.0.0.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 6.0.0.6, timeout is 2 seconds:
!!!!!
R1#
R5 routerı,bir statik rota çakalım. Loopback var zaten.
90 networküne loopback 1 den gitsin dedik.
R5(config)#ip route 90.0.0.0 255.255.255.0 lo1
statik rotamiz eklendi şimdi anons yaptıralım.
R5(config)#router ospf 1
R5(config-router)#redistribute static subnets
R5#sh ip route
Gateway of last resort is not set
O*IA 0.0.0.0/0 [110/2] via 15.0.0.1, 00:00:05, FastEthernet0/0
5.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 5.0.0.0/24 is directly connected, Loopback1
L 5.0.0.5/32 is directly connected, Loopback1
6.0.0.0/32 is subnetted, 1 subnets
O IA 6.0.0.6 [110/6] via 15.0.0.1, 00:00:05, FastEthernet0/0
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.0.0.0 [110/65] via 15.0.0.1, 00:00:05, FastEthernet0/0
13.0.0.0/24 is subnetted, 1 subnets
O IA 13.0.0.0 [110/2] via 15.0.0.1, 00:00:05, FastEthernet0/0
15.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 15.0.0.0/24 is directly connected, FastEthernet0/0
L 15.0.0.5/32 is directly connected, FastEthernet0/0
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.0.0.0 [110/3] via 15.0.0.1, 00:00:05, FastEthernet0/0
24.0.0.0/24 is subnetted, 1 subnets
O IA 24.0.0.0 [110/4] via 15.0.0.1, 00:00:05, FastEthernet0/0
46.0.0.0/24 is subnetted, 1 subnets
O IA 46.0.0.0 [110/5] via 15.0.0.1, 00:00:05, FastEthernet0/0
90.0.0.0/24 is subnetted, 1 subnets
S 90.0.0.0 is directly connected, Loopback1
R1#sh ip route
6.0.0.0/32 is subnetted, 1 subnets
O IA 6.0.0.6 [110/5] via 13.0.0.3, 00:16:07, FastEthernet2/0
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 12.0.0.0/24 is directly connected, Serial5/0
L 12.0.0.1/32 is directly connected, Serial5/0
13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 13.0.0.0/24 is directly connected, FastEthernet2/0
L 13.0.0.1/32 is directly connected, FastEthernet2/0
15.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 15.0.0.0/24 is directly connected, FastEthernet0/0
L 15.0.0.1/32 is directly connected, FastEthernet0/0
23.0.0.0/24 is subnetted, 1 subnets
O 23.0.0.0 [110/2] via 13.0.0.3, 00:16:22, FastEthernet2/0
24.0.0.0/24 is subnetted, 1 subnets
O IA 24.0.0.0 [110/3] via 13.0.0.3, 00:16:22, FastEthernet2/0
46.0.0.0/24 is subnetted, 1 subnets
O IA 46.0.0.0 [110/4] via 13.0.0.3, 00:16:07, FastEthernet2/0
80.0.0.0/24 is subnetted, 1 subnets
O E2 80.0.0.0 [110/20] via 13.0.0.3, 00:16:22, FastEthernet2/0
R1#
R1'e baktığımızda 90 networkü yok.
Bunlar aynı area içinde peki neden öğretmiyor.Stub arealarda type 5 anonsu iletilmiyor.
Aynı areada bile olsa. Type 5 anonsu routerdan çıkmıyor.
O yüzden bunu R1 bile öğrenemiyor. Bunu öğretmek istiyorsan, Type 5 anonsunun buradan
içeriye aktarılmasını istiyorsan aynı zamanda stub kalmasını istiyorsan, tek çözüm var
NSSA'e geçmek.
R1 routerında
R1#sh run | sec ospf
router ospf 1
router-id 1.1.1.1
area 2 stub
network 12.0.0.0 0.0.0.255 area 0
network 13.0.0.0 0.0.0.255 area 0
network 15.0.0.0 0.0.0.255 area 2
R1#
R1(config)#router ospf 1
R1(config-router)#no area 2 stub
R1(config-router)#
*Aug 16 11:16:22.823: %OSPF-5-ADJCHG: Process 1, Nbr 5.5.5.5 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
Komşuluk kalktı R5 de de aynı şekilde yapalım.
R5(config)#router ospf 1
R5(config-router)#no area 2 stub no-summary
R1#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/DR 00:00:36 13.0.0.3 FastEthernet2/0
2.2.2.2 0 FULL/ - 00:00:36 12.0.0.2 Serial5/0
5.5.5.5 1 DOWN/DROTHER - 15.0.0.5 FastEthernet0/0
R5# sh ip route
5.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 5.0.0.0/24 is directly connected, Loopback1
L 5.0.0.5/32 is directly connected, Loopback1
15.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 15.0.0.0/24 is directly connected, FastEthernet0/0
L 15.0.0.5/32 is directly connected, FastEthernet0/0
90.0.0.0/24 is subnetted, 1 subnets
S 90.0.0.0 is directly connected, Loopback1
R5 90 networkünü artık öğrenmiş.
Bir taraf stub kalıp diğer taraf olmayınca komşuluk gider.
Şimdi bunları 90 networkünü öğretecek ama stub
R1(config)#router ospf 1
R1(config-router)#area 2 nssa
R1(config-router)#
*Aug 16 11:26:06.343: %OSPF-5-ADJCHG: Process 1, Nbr 5.5.5.5 on FastEthernet0/0 from DOWN to DOWN, Neighbor Down: Adjacency forced to reset
R1(config-router)#
aynı konfigurasyonunu diğer uçta da yapmak gerekiyor.
R5(config)#router ospf 1
R5(config-router)#area 2 nssa
R5(config-router)#
*Aug 16 11:27:26.591: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
R5#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/BDR 00:00:33 15.0.0.1 FastEthernet0/0
R1#sh ip route
5.0.0.0/24 is subnetted, 1 subnets
O 5.0.0.0 [110/2] via 15.0.0.5, 00:01:19, FastEthernet0/0
6.0.0.0/32 is subnetted, 1 subnets
O IA 6.0.0.6 [110/5] via 13.0.0.3, 00:02:54, FastEthernet2/0
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 12.0.0.0/24 is directly connected, Serial5/0
L 12.0.0.1/32 is directly connected, Serial5/0
13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 13.0.0.0/24 is directly connected, FastEthernet2/0
L 13.0.0.1/32 is directly connected, FastEthernet2/0
15.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 15.0.0.0/24 is directly connected, FastEthernet0/0
L 15.0.0.1/32 is directly connected, FastEthernet0/0
23.0.0.0/24 is subnetted, 1 subnets
O 23.0.0.0 [110/2] via 13.0.0.3, 00:02:54, FastEthernet2/0
24.0.0.0/24 is subnetted, 1 subnets
O IA 24.0.0.0 [110/3] via 13.0.0.3, 00:02:54, FastEthernet2/0
46.0.0.0/24 is subnetted, 1 subnets
O IA 46.0.0.0 [110/4] via 13.0.0.3, 00:02:54, FastEthernet2/0
80.0.0.0/24 is subnetted, 1 subnets
O E2 80.0.0.0 [110/20] via 13.0.0.3, 00:02:54, FastEthernet2/0
90.0.0.0/24 is subnetted, 1 subnets
O N2 90.0.0.0 [110/20] via 15.0.0.5, 00:01:19, FastEthernet0/0
90 networkü öğretildi. Defaultta redistribution type 2, bunu değiştirebiliriz.
R5#sh ip route
5.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 5.0.0.0/24 is directly connected, Loopback1
L 5.0.0.5/32 is directly connected, Loopback1
6.0.0.0/32 is subnetted, 1 subnets
O IA 6.0.0.6 [110/6] via 15.0.0.1, 00:02:53, FastEthernet0/0
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.0.0.0 [110/65] via 15.0.0.1, 00:02:53, FastEthernet0/0
13.0.0.0/24 is subnetted, 1 subnets
O IA 13.0.0.0 [110/2] via 15.0.0.1, 00:02:53, FastEthernet0/0
15.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 15.0.0.0/24 is directly connected, FastEthernet0/0
L 15.0.0.5/32 is directly connected, FastEthernet0/0
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.0.0.0 [110/3] via 15.0.0.1, 00:02:53, FastEthernet0/0
24.0.0.0/24 is subnetted, 1 subnets
O IA 24.0.0.0 [110/4] via 15.0.0.1, 00:02:53, FastEthernet0/0
46.0.0.0/24 is subnetted, 1 subnets
O IA 46.0.0.0 [110/5] via 15.0.0.1, 00:02:53, FastEthernet0/0
90.0.0.0/24 is subnetted, 1 subnets
S 90.0.0.0 is directly connected, Loopback1
R1 de bir external rota var 80 ve ama R5 de 80 yok.
80 networkü R3 ten enjecte etmiştim. 80'i R1 öğrenmiş ama R5 öğrenmemiş. Çünkü burası
Not so stubby area. Interarea (IA) rotalar duruyor çünkü Totaly yapmadım.
Default rota yok. çünkü NSSA 'da default rota öğretilmiyor. Öğretilmesini istiyorsanız
R1#sh run | sec ospf
router ospf 1
router-id 1.1.1.1
area 2 nssa
network 12.0.0.0 0.0.0.255 area 0
network 13.0.0.0 0.0.0.255 area 0
network 15.0.0.0 0.0.0.255 area 2
R1#
R1(config)#router ospf 1
R1(config-router)#area 2 nssa default-information-originate
Artık type 5 anonslarını filtreleme yapacak. Ama default rotayı öğretecek.
R5# sh ip route
O*N2 0.0.0.0/0 [110/1] via 15.0.0.1, 00:01:44, FastEthernet0/0
5.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 5.0.0.0/24 is directly connected, Loopback1
L 5.0.0.5/32 is directly connected, Loopback1
6.0.0.0/32 is subnetted, 1 subnets
O IA 6.0.0.6 [110/6] via 15.0.0.1, 00:08:05, FastEthernet0/0
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.0.0.0 [110/65] via 15.0.0.1, 00:08:05, FastEthernet0/0
13.0.0.0/24 is subnetted, 1 subnets
O IA 13.0.0.0 [110/2] via 15.0.0.1, 00:08:05, FastEthernet0/0
15.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 15.0.0.0/24 is directly connected, FastEthernet0/0
L 15.0.0.5/32 is directly connected, FastEthernet0/0
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.0.0.0 [110/3] via 15.0.0.1, 00:08:05, FastEthernet0/0
24.0.0.0/24 is subnetted, 1 subnets
O IA 24.0.0.0 [110/4] via 15.0.0.1, 00:08:05, FastEthernet0/0
46.0.0.0/24 is subnetted, 1 subnets
O IA 46.0.0.0 [110/5] via 15.0.0.1, 00:08:05, FastEthernet0/0
90.0.0.0/24 is subnetted, 1 subnets
S 90.0.0.0 is directly connected, Loopback1
R6#sh ip route
5.0.0.0/24 is subnetted, 1 subnets
O IA 5.0.0.0 [110/6] via 46.0.0.4, 00:09:08, FastEthernet0/0
6.0.0.0/32 is subnetted, 1 subnets
C 6.0.0.6 is directly connected, Loopback1
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.0.0.0 [110/66] via 46.0.0.4, 00:44:31, FastEthernet0/0
13.0.0.0/24 is subnetted, 1 subnets
O IA 13.0.0.0 [110/4] via 46.0.0.4, 00:44:31, FastEthernet0/0
15.0.0.0/24 is subnetted, 1 subnets
O IA 15.0.0.0 [110/5] via 46.0.0.4, 00:09:08, FastEthernet0/0
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.0.0.0 [110/3] via 46.0.0.4, 00:44:31, FastEthernet0/0
24.0.0.0/24 is subnetted, 1 subnets
O IA 24.0.0.0 [110/2] via 46.0.0.4, 00:44:36, FastEthernet0/0
46.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 46.0.0.0/24 is directly connected, FastEthernet0/0
L 46.0.0.6/32 is directly connected, FastEthernet0/0
80.0.0.0/24 is subnetted, 1 subnets
O E2 80.0.0.0 [110/20] via 46.0.0.4, 00:44:31, FastEthernet0/0
90.0.0.0/24 is subnetted, 1 subnets
O E2 90.0.0.0 [110/20] via 46.0.0.4, 00:09:07, FastEthernet0/0
R6#
R6 ne yapıyordu N rotalarını, N rotaları type 7 olarak aynı area içinde dönüyordu.
Sonra type 5'e çevrilip taşıyordu. N rotaları gördüğünüz gibi E ye geri dönüştü
Çünkü border router. Type 7'yi Type 5'e çevirdi.
Type 7 o area içinde işini gördü, area içinde external rotalar taşındı. Sonra E2 de
devam etti.
Summarizatin yapalım.
Summarization border routerlarda gerçekleştirilebilir.
Başka bir routerda summarization yapma lüksünüz yok.
Summarizationu örnek olarak R4 üzerinden bir sürü loopback oluşturalım ve
burada R4 üzerinde summarization yapalım.
R4(config-if)#int lo0
R4(config-if)#ip add 40.0.0.4 255.255.255.0
R4(config-if)#int lo1
R4(config-if)#ip add 192.168.1.4 255.255.255.0
R4(config-if)#int lo2
R4(config-if)#ip add 192.168.2.4 255.255.255.0
R4(config-if)#int lo3
R4(config-if)#ip add 192.168.3.4 255.255.255.0
interface altında ospf anons edelim.
/24 leri birleştirelim o yüzden /32 yerine /24 yapalım.
R4(config-if)#int lo1
R4(config-if)#ip ospf network point-to-point
R4(config-if)#ip ospf 1 area 1
R4#sh run int lo1
Building configuration...
Current configuration : 115 bytes
!
interface Loopback1
ip address 192.168.1.4 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 1
end
R4#
R4(config)#int lo2
R4(config-if)#ip ospf network point-to-point
R4(config-if)#ip ospf 1 area 1
R4(config-if)#int lo3
R4(config-if)#ip ospf network point-to-point
R4(config-if)#ip ospf 1 area 1
R4(config-if)#
R4#sh ip protocol
*** IP Routing is NSF aware ***
Routing Protocol is "application"
Sending updates every 0 seconds
Invalid after 0 seconds, hold down 0, flushed after 0
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Maximum path: 32
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 4)
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 4.4.4.4
It is an area border router
Number of areas in this router is 3. 3 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
24.0.0.0 0.0.0.255 area 1
46.0.0.0 0.0.0.255 area 3
Routing on Interfaces Configured Explicitly (Area 1):
Loopback1
Loopback2
Loopback3
Routing Information Sources:
Gateway Distance Last Update
1.1.1.1 110 00:07:04
3.3.3.3 110 00:07:04
2.2.2.2 110 00:07:04
6.6.6.6 110 00:07:14
Distance: (default is 110)
R4#sh ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
VL0 1 0 24.0.0.4/24 1 P2P 1/1
Lo1 1 1 192.168.1.4/24 1 P2P 0/0
Lo2 1 1 192.168.2.4/24 1 P2P 0/0
Lo3 1 1 192.168.3.4/24 1 P2P 0/0
Fa0/0 1 1 24.0.0.4/24 1 DR 1/1
Fa2/0 1 3 46.0.0.4/24 1 BDR 1/1
R4#
R1#sh ip route | inc O
O 5.0.0.0 [110/2] via 15.0.0.5, 00:10:04, FastEthernet0/0
O IA 6.0.0.6 [110/5] via 13.0.0.3, 00:09:49, FastEthernet2/0
O 23.0.0.0 [110/2] via 13.0.0.3, 00:10:04, FastEthernet2/0
O IA 24.0.0.0 [110/3] via 13.0.0.3, 00:10:04, FastEthernet2/0
O IA 46.0.0.0 [110/4] via 13.0.0.3, 00:09:49, FastEthernet2/0
O E2 80.0.0.0 [110/20] via 13.0.0.3, 00:10:04, FastEthernet2/0
O N2 90.0.0.0 [110/20] via 15.0.0.5, 00:10:04, FastEthernet0/0
O IA 192.168.1.0/24 [110/4] via 13.0.0.3, 00:05:16, FastEthernet2/0
O IA 192.168.2.0/24 [110/4] via 13.0.0.3, 00:03:48, FastEthernet2/0
O IA 192.168.3.0/24 [110/4] via 13.0.0.3, 00:03:32, FastEthernet2/0
R1#
R1 routerında gördüğünüz gibi gelmiş.
Bunları summarization yaptıracağız.
Summarizationu Border routerda yani R2 de yaptıracağız.
R2 de area1 den networkleri alıp area 0'a gönderecek.
Defaultta advertise şeklinde öğretiyor. İstersek cost'da verebiliyoruz.
cost vermemizin nedeni ospf oradaki en düşük cost'la olanı özetleyip yolluyor.
Ancak en düşük cost'Lu olan link giderse, ondan sonraki en küçük sıradakini yapacak
yine de stabilite problemi ekstra getirecek. cost diyip 50 derseniz ne olursa olsun
50 olarak kalır.
R2(config)#router ospf 1
R2(config-router)#area 1 ?
authentication Enable authentication
capability Enable area specific capability
default-cost Set the summary default-cost of a NSSA/stub area
filter-list Filter networks between OSPF areas
nssa Specify a NSSA area
range Summarize routes matching address/mask (border routers only)
sham-link Define a sham link and its parameters
stub Specify a stub area
virtual-link Define a virtual link and its parameters
R2(config-router)#area 1 range 192.168.0.0 255.255.0.0 ?
advertise Advertise this range (default)
cost User specified metric for this range
not-advertise DoNotAdvertise this range
<cr>
R2(config-router)#area 1 range 192.168.0.0 255.255.0.0 cost 50
R1#sh ip route | inc O
O 5.0.0.0 [110/2] via 15.0.0.5, 00:16:35, FastEthernet0/0
O IA 6.0.0.6 [110/5] via 13.0.0.3, 00:16:20, FastEthernet2/0
O 23.0.0.0 [110/2] via 13.0.0.3, 00:16:35, FastEthernet2/0
O IA 24.0.0.0 [110/3] via 13.0.0.3, 00:16:35, FastEthernet2/0
O IA 46.0.0.0 [110/4] via 13.0.0.3, 00:16:20, FastEthernet2/0
O E2 80.0.0.0 [110/20] via 13.0.0.3, 00:16:35, FastEthernet2/0
O N2 90.0.0.0 [110/20] via 15.0.0.5, 00:16:35, FastEthernet0/0
O IA 192.168.0.0/16 [110/52] via 13.0.0.3, 00:01:16, FastEthernet2/0
O IA 192.168.1.0/24 [110/4] via 13.0.0.3, 00:11:47, FastEthernet2/0
O IA 192.168.2.0/24 [110/4] via 13.0.0.3, 00:10:19, FastEthernet2/0
O IA 192.168.3.0/24 [110/4] via 13.0.0.3, 00:10:03, FastEthernet2/0
Virtaul link olduğu için tam olarak summary yapmadı diğer loopbacklerde burada
gördüğünüz gibi gözükyür.
Virtual link kaldırıp tekrardan bakalım. R4 roturerı 2 ayrı zone 'dan anonsu R2 ye
çaktığı için ilk olarak direkt interface ile öğretiyor. İkincisi ise bir tüneli var.
Virtual linki var. Onunla öğretiyor.
Virtual link yapılan hem de summarization yapılan routerda bu şekilde sıkıntı çıkabiliyor.
Örnek olarak R5 de yapsaydık böyle bir şey ile karşılaşmayacaktık.
R2(config)#router ospf 1
R2(config-router)#no area 1 virtual-link 4.4.4.4
R2(config-router)#
R1#sh ip route | inc O
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
O 5.0.0.0 [110/2] via 15.0.0.5, 00:30:04, FastEthernet0/0
O 23.0.0.0 [110/2] via 13.0.0.3, 00:30:04, FastEthernet2/0
O IA 24.0.0.0 [110/3] via 13.0.0.3, 00:30:04, FastEthernet2/0
O E2 80.0.0.0 [110/20] via 13.0.0.3, 00:30:04, FastEthernet2/0
O N2 90.0.0.0 [110/20] via 15.0.0.5, 00:30:04, FastEthernet0/0
O IA 192.168.0.0/16 [110/52] via 13.0.0.3, 00:14:45, FastEthernet2/0
Gördüğünüz gibi /16 ile özetleme yaptı.
R4 üzerinde herhangi bir network çökse dahi R1 de hiçbir yaprak oynamaz.
R4(config-if)#int lo1
R4(config-if)#shutdown
yine özet tablosunda /16 şeklinde gözükür. Özet aralığında bir network olması
hiçbir şeyi etkilemez.
4(config-if)#int lo2
R4(config-if)#shutdown
R4(config-if)#int lo3
R4(config-if)#shutdown
192.168.1.0 lı networkllerin hepsin kapattım. Artık R1 de özetlenmiş şekilde gözükmeyecaktir.
Tekrar eski haline getirdik.
Null0 satırı özetleme yapılan routerda gözükür. R2 de özetleme yaptığımız için
burada görebiliriz.
R2#sh ip route | sec O
O IA 5.0.0.0 [110/4] via 23.0.0.3, 00:23:57, FastEthernet0/0
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O 13.0.0.0 [110/2] via 23.0.0.3, 00:23:57, FastEthernet0/0
15.0.0.0/24 is subnetted, 1 subnets
O IA 15.0.0.0 [110/3] via 23.0.0.3, 00:23:57, FastEthernet0/0
23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2 80.0.0.0 [110/20] via 23.0.0.3, 00:23:57, FastEthernet0/0
90.0.0.0/24 is subnetted, 1 subnets
O E2 90.0.0.0 [110/20] via 23.0.0.3, 00:23:57, FastEthernet0/0
O 192.168.0.0/16 is a summary, 00:00:20, Null0
O 192.168.2.0/24 [110/2] via 24.0.0.4, 00:00:10, FastEthernet2/0
O 192.168.3.0/24 [110/2] via 24.0.0.4, 00:00:20, FastEthernet2/0
R2 de niye /16 lı summarization yapıp /24'leri surpress etmemiş.
R2 de neden yok çünkü. Aynı area içinde özetleme yapamazsın. R2, R4 ile aynı
areada yani area 1 de . Yani type 1 anonsu alıyor. Type 1 anonsu için summarization
yapılamaz. Ancak başka area'ya geçilirken summarization yapılabilir.
Yani Routing tablosunda R2 burada aktif olan tüm 192'leri biliyor. Örneğin 192.168.2.0 a gidyorsa
onu yollar. 192.168.3.0 a gidiyorsa onu da yollar ama 192.168.5.0 a giderse onu
çöpe yani NUll0 a yollar.
Gerçekte olmayan bir networke giderse loop riskine girmesin diye onu çöpe atar.