Juniper: OSPF Configure Interface

From OnnoWiki
Jump to navigation Jump to search

Sumber: https://www.juniper.net/documentation/en_US/junos/topics/topic-map/ospf-configuring-interfaces.html


Overview

If the interface on which you are configuring OSPF supports broadcast mode (such as a LAN), or if the interface supports point-to-point mode (such as a PPP interface or a point-to-point logical interface on Frame Relay), you specify the interface by including the IP address or the interface name for OSPFv2, or only the interface name for OSPFv3. In Junos OS Release 9.3 and later, an OSPF point-to-point interface can be an Ethernet interface without a subnet. If you configure an interface on a broadcast network, designated router and backup designated router election is performed.


Note: Using both the interface name and the IP address of the same interface produces an invalid configuration.

In this example, you configure interface ge-0/2/0 as an OSPFv2 interface in OSPF area 0.0.0.1. Configuration CLI Quick Configuration

To quickly configure an OSPF interface on a broadcast or point-to-point network and to allow the inbound OSPF into the interfaces that are active, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode. [edit] set interfaces ge-0/2/0 unit 0 family inet address 10.0.0.1set protocols ospf area 0.0.0.1 interface ge-0/2/0set security zones security-zone Trust host-inbound-traffic protocols allset security zones security-zone Trust host-inbound-traffic system-services allset groups global security policies default-policy permit-allset security zones security-zone Trust interfaces ge-0/2/0 Step-by-Step Procedure

To configure an OSPF interface on a broadcast or point-to-point network:

   Configure the interface.
   	
   Note: For an OSPFv3 interface, specify an IPv6 address.
   [edit]user@host# set interfaces ge-0/2/0 unit 0 family inet address 10.0.0.1
   Create an OSPF area.
   	
   Note: For an OSPFv3 interface, include the ospf3 statement at the [edit protocols] hierarchy level.
   [edit]user@host# edit protocols ospf area 0.0.0.1
   Assign the interface to the area.
   [edit protocols ospf area 0.0.0.1 ]user@host# set interface ge-0/2/0
   If you are done configuring the device, commit the configuration.
   [edit protocols ospf area 0.0.0.1 ]
   To allow the inbound OSPF into the interfaces that are active.
   [edit]user@host# set security zones security-zone Trust host-inbound-traffic protocols alluser@host# set security zones security-zone Trust host-inbound-traffic system-services alluser@host# set groups global security policies default-policy permit-alluser@host# set security zones security-zone Trust interfaces ge-0/2/0user@host# commit

Results

Confirm your configuration by entering the show interfaces and the show protocols ospf commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration. user@host# show interfaces ge-0/2/0 {unit 0 {family inet {address 10.0.0.1/32;}}} user@host# show protocols ospf area 0.0.0.1 {interface ge-0/2/0.0;}

To confirm your OSPFv3 configuration, enter the show interfaces and the show protocols ospf3 commands. Verification

Confirm that the configuration is working properly. Verifying the OSPF Interface Purpose

Verify the interface configuration. Depending on your deployment, the Type field might display LAN or P2P. Action

From operational mode, enter the show ospf interface detail command for OSPFv2, and enter the show ospf3 interface detail command for OSPFv3.




Referensi


Pranala Menarik