티스토리 뷰
VMware guest로 Linux를 사용중, Linux를 업그레이드/패치 하고 재기동 하면
종종 ssh로 접속이 안될때가 있는데
콘솔로 들어가서 network 상태를 보면 아래와 같이 할당된 ip가 풀려 있는 때가 있다.
# ifconfig -a ens160: flags=4098<broadcast,multicast> mtu 1500</broadcast,multicast> ether 00:50:56:3b:62:8c 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 |
< ip가 없어..ㅡ,.ㅡ;; >
이럴 때는 아래와 같이 조치해 본다.
일단 NetworkManager가 미실행 상태이면 실행시키고,
# service NetworkManager status Redirecting to /bin/systemctl status NetworkManager.service ? NetworkManager.service - Network Manager Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled; vendor preset: enabled) Active: inactive (dead) since Fri 2023-11-10 14:33:58 KST; 8s ago Docs: man:NetworkManager(8) Process: 7518 ExecStart=/usr/sbin/NetworkManager --no-daemon (code=exited, status=0/SUCCESS) Main PID: 7518 (code=exited, status=0/SUCCESS) Nov 10 14:25:32 mrccpa1d NetworkManager[7518]: [1699593932.2596] device (ens160): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed') Nov 10 14:25:32 mrccpa1d NetworkManager[7518]: [1699593932.2600] manager: NetworkManager state is now CONNECTED_SITE Nov 10 14:25:32 mrccpa1d NetworkManager[7518]: [1699593932.2602] device (ens160): Activation: successful, device activated. Nov 10 14:25:32 mrccpa1d NetworkManager[7518]: [1699593932.2607] manager: NetworkManager state is now CONNECTED_GLOBAL Nov 10 14:33:58 mrccpa1d systemd[1]: Stopping Network Manager... Nov 10 14:33:58 mrccpa1d NetworkManager[7518]: [1699594438.2371] caught SIGTERM, shutting down normally. Nov 10 14:33:58 mrccpa1d NetworkManager[7518]: [1699594438.2380] manager: NetworkManager state is now CONNECTED_SITE Nov 10 14:33:58 mrccpa1d NetworkManager[7518]: [1699594438.2427] exiting (success) Nov 10 14:33:58 mrccpa1d systemd[1]: NetworkManager.service: Succeeded. Nov 10 14:33:58 mrccpa1d systemd[1]: Stopped Network Manager # service NetworkManager start Redirecting to /bin/systemctl start NetworkManager.service |
network 을 껐다 켜면
# nmcli n off # nmcli n on |
아래 명령어를 실행하면 해당 인터페이스가 managed 상태로 보이는 것을 알수 있다.
# nmcli device status DEVICE TYPE STATE CONNECTION ens160 ethernet connected ens160 virbr0 bridge unmanaged -- lo loopback unmanaged -- |
ens160 인터페이스가 connected 상태이므로
고정ip로 지정한 값이 할당되었는지 체크 해보면
# ifconfig -a ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.200.169 netmask 255.255.255.0 broadcast 192.168.200.255 inet6 fe80::250:56ff:fe3b:628c prefixlen 64 scopeid 0x20<link> ether 00:50:56:3b:62:8c txqueuelen 1000 (Ethernet) RX packets 1715 bytes 1870424 (1.7 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 826 bytes 84477 (82.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
그러면 ssh로 접속된다.
'Unix/Linux' 카테고리의 다른 글
locale 관련 환경변수 - LC_ALL, LANG (0) | 2021.04.28 |
---|---|
[ksh] $* 와 $@ 차이 (0) | 2021.03.18 |
[vmware] VM에서 vt-x 사용하려면 Hyper-V를 꺼야한다. (0) | 2021.03.16 |
[vmware] NetworkManager 시작이 안될때 가장 간단한 조치 방법 (0) | 2021.03.16 |
ksh에서 symbolic link 파일 체크 (0) | 2021.01.27 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- ksh
- RedHat8 #network 껏다켜기
- LC_ALL #LANG #한글깨짐
- dlsym()
- c #long_to_char_and_restore
- oracle
- common_parser #oracle19c #pro*c #DBIO
- dlerror()
- dlclose()
- decode
- dlopen()
- like
- outlook 검색
- SQL
- TDL
- jdk5 #autoboxing #unboxing #redjacob
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함