欢迎您访问我爱IT技术网,今天小编为你分享的电脑教程是网络协议方面的经验知识教程:BGP MPLS/VPN网络技术,下面是详细的分享!
BGP MPLS/VPN网络技术
BGP MPLS/VPN网络技术
BGP协议很早就被众人们熟知,其强大的选路策略工具能力以及其存储路由性能,超越像模像任何一种内部网关协议,从而在自治系统之间作为一部"桥"而存在. 在这之前,有EGP协议,很少有人知道它,因为它并没有广泛得到应用,现在也就不在美国的军方上用到的,但点也不多. BGP作为一种外部边界网关协议,不断的发展,现在所应用的都是BGP-4版本, 属于无类协议,前三种都是有类的,功能也没这么全.其相关的数据格式以及属性在前面提及过.
MPLS技术, 来自于ATM的技术革新. 传统的IP分组交换,是基于路由表里面的目标地址来选择下一路进行通信的,采用的是HOP-BY-HOP,采用IP分组,有很多方面的缺点,也就是人们也寻找一个技术来代替IP寻址. 此时ATM和FR出现了,FR是在X.25网上的更新,并作为一种新技术而出现的.主要体现在数据链路层次. 而ATM并不仅仅出现在数据链路层,它也伸入到三层,也到达用记的桌面,但是它的要求却也是非常高的,对于网络设备,网络终端配置性能都有限制要求,所以它并没有得到很多的广泛应用,采用中固定信元的方式,进行数据的转发,高效率,在交换时,打上VPI/VCI,这一点,与FR的DLCL相似, 可以基于路由器接口或者是基于设备的. 此时,MPLS,在这一种情况下,而产生,它不需要有特定的硬件支撑,也不需要有独特的分组交换, 同时支持多种协议,以标记的方式来转发分组,在内部采用相应的协议. 思科在很早的设备上就支持MPLS了,只是支持,但并没有真正的应用到这一性能.
VPN,虚拟专用网,对于从事网络安全的工程师来说,这一技术肯定是熟得不能再熟了,不管是二层的PPTP ,L2TP以及三层的IPSEC VPN 以及EASY VPN ,SSL VPN.都会涉及到相同的一个问题,就是数据的加密和认证,通过比较,可以知道,这一些VPN技术与MPLS VPN技术相比,后者则很少沾到加密和认证这一块,通过配置即可得知. 实现私网地址之间的一个互通. 采用的是GRE还是其他封闭嵌套技术也好,都是这一目的. 下面则对MPLS VPN实验进行操作.
网络拓扑图如下所示:

在PE1 P PE2 这三台路由器上分别配置环回接口,作为BGP的源地址 1.1.1.9/32 2.2.2.9/32 3.3.3.9/32
采用OSPF协议作为内部网关协议,使环回接口能够互通. 在AS 100 内配置MPLS ,并用环回接口作为测试
在CE1 与PE1之间采用RIP作为内部网络协议,在CE2与PE1之间采用的是OSPF作为内部网络协议
在CE3与PE2之间采用OSPF作为内部协议,在CE4与PE2之间采用EIGPR作为内部协议
在相应的网络设备上配置相应的IP地址,并测试互通情况。/
在AS 100 内查看OSPF邻居建立情况:
PE1# sh ip os neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.9 0 FULL/ - 00:00:30 172.1.1.2 Serial1/0
192.168.2.1 1 FULL/DR 00:00:38 10.2.1.1 FastEthernet0/1
MPLS 邻居建立情况:
PE1#sh mpls ldp neighbor
Peer LDP Ident: 2.2.2.9:0; Local LDP Ident 1.1.1.9:0
TCP connection: 2.2.2.9.51455 - 1.1.1.9.646
State: Oper; Msgs sent/rcvd: 16/15; Downstream
Up time: 00:06:54
LDP discovery sources:
Serial1/0, Src IP addr: 172.1.1.2
Addresses bound to peer LDP Ident:
172.1.1.2 2.2.2.9 172.2.1.1
P#sh mpls ldp neighbor
Peer LDP Ident: 1.1.1.9:0; Local LDP Ident 2.2.2.9:0
TCP connection: 1.1.1.9.646 - 2.2.2.9.51455
State: Oper; Msgs sent/rcvd: 16/16; Downstream
Up time: 00:07:13
LDP discovery sources:
Serial1/0, Src IP addr: 172.1.1.1
Addresses bound to peer LDP Ident:
172.1.1.1 1.1.1.9
Peer LDP Ident: 3.3.3.9:0; Local LDP Ident 2.2.2.9:0
TCP connection: 3.3.3.9.45449 - 2.2.2.9.646
State: Oper; Msgs sent/rcvd: 16/16; Downstream
Up time: 00:07:13
LDP discovery sources:
Serial1/1, Src IP addr: 172.2.1.2
Addresses bound to peer LDP Ident:
172.2.1.2 3.3.3.9
测试MPLS 网络:
PE1#traceroute 3.3.3.9
Type escape sequence to abort.
Tracing the route to 3.3.3.9
1 172.1.1.2 [MPLS: Label 16 Exp 0] 84 msec 40 msec 60 msec
2 172.2.1.2 48 msec * 60 msec
PE1#
已经成功建立。
下一步,创建相应的感兴趣流并进行区分和把相应的接口划分到VRF;
ip vrf vpna
rd 100:1
route-target export 100:1
route-target import 100:1
!
ip vrf vpnb
rd 200:1
route-target export 200:1
route-target import 200:1
!
interface FastEthernet0/0
ip vrf forwarding vpna
ip address 10.1.1.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip vrf forwarding vpnb
ip address 10.2.1.2 255.255.255.0
duplex auto
speed auto
PE1#ping vrf vpna 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max=12/32/48 ms
PE1#
建立M-BGP,并配置相应的协议,
router ospf 100 vrf vpnb
log-adjacency-changes
redistribute bgp 100 subnets
network 10.2.1.0 0.0.0.255 area 0
!
router ospf 1
log-adjacency-changes
network 1.1.1.9 0.0.0.0 area 0
network 172.1.1.0 0.0.0.255 area 0
!
router rip
version 2
network 10.0.0.0
no auto-summary
!
address-family ipv4 vrf vpna
redistribute bgp 100 metric 1
network 10.0.0.0
no auto-summary
exit-address-family
!
router bgp 100
no synchronization
bgp log-neighbor-changes
neighbor 3.3.3.9 remote-as 100
neighbor 3.3.3.9 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 3.3.3.9 activate
neighbor 3.3.3.9 send-community both
exit-address-family
!
address-family ipv4 vrf vpnb
redistribute ospf 100 vrf vpnb
no synchronization
exit-address-family
!
address-family ipv4 vrf vpna
redistribute rip
no synchronization
network 10.1.1.0
exit-address-family
这只是在PE1上面所做的配置,在PE3也作相应的配置即可,但配置EIGRP有不同点,如下所示:
!
router eigrp 1
network 10.4.1.0 0.0.0.255
no auto-summary
!
address-family ipv4 vrf vpnb
redistribute bgp 100 metric 100000 100 255 1 1500
network 10.0.0.0
no auto-summary
autonomous-system 1
exit-address-family
在PE1上查看VRF路由信息:
PE1#sh ip route vrf vpna
Routing Table: vpna
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 2 subnets
B 10.3.1.0 [200/0] via 3.3.3.9, 00:10:56
C 10.1.1.0 is directly connected, FastEthernet0/0
R 192.168.1.0/24 [120/1] via 10.1.1.1, 00:00:03, FastEthernet0/0
192.168.3.0/32 is subnetted, 1 subnets
B 192.168.3.1 [200/2] via 3.3.3.9, 00:10:56
PE1#sh ip route vrf vpnb
Routing Table: vpnb
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
B 192.168.4.0/24 [200/10] via 3.3.3.9, 00:11:08
10.0.0.0/24 is subnetted, 2 subnets
C 10.2.1.0 is directly connected, FastEthernet0/1
B 10.4.1.0 [200/0] via 3.3.3.9, 00:11:08
192.168.2.0/32 is subnetted, 1 subnets
O 192.168.2.1 [110/2] via 10.2.1.1, 00:12:51, FastEthernet0/1
在CE1上进行测试:
CE1#ping 192.168.3.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max=56/101/116 ms
CE1#tr
CE1#traceroute 192.168.3.1
Type escape sequence to abort.
Tracing the route to 192.168.3.1
1 10.1.1.2 40 msec 56 msec 28 msec
2 172.1.1.2 [MPLS: Labels 16/20 Exp 0] 92 msec 96 msec 44 msec
3 10.3.1.2 [MPLS: Label 20 Exp 0] 124 msec 48 msec 56 msec
4 10.3.1.1 108 msec * 112 msec
CE1#
实验完成。
以上就是关于BGP MPLS/VPN网络技术的网络协议知识分享,更多电脑教程请移步到>>电脑教程。
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
