- Table of Contents
-
- 08-Configuration Examples
- 01-Web Login Configuration Examples
- 02-Internet Access Through a Static IP Address Configuration Examples
- 03-Internet access through PPPoE configuration examples
- 04-Signature Library Upgrade Configuration Examples
- 04-Software Upgrade Examples(only for F50X0-D and F5000-AK5X5 firewalls)
- 05-Software Upgrade Examples
- 06-Static routing configuration examples
- 07-OSPF configuration examples
- 08-BGP configuration examples
- 09-RIP configuration examples
- 10-DHCP configuration examples
- 11-DNS configuration examples
- 12-Object Group Configuration Examples
- 13-Public key management configuration examples
- 14-Security Policy Configuration Examples
- 15-Attack defense configuration examples
- 16-Connection Limit Configuration Examples
- 17-IPS Configuration Examples
- 18-URL Filtering Configuration Examples
- 19-Anti-Virus Configuration Examples
- 20-Data Filtering Configuration Examples
- 21-File Filtering Configuration Examples
- 22-APR-Based Security Policy Configuration Examples
- 23-Bandwidth Management Configuration Examples
- 24-NAT configuration examples
- 25-NAT hairpin configuration examples
- 26-IPsec configuration examples
- 27-SSL VPN configuration examples
- 28-Server Load Balancing Configuration Examples
- 29-Outbound Link Load Balancing Configuration Examples
- 30-Inbound Link Load Balancing Configuration Examples
- 31-Transparent DNS Proxy Configuration Examples
- 32-Context Configuration Examples
- 32-Context Configuration Examples(only for F50X0-D and F5000-AK5X5 firewalls)
- 33-IRF configuration examples
- 34-High Availability Group Configuration Examples
- 35-NAT Flow Logging Configuration Examples
- 36-User identification configuration examples
- 37-Server Connection Detection Configuration Examples
- 38-IP Reputation Configuration Examples
- 39-NPTv6 Configuration Examples
- 40-SSL Decryption Configuration Examples
- 41-MAC Address Learning Through a Layer 3 Device Configuration Examples
- 42-WAF Configuration Examples
- 43-NetShare Control Configuration Examples
- 44-4G Configuration Examples
- 45-WLAN Configuration Examples
- Related Documents
-
Title | Size | Download |
---|---|---|
07-OSPF configuration examples | 355.97 KB |
Introduction
The following information provides OSPF configuration examples.
This document is not restricted to specific software or hardware versions. Procedures and information in the examples might be slightly different depending on the software or hardware version of the device.
The configuration examples were created and verified in a lab environment, and all the devices were started with the factory default configuration. When you are working on a live network, make sure you understand the potential impact of every command on your network
The following information is provided based on the assumption that you have basic knowledge of OSPF.
Network configuration
As shown in Figure 1, Device A and Device B are connected to R&D and finance departments, respectively. Device C is a router that acts as the gateway to the Internet.
Configure OSPF on the devices to enable the R&D and finance departments to learn routing information from each other. Configure a default route with the next hop being the gateway address 200.2.2.254 on Device C, and redistribute the default route to OSPF.
Software versions used
This configuration example was created and verified on F9345 of the F1060 device.
Restrictions and guidelines
OSPF uses multicast addresses 224.0.0.5 and 224.0.0.6 to establish neighbor relationships. You must configure a security policy to permit the traffic between the local security zone and the security zones that contain the OSPF interfaces. For more information, see the configuration procedure.
Procedure
Configuring Device A
1. Assign IP addresses to interfaces and add the interfaces to security zones.
# On the top navigation bar, click Network.
# From the navigation pane, select Interface Configuration > Interfaces.
# Click the Edit icon for GE 1/0/1.
# In the dialog box that opens, configure the interface:
a. Select the Untrust security zone.
b. On the IPv4 Address tab, enter the IP address and mask of the interface. In this example, enter 10.0.0.1/24.
c. Retain the default configuration for the rest of parameters.
d. Click OK.
# Add GE 1/0/2 to the Trust security zone and set its IP address to 10.1.1.1/24 in the same way you configure GE 1/0/1.
2. Create security policies.
# On the top navigation bar, click the Policies tab.
# From the navigation pane, select Security Policies > Security Policies.
# Select Create > Create a policy.
# Create security policy ospf-a:
¡ Enter policy name ospf-a.
¡ Select source zone Trust.
¡ Select destination zone Untrust.
¡ Select type IPv4.
¡ Select action Permit.
¡ Enter 10.1.1.0/24 as the source address.
¡ Retain the default configuration for the rest of parameters.
# Click OK.
# Create security policy ospf-b:
¡ Enter policy name ospf-b.
¡ Select source zone Local.
¡ Select destination zone Unrust.
¡ Select type IPv4.
¡ Select service object group ospf.
¡ Select action Permit.
¡ Retain the default configuration for the rest of parameters.
# Click OK.
# Create security policy ospf-c:
¡ Enter policy name ospf-c.
¡ Select source zone Unrust.
¡ Select destination zone Local.
¡ Select type IPv4.
¡ Select service object group ospf.
¡ Select action Permit.
¡ Retain the default configuration for the rest of parameters.
# Click OK.
3. Configure OSPF.
# On the top navigation bar, click Network.
# From the navigation pane, select Routing > OSPF.
Figure 2 Configuring OSPF
# Click Create.
# In the dialog box that opens, configure an OSPF instance.
Figure 3 Creating an OSPF instance
# Click OK.
Figure 4 OSPF instance
# Click 0 in the Number of OSPF areas column for the created OSPF instance.
Figure 5 OSPF areas
# On the OSPF area configuration page that opens, click Create.
# In the dialog box that opens, configure Area 0.
Figure 6 Creating Area 0
# Click OK.
# On the OSPF area configuration page, click Create.
# In the dialog box that opens, configure Area 1.
Figure 7 Creating Area 1
Configuring Device B
1. Assign IP addresses to interfaces and add the interfaces to security zones.
# On the top navigation bar, click Network.
# From the navigation pane, select Interface Configuration > Interfaces.
# Click the Edit icon for GE 1/0/1.
# In the dialog box that opens, configure the interface:
a. Select the Untrust security zone.
b. On the IPv4 Address tab, enter the IP address and mask of the interface. In this example, enter 10.0.0.2/24.
c. Retain the default configuration for the rest of parameters.
d. Click OK.
# Add GE 1/0/2 to the Trust security zone and set its IP address to 10.2.2.1/24 in the same way you configure GE 1/0/1.
2. Create security policies.
# On the top navigation bar, click the Policies tab.
# From the navigation pane, select Security Policies > Security Policies.
# Select Create > Create a policy.
# Create security policy ospf-a:
¡ Enter policy name ospf-a.
¡ Select source zone Trust.
¡ Select destination zone Untrust.
¡ Select action Permit.
¡ Select type IPv4.
¡ Enter 10.2.2.0/24 as the source address.
¡ Retain the default configuration for the rest of parameters.
# Click OK.
# Create security policy ospf-b:
¡ Enter policy name ospf-b.
¡ Select source zone Local.
¡ Select destination zone Untrust.
¡ Select type IPv4.
¡ Select action Permit.
¡ Select service object group ospf.
¡ Retain the default configuration for the rest of parameters.
# Click OK.
# Create security policy ospf-c:
¡ Enter policy name ospf-b.
¡ Select source zone Untrust.
¡ Select destination zone Local.
¡ Select type IPv4.
¡ Select action Permit.
¡ Select service object group ospf.
¡ Retain the default configuration for the rest of parameters.
# Click OK.
3. Configure OSPF.
# On the top navigation bar, click Network.
# From the navigation pane, select Routing > OSPF.
Figure 8 Configuring OSPF
# Click Create.
# In the dialog box that opens, configure an OSPF instance.
Figure 9 Creating an OSPF instance
# Click OK.
Figure 10 OSPF instance
# Click 0 in the Number of OSPF areas column for the created OSPF instance.
Figure 11 OSPF areas
# On the OSPF area configuration page that opens, click Create.
# In the dialog box that opens, configure Area 0.
Figure 12 Creating Area 0
# Click OK.
# On the OSPF area configuration page, click Create.
# In the dialog box that opens, configure Area 2.
Figure 13 Creating Area 2
# Click OK.
Configuring Device C
1. Assign IP addresses to interfaces. (Details not shown.)
2. Configure OSPF.
# Enable OSPF process 1, and specify the router ID as 3.3.3.3.
<Device C> system-view
[Device C] ospf 1 router-id 3.3.3.3
# Create Area 0 and enter Area 0 view.
[Device C-ospf-1] area 0.0.0.0
# Advertise network 10.0.0.0/24.
[Device C-ospf-1-area-0.0.0.0] network 10.0.0.0 0.0.0.255
[Device C-ospf-1-area-0.0.0.0] quit
# Redistribute the default route into the OSPF routing table.
<Sysname> system-view
[Device C-ospf-1] default-route-advertise always
[Device C-ospf-1] quit
# Configure the default route to the ISP.
[Device C] ip route-static 0.0.0.0 0 200.2.2.254
Verifying the configuration
1. View information about the OSPF routing table of Device A.
# On the top navigation bar, click Network.
# From the navigation pane, select Routing > Routing Table.
# On the IPv4 Routing Table tab, view the OSPF routing table information.
Figure 14 OSPF routing table of Device A
2. View information about the OSPF routing table of Device B.
# On the top navigation bar, click Network.
# From the navigation pane, select Routing > Routing Table.
# On the IPv4 Routing Table tab, view the OSPF routing table information.
Figure 15 OSPF routing table of Device B
3. Verify that Device A can ping the ISP.
<Device A> ping -a 10.1.1.1 200.2.2.254
Ping 200.2.2.254 (200.2.2.254) from 10.1.1.1: 56 data bytes, press CTRL_C to break
56 bytes from 200.2.2.254: icmp_seq=0 ttl=254 time=0.423 ms
56 bytes from 200.2.2.254: icmp_seq=1 ttl=254 time=0.222 ms
56 bytes from 200.2.2.254: icmp_seq=2 ttl=254 time=0.173 ms
56 bytes from 200.2.2.254: icmp_seq=3 ttl=254 time=0.170 ms
56 bytes from 200.2.2.254: icmp_seq=4 ttl=254 time=0.167 ms
--- Ping statistics for 200.2.2.254 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.167/0.231/0.423/0.098 ms
The output shows that the ISP can be pinged.
4. Verify that Device B can ping the ISP.
<Device B> ping -a 10.0.0.2 200.2.2.254
Ping 200.2.2.254 (200.2.2.254) from 10.0.0.2: 56 data bytes, press CTRL_C to break
56 bytes from 200.2.2.254: icmp_seq=0 ttl=254 time=0.437 ms
56 bytes from 200.2.2.254: icmp_seq=1 ttl=254 time=0.209 ms
56 bytes from 200.2.2.254: icmp_seq=2 ttl=254 time=0.194 ms
56 bytes from 200.2.2.254: icmp_seq=3 ttl=254 time=0.174 ms
56 bytes from 200.2.2.254: icmp_seq=4 ttl=254 time=0.179 ms
--- Ping statistics for 200.2.2.254 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.174/0.239/0.437/0.100 ms
The output shows that the ISP can be pinged.