zoukankan      html  css  js  c++  java
  • vpp tapinject

     

     查看路由表

    DBGvpp# show ip fib        
    ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ] epoch:0 flags:none locks:[default-route:1, nat-hi:2, ]
    0.0.0.0/0
      unicast-ip4-chain
      [@0]: dpo-load-balance: [proto:ip4 index:1 buckets:1 uRPF:0 to:[2:156]]
        [0] [@0]: dpo-drop ip4
    0.0.0.0/32
      unicast-ip4-chain
      [@0]: dpo-load-balance: [proto:ip4 index:2 buckets:1 uRPF:1 to:[0:0]]
        [0] [@0]: dpo-drop ip4
    192.168.1.0/32
      unicast-ip4-chain
      [@0]: dpo-load-balance: [proto:ip4 index:14 buckets:1 uRPF:20 to:[0:0]]
        [0] [@0]: dpo-drop ip4
    192.168.1.0/24
      unicast-ip4-chain
      [@0]: dpo-load-balance: [proto:ip4 index:13 buckets:1 uRPF:12 to:[0:0]]
        [0] [@4]: ipv4-glean: UnknownEthernet5/0/0: mtu:9000 ffffffffffff44a191a49beb0806
    192.168.1.229/32
      unicast-ip4-chain
      [@0]: dpo-load-balance: [proto:ip4 index:16 buckets:1 uRPF:17 to:[0:0]]
        [0] [@2]: dpo-receive: 192.168.1.229 on UnknownEthernet5/0/0
    192.168.1.255/32
      unicast-ip4-chain
      [@0]: dpo-load-balance: [proto:ip4 index:15 buckets:1 uRPF:21 to:[0:0]]
        [0] [@0]: dpo-drop ip4
    224.0.0.0/4
      unicast-ip4-chain
      [@0]: dpo-load-balance: [proto:ip4 index:4 buckets:1 uRPF:3 to:[0:0]]
        [0] [@0]: dpo-drop ip4
    240.0.0.0/4                                                                                                      
      unicast-ip4-chain                                                                                              
      [@0]: dpo-load-balance: [proto:ip4 index:3 buckets:1 uRPF:2 to:[0:0]]                                          
        [0] [@0]: dpo-drop ip4                                                                                       
    255.255.255.255/32                                                                                               
      unicast-ip4-chain                                                                                              
      [@0]: dpo-load-balance: [proto:ip4 index:5 buckets:1 uRPF:4 to:[65:21159]]                                     
        [0] [@0]: dpo-drop ip4  
    [root@localhost vpp_plugin]# route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         10.10.16.254    0.0.0.0         UG    0      0        0 enp125s0f0
    10.10.16.0      0.0.0.0         255.255.255.0   U     0      0        0 enp125s0f0
    192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 vpp0
    192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 enp125s0f3
    添加一条路由
    [root@localhost vpp_plugin]# route add -net 192.168.10.0/24 dev vpp0
    [root@localhost vpp_plugin]# route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         10.10.16.254    0.0.0.0         UG    0      0        0 enp125s0f0
    10.10.16.0      0.0.0.0         255.255.255.0   U     0      0        0 enp125s0f0
    192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 vpp0
    192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 enp125s0f3
    192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 vpp0
    [root@localhost vpp_plugin]# 

    再次查看路由表

    DBGvpp# show ip fib 
    ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ] epoch:0 flags:none locks:[default-route:1, nat-hi:2, ]
    0.0.0.0/0
      unicast-ip4-chain
      [@0]: dpo-load-balance: [proto:ip4 index:1 buckets:1 uRPF:0 to:[3:421]]
        [0] [@0]: dpo-drop ip4
    0.0.0.0/32
      unicast-ip4-chain
      [@0]: dpo-load-balance: [proto:ip4 index:2 buckets:1 uRPF:1 to:[0:0]]
        [0] [@0]: dpo-drop ip4
    192.168.1.0/32
      unicast-ip4-chain
      [@0]: dpo-load-balance: [proto:ip4 index:14 buckets:1 uRPF:20 to:[0:0]]
        [0] [@0]: dpo-drop ip4
    192.168.1.0/24
      unicast-ip4-chain
      [@0]: dpo-load-balance: [proto:ip4 index:13 buckets:1 uRPF:12 to:[0:0]]
        [0] [@4]: ipv4-glean: UnknownEthernet5/0/0: mtu:9000 ffffffffffff44a191a49beb0806
    192.168.1.229/32
      unicast-ip4-chain
      [@0]: dpo-load-balance: [proto:ip4 index:16 buckets:1 uRPF:17 to:[0:0]]
        [0] [@2]: dpo-receive: 192.168.1.229 on UnknownEthernet5/0/0
    192.168.1.255/32
      unicast-ip4-chain
      [@0]: dpo-load-balance: [proto:ip4 index:15 buckets:1 uRPF:21 to:[0:0]]
        [0] [@0]: dpo-drop ip4
    192.168.10.0/24
      unicast-ip4-chain
      [@0]: dpo-load-balance: [proto:ip4 index:17 buckets:1 uRPF:18 to:[0:0]]
        [0] [@4]: ipv4-glean: UnknownEthernet5/0/0: mtu:9000 ffffffffffff44a191a49beb0806
    224.0.0.0/4                                                                                                      
      unicast-ip4-chain                                                                                              
      [@0]: dpo-load-balance: [proto:ip4 index:4 buckets:1 uRPF:3 to:[0:0]]                                          
        [0] [@0]: dpo-drop ip4                                                                                       
    240.0.0.0/4                                                                                                      
      unicast-ip4-chain                                                                                              
      [@0]: dpo-load-balance: [proto:ip4 index:3 buckets:1 uRPF:2 to:[0:0]]                                          
        [0] [@0]: dpo-drop ip4                                                                                       
    255.255.255.255/32                                                                                               
      unicast-ip4-chain                                                                                              
      [@0]: dpo-load-balance: [proto:ip4 index:5 buckets:1 uRPF:4 to:[93:30343]]                                     
        [0] [@0]: dpo-drop ip4                                                                                       
    DBGvpp#                                                                                                          
    DBGvpp# 
    添加一条neigh项
    [root@localhost vpp_plugin]# ip n add 192.168.1.82 lladdr 48:57:02:64:e7:ae dev vpp0 nud reachable [root@localhost vpp_plugin]#
  • 相关阅读:
    软件架构学习小结
    20+ 个很有用的 jQuery 的 Google 地图插件 (英语)
    网页JS获取当前地理位置(省市区)
    前端Js框架汇总(工具多看)
    MUI简介-最接近原生App体验的前端框架
    Bootstrap手机网站开发案例
    jQuery Mobile手机网站案例
    历届图灵奖 (Turing award)得奖名单
    js进阶 10-9 -of-type型子元素伪类选择器
    网页如何实现隔多久自动调用某个方法
  • 原文地址:https://www.cnblogs.com/dream397/p/12792020.html
Copyright © 2011-2022 走看看