2

I created little network and set up OSPF protocol. When I took away one ethernet cable I was hoping to see change in routing table...

But what happened was that the router only showed directly connected networks and none of the OSPF.

Just a note: It still had other routers connected to it. All I removed was one cable out of the network.enter image description here

This is R0 routing table when everything is connected.

     192.168.1.0/29 is subnetted, 1 subnets
C       192.168.1.0 is directly connected, FastEthernet0/1
     192.168.2.0/29 is subnetted, 1 subnets
C       192.168.2.0 is directly connected, FastEthernet0/0
     192.168.3.0/29 is subnetted, 1 subnets
O       192.168.3.0 [110/2] via 192.168.1.2, 00:00:49, FastEthernet0/1
     192.168.4.0/29 is subnetted, 1 subnets
O       192.168.4.0 [110/2] via 192.168.2.2, 00:00:49, FastEthernet0/0

This s R0 routing table when I disconnect R1 and R0 (All the ospf networks dissapear)

     192.168.1.0/29 is subnetted, 1 subnets
C       192.168.1.0 is directly connected, FastEthernet0/1

The question is why is it happening. Shouldn't it stay the same except for the one that is disconnected?

R0
Router(config)#router ospf 1
Router(config-router)#network 192.168.1.0 0.0.0.7 area 0
Router(config-router)#network 192.168.2.0 0.0.0.7 area 0

R1
Router(config)#router ospf 1
Router(config-router)#network 192.168.2.0 0.0.0.7 area 0
Router(config-router)#network 192.168.4.0 0.0.0.7 area 0

R2
Router(config)#router ospf 1
Router(config-router)#network 192.168.4.0 0.0.0.7 area 0
Router(config-router)#network 192.168.3.0 0.0.0.7 area 0

R3
Router(config)#router ospf 1
Router(config-router)#network 192.168.3.0 0.0.0.7 area 0
Router(config-router)#network 192.168.1.0 0.0.0.7 area 0

R0

Router#show run
Building configuration...

Current configuration : 692 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
ip cef
no ipv6 cef
!
spanning-tree mode pvst
!
interface FastEthernet0/0
 ip address 192.168.2.1 255.255.255.248
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.1.1 255.255.255.248
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 1
 log-adjacency-changes
 network 192.168.1.0 0.0.0.7 area 0
 network 192.168.2.0 0.0.0.7 area 0
!
ip classless
!
ip flow-export version 9

line con 0
!
line aux 0
!
line vty 0 4
 login
end

R1

Router#show run
Building configuration...

Current configuration : 692 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 192.168.2.2 255.255.255.248
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.4.1 255.255.255.248
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 1
 log-adjacency-changes
 network 192.168.2.0 0.0.0.7 area 0
 network 192.168.4.0 0.0.0.7 area 0
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

R2

Router#sh run
Building configuration...

Current configuration : 692 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 192.168.3.2 255.255.255.248
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.4.2 255.255.255.248
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 1
 log-adjacency-changes
 network 192.168.4.0 0.0.0.7 area 0
 network 192.168.3.0 0.0.0.7 area 0
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

R3

Router#sh run
Building configuration...

Current configuration : 692 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 192.168.3.1 255.255.255.248
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.1.2 255.255.255.248
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 1
 log-adjacency-changes
 network 192.168.3.0 0.0.0.7 area 0
 network 192.168.1.0 0.0.0.7 area 0
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end
8
  • Do you have a question? If you need help, you are going to need to edit your question to include a lot more detail: at the very least, a diagram of how the devices are connected, the device configurations, and any relevant information such as logs, error messages, what you have done to test, and the results of the tests.
    – Ron Maupin
    Commented Jan 25, 2017 at 20:47
  • I edited the question, I cannot post more than 2 images when I have this low reputation so I wrote the last Routing table it is just one line.
    – Daniel
    Commented Jan 25, 2017 at 21:00
  • Please, do not use images for text. Copy and paste the text, then use the Preformatted Text feature ({}).
    – Ron Maupin
    Commented Jan 25, 2017 at 21:07
  • Edited again. Do you have any idea why this could be happening?
    – Daniel
    Commented Jan 25, 2017 at 21:21
  • You haven't included all the configurations. We can't simply guess or speculate because that would be off-topic here.
    – Ron Maupin
    Commented Jan 25, 2017 at 21:31

1 Answer 1

3

The problem you see is caused by the lack of a stable router ID.

OSPF requires a router ID to identify itself in routing updates. If you don't manually specify the router ID, the router will use the highest loopback address as the router ID. Since you haven't created a loopback interface, the router chooses the highest interface address as the router ID.

When you unplug a cable, the IP address on that interface is no longer valid (because the interface is down). So the OSPF process stops running. That's why you don't see any OSPF routes.

Good practice is to manually create a router ID:

router ospf 1
router-id 1.1.1.1

Note that although the router ID is written in dotted decimal like an IP address, it is not an address -- it's just a number. Pick any unique number you like.

Alternatively, you can create a loopback interface. The router will use this address as the router ID. Since it's a virtual interface, it never goes down.

interface Loopback 0
ip address 1.1.1.1 255.255.255.255
1
  • Great answer, I only have access to PT at home, please excuse my late reaction.
    – Daniel
    Commented Jan 27, 2017 at 18:35

Your Answer

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

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