天下网吧 >> 网吧方案 >> 网络方案 >> 正文

全球路由表应用举例


  
  
  CE 1
  version 12.2
  !
  hostname CE-1
  !
  ip subnet-zero
  !
  interface Loopback0
  ip address 10.1.1.1 255.255.255.255
  !
  interface Loopback2
  ip address 11.11.11.1 255.255.255.0
  !
  interface Serial8/0
  ip address 192.168.10.1 255.255.255.252
  
  !--- The interface is connected to PE 1.
  
  !
  ip classless
  ip route 0.0.0.0 0.0.0.0 192.168.10.2
  
  !--- This is the default route to route all packets to PE 1.
  
  !
  
  PE 1
  version 12.2
  !
  hostname PE-1
  !
  ip subnet-zero
  !
  ip vrf customer1
  
  !--- This configured VRF customer1.
  
  rd 100:1
  
  !--- This configured the route distiguisher for VRF.
  
  route-target export 1:1
  route-target import 1:1
  
  !--- This configured the export and import policies into VRF.
  
  !
  ip cef
  
  !--- This enabled Cisco Express Forwarding (CEF) switching.
  
  !
  interface Loopback0
  ip address 10.1.1.2 255.255.255.255
  !
  interface Ethernet0/0
  
  !--- It is connected to P router.
  
  ip address 10.10.23.2 255.255.255.0
  tag-switching ip
  
  !--- MPLS switching is enabled.
  
  !
  interface Serial8/0
  ! Connected to CE-1
  ip vrf forwarding customer1
  
  !--- Route forwarding based on customer1 VRF is enabled.
  
  ip address 192.168.10.2 255.255.255.252
  !
  router ospf 1
  log-adjacency-changes
  redistribute static subnets
  network 0.0.0.0 255.255.255.255 area 0
  !
  router bgp 100
  no synchronization
  bgp log-neighbor-changes
  neighbor 10.1.1.4 remote-as 100
  
  !--- Neighbor relationship with PE 2 is established.
  
  neighbor 10.1.1.4 update-source Loopback0
  neighbor 10.1.1.4 next-hop-self
  no auto-summary
  !
  address-family ipv4 vrf customer1
  
  !--- The address-family configuration mode specifies IPv4 unicast
  !---address prefixes for customer1 VRF.
  
  no auto-summary
  no synchronization
  network 11.11.11.0 mask 255.255.255.0
  
  !--- CE 1 network 11.11.11.0/24 to PE 2 is announced.
  
  network 192.168.10.0 mask 255.255.255.252
  exit-address-family
  !
  address-family vpnv4

本文来源:天下网吧 作者:网吧方案

相关文章
声明
声明:本站所发表的文章、评论及图片仅代表作者本人观点,与本站立场无关。若文章侵犯了您的相关权益,请及时与我们联系,我们会及时处理,感谢您对本站的支持!联系Email:support@txwb.com,系统开号,技术支持,服务联系QQ:1175525021本站所有有注明来源为天下网吧或天下网吧论坛的原创作品,各位转载时请注明来源链接!
天下网吧·网吧天下