NotePublic/Software/Applications/Route/Route_命令.md

20 lines
476 B
Markdown

# Route 命令
```bash
# 查看当前路由配置
route -n
# 添加默认网关
route add default dev <netif>
route add default gw 192.168.56.1
route add default gw 192.168.56.1 dev <netif>
# 删除默认网关
route del default
route del default dev <netif>
# 设置
route add -net <target ip> netmask <mask> [gw <gateway ip>] [metric <跃点信息>] dev <netif>
# 删除
route del -net <target ip> netmask <mask> [gw <gateway ip>] [metric <跃点信息>] dev <netif>
```