迅维网

标题: centos7_debian10_设置静态路由_eth0_wlan0 [打印本页]

作者: u1458515    时间: 2022-9-26 18:01
标题: centos7_debian10_设置静态路由_eth0_wlan0
本帖最后由 u1458515 于 2022-9-26 18:04 编辑

centos-7eth0
  1. any net 10.0.0.0/8 gw 10.0.0.1   
  2. any net 192.168.0.0/16 gw 192.168.0.1  
复制代码

debian-10(buster)
eth0
  1. up ip route add 10.0.0.0/8 via 10.0.0.1 metric 50
  2. up ip route add 192.168.0.0/16 via 192.168.0.1 metric 50
复制代码



wlan0 (wifi client)
禁止重启后自动配置网络:
修改/etc/default/networking文件, CONFIGURE_INTERFACES set to 'no'.
  1. # Set to 'no' to skip interfaces configuration on boot#CONFIGURE_INTERFACES=yes
复制代码








欢迎光临 迅维网 (https://www.chinafix.com/) Powered by Discuz! X3.4