ip address 192.168.123.2 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
#Configuring OSPF routing protocol
router ospf 1
network 192.168.23.0 0.0.0.255 area 0
network 192.168.123.0 0.0.0.255 area 0
Configuration of Device C:
#Configuring Ethernet interface
interface FastEthernet 0/0
ip address 192.168.23.3 255.255.255.0
#Configure the WAN port
interface Serial 1/0
ip address 192.168.123.3 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
#Configuring OSPF routing protocol
router ospf 1
network 192.168.23.0 0.0.0.255 area 0
network 192.168.123.0 0.0.0.255 area 0
The above configuration has another assumption:
From device A to the 192.168.23.0/24 target network, router B is the first choice. To achieve
preferred routing, you must set the cost of the neighbor when you configure the neighbor.
The following commands can be configured in the device A:
router ospf 1
neighbor 192.168.123.2 cost 100
neighbor 192.168.123.3 cost 200
28.4.3 Example of configuring OSPF
authentication
Configuration requirements:
Two devices are connected via the Ethernet and run the OSPF routing protocol, with the
MD5 authentication used. The connection diagram among devices and the assignment of IP
addresses are shown as in Figure 28-3.