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]#
  • 相关阅读:
    idea找不到或无法加载主类
    Scala核心编程_第09章 面向对象编程(高级特性)
    spring源码:学习线索
    Redis
    spring源码:Aware接口
    spring源码:核心组件(li)
    java socket编程
    spring源码:ApplicationContext的增强功能(li)
    spring源码:web容器启动
    spring源码:BeanPostProcessor(li)
  • 原文地址:https://www.cnblogs.com/dream397/p/12792020.html
Copyright © 2011-2022 走看看