Got it

OSPF Domain ID

Created: Jun 22, 2020 09:07:07Latest reply: Jun 22, 2020 12:12:26 956 4 1 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hi,

What's the main function of the OSPF Domain ID? Can it be used to prevent loops?


Featured Answers
Popeye_Wang
Admin Created Jun 22, 2020 09:09:35

Hello,
The domain ID is used in VPN scenarios to identify and distinguish domains, but not to prevent loops. 

As shown in the following figure, OSPF is used in different sites. On the PEs, the BGP routes imported to OSPF( VPN instances) are advertised to CEs as external LSAs (type-5 LSAs) by default. However, for the destinations of different nodes in the same OSPF domain, such routes should be advertised as Type 3 LSAs. Therefore, the domain ID is required to identify the same OSPF domain. In this case, the PEs consider that the MPLS domain is a super area 0. After receiving LSAs 1, 2, and 3 from the peer, the local PE summarizes them into LSA3 and advertise to the corresponding CE. If the PE receives LSA5, it still sends LSA5 to the CE. If the domain IDs are different, the PE imports all received routes as Type 5 LSAs.

1

I hope this helps.

View more
  • x
  • convention:

All Answers

Hello,
The domain ID is used in VPN scenarios to identify and distinguish domains, but not to prevent loops. 

As shown in the following figure, OSPF is used in different sites. On the PEs, the BGP routes imported to OSPF( VPN instances) are advertised to CEs as external LSAs (type-5 LSAs) by default. However, for the destinations of different nodes in the same OSPF domain, such routes should be advertised as Type 3 LSAs. Therefore, the domain ID is required to identify the same OSPF domain. In this case, the PEs consider that the MPLS domain is a super area 0. After receiving LSAs 1, 2, and 3 from the peer, the local PE summarizes them into LSA3 and advertise to the corresponding CE. If the PE receives LSA5, it still sends LSA5 to the CE. If the domain IDs are different, the PE imports all received routes as Type 5 LSAs.

1

I hope this helps.

View more
  • x
  • convention:

Hi user!

OSPF Domain ID
If inter-area routes are advertised between local and remote OSPF areas, these areas are considered to be in the same OSPF domain.

Important characteristics of OSPF domain IDs include:
- Domain IDs identify and differentiate different domains.
- Each OSPF domain has one or more domain IDs. One domain ID must be a primary ID, while the others are secondary IDs.
- If an OSPF instance does not have a specific domain ID, its ID is considered as null.

Before a PE advertises the BGP routes learned from a remote PE to CEs, the PE checks the domain IDs carried in the BGP routes to determine the type of OSPF routes (Type 3, Type 5, or Type 7) to be advertised.

If local domain IDs are the same as or compatible with the remote domain IDs carried in the BGP routes, the PE advertises Type 3 routes. Otherwise, the PE advertises Type 5 or Type 7 routes.

DOMAIN ID

Routing Loop Prevention

Routing loops may occur between PEs and CEs when OSPF and BGP learn routes from each other.

LOOP


As shown in Figure 3, a routing loop occurs in the following process:
  1. 1. PE1 uses OSPF to import a BGP route whose destination address is 10.1.1.1/32.

  2. 2. OSPF then generates and advertises a Type 5 or Type 7 LSA to CE1.

  3. 3. CE1 learns an OSPF route with the destination address 10.1.1.1/32 and next hop of PE1 and advertises the route to PE2.

  4. 4. PE2 learns an OSPF route with the destination address and next hop being 10.1.1.1/32 and CE1.

  5. 5. CE1 also learns an OSPF route with the destination address 10.1.1.1/32 and next hop of PE2. PE1 learns an OSPF route with the destination address 10.1.1.1/32 and next hop of CE1.

  6. 6. CE1 has learned two equal-cost routes, with the next hop of one being PE1 and the other being PE2. The next hops of the routes from PE1 and PE2 to 10.1.1.1/32 are CE1.

The preference of an OSPF route is higher than that of a BGP route. Therefore, BGP routes on PE1 and PE2 to 10.1.1.1/32 are replaced by the OSPF route. The OSPF route with the destination address 10.1.1.1/32 and next hop of CE1 is active in the routing tables of PE1 and PE2.

The BGP route then becomes inactive, causing LSAs generated when this route is imported by OSPF to be deleted. As a result, the OSPF route is withdrawn. There is no OSPF route in the routing table, and the BGP route becomes active again. This cycle causes route flapping.

OSPF VPN provides a solution to this problem.

LOOP


https://support.huawei.com/enterprise/en/doc/EDOC1000141935/2e3eb6b4/enhanced-ospf-functions

Thanks!

View more
  • x
  • convention:

Hi User,


domain-id (OSPF)

Function

The domain-id command sets an ID for an OSPF domain.

The undo domain-id command restores the default setting.

By default, the domain ID is null.

Format

domain-id { null | domain-id [ type type value value | secondary ] * }

undo domain-id [ domain-id [ type type value value ] ]

Parameters

ParameterDescriptionValue
domain-idSpecifies the ID of an OSPF domain.

The value can be an integer or in dotted decimal notation.

  • If it is an integer, the value ranges from 0 to 4294967295, and it is converted to dotted decimal notation when the ID is displayed.

  • If it is in dotted decimal notation, it is displayed as entered.

nullIndicates that the OSPF domain ID is null.-
type typeSpecifies the type of the OSPF domain ID.It can be 0005, 0105, 0205, or 8005. By default, it is 0005.
value valueSpecifies the value of the type of the OSPF domain ID.The value is a hexadecimal number that ranges from 0x0 to 0xffff, and the default value is 0x0.
secondaryIndicates the ID of a secondary domain.The maximum number of domain-id secondary in each OSPF process is 1000.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Domain IDs are used to identify domains.

If the local OSPF area and an OSPF area of a remote VPN attempts to exchange Type 3 LSAs, the two areas must be in the same OSPF domain. You can run the domain-id command to configure the same domain ID for the two OSPF areas.

The routes that are imported from a PE switch are advertised using External-LSAs. The routes destined for different nodes in the same OSPF domain are advertised based on Type 3 LSAs. This requires that the nodes in the same OSPF domain be configured with the same domain ID.

If the undo domain-id command without any parameter is executed, the primary domain ID will be deleted.

imgDownload?uuid=2fd5fce2d0e641e5b33cdfb325860816.png
OSPF direct routes to the PE do not carry the domain ID, while BGP direct routes to the PE carry the domain ID.

Configuration Impact

Before sending routes to a remote CE switch, a PE switch sends Type 3 LSAs or Type 5 LSAs to the CE based on domain ID. If local domain IDs are the same as or compatible with remote domain IDs in BGP routes, the PE advertises Type 3 routes. If local domain IDs are different from or incompatible with remote domain IDs in BGP routes, the PE advertises Type 5 routes.

Precautions

  • Each OSPF domain has one or multiple domain IDs. One of them is a primary ID and the others are secondary IDs.

  • If an OSPF instance does not have a specific domain ID, its ID is considered as null.

  • If the value of the domain ID is 0, secondary cannot be configured.

  • The maximum number of domain-id secondary items configured in an OSPF process is 1000.

  • The domain-id command is forbidden in public networks.

Example

# Set an OSPF domain ID.

<Quidway> system-view
[Quidway] ospf 1
[Quidway-ospf-1] domain-id 234

https://support.huawei.com/enterprise/en/doc/EDOC1100116542/cafb264d/domain-id-ospf

Thanks i hope this will help you.

View more
  • x
  • convention:

Thanks for your reply. Very useful.
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.