分享
 
 
 

全球路由表应用举例

王朝other·作者佚名  2008-05-19
窄屏简体版  字體: |||超大  

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

!--- This is the address-family VPNV4 configuration mode for

!--- configuring BGP sessions.

neighbor 10.1.1.4 activate

neighbor 10.1.1.4 send-community extended

no auto-summary

exit-address-family

!

ip classless

ip route 11.11.11.0 255.255.255.0 Serial8/0 192.168.10.1

!--- The static route in the global routing table is pointing to

!--- the interface connected to CE 1.

ip route vrf customer1 0.0.0.0 0.0.0.0 192.168.67.1 global

!--- The static default route under customer1 VRF, routing packets

!--- outside of VPN to the Internet gateway.

! routes

ip route vrf customer1 11.11.11.0 255.255.255.0 192.168.10.1

!--- The static route for network 11.11.11.0/24 (CE-1 Network) under

!---customer1 VRF ensures the reachability of CE 1 network from the

!--- other VPN sites

P

version 12.2

!

hostname P

!

ip subnet-zero

!

ip cef

!--- CEF switching is enabled.

!

interface Loopback0

ip address 10.1.1.3 255.255.255.255

!

interface Ethernet0/0

!--- This is connected to PE 1.

ip address 10.10.23.3 255.255.255.0

tag-switching ip

!--- MPLS switching is enabled.

!

interface Ethernet1/0

!--- This is connected to PE 2.

ip address 10.10.34.3 255.255.255.0

tag-switching ip

!

interface Ethernet2/0

!--- This is connected to the Internet gateway.

ip address 10.10.36.3 255.255.255.0

tag-switching ip

!

router ospf 1

log-adjacency-changes

network 0.0.0.0 255.255.255.255 area 0

IGW

version 12.2

!

hostname IGW

!

ip subnet-zero

!

ip cef

!--- This enabled CEF switching.

!

interface Loopback0

ip address 10.1.1.6 255.255.255.255

!

interface Ethernet2/0

!--- This is connected to P router.

ip address 10.10.36.6 255.255.255.0

tag-switching ip

!

interface Serial8/0

!--- This is connected to Internet R7.

ip address 192.168.67.1 255.255.255.252

!

router ospf 1

log-adjacency-changes

network 0.0.0.0 255.255.255.255 area 0

!

router bgp 100

no synchronization

bgp log-neighbor-changes

network 11.11.11.0 mask 255.255.255.0

network 22.22.22.0 mask 255.255.255.0

neighbor 192.168.67.2 remote-as 200

no auto-summary

PE 2

version 12.2

!

hostname PE-2

!

ip subnet-zero

!

ip vrf customer1

!--- Customer1 VRF is configured.

rd 100:1

!--- Route Distinguisher for VRF is configured.

route-target export 1:1

route-target import 1:1

!--- This configured the import and export policies for customer1

!--- VRF.

!

ip cef

!--- This enabled CEF switching.

!

interface Loopback0

ip address 10.1.1.4 255.255.255.255

interface Ethernet1/0

!--- Connected to P router.

ip address 10.10.34.4 255.255.255.0

tag-switching ip

!--- MPLS switching is enabled.

!

interface Serial9/0

!--- Connected to CE 2 router.

ip vrf forwarding customer1

!--- This enables VRF forwarding on the interface.

ip address 192.168.20.1 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.2 remote-as 100

neighbor 10.1.1.2 update-source Loopback0

neighbor 10.1.1.2 next-hop-self

no auto-summary

!

address-family ipv4 vrf customer1

!--- This is the address-family IPv4 configuration of customer1 VRF.

no auto-summary

no synchronization

network 22.22.22.0 mask 255.255.255.0

!--- This announces the CE 2 network to PE 1.

exit-address-family

!

address-family vpnv4

!--- This is the address-family VPNV4 configuration for BGP Sessions

!--- with PE 1.

neighbor 10.1.1.2 activate

neighbor 10.1.1.2 send-community extended

no auto-summary

exit-address-family

!

ip classless

ip route 22.22.22.0 255.255.255.0 Serial9/0 192.168.20.2

!--- This is the static route for network 22.22.22.0/24 in the global

!--- routing table pointing to the interface connected to CE 2.

ip route vrf customer1 0.0.0.0 0.0.0.0 192.168.67.1 global

!--- This is the static default route for customer VRF

!--- for destinations outside the VPN.

ip route vrf customer1 22.22.22.0 255.255.255.0 192.168.20.2

!--- This is the static route within customer1 VRF for CE 2

!--- network for VPN connectivity.

CE 2

version 12.2

!

hostname CE-2

!

ip subnet-zero

!

interface Loopback0

ip address 22.22.22.22 255.255.255.0

!

interface Serial9/0

!--- This is connected to PE 2.

ip address 192.168.20.2 255.255.255.252

!

ip classless

ip route 0.0.0.0 0.0.0.0 192.168.20.1

!--- This is the default route pointing to PE 2.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有