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]#
  • 相关阅读:
    MyBatis XML 配置文件 properties 元素扩展
    ranche2.0-CN
    xpath_note
    使用face_recognition进行人脸特征检测
    spring+mybatis+mysql5.7实现读写分离,主从复制
    js 创建对象的多种方式
    吴裕雄 python 机器学习——人工神经网络与原始感知机模型
    吴裕雄 python 机器学习——人工神经网络感知机学习算法
    吴裕雄 python 机器学习——支持向量机非线性回归SVR模型
    吴裕雄 python 机器学习——支持向量机线性回归SVR模型
  • 原文地址:https://www.cnblogs.com/dream397/p/12792020.html
Copyright © 2011-2022 走看看