C H A P T E R 16 |
Configuring Open Shortest Path First (OSPF) |
This chapter describes how to configure OSPF.
This chapter contains the following topics:
Larger networks typically use Open Shortest Path First (OSPF) instead of RIP. To the administrator of a large and/or complex network, OSPF offers several benefits:
The top level of the hierarchy of an OSPF network is known as an autonomous system (AS) or routing domain, and is a collection of networks with a common administration and routing strategy. The AS is divided into areas: intra-area routing is used when a source and destination address are in the same area, and inter-area routing across an OSPF backbone is used when they are not. An inter-area router communicates with border routers in each of the areas to which it provides connectivity.
The Sun Netra CP3240 switch operating as a router and running OSPF will determine the best route using the assigned cost and the type of the OSPF route. The order for choosing a route if more than one type of route exists is as follows:
Note - External Type 1 is a route that is external to the AS. External Type 2 is a route that was learned from other protocols such as RIP. |
The examples in this section show you how to configure Sun Netra CP3240 switch, first as an inter-area router, and then as a border router. They show two areas, each with its own border router connected to one inter-area router.
The first diagram shows a network segment with an inter-area router connecting areas 0.0.0.2 and 0.0.0.3. The example script shows the commands used to configure a Sun Netra CP3240 switch as the inter-area router in the diagram by enabling OSPF on port 0/2 in area 0.0.0.2 and port 0/3 in area 0.0.0.3.
FIGURE 16-1 SPF Example Network Diagram: Inter-area Router
The following command sequence enables ip routing for the switch.
The following sequence enables routing and assigns IP addresses for ports 0/2 and 0/3:
config interface 0/2 routing ip address 192.150.2.1 255.255.255.0 exit interface 0/3 routing ip address 192.150.3.1 255.255.255.0 exit exit |
The following sequence specifies the router ID and enables OSPF for the switch. Disable 1583 compatibility to prevent the routing loop.
Config router ospf enable router-id 192.150.9.9 no 1583compatibility exit exit |
The following sequence enables OSPF and sets the OSPF priority and cost for the ports.
The next diagram shows the same network segment with the Sun Netra CP3240 switch operating as the border router in area 0.0.0.2. The example script shows the commands used to configure the switch with OSPF enabled on port 1/0/2 for communication with the inter-area router in the OSPF backbone, and on ports 1/0/3 and 1/0/4 for communication with subnets within area 0.0.0.2.
FIGURE 16-2 OSPF Example Network Diagram: Border Router
Disable 1583 compatibility to prevent a routing loop.
config router ospf enable router-id 192.130.1.1 no 1583compatibility exit exit |
Enable OSPF for the ports and set the OSPF priority and cost for the ports.
Similar configurations as described in the previous CLI sections can be performed using the Web interface.
Use the following screens to perform an inter-area router configuration using the Web interface:
Use the following screens to perform the same configuration using the Graphical User Interface:
© 2007 Diversified Technology, Inc. All Rights Reserved. © 2009 Sun Microsystems, Inc. All rights reserved.