zoukankan      html  css  js  c++  java
  • vpp vrf

    默认table 0

     set interface ip table loop2 vrf1

     loop1 in vrf1 and loop2 in vrf2

    nat44-out2in no translation with multiple tenants

    Example Usage
    Example of how to add a straight forward static route:
    
    vpp# ip route add 6.0.1.2/32 via 6.0.0.1 GigabitEthernet2/0/0
    Example of how to delete a straight forward static route:
    
    vpp# ip route del 6.0.1.2/32 via 6.0.0.1 GigabitEthernet2/0/0
    Mainly for route add/del performance testing, one can add or delete multiple routes by adding ‘count N’ to the previous item:
    
    vpp# ip route add count 10 7.0.0.0/24 via 6.0.0.1 GigabitEthernet2/0/0
    Add multiple routes for the same destination to create equal-cost multipath:
    
    vpp# ip route add 7.0.0.1/32 via 6.0.0.1 GigabitEthernet2/0/0
    
    vpp# ip route add 7.0.0.1/32 via 6.0.0.2 GigabitEthernet2/0/0
    For unequal-cost multipath, specify the desired weights. This combination of weights results in 3/4 of the traffic following the second path, 1/4 following the first path:
    
    vpp# ip route add 7.0.0.1/32 via 6.0.0.1 GigabitEthernet2/0/0 weight 1
    
    vpp# ip route add 7.0.0.1/32 via 6.0.0.2 GigabitEthernet2/0/0 weight 3
    To add a route to a particular FIB table (VRF), use:
    
    vpp# ip route add 172.16.24.0/24 table 7 via GigabitEthernet2/0/0
    VPP Configuration steps for a common router on top of telco router:
    comment { configure wan port }
    set int state port1 up
    comment { set int mac address port1 7D:3F:69:54:b8:4C }
    set dhcp client intfc port1 hostname vpprouter
    
    comment { create IRB loopback interface }
    loopback create
    set int l2 bridge loop0 1 bvi
    set int ip address loop0 192.168.2.1/24
    set int state loop0 up
    
    comment { add more ports to the IRB bridge group }
    set int l2 bridge port2 1
    set int state port2 up
    
    set int l2 bridge port3 1
    set int state port3 up
    
    set int l2 bridge port4 1
    set int state port4 up
    
    set int l2 bridge port5 1
    set int state port5 up
    
    set int l2 bridge port6 1
    set int state port6 up
    
    comment { create tap iface for dhcp server and host-stack access }
    create tap host-if-name lstack host-ip4-addr 192.168.2.2/24 host-ip4-gw 192.168.1.1
    set int l2 bridge tap0 1
    set int state tap0 up
    
    comment { configure nat }
    nat44 add interface address port1
    set interface nat44 in loop0 out port1
    
    nat44 add static mapping local 192.168.2.2 22 external port1 22 tcp
    
    add default linux route via 192.168.2.1

     

  • 相关阅读:
    第一节,Django+Xadmin打造上线标准的在线教育平台—创建用户app,在models.py文件生成3张表,用户表、验证码表、轮播图表
    Tensorflow 错误:Unknown command line flag 'f'
    Python 多线程总结
    Git 强制拉取覆盖本地所有文件
    Hive常用函数 傻瓜学习笔记 附完整示例
    Linux 删除指定大小(范围)的文件
    Python 操作 HBase —— Trift Trift2 Happybase 安装使用
    梯度消失 梯度爆炸 梯度偏置 梯度饱和 梯度死亡 文献收藏
    Embedding 文献收藏
    深度学习在CTR预估中的应用 文献收藏
  • 原文地址:https://www.cnblogs.com/dream397/p/12760173.html
Copyright © 2011-2022 走看看