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]#
  • 相关阅读:
    Windows10下VirtualBox安装CentOS7网络配置:添加DNS
    Windows下LaTeX环境: SumatraPDF + notepad++/ST3
    Windows10 环境变量设置: "此环境变量太大"
    修改CMD字体后导致乱码的恢复方法
    nfs:server is not responding,still trying 原因与解决方案
    [GIT] 更新.repo目录
    linux网络栈相关
    linux mailbox模型
    虚拟机ping不通主机,主机能ping 通虚拟机问题解决
    pygame学习
  • 原文地址:https://www.cnblogs.com/dream397/p/12792020.html
Copyright © 2011-2022 走看看