前几天是node3连不上,今天早上写作业发现node2又连不上了
]$ systemctl status network.service ● network.service - LSB: Bring up/down networking Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled) Active: active (exited) since 二 2023-11-14 08:11:26 CST; 6min ago Docs: man:systemd-sysv-generator(8) Process: 818 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS) Tasks: 0
输入以上命令以后吧又发现vmware里面正常,然后我就去找hosts文件了,发现不知道什么时候被清空了,然后我又把各个配置补上去了,就正常了
别忘了写上虚拟机ip
ifconfig可以查看当前虚拟机ip
比如:
]$ ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.88.103 netmask 255.255.255.0 broadcast 192.168.88.255
inet6 fe80::20c:29ff:feb2:52ce prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:b2:52:ce txqueuelen 1000 (Ethernet)
RX packets 31812 bytes 11226562 (10.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 41990 bytes 10161068 (9.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:b0:ab:39 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0