美文网首页
PE客户路由实例里auto-export的使用

PE客户路由实例里auto-export的使用

作者: 严炎2016 | 来源:发表于2021-02-27 19:52 被阅读0次

cust-A-1与cust-B-1的lo0地址要互通

root@PE> show configuration | display set

set version 14.1R4.8

set system host-name PE

set system root-authentication encrypted-password "$1$65QU7nZx$/CELLqn/JjiG1yYaOD/c3/"

set system syslog user * any emergency

set system syslog file messages any notice

set system syslog file messages authorization info

set system syslog file interactive-commands interactive-commands any

set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.2/30

set interfaces ge-0/0/1 unit 0 family inet address 192.168.2.2/30

set interfaces lo0 unit 0 family inet address 10.0.255.3/32

set routing-options router-id 10.0.255.3

set routing-options autonomous-system 65003

set policy-options policy-statement import-from-cust-A term 1 from community cust-A

set policy-options policy-statement import-from-cust-A term 1 then accept

set policy-options policy-statement import-from-cust-B term 1 from community cust-B

set policy-options policy-statement import-from-cust-B term 1 then accept

set policy-options community cust-A members target:65003:1

set policy-options community cust-B members target:65003:2

set routing-instances cust-A instance-type vrf

set routing-instances cust-A interface ge-0/0/0.0

set routing-instances cust-A route-distinguisher 65003:1

set routing-instances cust-A vrf-import import-from-cust-B

set routing-instances cust-A vrf-target target:65003:1

set routing-instances cust-A routing-options auto-export

set routing-instances cust-A protocols bgp group PE-CE type external

set routing-instances cust-A protocols bgp group PE-CE neighbor 192.168.1.1 peer-as 65001

set routing-instances cust-B instance-type vrf

set routing-instances cust-B interface ge-0/0/1.0

set routing-instances cust-B route-distinguisher 65003:2

set routing-instances cust-B vrf-import import-from-cust-A

set routing-instances cust-B vrf-target target:65003:2

set routing-instances cust-B routing-options auto-export

set routing-instances cust-B protocols bgp group PE-CE type external

set routing-instances cust-B protocols bgp group PE-CE neighbor 192.168.2.1 peer-as 65002

root@cust-A# run show configuration | display set

set version 14.1R4.8

set system host-name cust-A

set system root-authentication encrypted-password "$1$EQZTCpt8$v6k.Awtmq53g76ezR1VKd."

set system syslog user * any emergency

set system syslog file messages any notice

set system syslog file messages authorization info

set system syslog file interactive-commands interactive-commands any

set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.1/30

set interfaces lo0 unit 0 family inet address 10.0.255.1/32

set routing-options router-id 10.0.255.1

set routing-options autonomous-system 65001

set protocols bgp group EBGP type external

set protocols bgp group EBGP export export-lo0

set protocols bgp group EBGP neighbor 192.168.1.2 peer-as 65003

set policy-options policy-statement export-lo0 term 1 from interface lo0.0

set policy-options policy-statement export-lo0 term 1 then accept

root@cust-B# run show configuration | display set

set version 14.1R4.8

set system root-authentication encrypted-password "$1$r/RbmCuW$eWwmuUqbY6CE5OcvADzap0"

set system syslog user * any emergency

set system syslog file messages any notice

set system syslog file messages authorization info

set system syslog file interactive-commands interactive-commands any

set interfaces ge-0/0/1 unit 0 family inet address 192.168.2.1/30

set interfaces lo0 unit 0 family inet address 10.0.255.2/32

set routing-options router-id 10.0.255.2

set routing-options autonomous-system 65002

set protocols bgp group EBGP type external

set protocols bgp group EBGP export export-lo0

set protocols bgp group EBGP neighbor 192.168.2.2 peer-as 65003

set policy-options policy-statement export-lo0 term 1 from interface lo0.0

set policy-options policy-statement export-lo0 term 1 then accept

验证:

root@cust-A> show route

inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)

+ = Active Route, - = Last Active, * = Both

10.0.255.1/32      *[Direct/0] 00:27:35

                    > via lo0.0

10.0.255.2/32      *[BGP/170] 00:05:25, localpref 100

                      AS path: 65003 65002 I, validation-state: unverified

                    > to 192.168.1.2 via ge-0/0/0.0

192.168.1.0/30    *[Direct/0] 00:27:35

                    > via ge-0/0/0.0

192.168.1.1/32    *[Local/0] 00:27:35

                      Local via ge-0/0/0.0

root@cust-B> show route

inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)

+ = Active Route, - = Last Active, * = Both

10.0.255.1/32      *[BGP/170] 00:09:49, localpref 100

                      AS path: 65003 65001 I, validation-state: unverified

                    > to 192.168.2.2 via ge-0/0/1.0

10.0.255.2/32      *[Direct/0] 00:27:34

                    > via lo0.0

192.168.2.0/30    *[Direct/0] 00:27:34

                    > via ge-0/0/1.0

192.168.2.1/32    *[Local/0] 00:27:34

                      Local via ge-0/0/1.0

root@cust-B> ping source 10.0.255.2 10.0.255.1 rapid count 6

PING 10.0.255.1 (10.0.255.1): 56 data bytes

!!!!!!

--- 10.0.255.1 ping statistics ---

6 packets transmitted, 6 packets received, 0% packet loss

round-trip min/avg/max/stddev = 3.340/4.229/6.315/1.034 ms

相关文章

  • PE客户路由实例里auto-export的使用

    cust-A-1与cust-B-1的lo0地址要互通 root@PE> show configuration | ...

  • vue-router

    一: 使用路由引入组件配置路由创建路由实例创建Vue实例,挂载路由二: 两个标签(1)

  • 2018-11-22

    路由的基本使用 1 路由的基本使用2 再路由注册再跟实例的时候我们可以全局的访问路由,this.$router或者...

  • Vue 基础 - 前端路由

    使用vue-router实现前端路由 安装vue-router: 配置路由文件,并在vue实例中导入: 设置视图(...

  • vue-router @4.x 和 @3.x 对比

    1. 创建实例 2. 路由重定向 vue2.x使用路由选项redirect设置路由自动调整,vue3.x中移除了这...

  • Vue知识点总结

    响应路由参数的变化 当使用路由参数时,例如从 /user/foo 导航到 /user/bar,原来的组件实例会被复...

  • 第一篇 - dingo/api - 3.路由设置

    文件:  routes.php 1. 获取实例 2. 多版本 3. 路由分组 说明: 可以参考当前所使用框架的路由...

  • Flask-路由

    路由(route) 什么是路由 客户端将请求发送给web服务器,web服务器再将请求发送给flask程序实例,程序...

  • 2018-09-26

    1. 盛放链接对应的内容 2.创建组件 3.配置路由 4.创建路由实例 5.路由实例挂载到vue实例上

  • web路由机制

    路由的含义 简单来说,路由就是URL到函数的映射。 路由的分类 服务端路由 客户端路由客户端静态路由客户端动态路由...

网友评论

      本文标题:PE客户路由实例里auto-export的使用

      本文链接:https://www.haomeiwen.com/subject/wbbifltx.html