────────────────────────────────────────────────────────────────────────────────────────────────────────────
操作前:
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:4f:77:27 brd ff:ff:ff:ff:ff:ff
inet 192.168.239.153/24 brd 192.168.239.255 scope global noprefixroute ens33
valid_lft forever preferred_lft forever
inet6 fe80::f87e:ea1b:61b7:e196/64 scope link noprefixroute
valid_lft forever preferred_lft forever
[root@localhost ~]# ip r
default via 192.168.239.2 dev ens33 proto static metric 100
192.168.239.0/24 dev ens33 proto kernel scope link src 192.168.239.153 metric 100
────────────────────────────────────────────────────────────────────────────────────────────────────────────
操作时:
[root@localhost ~]# ip r add 192.168.239.0/24 via 192.168.239.2
────────────────────────────────────────────────────────────────────────────────────────────────────────────
操作后:终端卡顿后,出现以下情况
Network error: Software caused connection abort
─────────────────────────────────
Session stopped
- Press <return> to exit tab
- Press R to restart session
- Press S to save terminal output to file
此时终端已经无法进入(更换终端或会话仍旧无效)
但虚拟机操作正常,可使用 ip r del 192.168.239.0/24 via 192.168.239.2 dev ens33 进行删除恢复
[root@localhost ~]# ip r
default via 192.168.239.2 dev ens33 proto static metric 100
192.168.239.0/24 via 192.168.239.2 dev ens33
192.168.239.0/24 dev ens33 proto kernel scope link src 192.168.239.153 metric 100
────────────────────────────────────────────────────────────────────────────────────────────────────────────
解决方法直接操作虚拟机
[root@localhost ~]# ip r del 192.168.239.0/24 via 192.168.239.2 dev ens33
[root@localhost ~]# ip r
default via 192.168.239.2 dev ens33 proto static metric 100
192.168.239.0/24 dev ens33 proto kernel scope link src 192.168.239.153 metric 100
终端连接恢复正常
本次未探究此问题对服务和网络的影响,如有了解这方面的还望赐教
标签:24,00,虚拟机,192.168,lft,dev,卡死,路由,ens33 From: https://www.cnblogs.com/xiewenbing/p/16721947.html