八宝书库 > 文学其他电子书 > 路由器基本知识及应用实例(DOC格式) >

第24部分

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

小说: 路由器基本知识及应用实例(DOC格式) 字数: 每页4000字

按键盘上方向键 ← 或 → 可快速上下翻页,按键盘上的 Enter 键可回到本书目录页,按键盘上方向键 ↑ 可回到本页顶部!
————未阅读完?加入书签已便下次继续阅读!



# 配置本vpn…instance的VPN…target。
'PE3…vpn…instance' vpn…target 100:3 both
# 配置CE3所在的Site可以接受CE1所在的Site的路由。
'PE3…vpn…instance' vpn…target 100:1 import…extmunity
# 配置Loopback接口(对PE路由器,配置Loopback接口地址时,必须使用32位掩码的主机地址)。
'PE3' interface loopback0
'PE3…LoopBack0' ip address 202。100。1。3 255。255。255。255
# 将vpn…instance和与CE连接的接口关联。
'PE3' interface ethernet 2/0/0
'PE3…Ethernet2/0/0' ip binding vpn…instance vpna
# 需在实施关联后,配置与vpn…instance关联的接口地址。
'PE3…Ethernet2/0/0' ip address 168。3。3。2 255。255。0。0
'PE3…Ethernet2/0/0' exit
'PE3' interface pos1/0/0
'PE3…Pos1/0/0' ip address 172。3。3。1 255。255。0。0
# PE与CE之间运行EBGP协议。
'PE3' bgp 100
'PE3…bgp' ipv4…family vpn…instance vpna
'PE3…bgp…af…vpn…instance' peer 168。3。3。1 as…number 65430
'PE3…bgp…af…vpn…instance' quit
# 配置PE的PE对等体、AS号及BGP连接所使用的接口(一般用Loopback接口)。
'PE3' bgp 100
'PE3…bgp' peer 202。100。1。1 as…number 100
'PE3…bgp' peer 202。100。1。1 connect…interface loopback0
'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…inst

返回目录 上一页 下一页 回到顶部 0 0

你可能喜欢的