CCIE ISP-Inter-AS MPLS solutions - Back-to-Back vrf’s

When configuring inter-as mpls vpn’s you’ve got 3 options to choose from.

A - Back-to-Back VRF’s
B - MP-eBGP for VPNv4
C - Multi-hop EBGP VPNv4

This post is about option A. I will show how to configure inter-as vpn’s using back-to-back vrf’s. Below you can see the diagram used for the purpose of this post.

InterAS

With back-to-back vrf’s what you’ll do is basically make the connected PE’s think of each other as CE’s. You can run any supported PE-CE routing protocol over the per VPN logical interface between the directly connected ASBR’s. This option is seen as the easiest one to configure, a drawback is that this option doesn’t scale very well as the numbers of VPN’s start to grow.

Below the working configurations for this inter-as solution, I left out the configurations for router R1, R5, R7 and R8 because there is nothing special configured on these routers (they’re just simple P-routers and CE routers running RIPv2).

R2 :





hostname R2
!
ip cef
!
ip vrf VPN_A
 rd 2.2.2.2:1
 route-target export 2.2.2.2:1
 route-target import 3.3.3.3:1
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface Loopback1
 ip vrf forwarding VPN_A
 ip address 22.22.22.22 255.255.255.255
!
interface FastEthernet0/0
 ip vrf forwarding VPN_A
 ip address 24.24.24.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 12.12.12.2 255.255.255.0
 duplex auto
 speed auto
 tag-switching ip
!
router ospf 100 vrf VPN_A
 log-adjacency-changes
 redistribute bgp 123 subnets
 network 22.22.22.22 0.0.0.0 area 0
 network 24.24.24.2 0.0.0.0 area 0
!
router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 network 2.2.2.2 0.0.0.0 area 0
 network 12.12.12.2 0.0.0.0 area 0
!
router bgp 123
 bgp router-id 2.2.2.2
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 3.3.3.3 remote-as 123
 neighbor 3.3.3.3 update-source Loopback0
 !
 address-family vpnv4
 neighbor 3.3.3.3 activate
 neighbor 3.3.3.3 send-community both
 exit-address-family
 !
 address-family ipv4 vrf VPN_A
 redistribute ospf 100 vrf VPN_A match internal external 1 external 2
 no auto-summary
 no synchronization
 exit-address-family
    

R4 :





hostname R4
!
ip cef
!
ip vrf VPN_A
 rd 4.4.4.4:1
 route-target export 4.4.4.4:1
 route-target import 6.6.6.6:1
!
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface Loopback1
 ip vrf forwarding VPN_A
 ip address 44.44.44.44 255.255.255.255
!
interface FastEthernet0/0
 ip vrf forwarding VPN_A
 ip address 24.24.24.4 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 45.45.45.4 255.255.255.0
 duplex auto
 speed auto
 tag-switching ip
!
router ospf 100 vrf VPN_A
 log-adjacency-changes
 redistribute bgp 456 subnets
 network 24.24.24.4 0.0.0.0 area 0
 network 44.44.44.44 0.0.0.0 area 0
!
router ospf 1
 router-id 4.4.4.4
 log-adjacency-changes
 network 4.4.4.4 0.0.0.0 area 0
 network 45.45.45.4 0.0.0.0 area 0
!
router bgp 456
 bgp router-id 4.4.4.4
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 6.6.6.6 remote-as 456
 neighbor 6.6.6.6 update-source Loopback0
 !
 address-family vpnv4
 neighbor 6.6.6.6 activate
 neighbor 6.6.6.6 send-community both
 exit-address-family
 !
 address-family ipv4 vrf VPN_A
 redistribute ospf 100 vrf VPN_A match internal external 1 external 2
 no auto-summary
 no synchronization
 exit-address-family
    

R3 :





hostname R3
!
ip cef
!
ip vrf VPN_A
 rd 3.3.3.3:1
 route-target export 3.3.3.3:1
 route-target import 2.2.2.2:1
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 13.13.13.3 255.255.255.0
 duplex auto
 speed auto
 tag-switching ip
!
interface FastEthernet2/0
 ip vrf forwarding VPN_A
 ip address 37.37.37.3 255.255.255.0
 duplex auto
 speed auto
!
router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
 network 3.3.3.3 0.0.0.0 area 0
 network 13.13.13.3 0.0.0.0 area 0
!
router rip
 version 2
 no auto-summary
 !
 address-family ipv4 vrf VPN_A
 redistribute bgp 123 metric transparent
 network 37.0.0.0
 no auto-summary
 exit-address-family
!
router bgp 123
 bgp router-id 3.3.3.3
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 123
 neighbor 2.2.2.2 update-source Loopback0
 !
 address-family vpnv4
 neighbor 2.2.2.2 activate
 neighbor 2.2.2.2 send-community both
 exit-address-family
 !
 address-family ipv4 vrf VPN_A
 redistribute rip
 no auto-summary
 no synchronization
 exit-address-family
    

R6 :





hostname R6
!
ip cef
!
ip vrf VPN_A
 rd 6.6.6.6:1
 route-target export 6.6.6.6:1
 route-target import 4.4.4.4:1
!
interface Loopback0
 ip address 6.6.6.6 255.255.255.255
!
interface FastEthernet0/0
 ip vrf forwarding VPN_A
 ip address 61.61.61.6 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 56.56.56.6 255.255.255.0
 duplex auto
 speed auto
 tag-switching ip
!
interface FastEthernet2/0
 ip vrf forwarding VPN_A
 ip address 68.68.68.6 255.255.255.0
 duplex auto
 speed auto
!
router ospf 1
 router-id 6.6.6.6
 log-adjacency-changes
 network 6.6.6.6 0.0.0.0 area 0
 network 56.56.56.6 0.0.0.0 area 0
!
router rip
 version 2
 no auto-summary
 !
 address-family ipv4 vrf VPN_A
 redistribute bgp 456 metric transparent
 network 68.0.0.0
 no auto-summary
 exit-address-family
!
router bgp 456
 bgp router-id 6.6.6.6
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 4.4.4.4 remote-as 456
 neighbor 4.4.4.4 update-source Loopback0
 !
 address-family vpnv4
 neighbor 4.4.4.4 activate
 neighbor 4.4.4.4 send-community both
 exit-address-family
 !
 address-family ipv4 vrf VPN_A
 redistribute rip
 no auto-summary
 no synchronization
 exit-address-family
    

As you can see we run a separate instance of the OSPF process between router R2 and R4, under this process we redistribute BGP.

Now let’s do a “show ip route” on router R7 :

R7 :





R7#sh ip route
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

     68.0.0.0/24 is subnetted, 1 subnets
R       68.68.68.0 [120/2] via 37.37.37.3, 00:00:07, FastEthernet1/3
     37.0.0.0/24 is subnetted, 1 subnets
C       37.37.37.0 is directly connected, FastEthernet1/3
     22.0.0.0/32 is subnetted, 1 subnets
R       22.22.22.22 [120/1] via 37.37.37.3, 00:00:07, FastEthernet1/3
     7.0.0.0/32 is subnetted, 1 subnets
C       7.7.7.7 is directly connected, Loopback0
     8.0.0.0/32 is subnetted, 1 subnets
R       8.8.8.8 [120/2] via 37.37.37.3, 00:00:07, FastEthernet1/3
     24.0.0.0/24 is subnetted, 1 subnets
R       24.24.24.0 [120/1] via 37.37.37.3, 00:00:07, FastEthernet1/3
     44.0.0.0/32 is subnetted, 1 subnets
R       44.44.44.44 [120/3] via 37.37.37.3, 00:00:09, FastEthernet1/3
    

As you can see router R7 can see router R8

深度学习是机器学习的一个子领域,它基于人工神经网络的研究,特别是利用多层次的神经网络来进行学习和模式识别。深度学习模型能够学习数据的高层次特征,这些特征对于图像和语音识别、自然语言处理、医学图像分析等应用至关重要。以下是深度学习的一些关键概念和组成部分: 1. **神经网络(Neural Networks)**:深度学习的基础是人工神经网络,它是由多个层组成的网络结构,包括输入层、隐藏层和输出层。每个层由多个神经元组成,神经元之间通过权重连接。 2. **前馈神经网络(Feedforward Neural Networks)**:这是最常见的神经网络类型,信息从输入层流向隐藏层,最终到达输出层。 3. **卷积神经网络(Convolutional Neural Networks, CNNs)**:这种网络特别适合处理具有网格结构的数据,如图像。它们使用卷积层来提取图像的特征。 4. **循环神经网络(Recurrent Neural Networks, RNNs)**:这种网络能够处理序列数据,如时间序列或自然语言,因为它们具有记忆功能,能够捕捉数据中的时间依赖性。 5. **长短期记忆网络(Long Short-Term Memory, LSTM)**:LSTM 是一种特殊的 RNN,它能够学习长期依赖关系,非常适合复杂的序列预测任务。 6. **生成对抗网络(Generative Adversarial Networks, GANs)**:由两个网络组成,一个生成器和一个判别器,它们相互竞争,生成器生成数据,判别器评估数据的真实性。 7. **深度学习框架**:如 TensorFlow、Keras、PyTorch 等,这些框架提供了构建、训练和部署深度学习模型的工具和库。 8. **激活函数(Activation Functions)**:如 ReLU、Sigmoid、Tanh 等,它们在神经网络中用于添加非线性,使得网络能够学习复杂的函数。 9. **损失函数(Loss Functions)**:用于评估模型的预测与真实值之间的差异,常见的损失函数包括均方误差(MSE)、交叉熵(Cross-Entropy)等。 10. **优化算法(Optimization Algorithms)**:如梯度下降(Gradient Descent)、随机梯度下降(SGD)、Adam 等,用于更新网络权重,以最小化损失函数。 11. **正则化(Regularization)**:技术如 Dropout、L1/L2 正则化等,用于防止模型过拟合。 12. **迁移学习(Transfer Learning)**:利用在一个任务上训练好的模型来提高另一个相关任务的性能。 深度学习在许多领域都取得了显著的成就,但它也面临着一些挑战,如对大量数据的依赖、模型的解释性差、计算资源消耗大等。研究人员正在不断探索新的方法来解决这些问题。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值