用AI赚第一桶💰低成本搭建一套AI赚钱工具,源码可二开。 广告
[TOC] ### **Veth** ``` ip link add eth0 type veth peer name cali000001 ip link set eth0 netns pod0 ip netns exec pod0 ip link set eth0 up ``` ### **Ipvlan** ``` ip link add eth0 link ens33 type ipvlan mode l2 ``` ### **命令空间** ``` ip netns list # 查看网络命名空间 ``` ### **路由** ``` ip route show ip route add x.x.x.x/xx via x.x.x.x dev xx # 有网关 ip route add x.x.x.x/xx dev xx # 在同一子网内 ip route add 0.0.0.0/0 via x.x.x.x dev xx # 添加默认路由 ip route del x.x.x.x/xx [via x.x.x.x dev xx] ip rule list # 查看rule,rule表示匹配哪些table以及优先级,可参考neutron中的"DVR-南北流量"一文 ip route show table all # 查看所有table的路由,常用的表有 local、main、default ip route show table <id> # 查看指定id的table的路由 ``` ### **网桥** ``` brctl showmacs <bridgename> # 查看二层转发表 bridge fdb show <bridgename> # ??? ip link add cni0 type bridge ``` ### **邻接表(ARP表)** ``` ip neigh show [dev xxx] ### 查看网卡的邻接表(ARP表) ```