!Lab 10-2 Router R2 TT-C Config
!
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname R2
!
vrf definition VPN_A
 rd 100:1
 route-target export 100:1
 route-target import 100:1
 !
 address-family ipv4
 exit-address-family
 !
 address-family ipv6
 exit-address-family
!
vrf definition VPN_B
 rd 200:1
 route-target export 200:1
 route-target import 200:1
 !
 address-family ipv4
 exit-address-family
 !
 address-family ipv6
 exit-address-family
!
enable secret cisco
!
aaa new-model
!
!
aaa authentication login default local
aaa authentication login CONSOLE none
aaa authorization exec default local 
!
!
clock timezone PST -8
clock summer-time PDT recurring
do clock set 09:05:00 Oct 29 2014
!
!
no ip domain lookup
ip domain name tshoot.net
ip cef
ipv6 unicast-routing
ipv6 cef
!
username cisco secret cisco
!
lldp run
!
track 1 interface Serial0/0/0 line-protocol
 delay down 30 up 30
!
track 2 interface Serial0/0/1 line-protocol
 delay down 30 up 30
!
track 3 list boolean or
 object 1
 object 2
!
track 5 interface GigabitEthernet0/0 line-protocol
 delay down 30 up 30
!
!
ip telnet source-interface Loopback0
ip ssh source-interface Loopback0
ip ssh dh min size 2048
! 
interface Loopback0
 description VPN_A
 vrf forwarding VPN_A
 ip address 2.2.2.2 255.255.255.255
 ipv6 address FE80::2 link-local
 ipv6 address 2001:DB8:FEED:222::2/128
!
interface Loopback1
 description VPN_B
 vrf forwarding VPN_B
 ip address 2.2.2.2 255.255.255.255
 ipv6 address FE80::2 link-local
 ipv6 address 2001:DB8:FEED:222::2/128
!
interface Loopback2
 description EIGRP & RIP
 ip address 20.20.20.20 255.255.255.255
 ipv6 address FE80::2 link-local
 ipv6 address 2001:DB8:CAFE:2020::2/128
 ipv6 rip V120 enable
!
interface Loopback3
 description Internet
 ip address 22.22.22.22 255.0.0.0
 ipv6 address FE80::2 link-local
 ipv6 address 2001:DB8:EFAC::2/48
!
interface Loopback4
 description Internet
 vrf forwarding VPN_A
 ip address 22.22.22.22 255.0.0.0
 ipv6 address FE80::2 link-local
 ipv6 address 2001:DB8:EFAC::2/48
!
interface Loopback5
 description Internet
 vrf forwarding VPN_B
 ip address 22.22.22.22 255.0.0.0
 ipv6 address FE80::2 link-local
 ipv6 address 2001:DB8:EFAC::2/48
!
!
interface GigabitEthernet0/0
 ip address dhcp
 duplex auto
 speed auto
 ipv6 address FE80::2 link-local
 ipv6 address autoconfig
 ipv6 enable
 ipv6 nd autoconfig default-route
 ipv6 rip V120 enable
 ipv6 rip V120 metric-offset 5
 ipv6 dhcp client pd hint ::/64
 no shutdown
!
interface Serial0/0/0
 description WAN link to R1: 2 Mbps leased line
 no ip address
 encapsulation frame-relay
 no keepalive
 no shutdown
!
interface Serial0/0/0.1 point-to-point
 vrf forwarding VPN_A
 ip address 209.165.200.226 255.255.255.252
 ipv6 address FE80::2 link-local
 ipv6 address 2001:DB8:FEED:10::2/126
 frame-relay interface-dlci 201   
!
interface Serial0/0/0.2 point-to-point
 ip address 209.165.200.230 255.255.255.252
 ipv6 address FE80::2 link-local
 ipv6 address 2001:DB8:CAFE:6::2/126
 frame-relay interface-dlci 102 
!
interface Tunnel0
 no ip address
 ipv6 address FE80::2 link-local
 ipv6 address FC00::2/7
 ipv6 rip V120 enable
 tunnel source Serial0/0/0.2
 tunnel destination 10.1.2.1
!
interface Serial0/0/1
 description WAN link to R3: 2 Mbps leased line
 no ip address
 encapsulation frame-relay
 no keepalive
 clock rate 2000000
 no shutdown
!
interface Serial0/0/1.1 point-to-point
 vrf forwarding VPN_B
 ip address 209.165.200.222 255.255.255.252
 ipv6 address FE80::2 link-local
 ipv6 address 2001:DB8:FEED:14::2/126
 frame-relay interface-dlci 203   
!
interface Serial0/0/1.2 point-to-point
 ip address 10.1.90.2 255.255.255.254
 ipv6 address FE80::2 link-local
 ipv6 address 2001:DB8:CAFE:90::2/126
 ipv6 rip V120 enable
 ipv6 rip V120 metric-offset 5
 frame-relay interface-dlci 302
!
!
router eigrp HQ
 !
 address-family ipv4 unicast autonomous-system 1
  !
  af-interface default
   shutdown
   passive-interface
  exit-af-interface
  !
  af-interface Serial0/0/1.2
   no shutdown
   no passive-interface
  exit-af-interface
  !
  af-interface Loopback2
   no shutdown
  exit-af-interface
  !
  topology base
  exit-af-topology
  network 10.1.90.2 0.0.0.1
  network 20.20.20.20 0.0.0.0
  eigrp stub receive-only
 exit-address-family
 !
 address-family ipv6 unicast autonomous-system 1
  !
  af-interface default
   shutdown
   passive-interface
  exit-af-interface
  !
  af-interface Serial0/0/1.2
   no shutdown
   no passive-interface
  exit-af-interface
  !
  af-interface Loopback2
   no shutdown
  exit-af-interface
  !
  topology base
  exit-af-topology
  eigrp stub receive-only
 exit-address-family
!
!
router rip
 version 2
 passive-interface default
 no passive-interface GigabitEthernet0/0
 no passive-interface Serial0/0/0.2
 no passive-interface Serial0/0/1.2
 offset-list 0 in 5 GigabitEthernet0/0
 network 10.0.0.0
 network 20.0.0.0
 network 209.165.200.0
 distribute-list prefix NoLAN in GigabitEthernet0/0
 no auto-summary
! 
!
router bgp 65502
 bgp router-id 2.0.0.2
 bgp log-neighbor-changes
 no bgp default ipv4-unicast
 !
 address-family ipv4 vrf VPN_A
  bgp router-id 2.2.0.2
  network 0.0.0.0
  network 2.2.2.2 mask 255.255.255.255
  neighbor 209.165.200.225 remote-as 65501
  neighbor 209.165.200.225 password 7 14141B180F0B
  neighbor 209.165.200.225 activate
 exit-address-family
 !
 address-family ipv6 vrf VPN_A
  bgp router-id 2.2.0.2
  network ::/0
  network 2001:DB8:FEED:222::2/128
  neighbor 209.165.200.225 remote-as 65501
  neighbor 209.165.200.225 password 7 14141B180F0B
  neighbor 209.165.200.225 activate
  neighbor 209.165.200.225 route-map IPv4TransportIPv6RouteA in
 exit-address-family
 !
 address-family ipv4 vrf VPN_B
  bgp router-id 2.0.2.2
  network 0.0.0.0
  network 2.2.2.2 mask 255.255.255.255
  neighbor 209.165.200.221 remote-as 65501
  neighbor 209.165.200.221 local-as 65503 no-prepend replace-as
  neighbor 209.165.200.221 password 7 0822455D0A16
  neighbor 209.165.200.221 activate
  neighbor 209.165.200.221 allowas-in
 exit-address-family
 !
 address-family ipv6 vrf VPN_B
  bgp router-id 2.0.2.2
  network ::/0
  network 2001:DB8:FEED:222::2/128
  neighbor 209.165.200.221 remote-as 65501
  neighbor 209.165.200.221 local-as 65503 no-prepend replace-as
  neighbor 209.165.200.221 password 7 0822455D0A16
  neighbor 209.165.200.221 activate
  neighbor 209.165.200.221 allowas-in
  neighbor 209.165.200.221 route-map IPv4TransportIPv6RouteB in
 exit-address-family
!
!
crypto key gen rsa general-keys modulus 1024
!
!
ip http server
ip http secure-server
!
ip flow-top-talkers
 top 3
 sort-by bytes
 cache-timeout 600000
!
ip route vrf VPN_A 0.0.0.0 0.0.0.0 Null0
ip route vrf VPN_B 0.0.0.0 0.0.0.0 Null0
!
ip prefix-list NoLAN seq 10 deny 10.1.0.0/16 ge 17
ip prefix-list NoLAN seq 20 permit 0.0.0.0/0 le 32
!
!
ip sla 3
 icmp-echo 10.1.2.2
 frequency 10
ip sla schedule 3 life forever start-time now
ip sla 5
 icmp-echo 10.1.2.14
 frequency 10
ip sla schedule 5 life forever start-time now
!
!
logging host 10.1.100.1
logging source-interface Loopback0
!
!
ipv6 route 2001:DB8:CAFE:201::1/128 Serial0/0/0.2
ipv6 route vrf VPN_B ::/0 Null0
ipv6 route vrf VPN_A ::/0 Null0
!
!
ipv6 router rip V120
 distribute-list prefix-list NoLAN in GigabitEthernet0/0
 distribute-list prefix-list RIP in Tunnel0
!
!
ipv6 prefix-list NoLAN seq 10 deny 2001:DB8:CAFE::/48 ge 49
ipv6 prefix-list NoLAN seq 20 permit ::/0 le 128
!
ipv6 prefix-list RIP seq 10 deny 2001:DB8:CAFE:120::/64
ipv6 prefix-list RIP seq 20 permit ::/0 le 128
!
!
route-map IPv4TransportIPv6RouteA permit 10
 set ipv6 next-hop 2001:DB8:FEED:10::1
!
route-map IPv4TransportIPv6RouteB permit 10
 set ipv6 next-hop 2001:DB8:FEED:14::3
!
!
snmp-server community cisco RO
snmp-server community san-fran RW
snmp-server trap-source Loopback0
snmp-server location TSHOOT Lab Facility
snmp-server contact support@tshoot.net
snmp-server enable traps eigrp
snmp-server enable traps flash insertion
snmp-server enable traps flash removal
snmp-server enable traps config
snmp-server enable traps cpu threshold
snmp-server host 10.1.100.1 version 2c cisco 
!
!
banner motd ^CCCCCC*** Lab 10-2 Router R2 TT-C Config ***^C
!
alias exec srb show run | begin router bgp
alias exec sro show run | begin router ospf
alias exec srr show run | b router rip
alias exec sre show run | begin router eigrp
alias exec srr6 show run | b ipv6 router rip
alias exec sra show run | section event manager
alias exec srig show run inter g0/0
alias exec sira show ip route vrf VPN_A
alias exec sirb show ip route vrf VPN_B
alias exec sir show ip route
alias exec six show ipv6 route
alias exec sixa show ipv6 route vrf VPN_A
alias exec sixb show ipv6 route vrf VPN_B
!
line con 0
 exec-timeout 0 0
 logging synchronous
 login authentication CONSOLE
!
line vty 0 4
 exec-timeout 0 0
 logging synchronous
 transport input telnet ssh
!
ntp master 3
!
!
event manager applet G0/0way
 event track 3 state down
 action 1.0   cli command "enable"
 action 1.1   cli command "conf t"
 action 1.13  cli command "ipv6 router rip V120"
 action 1.14  cli command "no distribute-list prefix NoLAN in G0/0"
 action 1.145 cli command "int g0/0"
 action 1.15  cli command "ipv6 rip V120 default-information originate"
 action 1.2   cli command "router rip"
 action 1.3   cli command "no distribute-list prefix NoLAN in GigabitEthernet0/0"
 action 1.35  cli command "default-information originate"
 action 1.4   syslog msg "G0/0 Way!"
event manager applet NoG0/0way
 event track 3 state up
 action 1.0   cli command "enable"
 action 1.1   cli command "conf t"
 action 1.13  cli command "ipv6 router rip V120"
 action 1.14  cli command "distribute-list prefix NoLAN in G0/0"
 action 1.145 cli command "int g0/0"
 action 1.15  cli command "no ipv6 rip V120 default-information originate"
 action 1.2   cli command "router rip"
 action 1.3   cli command "distribute-list prefix NoLAN in GigabitEthernet0/0"
 action 1.35  cli command "no default-information originate"
 action 1.4   syslog msg "No G0/0 Way!"
event manager applet LANdown
 event track 5 state down
 action 1.0 cli command "enable"
 action 1.1 cli command "conf t"
 action 1.2 cli command "ip route 0.0.0.0 0.0.0.0 209.165.200.229"
 action 1.3 cli command "ip route 0.0.0.0 0.0.0.0 10.1.90.3"
 action 1.4 cli command "ipv6 route ::/0 FC00::D1"
 action 1.5 cli command "ipv6 route ::/0 2001:db8:cafe:90::3"
 action 1.6 syslog msg "LAN Down!"
event manager applet LANup
 event track 5 state up
 action 1.0 cli command "enable"
 action 1.1 cli command "conf t"
 action 1.2 cli command "no ip route 0.0.0.0 0.0.0.0 209.165.200.229"
 action 1.3 cli command "no ip route 0.0.0.0 0.0.0.0 10.1.90.3"
 action 1.4 cli command "no ipv6 route ::/0 FC00::D1"
 action 1.5 cli command "no ipv6 route ::/0 2001:db8:cafe:90::3"
 action 1.6 syslog msg "LAN Up!"
!
!
archive
 log config
  logging enable
  logging size 50
  notify syslog contenttype plaintext
  hidekeys
 path tftp://10.1.100.1/$h-archive-config
 write-memory
file prompt quiet
!
end
!
