
如图,AB公司与CD公司互为竞争对手,且租用同一ISP的线路作为分部的互连网络。由于必须确保两公司之间的路由安全性,ISP采用MPLS ×××保障线路可达性及安全性。
其中AB公司分公司网关R1申请了自治号1,R4申请自治号4;CD分公司R3申请自治号3,R6申请自治号6。ISP自己采用自治号25。配置完成后,R1、R4拥有1.0.0.0/24和4.0.0.0/24的路由;R3、R6拥有3.0.0.0/24和6.0.0.0/24的路由。
R1、R3、R4、R6配置基本一致。
R1#show run
hostname R1
!
interface Loopback0
ip
address 1.1.1.1 255.255.255.255
!
interface Loopback1
description Corp_1
ip address 1.0.0.1
255.255.255.0
!
interface Ethernet0/0
description To R2's E0/0
ip
address 12.0.0.1 255.255.255.0
!
router bgp 1
no
synchronization
bgp
router-id 1.1.1.1
bgp
log-neighbor-changes
network 1.0.0.0
mask 255.255.255.0
network 1.1.1.1
mask 255.255.255.255
neighbor 12.0.0.2
remote-as 25
no
auto-summary
!
end
-----------------------------------分割线-----------------------------------
R2、R5配置基本一致
R2#show run
version 12.4
!
hostname R2
!
ip vrf ×××_14
rd 25:14
route-target export 25:14
route-target import 25:14
!
ip vrf ×××_36
rd 25:36
route-target export 25:36
route-target import 25:36
!
ip cef
interface Loopback0
ip
address 2.2.2.2 255.255.255.255
!
interface Loopback1
description Insert into ×××_14
ip
address 2.0.0.2 255.255.255.0
!
interface Ethernet0/0
description To R1's E0/0
ip vrf forwarding ×××_14
ip
address 12.0.0.2 255.255.255.0
!
interface Ethernet0/1
description To R3's E0/1
ip vrf forwarding ×××_36
ip
address 23.0.0.2 255.255.255.0
!
interface Ethernet0/2
description To R5's E0/2
ip
address 25.0.0.2 255.255.255.0
mpls ip
!
router eigrp 25
network 2.2.2.2
0.0.0.0
network 12.0.0.2
0.0.0.0
network 23.0.0.2
0.0.0.0
network 25.0.0.2 0.0.0.0
no auto-summary
eigrp router-id 2.2.2.2
!
router bgp 25
no bgp default ipv4-unicast
bgp
log-neighbor-changes
neighbor 5.5.5.5
remote-as 25
neighbor 5.5.5.5
update-source Loopback0
!
address-family
ipv4
no
synchronization
no
auto-summary
exit-address-family
!
address-family vpnv4
neighbor 5.5.5.5
activate
neighbor 5.5.5.5
send-community extended
exit-address-family
!
address-family ipv4 vrf ×××_14
no synchronization
neighbor 12.0.0.1
remote-as 1
neighbor 12.0.0.1
activate
exit-address-family
!
address-family ipv4 vrf ×××_36
no synchronization
neighbor 23.0.0.3
remote-as 3
neighbor 23.0.0.3
activate
exit-address-family
!
End
R1#show ip route
1.0.0.0/8 is variably subnetted, 3 subnets,
2 masks
C
1.0.0.0/24 is directly connected, Loopback1
C
1.1.1.1/32 is directly connected, Loopback0
4.0.0.0/8 is variably subnetted, 2 subnets,
2 masks
B 4.0.0.0/24
[20/0] via 12.0.0.2, 00:03:23
B 4.4.4.4/32
[20/0] via 12.0.0.2, 00:03:23
12.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
C
12.0.0.0/24 is directly connected,
Ethernet0/0
R3#show ip route
3.0.0.0/8 is variably subnetted, 3 subnets,
2 masks
C
3.0.0.0/24 is directly connected, Loopback1
C
3.3.3.3/32 is directly connected, Loopback0
6.0.0.0/8 is variably subnetted, 2 subnets,
2 masks
B 6.0.0.0/24
[20/0] via 23.0.0.2, 00:04:08
B 6.6.6.6/32
[20/0] via 23.0.0.2, 00:04:08
23.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
C
23.0.0.0/24 is directly connected,
Ethernet0/1
-----------------------------------分割线-----------------------------------
MPLS ×××是通过MPLS中的标签,对不同×××内的路由进行两次标记,第一次标记在MPBGP内,目的是为了区分某条路由在同一PE(BGP进程)上不同的入出口;第二次标记在MPLS域内,目的是为了MPLS路由器可以传递到iBGP对端。由于MPLS域内的路由器并不知道CE的相关路由,它们只需要根据PE所设定的MPLS标签进行转发即可,这和IP over IP有点类似,也就是通过二次路由减少单次路由时路由表过大所造成的影响。只不过MPLS使用标签代替了IP头而已。
其中红色字迹表示该部分将对MPLS起作用。由于LDP需要IGP配合才能进行标签分发,因此在E0/2启动MPLS IP,并启用EIGRP作为IGP帮助标签分发。
R2#show mpls forwarding-table
Local
Outgoing Prefix Bytes Label Outgoing
Next Hop
Label
Label or Tunnel Id Switched interface
16 Pop Label 5.5.5.5/32 0 Et0/2 25.0.0.5
17 No Label
1.0.0.0/24[V] 0 Et0/0 12.0.0.1
18 No Label 1.1.1.1/32[V] 0 Et0/0 12.0.0.1
19 No Label 3.0.0.0/24[V] 0 Et0/1 23.0.0.3
20
No Label 3.3.3.3/32[V] 0 Et0/1 23.0.0.3
可以看到eigrp传递的5.5.5.5/32路由已经被MPLS贴上标签。
黄、灰底色的内容是不同MPLS ×××的相关配置。可以看到,在CISCO内部,不同的MPLS ×××客户被加入到不同的VRF内,并在BGP内部调用不同的IPv4 VRF地址簇进行标记。而内部iBGP则调用×××v4地址簇进行互连。由此,CE的路由在IPv4 VRF内被添加第一个标签/去掉第二个标签,并在×××v4内添加第二个标签/去掉第一个标签。根据标签,R2、R5进行转发,并在对端完成逆向操作。
本文详细介绍了如何利用MPLS×××技术为两个互为竞争关系的公司提供安全可靠的网络连接。通过配置不同的自治系统编号和VRF,实现了AB公司与CD公司之间的路由隔离和安全性保障。
934

被折叠的 条评论
为什么被折叠?



