1

route 操作

 2 years ago
source link: https://xmetal.cc/?p=2060
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

查询可用的路由出口(网卡)

networksetup -listallnetworkservices
1.Wi-Fi
2.AX88x72A

查询指定路由出口(网卡)的路由表配置

networksetup -getadditionalroutes Wi-Fi

router 命令

add 增加路由

del 删除路由

-net 设置到某个网段的路由

-host 设置到某台主机的路由

netmask :与网域有关,可以设定 netmask 决定网域的大小;

gw 出口网关 IP地址

dev 出口网关 物理设备名 则使用这个设定,后面接 eth0 等

linux: sudo route add –net 192.168.1.0/24 gw 10.0.0.129 

Mac: sudo route -n add -net 192.168.0.0 -netmask 255.255.255.0 192.168.5.254

Post navigation

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK