
BGP and BGP4+ Introduction
How to apply BGP filtering for private AS numbers
Apply BGP filtering for private AS numbers using the neighbor <neighborid>
awplus# configure terminal
awplus(config)# router bgp 5
awplus(config-router)# neighbor 192.168.0.2 remove-private-AS
If the
Router 2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router 2(config)#router bgp 5
Router
Router
Router 2(config)#exit
Router 2#clear ip bgp *
The show ip bgp command output on ISP Router 1 shows that the update for the network 10.0.0.0/24 received from Router 2 (192.68.0.1) has an AS path attribute 5. This is the AS number of Router 2, without private AS path 65000.
In the ISP router BGP prefix table below, the only AS path attribute for the 10.0.0.0/24 network is '5', and the AS 65000 has been correctly filtered out from the update sent by Router 2 received into ISP Router 1. This is displayed in the show ip bgp output below:
Router 1#show
!
router bgp 1
neighbor 192.168.0.1
!
Router 1#show ip bgp
BGP table version is 1041, local router ID is 192.168.0.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal l - labeled, S Stale
Origin codes: i - IGP, e | - EGP, ? - incomplete |
|
| ||
Network | Next | Hop | Metric LocPrf Weight Path | ||
*> 10.0.0.0/24 | 192.168.0.1 | 0 | 0 5 | i | |
*> 172.30.0.0 | 192.168.0.1 | 0 | 0 5 | i | |
*> 192.168.0.0 | 192.168.0.1 | 0 | 0 5 | i |
| Software Reference Supplement for SwitchBlade® x8112, x908, x900 and x610 Series Switches |
|
AlliedWare PlusTM Operating System - Software Version | 1.41 |