The following figure shows an OSPF sample network.
- Enable IP routing on the switch.
- Select Routing > IP > Basic > IP Configuration.
A screen similar to the following displays.

- For Routing Mode, select the Enable radio button.
- Click Apply to save the settings.
- Select Routing > IP > Basic > IP Configuration.
- Assign IP address 192.150.2.2 to port 1/0/2.
- Select Routing > IP > Advanced > IP Interface Configuration.
A screen similar to the following displays.

- Scroll down and select the interface 1/0/2 check box.
Now 1/0/2 appears in the Interface field at the top.
- Enter the following information:
- In the IP Address field, enter 192.150.2.2.
- In the Network Mask field, enter 255.255.255.0.
- In the Admin Mode field, select Enable.
- Click Apply to save the settings.
- Select Routing > IP > Advanced > IP Interface Configuration.
- Assign IP address 192.130.3.1 to port 1/0/3:
- Select Routing > IP > Advanced > IP Interface Configuration.
A screen similar to the following displays.

- Scroll down and select the interface 1/0/3 check box.
Now 1/0/3 appears in the Interface field at the top.
- Enter the following information:
- In the IP Address field, enter 192.130.3.1.
- In the Network Mask field, enter 255.255.255.0.
- In the Admin Mode field, select Enable.
- Click Apply to save the settings.
- Select Routing > IP > Advanced > IP Interface Configuration.
- Assign IP address 192.64.4.1 to port 1/0/4.
- Select Routing > IP > Advanced > IP Interface Configuration.
A screen similar to the following displays.

- Scroll down and select the interface 1/0/4 check box.
Now 1/0/4 appears in the Interface field at the top.
- Enter the following information:
- In the IP Address field, enter 192.64.4.1.
- In the Network Mask field, enter 255.255.255.0.
- In the Admin Mode field, select Enable.
- Click Apply to save the settings.
- Select Routing > IP > Advanced > IP Interface Configuration.
- Specify the router ID, and enable OSPF for the switch.
- Select Routing > OSPF > Advanced > OSPF Configuration.
A screen similar to the following displays.

- Under OSPF Configuration, enter the following information:
- In the Router ID field, enter 192.130.1.1.
- In the OSPF Admin Mode field, select Enable .
- In the RFC 1583 Compatibility field, select Disable.
- Click Apply to save the settings.
- Select Routing > OSPF > Advanced > OSPF Configuration.
- Enable OSPF on the port 1/0/2.
- Select Routing > OSPF > Advanced > Interface Configuration.
A screen similar to the following displays.

- Under Interface Configuration, scroll down and select the interface 1/0/2 check box.
Now 1/0/2 appears in the Interface field at the top.
- In the OSPF Area ID field, enter 0.0.0.2.
- In the OSPF Admin Mode field, select Enable.
- In the Router Priority (0 to 255) field, enter 128.
- In the Metric Cost field, enter 32.
- Click Apply to save the settings.
- Select Routing > OSPF > Advanced > Interface Configuration.
- Enable OSPF on port 1/0/3.
- Select Routing > OSPF > Advanced > Interface Configuration.
A screen similar to the following displays.

- Under Interface Configuration, scroll down and select the interface 1/0/3 check box.
Now 1/0/3 appears in the Interface field at the top.- In the OSPF Area ID field, enter 0.0.0.3.
- In the OSPF Admin Mode field, select Enable.
- In the Priority field, enter 255.
- In the Metric Cost field, enter 64.
- Click Apply to save the settings.
- Select Routing > OSPF > Advanced > Interface Configuration.
- Enable OSPF on port 1/0/4.
- Select Routing > OSPF > Advanced > Interface Configuration.
A screen similar to the following displays.

- Under Interface Configuration, scroll down and select the interface 1/0/4 check box.
Now 1/0/4 appears in the Interface field at the top.
- In the OSPF Area ID field, enter 0.0.0.2.
- In the OSPF Admin Mode field, select the Enable.
- In the Priority field, enter 255.
- In the Metric Cost field, enter 64.
- Click Apply to save the settings.
- Select Routing > OSPF > Advanced > Interface Configuration.
For more information, see the following support articles:
This article applies to the following managed switches and their respective firmware:
- M5300 - firmware version 10.0.0.x
-
- M5300-28G (GSM7228S)
- M5300-5G (GSM7252S)
- M5300-28G3 (GSM7328Sv2h2)
- M5300-52G3 (GSM7352Sv2h2)
- M5300-28G_POE+ (GSM7228PSv1h2)
- M5300-52G-POE+ (GSM7252PSv1h2)
- M5300-28GF3 (GSM7328FSv2)
- XSM7224S - firmware version 9.0.1.x (license required to support the feature described in this article)