Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !
- hostname HEADEND
- !
- vrf definition CORP
- rd 1:1
- !
- address-family ipv4
- exit-address-family
- !
- vrf definition FVRF-100
- !
- address-family ipv4
- exit-address-family
- !
- vrf definition FVRF-200
- !
- address-family ipv4
- exit-address-family
- !
- enable password cisco
- !
- username cisco privilege 15 password 0 cisco
- !
- interface Loopback0
- vrf forwarding CORP
- ip address 10.1.0.0 255.255.255.255
- !
- interface Tunnel100
- vrf forwarding CORP
- ip address 192.168.100.1 255.255.255.0
- no ip redirects
- ip mtu 1400
- ip nhrp authentication 100
- ip nhrp map multicast dynamic
- ip nhrp network-id 100
- ip nhrp holdtime 600
- ip nhrp redirect
- ip tcp adjust-mss 1360
- tunnel source Ethernet0/0
- tunnel mode gre multipoint
- tunnel key 100
- tunnel path-mtu-discovery
- tunnel vrf FVRF-100
- !
- interface Tunnel200
- vrf forwarding CORP
- ip address 192.168.200.1 255.255.255.0
- no ip redirects
- ip mtu 1400
- ip nhrp authentication 200
- ip nhrp map multicast dynamic
- ip nhrp network-id 200
- ip nhrp holdtime 600
- ip nhrp redirect
- ip tcp adjust-mss 1360
- tunnel source Ethernet0/1
- tunnel mode gre multipoint
- tunnel key 200
- tunnel path-mtu-discovery
- tunnel vrf FVRF-200
- !
- interface Ethernet0/0
- vrf forwarding FVRF-100
- ip address 100.0.0.1 255.255.255.0
- !
- interface Ethernet0/1
- vrf forwarding FVRF-200
- ip address 200.0.0.1 255.255.255.0
- !
- router bgp 1
- bgp router-id 10.1.0.0
- bgp log-neighbor-changes
- bgp listen range 192.168.200.0/24 peer-group T200-PEERS
- bgp listen range 192.168.100.0/24 peer-group T100-PEERS
- no bgp default ipv4-unicast
- !
- address-family ipv4 vrf CORP
- network 10.1.0.0 mask 255.255.255.255
- aggregate-address 10.1.0.0 255.255.0.0 summary-only
- neighbor T100-PEERS peer-group
- neighbor T100-PEERS remote-as 65335
- neighbor T100-PEERS send-community both
- neighbor T100-PEERS soft-reconfiguration inbound
- neighbor T100-PEERS route-map RMAP_T100-IN in
- neighbor T100-PEERS route-map RMAP_T100-OUT out
- neighbor T200-PEERS peer-group
- neighbor T200-PEERS remote-as 65335
- neighbor T200-PEERS send-community both
- neighbor T200-PEERS soft-reconfiguration inbound
- neighbor T200-PEERS route-map RMAP_T200-IN in
- neighbor T200-PEERS route-map RMAP_T200-OUT out
- exit-address-family
- !
- ip bgp-community new-format
- !
- route-map RMAP_T200-IN permit 10
- set as-path prepend 65200
- !
- route-map RMAP_T100-IN permit 10
- set as-path prepend 65100
- !
- route-map RMAP_T200-OUT permit 10
- set as-path prepend 65200
- set community 655361 additive
- !
- route-map RMAP_T100-OUT permit 10
- set as-path prepend 65100
- set community 655361 additive
- !
- event manager session cli username "cisco"
- event manager applet BGP-DETECT
- event syslog pattern ".*sent to neighbor .192.168.[12]00.[0-9]+ passive 2/2 .peer in wrong AS. 2 bytes [0-9]+"
- action 0.0 regexp "neighbor..([0-9\.]+)" "$_syslog_msg" ignore peer_ip
- action 0.1 regexp "[0-9]+\.[0-9]+\.([0-9]+)\.([0-9]+)" "$peer_ip" ignorevar peergroup_id site_id
- action 1.0 cli command "enable"
- action 1.1 cli command "conf t"
- action 2.0 cli command "router bgp 1"
- action 2.1 cli command " address-family ipv4 vrf CORP"
- action 2.2 cli command " neighbor $peer_ip remote-as $site_id"
- action 2.3 cli command " neighbor $peer_ip description AUTOPROVISIONED: SITE $site_id TUNNEL $peergroup_id"
- !
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement