Project name: ccna-bgp29-remove-private-as
enable configure terminal ! hostname R1 no ip domain-lookup line console 0 exec-timeout 0 0 logging synchronous exit ! interface Loopback 1 ip address 1.0.0.1 255.0.0.0 no shutdown exit interface GigabitEthernet 0/0 ip address 2.0.0.1 255.255.255.0 no shutdown exit ! end write
enable configure terminal ! hostname R2 no ip domain-lookup line console 0 exec-timeout 0 0 logging synchronous exit ! interface GigabitEthernet 0/0 ip address 3.0.0.2 255.255.255.0 no shutdown exit interface GigabitEthernet 0/1 ip address 2.0.0.2 255.255.255.0 no shutdown exit ! end write
enable configure terminal ! hostname R3 no ip domain-lookup line console 0 exec-timeout 0 0 logging synchronous exit ! interface GigabitEthernet 0/1 ip address 3.0.0.3 255.255.255.0 no shutdown exit ! end write
configure terminal ! router bgp 65001 network 1.0.0.0 mask 255.0.0.0 neighbor 2.0.0.2 remote-as 20 exit ! end
configure terminal ! router bgp 20 neighbor 2.0.0.1 remote-as 65001 neighbor 3.0.0.3 remote-as 30 exit ! end
configure terminal ! router bgp 30 neighbor 3.0.0.2 remote-as 20 exit ! end
R3#sh ip bgp BGP table version is 2, local router ID is 3.0.0.3 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *> 1.0.0.0 3.0.0.2 0 20 65001 i
configure terminal ! router bgp 20 neighbor 3.0.0.3 remove-private-as exit ! end
show ip bgp
clear ip bgp * soft out
show ip bgp
R3#sh ip bgp BGP table version is 3, local router ID is 3.0.0.3 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *> 1.0.0.0 3.0.0.2 0 20 i