Halaman

ROUTING OSPF (Open Shortest Path First)

            OSPF (Open Shortest Path First) mak protokolu routing hodi hatudu maneira hanesan atu enkamina tráfiku iha rede. Ida-ne'e uza algoritmu Dijkstra atu hatene kaminu boot liu ba tráfiku entre router sira iha rede. OSPF popularmente uza iha ambiente boot komplesu no grande, hanesan iha korporasaun sira, ISP (Internet Service Providers), no operadora telekomunikasaun.

Nune'e, hau sei hatudu prosesu konfigurasaun OSPF ho tetun:

  1. Ensinia OSPF iha Interface ba rede lokal:

    • Loke iha modo konfigurasaun router.
    • Ensinia OSPF iha interface sira ne'ebé konektadu ba rede lokal.
    • Uza komandu "router ospf [process ID]" atu ativa OSPF hodi define process ID ida. Process ID bele mak ita nia id iha router ida.
    • Define area OSPF ba kada interface, ho komandu "network [network address] [wildcard mask] area [area ID]". Ne'e sei hatudu OSPF network ida ho area ID ne'ebé asosia ho interface ne'ebé identifika hanesan pertense ba área ida iha OSPF.

  2. Define OSPF Router ID:

    • Identifika router ne'ebé iha OSPF process ho OSPF Router ID (ID router nian).
    • Komandu "router-id [Router ID]" bele ativa router ID.

  3. Konsidera Hierarkia OSPF:

    • Define hanesan iha OSPF neighbor routers nia relasaun iha hierarkia ida, inklui Designated Router (DR) no Backup Designated Router (BDR) iha broadcast network.
    • Iha broadcast network, router ho boot priority boot liu sei asume papel hanesan DR. Iha komandu "ip ospf priority" atu define boot priority ida ba router ne'ebé sei asume papel hanesan DR.
    • Iha non-broadcast network, presiza hatene iha manualmente define DR no BDR.

  4. Monitorizasaun OSPF:

    • Hatene kona-ba OSPF neighbor routers nia estadu uza komandu "show ip ospf neighbor".
    • Monitoriza topolojia rede uza komandu "show ip ospf topology".

  5. Seguransa OSPF:

    • Uza autentikasaun OSPF atu asegura katak komunikasaun OSPF seguru. Hanesan, autentikasaun kriptografika uza MD5.
    • Define autentikasaun OSPF ho komandu "ip ospf authentication".

        Hau espera ke informasaun ne'e ajuda ita atu hatudu prosesu konfigurasaun OSPF boot importante tebes iha redes boot no grande hodi hatene maneira hanesan atu enkamina tráfiku ho efikas no seguru.


Ref.
http://searchenterprisewan.techtarget.com/definition/OSPF

Topologia Routing OSPF

 Konfiurasaun nebé ita halo iha router mak hanesan tuir mai né :
===============================================
# R1
hostname R1
!
!
ip cef
no ipv6 cef
!

spanning-tree mode pvst
!
interface FastEthernet0/0
 ip address 192.168.20.254 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial0/0/0
 ip address 10.10.10.1 255.255.255.252
 clock rate 2000000
!
interface Serial0/1/0
 ip address 40.40.40.1 255.255.255.252
 clock rate 2000000
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 10
 log-adjacency-changes
 network 10.10.10.0 0.0.0.3 area 0
 network 40.40.40.0 0.0.0.3 area 0
 network 192.168.20.0 0.0.0.255 area 0
!
ip classless
!
ip flow-export version 9
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

koko teste


R1#sh ip ospf neighbor


Neighbor ID Pri State Dead Time Address Interface
192.168.10.254 0 FULL/ - 00:00:31 10.10.10.2 Serial0/0/0
192.168.40.254 0 FULL/ - 00:00:34 40.40.40.2 Serial0/1/0
R1#

======================================
 Konfigurasaun iha R2
======================================
hostname R2
!
ip cef
no ipv6 cef
!
spanning-tree mode pvst
!
interface FastEthernet0/0
 ip address 192.168.10.254 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial0/0/0
 ip address 10.10.10.2 255.255.255.252
!
interface Serial0/1/0
 ip address 30.30.30.1 255.255.255.252
 clock rate 2000000
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 10
 log-adjacency-changes
 network 10.10.10.0 0.0.0.3 area 0
 network 30.30.30.0 0.0.0.3 area 0
 network 192.168.10.0 0.0.0.255 area 0
!
ip classless
!
ip flow-export version 9
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

koko teste
R2#sh ip ospf neighbor


Neighbor ID Pri State Dead Time Address Interface
192.168.20.254 0 FULL/ - 00:00:33 10.10.10.1 Serial0/0/0
192.168.30.254 0 FULL/ - 00:00:34 30.30.30.2 Serial0/1/0

=====================================
 Konfigurasaun iha R3
=====================================
 hostname R3
!
!
ip cef
no ipv6 cef
!

spanning-tree mode pvst
!
!
interface FastEthernet0/0
 ip address 192.168.40.254 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial0/0/0
 ip address 40.40.40.2 255.255.255.252
!
interface Serial0/1/0
 ip address 20.20.20.2 255.255.255.252
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 10
 log-adjacency-changes
 network 20.20.20.0 0.0.0.3 area 0
 network 40.40.40.0 0.0.0.3 area 0
 network 192.168.40.0 0.0.0.255 area 0
!
ip classless
!
ip flow-export version 9
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

 koko teste 

R3#sh ip ospf neighbor


Neighbor ID Pri State Dead Time Address Interface
192.168.20.254 0 FULL/ - 00:00:38 40.40.40.1 Serial0/0/0
192.168.30.254 0 FULL/ - 00:00:34 20.20.20.1 Serial0/1/0

========================================
konfigurasaun iha R4
========================================
hostname R4
!
ip cef
no ipv6 cef
!
!
spanning-tree mode pvst
!
interface FastEthernet0/0
 ip address 192.168.30.254 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial0/0/0
 ip address 30.30.30.2 255.255.255.252
!
interface Serial0/1/0
 ip address 20.20.20.1 255.255.255.252
 clock rate 2000000
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 10
 log-adjacency-changes
 network 20.20.20.0 0.0.0.3 area 0
 network 30.30.30.0 0.0.0.3 area 0
 network 192.168.30.0 0.0.0.255 area 0
!
ip classless
!
ip flow-export version 9
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
end

koko teste
R4#sh ip ospf neighbor


Neighbor ID Pri State Dead Time Address Interface
192.168.10.254 0 FULL/ - 00:00:38 30.30.30.1 Serial0/0/0
192.168.40.254 0 FULL/ - 00:00:35 20.20.20.2 Serial0/1/0

=========================================

koko teste ping 
ex:ping husi pc0 ba ip 30.30.30.1


ex1; ping husi pc1 ba ip192.168.10.254



keta haluha teste ping husi router ida ba router seluk e teste ping husi pc0 ba router hotu.

obrigado.