友情提示:如果本网页打开太慢或显示不完整,请尝试鼠标右键“刷新”本网页!
第三电子书 返回本书目录 加入书签 我的书架 我的书签 TXT全本下载 『收藏到我的浏览器』

路由器基本知识及应用实例(DOC格式)-第22部分

快捷操作: 按键盘上方向键 ← 或 → 可快速上下翻页 按键盘上的 Enter 键可回到本书目录页 按键盘上方向键 ↑ 可回到本页顶部! 如果本书没有阅读完,想下次继续接着阅读,可使用上方 "收藏到我的浏览器" 功能 和 "加入书签" 功能!

'PE3…bgp' peer 202。100。1。2 as…number 100
'PE3…bgp' peer 202。100。1。2 connect…interface loopback0
'PE3…bgp' peer 202。100。1。4 as…number 100
'PE3…bgp' peer 202。100。1。4 connect…interface loopback0
# 激活PE对等体。
'PE3…bgp' ipv4…family vpnv4
'PE3…bgp…af…vpn' peer 202。100。1。1 enable
'PE3…bgp…af…vpn' peer 202。100。1。2 enable
'PE3…bgp…af…vpn' peer 202。100。1。4 enable
'PE3…bgp…af…vpn' import…route direct
'PE3…bgp…af…vpn' quit
# 在PE和P之间运行IGP路由协议,本例采用OSPF。
'PE3' ospf
'PE3…ospf' area 0
'PE3…ospf…area…0。0。0。0' network 172。3。3。0 0。0。255。255
'PE3…ospf…area…0。0。0。0' network 202。100。1。3 0。0。0。0
'PE3…ospf' import…route direct
CE3路由器配置
# 配置接口。
'CE3' interface ethernet 1
'CE3…Ethernet1' ip address 168。3。3。1 255。255。0。0
# 配置路由协议。
'CE3' bgp 65430
'CE3…bgp' peer 168。3。3。2 as…number 100
'CE3…bgp' import…route direct
'CE3…bgp' import…route static
PE2配置
# 配置MPLS基本能力。
'PE2' mpls lsr…id 172。2。2。2
'PE2…mpls' mpls ldp
'PE2…mpls…ldp' quit
'PE2' interface pos 1/0/0
'PE2…pos1/0/0' mpls ldp enable
# vpn…instance配置。
'PE2' ip vpn…instance vpna
'PE2…vpn…instance' route…distinguisher 100:2
'PE2…vpn…instance' vpn…target 100:2 both
# 配置CE2所在的Site可以接受CE4所在的Site的路由。
'PE2…vpn…instance' vpn…target 100:4 import…extmunity
# 接口配置(对PE路由器,配置Loopback0接口地址时,必须使用32位掩码的主机地址)。
'PE2' interface loopback0
'PE2…LoopBack0' ip address 202。100。1。2 255。255。255。255
'PE2' interface ethernet 2/0/0
'PE2…Ethernet2/0/0' ip binding vpn…instance vpna
'PE2…Ethernet2/0/0' ip address 168。2。2。2 255。255。0。0
'PE2…Ethernet2/0/0' exit
'PE2' interface pos1/0/0
'PE2…Pos1/0/0' ip address 172。2。2。1 255。255。0。0
# BGP配置PE…CE。
'PE2' bgp 100
'PE2…bgp' ipv4…family vpn…instance vpna
'PE2…bgp…af…vpn…instance' peer 168。2。2。1 as…number 65420
'PE2…bgp…af…vpn…instance' quit
# BGP配置PE…PE。
'PE2' bgp 100
'PE2…bgp' peer 202。100。1。1 as…number 100
'PE2…bgp' peer 202。100。1。1 connect…interface loopback0
'PE2…bgp' peer 202。100。1。3 as…number 100
'PE2…bgp' peer 202。100。1。3 connect…interface loopback0
'PE2…bgp' peer 202。100。1。4 as…number 100
'PE2…bgp' peer 202。100。1。4 connect…interface loopback0
'PE2…bgp' ipv4…family vpnv4
'PE2…bgp…af…vpn' peer 202。100。1。1 enable
'PE2…bgp…af…vpn' peer 202。100。1。3 enable
'PE2…bgp…af…vpn' peer 202。100。1。4 enable
'PE2…bgp…af…vpn' import…route direct
'PE2…bgp…af…vpn' quit
# 配置OSPF。
'PE2' ospf
'PE2…ospf' area 0
'PE2…ospf…area…0。0。0。0' network 172。2。2。0 0。0。255。255
'PE2…ospf…area…0。0。0。0' network 202。100。1。2 0。0。0。0
'PE2…ospf' import…route direct
CE2路由器配置
# 配置接口。
'CE2' interface ethernet 1
'CE2…Ethernet1' ip address 168。2。2。1 255。255。0。0
# 配置路由协议。
'CE2' bgp 65420
'CE2…bgp' peer 168。2。2。2 as…number 100
'CE2…bgp' import…route direct
'CE2…bgp' import…route static
PE4配置
# 配置MPLS基本能力。
'PE4' mpls lsr…id 172。4。4。4
'PE4…mpls' mpls ldp
'PE4…mpls…ldp' quit
'PE4' interface pos 1/0/0
'PE4…pos1/0/0' mpls ldp enable
# vpn…instance配置。
'PE4' ip vpn…instance vpna
'PE4…vpn…instance' route…distinguisher 100:4
'PE4…vpn…instance' vpn…target 100:4 both
# 配置CE4所在的Site可以接受CE2所在的Site的路由。
'PE4…vpn…instance' vpn…target 100:2 import…extmunity
# 接口配置(对PE路由器,配置Loopback0接口地址时,必须使用32位掩码的主机地址)。
'PE4' interface loopback0
'PE4…LoopBack0' ip address 202。100。1。4 255。255。255。255
'PE4' interface ethernet 2/0/0
'PE4…Ethernet2/0/0' ip binding vpn…instance vpna
'PE4…Ethernet2/0/0' ip address 168。4。4。4 255。255。0。0
'PE4…Ethernet2/0/0' exit
'PE4' interface pos1/0/0
'PE4…Pos1/0/0' ip address 172。4。4。1 255。255。0。0
# BGP配置PE…CE。
'PE4' bgp 100
'PE4…bgp' ipv4…family vpn…instance vpna
'PE4…bgp…af…vpn…instance' peer 168。4。4。1 as…number 65440
'PE4…bgp…af…vpn…instance' quit
# BGP配置PE…PE。
'PE4' bgp 100
'PE4…bgp' peer 202。100。1。1 as…number 100
'PE4…bgp' peer 202。100。1。1 connect…interface loopback0
'PE4…bgp' peer 202。100。1。2 as…number 100
'PE4…bgp' peer 202。100。1。2 connect…interface loopback0
'PE4…bgp' peer 202。100。1。3 as…number 100
'PE4…bgp' peer 202。100。1。3 connect…interface loopback0
'PE4…bgp' ipv4…family vpnv4
'PE4…bgp…af…vpn' peer 202。100。1。1 enable
'PE4…bgp…af…vpn' peer 202。100。1。2 enable
'PE4…bgp…af…vpn' peer 202。100。1。3 enable
'PE4…bgp…af…vpn' import…route direct
'PE4…bgp…af…vpn' quit
# 配置OSPF。
'PE4' ospf
'PE4…ospf' area 0
'PE4…ospf…area…0。0。0。0' network 172。4。4。0 0。0。255。255
'PE4…ospf…area…0。0。0。0' network 202。100。1。4 0。0。0。0
'PE4…ospf' import…route direct
CE4路由器配置
# 配置接口。
'CE4' interface ethernet 1
'CE4…Ethernet1' ip address 168。4。4。1 255。255。0。0
# 配置路由协议。
'CE4' bgp 65440
'CE4…bgp' peer 168。4。4。2 as…number 100
'CE4…bgp' import…route direct
'CE4…bgp' import…route static

P路由器配置
# 配置接口。
'P' interface pos1/0/0
'P…Pos1/0/0' ip address 172。1。1。2 255。255。0。0
'P' interface pos2/0/0
'P…Pos2/0/0' ip address 172。2。2。2 255。255。0。0
'P' interface pos3/0/0
'P…Pos3/0/0' ip address 172。3。3。2 255。255。0。0
'P' interface pos4/0/0
'P…Pos4/0/0' ip address 172。4。4。2 255。255。0。0
# 配置MPLS基本能力。
'P' mpls lsr…id 172。1。1。2
'P' mpls ldp
'P' interface pos1/0/0
'P…Pos1/0/0' mpls ldp enable
'P' interface pos2/0/0
'P…Pos2/0/0' mpls ldp enable
'P' interface pos3/0/0
'P…Pos3/0/0' mpls ldp enable
'P'interface pos4/0/0
'P…Pos4/0/0' mpls ldp enable
# 配置OSPF协议。
'P' ospf
'P…ospf' area 0
'P…ospf…area…0。0。0。0' network 172。1。1。0 0。0。255。255
'P…ospf…area…0。0。0。0' network 172。2。1。0 0。0。255。255
'P…ospf…area…0。0。0。0' network 172。3。1。0 0。0。255。255
'P…ospf…area…0。0。0。0' network 172。4。1。0 0。0。255。255
'P…ospf' import…route direct
4。4。4。2  Extranet组网配置示例
组网需求
公司A和公司B通过VPN网络互联,两个公司的总部在城市C,虚拟内部网号为VPN1和VPN2。NE80通过MPLS给用户提供VPN功能,两个VPN之间有一些共享资源在城市C,VPN内用户都可以访问城市C的资源,但城市A和B之间的用户不能互相访问。因为两个公司在NE80B上共用了一个VPN…instance,所以两个公司使用的IP地址不能够重叠。
组网图

Extranet组网示例
配置步骤
NE80A配置:
# MPLS基本功能配置
'NE80A' mpls lsr…id 60。60。60。60
'NE80A…mpls' mpls ldp 
'NE80A' interface pos 1/0/0
'NE80A…Pos1/0/0' mpls ldp enable
# 定义MPLS VPN
'NE80A' ip vpn…instance vpn…instance1
'NE80A…vpn…instance' route…distinguisher 100:1
'NE80A…vpn…instance' vpn…target 100:1
'NE80A…vpn…instance' quit
'NE80A' interface loopback0
'NE80A…Loopback0' ip address 172。15。10。1 255。255。255。255
'NE80A' interface ethernet 2/0/0
'NE80A…Ethernet2/0/0' ip binding vpn…instance vpn…instance1
'NE80A…Ethernet2/0/0' ip address 172。15。0。1 255。255。0。0
# 配置PE…PE
'NE80A' bgp 100
'NE80A…bgp' peer 70。70。70。70 as…number 100
'NE80A…bgp' peer 70。70。70。70 connect…interface loopback 0
'NE80A…bgp' ipv4…family vpnv4
'NE80A…bgp…af…vpn' peer 70。70。70。70 enable
'NE80A…bgp…af…vpn' quit
# 配置PE…CE
'NE80A…bgp' ipv4…family vpn…instance vpn…instance1
'NE80A…bgp…af…vpn…instance' peer 172。15。1。1 as…number 65011
'NE80A…bgp…af…vpn…instance' import…route direct
'NE80A…bgp…af…vpn…instance' import…route static
'NE80A…bgp…af…vpn…instance' quit
NE80B配置:
# MPLS基本功能配置
'NE80B' mpls lsr…id 70。70。70。70
'NE80B…mpls' mpls ldp
'NE80B' interface pos 1/0/0
'NE80B…Pos1/0/0' mpls ldp enable 
# 定义MPLS VPN
'NE80B' ip vpn…instance vpn…instance2
'NE80B…vpn…instance' route…distinguisher 100:2
'NE80B…vpn…instance' vpn…target 100:1
'NE80B…vpn…instance' vpn…target 100:2
'NE80B…vpn…instance' quit
'NE80B' interface loopback0
'NE80B…Loopback0' ip address 172。15。20。1 255。255。255。255
'NE80B…Loopback0' quit
'NE80B' interface ethernet 2/0/0
'NE80B…Ethernet2/0/0' ip binding vpn…instance vpn…instance2
'NE80B…Ethernet2/0/0' ip address 172。16。0。1 255。255。0。0
# 配置PE…PE
'NE80B' bgp 100
'NE80B…bgp' peer 60。60。60。60 as…number 100
'NE80B…bgp' peer 60。60。60。60 connect…interface loopback 0
'NE80B…bgp' peer 80。80。80。80 as…number 100
'NE80B…bgp' peer 80。80。80。80 connect…interface loopback 0
'NE80B…bgp' ipv4…family vpnv4
'NE80B…bgp…af…vpn' peer 60。60。60。60 enable
'NE80B…bgp…af…vpn' peer 80。80。80。80 enable
'NE80B…bgp…af…vpn' quit
# 配置PE…CE
'NE80B…bgp' ipv4…family vpn…instance vpn…instance2
'NE80B…bgp…af…vpn…instance' peer 172。16。1。1 as…number 65012
'NE80B…bgp…af…vpn…instance' import…route direct
'NE80B…bgp…af…vpn…instance' import…route static
'NE80B…bgp…af…vpn…instance' quit
NE80C配置:
# MPLS基本功能配置
'NE80C' mpls lsr…id 80。80。80。80
'NE80C…mpls' mpls ldp
'NE80C' interface pos 1/0/0
'NE80C…Pos1/0/0' mpls ldp enable
# 定义MPLS VPN
'NE80C' ip vpn…instance vpn…instance3
'NE80C…vpn…instance' route…distinguisher 100:3
'NE80C…vpn…instance' vpn…target 100:2
'NE80C…vpn…instance' ip binding vpn…instance vpn…instance3
'NE80C vpn…instance' quit
'NE80C' interface loopback0
'NE80C…Loopback0' ip address 172。15。20。1 255。255。255。255
'NE80C…Loopback0' quit
'NE80C' interface ethernet 2/0/0
'NE80C…Ethernet2/0/0' ip address 172。17。0。1 255。255。0。0
# 配置PE…PE
'NE80C' bgp 100
'NE80C…bgp' peer 70。70。70。70 as…number 100
'NE80C…bgp' peer 70。70。70。70 connect…interface loopback 0
'NE80C…bgp' ipv4…family vpnv4
'NE80C…bgp…af…vpn' peer 70。70。70。70 enable
'NE80C…bgp…af…vpn' quit
# 配置PE…CE
'NE80C…bgp' ipv4…family vpn…instance vpn…instance3
'NE80C…bgp…af…vpn…instance' peer 172。17。1。1 as…number 65013
'NE80C…bgp…af…vpn…instance' import…route direct
'NE80C…bgp…af…vpn…instance' import…route static
'NE80C…bgp…af…vpn…instance' quit
4。4。4。3  中央服务器拓扑组网配置示例
组网需求
中心服务器拓扑组网也称为Hub&Spoke组网方式。Hub…Site是指一个处于中心的site,具有所有同一VPN的其它site的路由;Spoke…Site是不处于中心的其它site,其流量通过Hub…Site到达目的。Hub…Site是Spoke…Site中枢。
某银行的分公司与公司总部的组网如0所示,要求所有分公司之间不能直接交换数据,必须通过总部进行通信,以达到统一控制的目的。组网配置成Hub&Spoke拓扑(中心…辐条式拓扑),其中,CE2、CE3为Spoke站点,CE1为银行数据中心Hub站点,CE2和CE3之间的通信都将通过中心站点CE1控制。
组网图

中心服务器拓扑组网示例
配置步骤
NE80A配置:
# MPLS基本功能配置。
'NE80A' mpls lsr…id 70。70。70。70
'NE80A' mpls ldp
'NE80A…mpls…ldp' quit
'NE80A' interface loopback0
'NE80A…Loopback0' ip address 172。15。20。1 255。255。255。255
'NE80A…Loopback0' quit 
'NE80A' interface pos1/0/0
'NE80A…pos1/0/0' mpls ldp enable
'NE80A…pos1/0/0' quit
# 定义MPLS VPN。
在NE80A上配置两个VPN…instance,并且使用不同的路由目标。以控制从NE80B接收的路由从NE80A的另外一个接口再次导出,通告给NE80C。从而达到各个分公司数据经过总部控制。
'NE80A' ip vpn…instance one
'NE80A…vpn…instance' route…distinguisher 100:2
'NE80A…vpn…instance' vpn…target 100:1 import…extmunity
'NE80A…vpn…instance' quit
'NE80A' ip vpn…instance two
'Quidway…vpn…instance' route…distinguisher 100:3
'Quidway…vpn…instance' vpn…target 100:2 export…extmunity
'Quidway…vpn…instance' quit
# 接口配置。
'NE80A' interface ethernet3/0/0
'NE80A…Ethernet3/0/0' ip binding vpn…instance one
'NE80A…Ethernet3/0/0' ip address 172。16。0。1 255。255。0。0
'NE80A…Ethernet3/0/0' quit
'NE80A' interface ethernet2/0/0
'NE80A…Ethernet2/0/0' ip binding vpn…instance two
'NE80A…Ethernet2/0/0' ip address 172。17。0。1 255。255。0。0
'NE80A…Ethernet2/0/0' quit
# 配置PE…PE。
'NE80A' bgp 100
'NE80A…bgp' peer 60。60。60。60 as…number 100
'NE80A…bgp' peer 60。60。60。60 connect…interface loopback 0
'NE80A…bgp' peer 80。80。80。80 as…number 100
'NE80A…bgp' peer 80。80。80。80 connect…interface loopback 0
'NE80A
返回目录 上一页 下一页 回到顶部 1 1
快捷操作: 按键盘上方向键 ← 或 → 可快速上下翻页 按键盘上的 Enter 键可回到本书目录页 按键盘上方向键 ↑ 可回到本页顶部!
温馨提示: 温看小说的同时发表评论,说出自己的看法和其它小伙伴们分享也不错哦!发表书评还可以获得积分和经验奖励,认真写原创书评 被采纳为精评可以获得大量金币、积分和经验奖励哦!