가상머신에서 물리적 network 어댑터를 추가할 수 있다.
이렇게하면 해당 머신에 물리적인 네트워크 카드가 두개 꼽혀있는 셈!

난 VMware를 사용하는데, VMare에서는 setting에서 add로 추가만 해주면 된다.
(settings -> Add 버튼 -> Networkd Adapter 선택)


이렇게 설정했더니 192.168.231.128 / 192.168.231.129 각각 다른 ip를 부여받긴 했는데
또 다른 장비에서 해당 IP로 ping을 날리면, 패킷을 받지 못한다. (서로간에는 되는데)

이건 네트워크 세팅을 NAT으로 했기 때문
**
가상머신 NAT / Bridge Mode 

네트워크카드를 추가하고 각각 Bridge로 세팅했더니!


아래와같이 원하는 환경이 구성되었다 ^0^ 아이 너무 기쁘다 (몇일간 삽질했지만 ㅎㅎㅎ)
[root@heninet1 ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.152  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::6a99:4659:c041:633e  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:68:fc:27  txqueuelen 1000  (Ethernet)
        RX packets 735  bytes 55347 (54.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 76  bytes 10185 (9.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens34: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.157  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::403a:111e:3be7:e00d  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:68:fc:31  txqueuelen 1000  (Ethernet)
        RX packets 679  bytes 45346 (44.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 24  bytes 4571 (4.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

타 장비에서 ping도 잘 받는다
[heni@tech3 ~]$ ping 192.168.0.152
PING 192.168.0.152 (192.168.0.152) 56(84) bytes of data.
64 bytes from 192.168.0.152: icmp_seq=1 ttl=64 time=0.581 ms
64 bytes from 192.168.0.152: icmp_seq=2 ttl=64 time=0.679 ms
64 bytes from 192.168.0.152: icmp_seq=3 ttl=64 time=0.534 ms

[heni@tech3 ~]$ ping 192.168.0.157
PING 192.168.0.157 (192.168.0.157) 56(84) bytes of data.
64 bytes from 192.168.0.157: icmp_seq=1 ttl=64 time=0.952 ms
64 bytes from 192.168.0.157: icmp_seq=2 ttl=64 time=1.40 ms
64 bytes from 192.168.0.157: icmp_seq=3 ttl=64 time=0.853 ms



방화벽 포트 테스트. 

아래와 같이 막혀있는 상태에서
[heni@tech3 ~]$ telnet 192.168.0.157 10101
Trying 192.168.0.157...
telnet: connect to address 192.168.0.157: No route to host
골디락스 클러스터에 필요한 10101-10134 포트 추가해주면
[root@heninet1 ~]# firewall-cmd --zone=public --add-port=10101-10134/tcp
success
[root@heninet1 ~]# firewall-cmd --zone=public --list-port
10101-10134/tc
두개 ip에서 모두 잘 확인된다! telnet, nmap 사용 시 포트상태 확인은 http://heni.tistory.com/25 ☜요기 참고♥
[heni@tech3 ~]$ telnet 192.168.0.157 10101
Trying 192.168.0.157...
telnet: connect to address 192.168.0.157: Connection refused

[heni@tech3 ~]$ telnet 192.168.0.152 10101
Trying 192.168.0.152...
telnet: connect to address 192.168.0.152: Connection refused

** 비상사태
nmap으로는 스캔이 안된다??
[heni@tech3 ~]$ nmap -sT -p 10101 192.168.0.152

Starting Nmap 6.40 ( http://nmap.org ) at 2018-01-25 11:19 KST
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 0.04 seconds
위에서처럼 telnet으로는 TCP포트 10101이 열려있음이 확인 되는데,
nmap으로는 스캔이 안된다... 하...ㅠㅠㅠ....뭐지...UDP확인해야하는데....

아 진짜!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
root계정이 아니었음ㅋㅋㅋㅋㅋ 내가 글써놓고도 이렇게 실수하다닛 http://heni.tistory.com/26 ☜바로 이 글 ㅋ_ㅋ;
[root@tech3 ~]# nmap -sT -p 10101 192.168.0.152

Starting Nmap 6.40 ( http://nmap.org ) at 2018-01-25 11:24 KST
Nmap scan report for 192.168.0.152
Host is up (0.00069s latency).
PORT      STATE  SERVICE
10101/tcp closed ezmeeting-2
MAC Address: 00:0C:29:68:FC:31 (VMware)

Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds
nmap으로도 포트 열려있음 잘 확인된당 ^0^*



네트워크카드 단절 테스트!

아래와 같이 두개 중 하나의 네트워크카드를 내려버렸다. (192.168.0.152카드)
[root@heninet1 ~]# ifdown ens33
Device 'ens33' successfully disconnected.

telnet, nmap, ping 모두 152번은 잡지못하고, 157은 잘 잡음
모든 환경이 완벽하게 세팅되었다..후후
[root@tech3 ~]# nmap -sT -p 10101 192.168.0.157

Starting Nmap 6.40 ( http://nmap.org ) at 2018-01-25 11:25 KST
Nmap scan report for 192.168.0.157
Host is up (0.00049s latency).
PORT      STATE  SERVICE
10101/tcp closed ezmeeting-2
MAC Address: 00:0C:29:68:FC:31 (VMware)

Nmap done: 1 IP address (1 host up) scanned in 0.08 seconds

[root@tech3 ~]# nmap -sT -p 10101 192.168.0.152

Starting Nmap 6.40 ( http://nmap.org ) at 2018-01-25 11:25 KST
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 0.47 seconds


[root@tech3 ~]# telnet 192.168.0.157 10101
Trying 192.168.0.157...
telnet: connect to address 192.168.0.157: Connection refused
[root@tech3 ~]# telnet 192.168.0.152 10101
Trying 192.168.0.152...

[root@tech3 ~]# ping 192.168.0.157
PING 192.168.0.157 (192.168.0.157) 56(84) bytes of data.
64 bytes from 192.168.0.157: icmp_seq=1 ttl=64 time=0.415 ms
64 bytes from 192.168.0.157: icmp_seq=2 ttl=64 time=0.863 ms

[root@tech3 ~]# ping 192.168.0.152
PING 192.168.0.152 (192.168.0.152) 56(84) bytes of data.
From 192.168.0.113 icmp_seq=1 Destination Host Unreachable
From 192.168.0.113 icmp_seq=2 Destination Host Unreachable
From 192.168.0.113 icmp_seq=3 Destination Host Unreachable



+ Recent posts