BGP local-as

Create an alternate AS for certain neighbors…
Say you change AS but just for one neighbor and do not want to delete your entire BGP configuration:

NewYork#sh run | s bgp
router bgp 2
no synchronization
bgp log-neighbor-changes
network 10.200.255.1 mask 255.255.255.255
network 222.222.222.0
neighbor 10.200.254.2 remote-as 1
neighbor 10.200.254.2 local-as 65000
neighbor 10.200.254.2 ebgp-multihop 2
neighbor 10.200.254.2 update-source Loopback0
no auto-summary

Router#sh run | s bgp
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor 10.200.254.1 remote-as 65000
neighbor 10.200.254.1 ebgp-multihop 2
neighbor 10.200.254.1 update-source Loopback0
no auto-summary

Router#sh ip bgp
BGP table version is 7, local router ID is 10.200.254.2
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete

Network Next Hop Metric LocPrf Weight Path
*> 10.200.255.1/32 10.200.254.1 0 0 65000 2 i
*> 222.222.222.0 10.200.254.1 0 0 65000 2 i

Router#sh ip bgp summary
BGP router identifier 10.200.254.2, local AS number 1
BGP table version is 7, main routing table version 7
2 network entries using 240 bytes of memory
2 path entries using 104 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 616 total bytes of memory
BGP activity 4/2 prefixes, 4/2 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.200.254.1 4 65000 20 18 7 0 0 00:05:20 2

use no-prepend to hide local AS on advertisements of externally learned routes, in this case HIDE AS 2:

MPLS LDP access-list to allow neighbors to form

LDP uses TCP port 646 for adjacency connection and label exchange…
LDP neighbors send hellos to 224.0.0.2 multicast address (all routers on a subnet)…

R0(config-ext-nacl)#do sh ip access-list
Extended IP access list MPLS
10 permit icmp any any
11 permit ip host 1.1.1.1 host 224.0.0.2 (52 matches)
15 permit tcp any eq 646 host 1.1.1.2 (3 matches)
20 deny ip any any (87 matches)

R0(config-ext-nacl)#do sh mpls ldp nei
Peer LDP Ident: 1.1.1.1:0; Local LDP Ident 1.1.1.2:0
TCP connection: 1.1.1.1.646 – 1.1.1.2.18505
State: Oper; Msgs sent/rcvd: 8/8; Downstream
Up time: 00:03:59
LDP discovery sources:
FastEthernet0/0, Src IP addr: 1.1.1.1
Addresses bound to peer LDP Ident:
1.1.1.1

When two LSRs are running LDP and they share one or more links between them, they should
discover each other by means of Hello messages. The second step is for them to establish a session
across a TCP connection. Across this TCP connection, LDP advertises the label mapping
messages between the two LDP peers. These label mapping messages are used to advertise,
change, or retract label bindings. LDP provides the means to notify the LDP neighbor of some
advisory and error messages by sending notification messages.

no mpls ip propagate-ttl forwarded

MPLS_no_TTL

Traceroute with out the ‘no mpls ip propagate-ttl forwarded’ :
R1#traceroute 6.6.6.6 source loopback 0

Type escape sequence to abort.
Tracing the route to 6.6.6.6

1 10.1.1.2 48 msec 72 msec 28 msec
2 20.1.1.2 [MPLS: Label 23 Exp 0] 92 msec 96 msec 108 msec
3 30.1.1.2 [MPLS: Label 23 Exp 0] 84 msec 172 msec 100 msec
4 40.1.1.2 [MPLS: Label 23 Exp 0] 40 msec 88 msec 24 msec
5 50.1.1.2 76 msec 148 msec *

Traceroute with the command ‘no mpls ip propagate-ttl forwarded’ :
R1#traceroute 6.6.6.6 source loopback 0

Type escape sequence to abort.
Tracing the route to 6.6.6.6

1 10.1.1.2 52 msec 32 msec 48 msec
2 40.1.1.2 [MPLS: Label 23 Exp 0] 72 msec 156 msec 36 msec
3 50.1.1.2 164 msec 132 msec *

You will always see ingress and egress PE nodes. What you are hiding are P nodes…