1. ip route 显示和设定路由 1.1 显示路由表 [root@linux-node1 ~]# ip route show default via 192.168.56.2 dev eth0 169.254.0.0/16 dev eth0 scope link metric 1002 192.168.56.0/24 dev eth0 proto kernel scope link src 192.168.56.11 [root@linux-node1 ~]# ip route
1.添加程序集 2.引入命名空间 using System.Management; 3.方法 ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration"); ManagementObjectCollection nics = mc.GetInstances(); foreach (ManagementObject nic in nics) { if (Convert.ToBoolean(nic