命令解析:请按需修改。
enable //先进入特权模式
configure terminal //再进入配置模式才能配置
ip route 192.168.1.0 255.255.255.0 192.168.100.254 //告诉设备去往192.168.1.0 子网掩码255.255.255.0的网段 下一个出口IP为192.168.100.254 默认优先级为60(越小越优先)
脚本命令:使用前请先做好备份,以防万一。
enable
configure terminal
ip route 192.168.1.0 255.255.255.0 192.168.100.254