neighbor allowas-in
Use this command to advertise prefixes (routes) even when the source of the prefixes is from the same Autonomous System (AS) number.
Use this command in a scenario where two routers at different locations use the same Autonomous System number and are connected via an ISP. Once prefixes arrive from one branch at the ISP, they are tagged with the customer’s AS number. By default, when the ISP passes the prefixes to the other router, the prefixes are dropped if the other router uses the same AS number. Use this command to advertise the prefixes at the other side. Control the number of times an AS number is advertised by specifying a number.
In a hub and spoke configuration in a VPN, a PE (Provider Edge) router advertises all prefixes containing duplicate AS numbers. Use this command to configure two VRFs on each PE router to receive and advertise prefixes. One of the VRFs receives prefixes with AS numbers from all PE routers and then advertises them to neighboring PE routers. The other VRF receives prefixes with AS numbers from the CE (Customer Edge) router and advertises them to all PE routers in the hub and spoke configuration.
Use the no parameter with this command to remove the configuration.
For unnumbered peer IPv4 unicast mode commands are configured under v4-unnumbered-mode.
Command Syntax
neighbor (A.B.C.D|X:X::X:X|WORD) allowas-in <1-10>
no neighbor (A.B.C.D|X:X::X:X|WORD) allowas-in
For v4-unnumbered mode:
neighbor WORD allowas-in
neighbor WORD allowas-in <1-10>
no neighbor WORD allowas-in
Parameters
A.B.C.D
IPv4 neighbor address.
X:X::X:X
IPv6 neighbor address.
WORD
Name of peer group.
Note: For information on how to create peer groups, refer to the neighbor peer-group and neighbor remote-as commands. When this parameter is used with a command, the command applies on all peers in the specified group.
<1-10>
Number of times to allow the advertisement of an AS number
Default
No default value is specified.
Command Mode
This CLI command is available to configure in all Address-family modes (v4-unnumbered mode, IPv4 unicast, IPv6 unicast, IPv4 labeled-unicast, IPv6 labeled-unicast, VPNv4 unicast, VPNv6 unicast, IPv4/IPv6 VRF, L2VPN EVPN)
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router bgp 7657
(config-router)#address-family ipv4 vrf VRF_A
(config-router-af)#neighbor 10.10.0.1 allowas-in 3
#configure terminal
(config)#router bgp 7657
(config-router)#address-family ipv6 vrf VRF_A
(config-router-af)#neighbor 3ffe:15:15:15:15::0 allowas-in 3
#con terminal
(config)#router bgp 100
(config-router)#address-family ipv4 unicast
(config-router-af)#bgp v4-unnumbered-mode
(config-router-v4-unnum)#neighbor eth1 allowas-in 6
For unnumbered peer configs in L2vpn evpn mode are configured under l2vpn-unnumbered-mode.
(config)#router bgp 100
(config-router)#address-family l2vpn evpn
(config-router-af)#neighbor eth1 allowas-in 7
Last modified date: 07-13-2023