OSPF Configuration on Cisco, Juniper, Alcatel-Lucent Routers

This post demonstrates how to configure OSPF and redistribute connected and static routes into OSPF on Cisco, Juniper and Nokia (Alcatel-Lucent) routers

 

Cisco Configuration:

 

interface GigabitEthernet3/2/0

 description ***Connected to Juniper***

ip address 172.31.22.22 255.255.255.252

 load-interval 30

 negotiation auto

 mpls ip

end

 

router ospf 100

 router-id 100.64.0.5

 redistribute static subnets

 redistribute connected subnets

network 172.31.22.20 0.0.0.3 area 0

 

 

Verification:

Cisco-RTR #sh ip ospf neighbor                    

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

100.64.0.3        0   FULL/  -        00:00:32    172.31.22.21    GigabitEthernet3/2/0

 

Configuration on Juniper:

 

Interface configuration:

 

set interfaces ge-3/2/1 unit 0 family inet address 172.31.22.21/30

 

OSPF Configuration:

set protocols ospf export Redistribute-static-direct

set protocols ospf area 0 interface ge-3/2/1.0

 

juniper-rtr> show configuration policy-options policy-statement Redistribute-static-direct

term 1 {

    from {

        protocol direct;     

    }

    then accept;

}

term 2 {

    from {

        protocol static;

    }

    then accept;

}

 

Verification:

Juniper-rtr > show ospf neighbor                                                   

Address          Interface              State     ID               Pri  Dead

172.31.22.22     ge-3/2/1.0             Full      100.64.0.5         1    36

 

Configuration on Alcatel SR routers:

 

Interface Configuration :

 

ALU-RTR # configure router interface "GE_2/2/17"

ALU-RTR >config>router>if# address 172.31.23.89/30

ALU-RTR >config>router>if#port 2/2/17:0

ALU-RTR >config>router>if#no shutdown

 

Policy configuration to advertise connected and static routes:

 

ALU-RTR# configure router policy-options

ALU-RTR>config>router>policy-options# begin                      

*ALU-RTR>config>router>policy-options# policy-statement EXPORT_OSPF

*ALU-RTR>config>router>policy-options>policy-statement$ entry 10

*ALU-RTR>config>router>policy-options>policy-statement>entry$ from protocol direct

*ALU-RTR>config>router>policy-options>policy-statement>entry$ action accept

*ALU-RTR>config>router>policy-options>policy-statement>entry>action$ exit         

*ALU-RTR>config>router>policy-options>policy-statement>entry$ exit

*ALU-RTR>config>router>policy-options>policy-statement$ entry 20

*ALU-RTR>config>router>policy-options>policy-statement>entry$ from protocol static

*ALU-RTR>config>router>policy-options>policy-statement>entry$ action accept

*ALU-RTR>config>router>policy-options>policy-statement>entry>action$ exit

*ALU-RTR>config>router>policy-options>policy-statement>entry$ exit

*ALU-RTR>config>router>policy-options>policy-statement$ default-action reject

*ALU-RTR>config>router>policy-options>policy-statement$ exit

*ALU-RTR>config>router>policy-options# commit

 

OSPF Configuration:

 

ALU-RTR# configure router ospf

ALU-RTR >config>router>ospf# export "EXPORT_OSPF"

ALU-RTR >config>router>ospf#  area 0.0.0.0

ALU-RTR > config>router>ospf>area# interface "TOCISCO"

ALU-RTR > config>router>ospf>area>if$no shutdown

 

Verification:

ALU-RTR# show router ospf neighbor

 

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

OSPFv2 (0) all neighbors

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

Interface-Name                   Rtr Id          State      Pri  RetxQ   TTL

   Area-Id

-------------------------------------------------------------------------------

GE_2/2/17                        100.64.0.23     Full       1    0       36

   0.0.0.0

-------------------------------------------------------------------------------

No. of Neighbors: 1

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

ALU-RTR#