Sabtu, 14 November 2009

Route leaking vrfs

Dynamips File

autostart=false

##############
# Instance 0 #
##############

[localhost:7200]

[[7200]]

  image = c:\CCIE\Emulator\Dynamips\images\c7200-p.120-32.S9.bin
  ram = 64
  npe = npe-400
  idlepc = 0x60669380

#########################################
 [[Router CE1]]
  model = 7200
  console = 2001
  F1/0 = PE F1/0

 [[Router PE]]
  model = 7200
  console = 2002
  F2/0 = CE2 F2/0

 [[Router CE2]]
  model = 7200
  console = 2003

Final Configuration

PE

hostname PE
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
ip subnet-zero
ip cef
!
!
no ip domain-lookup
!
ip vrf CE1
 rd 1:1
 route-target export 1:1
 route-target import 2:2
!
ip vrf CE2
 rd 2:2
 route-target export 2:2
 route-target import 1:1
!
no mpls traffic-eng auto-bw timers frequency 0
call rsvp-sync
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 100.100.100.100 255.255.255.255
 no clns route-cache
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
 no clns route-cache
!
interface FastEthernet1/0
 ip vrf forwarding CE1
 ip address 10.10.10.254 255.255.255.0
 duplex auto
 speed auto
 no clns route-cache
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
 no clns route-cache
!
interface FastEthernet2/0
 ip vrf forwarding CE2
 ip address 20.20.20.254 255.255.255.0
 duplex auto
 speed auto
 no clns route-cache
!
interface FastEthernet2/1
 no ip address
 shutdown
 duplex auto
 speed auto
 no clns route-cache
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 no auto-summary
 !
 address-family ipv4 vrf CE2
 redistribute connected
 redistribute static
 no auto-summary
 no synchronization
 exit-address-family
 !
 address-family ipv4 vrf CE1
 redistribute connected
 redistribute static
 no auto-summary
 no synchronization
 exit-address-family
!
ip classless
ip route vrf CE1 1.1.1.1 255.255.255.255 10.10.10.1
ip route vrf CE2 2.2.2.2 255.255.255.255 20.20.20.1
!
no ip http server
!
!
!
!
!
!
control-plane
!
!
dial-peer cor custom
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 stopbits 1
line vty 0 4
 password cisco
 login
!
!
end

CE1

hostname CE1
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
ip subnet-zero
ip cef
!
!
no ip domain-lookup
!
no mpls traffic-eng auto-bw timers frequency 0
call rsvp-sync
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
 no clns route-cache
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
 no clns route-cache
!
interface FastEthernet1/0
 ip address 10.10.10.1 255.255.255.0
 duplex auto
 speed auto
 no clns route-cache
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
 no clns route-cache
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.10.10.254
!
no ip http server
!
!
!
!
!
!
control-plane
!
!
dial-peer cor custom
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 stopbits 1
line vty 0 4
 password cisco
 login
!
!
end

CE2

hostname CE2
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
ip subnet-zero
ip cef
!
!
no ip domain-lookup
!
no mpls traffic-eng auto-bw timers frequency 0
call rsvp-sync
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
 no clns route-cache
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
 no clns route-cache
!
interface FastEthernet2/0
 ip address 20.20.20.1 255.255.255.0
 duplex auto
 speed auto
 no clns route-cache
!
interface FastEthernet2/1
 no ip address
 shutdown
 duplex auto
 speed auto
 no clns route-cache
!
ip classless
ip route 0.0.0.0 0.0.0.0 20.20.20.254
!
no ip http server
!
!
!
!
!
!
control-plane
!
!
dial-peer cor custom
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 stopbits 1
line vty 0 4
 password cisco
 login
!
!
end