1

What configuration do I need to connect ospf configure router to the other one which has a static route?

router 1 config:

hostname ISP
int g0/0
  ip add 210.1.1.1 255.255.255.224
  no shut
int s0/0/1
  ip add 172.20.0.222 255.255.255.252
  no shut
ip route 172.20.0.128 255.255.255.224 s0/0/1
ip route 0.0.0.0 0.0.0.0 s0/0/1

Router 0 config:

hostname R2
int g0/0
  ip add 172.20.0.129 255.255.255.224
  no shut
int s0/0/1
  ip add 172.20.0.221 255.255.255.252
  no shut
int s0/0/0
  ip add 172.20.0.218 255.255.255.252 
  no shut
router ospf 1
router-id 2.2.2.2
network 172.20.0.128 0.0.0.31 area 0
network 172.20.0.220 0.0.0.3 area 0
passive-interface g0/0

Topology

2
  • What's your goal you run OSPF on router without any neighbor (alone), no relationship is up.
    – Bacara
    Dec 3, 2015 at 17:59
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide your own answer and accept it.
    – Ron Maupin
    Aug 7, 2017 at 15:30

2 Answers 2

3

You either use static routes all around, which doesn't scale and needs manual intervention when routes change, or you use a dynamic routing protocol, like OSPF, which can adapt to changing conditions.

A routing protocol like OSPF must be run on all the routers. Running it on only one router doesn't do anything since it is designed to exchange information with other routers running the same routing protocol.

Router don't need a routing protocol to have a routing table, they need a routing protocol to share routes. That doesn't happen unless they are all running the routing protocol.

2

I don't know if you understand why you need OSPF? You need OSPF on both of the routers and you need to advertise the networks connected to the respective routers for OSPF to work. What you want on Router 1 is:

router ospf 1
router-id 1.1.1.1
network 172.20.0.222 0.0.0.3 area 0
network 210.1.1.0 0.0.0.31 area 0
passive interface g0/0

I can see that there's some problems with your ip-addresses, you should correct those or ospf wont work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.