peer fake-as

Use peer fake-as to advertise a fake AS number to a peer or peer group.

Use undo peer fake-as to remove the fake AS number advertised to a peer or peer group.

Syntax

peer { group-name | ipv6-address [ prefix-length ] } fake-as as-number

undo peer { group-name | ipv6-address [ prefix-length ] } fake-as

Default

No fake local AS number is advertised to a peer or peer group.

Views

BGP instance view

BGP-VPN instance view

Predefined user roles

network-admin

Parameters

group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.

ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.

mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command advertises a fake AS number to all dynamic peers in the subnet.

ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.

prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command advertises a fake AS number to all dynamic peers in the subnet.

as-number: Specifies a fake AS number in the range of 1 to 4294967295.

Usage guidelines

After you move a BGP router from an AS to another AS (from AS 2 to AS 3 for example), you have to modify the AS number of the router on all its EBGP peers. To avoid such modifications, you can configure the router to advertise a fake AS number 2 to its EBGP peers so that the EBGP peers still think that Router A is in AS 2.

The peer fake-as command is applicable only to EBGP peers or peer groups.

If you execute the peer fake-as command on the local router, specify the local router's AS number on the peer as the fake local AS number specified in the command.

Examples

# In BGP instance view, advertise a fake AS number of 200 to peer group test.

<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test fake-as 200