OSPF

From StarOS Community Wiki

Jump to: navigation, search

OSPF stands for Open Shortest Path First. On StarOS, this is implemented through the use of the Quagga routing daemon. Essentially, the daemon runs on two routers and they use the broacast addresses to announce routes between routers. This is an excellent way to dynamically distribute routes across a complex routed network.

OSPF configuration uses a configuration prompt that works in a very similar manner to a Cisco router configuration. Once logged in, you have to use the “enable” command to get into a privileged mode which will allow for modification of the configuration. Each line in the configuration file is enabled by simply typing the command. Disabling interfaces or commands is accomplished by putting the word “no” in front of the command. When the configuration is comppleted, use the “write memory” command to copy the configuration to memory. If you do not write the config to memory, OSPF will not retain the configuration.

Here is an example of a simple OSPF configuration:

Current configuration:
!
hostname ospftest-ap
password yourpassword
!
!
!
interface eth0
!
interface wpci0
!
interface wpcm0
!
router ospf
  ospf router-id 10.1.1.1
  redistribute connected
  redistribute static
  network 10.0.0.0/8 area 0.0.0.0
!
access-list vtylist permit 127.0.0.1/32
access-list vtylist permit 10.0.0.0/8
access-list vtylist deny any
!
line vty
  access-class vtylist
!
end

Here are the commands that would be run to set this up:

hostname>en

hostname#conf t

hostname(config)#password yourpassword

hostname(config)#hostname ospftest-ap

ospftest-ap(config)#router ospf

ospftest-ap(config-router)#ospf router-id 10.1.1.1

ospftest-ap(config-router)#redistribute connected

ospftest-ap(config-router)#redistribute static

ospftest-ap(config-router)#network 10.0.0.0/8 area 0

ospftest-ap(config-router)#exit

ospftest-ap(config)#no access-list vtylist deny any

ospftest-ap(config)#access-list vtylist permit 10.0.0.0/8

ospftest-ap(config)#access-list vtylist deny any

ospftest-ap(config)#exit

ospftest-ap#write memory

ospftest-ap#show run

Common commands to use for troubleshooting OSPF include the “show ip ospf neighbor” and “show ip ospf routes” commands.

ospftest-ap# sh ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface           RXmtL RqstL DBsmL
10.0.1.7          1   Full/Backup     00:00:35    10.8.1.1        wpci0:10.8.1.2      0     0     0
10.8.3.2          1   Full/DR         00:00:34    10.8.3.2        wpcm0:10.8.3.1      0     0     0
ospftest-ap#

This shows all neighbors to an OSPF router. The “Full” designation indicates that routes are being exchanged between this router and the neighbor routers. If you see the “Init” state continuously, there may be a configuration issue on one of the routers.

The “show ip ospf routes” command will show all of the routes that this OSPF router has in its routing table.

Caveats:

– Certain via-rhine network cards will not broadcast network traffic, and have problems with the standard OSPF configuration. You will have to set up a unicast network broadcast to adjacent routers and vice versa if you are using these cards.

– The broadcast traffic for OSPF will go out using the first IP address configuration on an interface.

– OSPF traffic will not propagate between two different routers on a PTMP wireless connection with Intercell relay turned off

– OSPF is very sensitive to network timing changes. On StarOS it is encouraged to either leave the automatic time updates set to on or off – do not mix these settings, or it will cause OSPF problems.

This article requires reformatting. You can help the StarOS Community Wiki by cleaning it up with some wiki formatting, and possibly checking the grammar and spelling.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: