LAB

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.


Last updated