首页
/
每日頭條
/
科技
/
router ospf配置詳細教程
router ospf配置詳細教程
更新时间:2024-10-05 04:25:38

router ospf配置詳細教程(Mac系統route路由配置)1

基本命令

# 添加默認路由 sudo route add -net 0.0.0.0 192.168.191.1 # 删除默認路由 sudo route -n delete default 192.168.191.1 # 獲取默認路由 sudo route get 0.0.0.0 # 添加普通路由 sudo route -n add -net 10.1.0.0/16 192.168.0.1 # 删除普通路由 sudo route delete -net 10.1.0.0/16 192.168.0.1 # 查看路由表 netstat -rn

永久路由
  • 查看網卡

networksetup -listallnetworkservices

  • 查看網卡配置的路由

networksetup -getadditionalroutes [網卡]

  • networksetup -setadditionalroutes [網卡] [目标IP] [掩碼] [網關IP]

networksetup -setadditionalroutes ethernet 10.1.0.0 255.255.0.0 172.168.0.1

  • 多條路由同時配置

networksetup -setadditionalroutes ethernet 10.1.0.0 255.255.0.0 172.168.0.1 10.2.0.0 255.255.0.0 192.168.1.1

,
Comments
Welcome to tft每日頭條 comments! Please keep conversations courteous and on-topic. To fosterproductive and respectful conversations, you may see comments from our Community Managers.
Sign up to post
Sort by
Show More Comments
Copyright 2023-2024 - www.tftnews.com All Rights Reserved