[Seek Help] route命令的使用
Tofloor
poster avatar
自取其乐
deepin
2021-06-18 17:06
Author

我使用的是笔记本在做体验,一个有线网卡,一个无线网卡,分别连接了两个局域网,之前用的windows是写route命令完成的让某些地址通过其中一个网关去访问,可以正常使用route add 10.32.0.0 mask 255.255.0.0 10.35.51.1 -p

现在使用deepin,想完成同样的操作,使用了命令sudo ip route add 10.32.0.0/16 via 10.35.51.1

当时可以使用,但是重启之后就失效了,又得再写,不知道有没有命令是可以让其重启之后也继续保持设置的,就像windows里的-p一样的效果,谢谢

Reply Favorite View the author
All Replies
liwl
deepin
2021-06-18 17:55
#1

写成脚本,加到开机启动

Reply View the author
自取其乐
deepin
2021-06-18 23:53
#2
liwl

写成脚本,加到开机启动

额···难道这是唯一的办法

Reply View the author
liwl
deepin
2021-06-23 19:53
#3

看看这篇帖子:

https://blog.csdn.net/zhicai_liu/article/details/110366666?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-3.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-3.control

我也是刚看到。

进入目录:/etc/NetworkManager/system-connections,下面是你不同网络连接的配置文件

编辑文件,写入静态路由

Reply View the author
自取其乐
deepin
2021-06-26 17:43
#4
liwl

看看这篇帖子:

https://blog.csdn.net/zhicai_liu/article/details/110366666?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-3.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-3.control

我也是刚看到。

进入目录:/etc/NetworkManager/system-connections,下面是你不同网络连接的配置文件

编辑文件,写入静态路由

好的,谢谢,我研究一下

Reply View the author