linux查看网关的命令 linux系统查看网关的入口

1.route//如果Gateway处显示bogon是因为IP地址为私网地址,可以加-n参数?~route-nKernelIProutingtableDestination1.route //如果Gateway处显示bogon是因为IP地址为私网地址,可以加 -n参数
?~ route -nKernel IP routing tableDestinationGatewayGenmaskFlags Metric RefUse Ifacedefault192.168.3.10.0.0.0UG60000 wlp7s0link-local0.0.0.0255.255.0.0U100000 virbr0172.16.90.00.0.0.0255.255.255.0U000 vmnet8192.168.3.00.0.0.0255.255.255.0U60000 wlp7s0192.168.4.00.0.0.0255.255.255.0U000 vmnet1192.168.122.00.0.0.0255.255.255.0U000 virbr02.ip route show
?~ ip route show default via 192.168.3.1 dev wlp7s0 proto dhcp metric 600 169.254.0.0/16 dev virbr0 scope link metric 1000 linkdown 172.16.90.0/24 dev vmnet8 proto kernel scope link src 172.16.90.1 192.168.3.0/24 dev wlp7s0 proto kernel scope link src 192.168.3.23 metric 600 192.168.4.0/24 dev vmnet1 proto kernel scope link src 192.168.4.1 192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown3.netstat -rn
?~ netstat -rnKernel IP routing tableDestinationGatewayGenmaskFlagsMSS Windowirtt Iface0.0.0.0192.168.3.10.0.0.0UG0 00 wlp7s0169.254.0.00.0.0.0255.255.0.0U0 00 virbr0172.16.90.00.0.0.0255.255.255.0U0 00 vmnet8192.168.3.00.0.0.0255.255.255.0U0 00 wlp7s0192.168.4.00.0.0.0255.255.255.0U0 00 vmnet1192.168.122.00.0.0.0255.255.255.0U0 00 virbr04.添加自定义路由条目
?~ route add -net 10.0.29.0 netmask 255.255.255.0 gw 192.168.0.183

linux查看网关的命令 linux系统查看网关的入口

【linux查看网关的命令 linux系统查看网关的入口】

秒懂生活扩展阅读