linux route没有默认路由解决

1.route看不到default路由,只有到本网段的的

root@datasrv network-scripts# route

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

192.168.81.0 0.0.0.0 255.255.255.0 U 100 0 0 p6p1

192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0

2.添加默认路由

root@datasrv network-scripts# ip route add default via 192.168.81.1

3.查看添加的默认路由

root@datasrv network-scripts# route

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface
default gateway 0.0.0.0 UG 0 0 0 p6p1

192.168.81.0 0.0.0.0 255.255.255.0 U 100 0 0 p6p1

192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0

相关推荐
祁白_3 小时前
[0xV01D]_Night Traffic_writeUp
网络·安全·ctf·writeup
xingyuzhisuan3 小时前
网络 Token 常见故障原理,基础排查科普
运维·服务器·网络·php
APIshop4 小时前
Python 获取 1688 商品采集 API 接口 | 工厂货源自动化对接商品信息 | 无需选品
运维·python·自动化
wljy14 小时前
二、进制状态转换
linux·运维·服务器·c语言·c++
handler014 小时前
【MySQL】常用命令总结(库与表增删查改)
运维·数据库·mysql·命令·总结
week@eight5 小时前
Linux - Doris
linux·运维·数据库·mysql
学习3人组5 小时前
企业交换机OSPF路由协议配置与防护
网络
平行云5 小时前
实时云渲染预启动技术解析:UE数字孪生应用的延迟优化机制(二)
linux·unity·ue5·webgl·实时云渲染·云桌面·像素流
看到代码头都是大的5 小时前
CentOS环境下手动升级openssl、openssh
linux·运维·centos
浮生若城5 小时前
Linux——Ext系列文件系统
linux·运维·服务器