network (BGP-IPv6 unicast address family view)

Function

The network command imports routes to the BGP routing table and advertises them to peers.

The undo network command cancels the configuration.

By default, BGP does not import routes.

Format

network ipv6-address prefix-length [ route-policy route-policy-name ]

network ipv6-address prefix-length route-filter route-filter-name

undo network ipv6-address prefix-length

Parameters

Parameter Description Value
ipv6-address

Specifies the IPv6 address of a route to be imported by BGP.

The prefix is in the format of X:X:X:X:X:X:X:X.

prefix-length

Specifies the mask length of an IPv6 address. If no mask length is specified, the IP address is considered as a classful address.

The value is an integer that ranges from 0 to 128.

route-policy route-policy-name

Specifies the name of a route-policy that is used for route import.

The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

route-filter route-filter-name

Specifies the name of the route-filter that is used for route import.

The value is a string of 1 to 200 case-sensitive characters, spaces not supported. If parameters are included in the referenced route-filter, specify values for them in the format of (var1, var2, ...var8) behind the route-filter name. A maximum of eight parameters can be specified, and each value ranges from 1 to 200 characters.

Views

BGP-IPv6 unicast address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

BGP itself cannot discover routes. Instead, it imports routes discovered by other protocols (such as an IGP or static routes) to the BGP routing table. These imported routes then are transmitted within an AS or between ASs. Before adding routes to the BGP routing table, BGP can filter them based on the routing protocol. Alternatively, if routes in the local routing table need to be manually added to the BGP routing table and then advertised, you can use the network command.

The Origin attribute of the routes imported to the BGP routing table using the network command is IGP.

If a route with a specific prefix or mask is added to the BGP routing table using the network command, this route is the optimal route selected from all types of protocol routes. Unlike the network command, the import-route command is used to add all routes of a specified protocol, such as RIP, OSPF, IS-IS, static routes, or direct routes to the BGP routing table.

Precautions

The network command imports the routes in the local routing table that exactly match the specified destination address and prefix length to the BGP routing table. If mask is not specified, routes are matched against the natural network mask.

When using the undo network command to delete the existing configuration, specify a correct mask.

The network route-policy route-policy-name command is mutually exclusive with the network route-filter route-filter-name command.

Example

# Configure BGP to import the local route 1.0.0.0/16.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] ipv6-family unicast
[*HUAWEI-bgp-af-ipv6] network 1.0.0.0 255.255.0.0
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >