The Version used in the examples is 5.1.22 r115126 (Qt5.6.2):

VirtualBox VM Drop Down:

Select VirtuaBoxVM > Preferences:

Screen Shot 2017-07-03 at 17.36.50

  • Select the Network > Host-only Networks tab.
  • Click toScreen Shot 2017-07-03 at 17.45.59.png add new host-only network.
  • Edit Screen Shot 2017-07-03 at 17.47.57.png  the new network and enter a valid IPv4 address and Network Mask:

Screen Shot 2017-07-03 at 17.47.31.png

  • Select OK to save.

On the Machine:

Configure three Network Adaptors on both nodes:

Screen Shot 2017-07-03 at 17.53.39.png

For the two nodes above we select the Host-only Adapter, we created in the previous step and we select and Internal Network and a NAT.  The machines need to be down, click the “Network” (in blue), or select Screen Shot 2017-07-03 at 18.15.29Setting > Network to add your adapters from 1-3.

  • Host-only Adapter (‘vboxnet2’):
    • Resembles a physical ethernet switch between Virtual Machines.
    • With host-only networking, a new “loopback” interface is created on the host.
  • Internal Network:
    • VM can communicate to other VMs on the same host which connect to the same internal network.
    • Allows two or more VMs on the same machine to communicate privately, hiding their data from both the host system and the user.
  • Network Address Translation (NAT):
    • Default networking mode on VirtualBox and simplest way of accessing an external network from VirtualBox
    • The first card is connected to the private network is 10.0.2.0, the second card to the network 10.0.3.0 and so on.

Screen Shot 2017-07-03 at 17.53.54

 

My Demo Network Scheme:

This is what I have in the /etc/hosts on both nodes:

10.100.127.101 node1.alinafe.com node1
10.100.127.102 node2.alinafe.com node2
10.100.128.101 node1-priv.alinafe.com node1-priv
10.100.128.102 node2-priv.alinafe.com node2-priv
10.100.127.103 node1-vip.alinafe.com node1-vip
10.100.127.104 node2-vip.alinafe.com node2-vip
10.100.127.105 node-scan.alinafe.com node-scan
10.100.127.106 node-scan.alinafe.com node-scan
10.100.127.107 node-scan.alinafe.com node-scan

Review the network config:

enp0s3 ~= eth0
enp0s8 ~= eth2
enp0s9 ~= eth3

[oracle@node1 ~]$ ifconfig -a

Host-only Network
enp0s3: flags…….
inet 10.100.127.101 netmask 255.255.255.0 broadcast 10.100.127.255
ether 08:00:27:e9:f3:ef  ……..
enp0s3:1: flags…..
inet 10.100.127.103 netmask 255.255.255.0 broadcast 10.100.127.255
ether 08:00:27:e9:f3:ef ……..
enp0s3:3: flags…..
inet 10.100.127.107 netmask 255.255.255.0 broadcast 10.100.127.255
ether 08:00:27:e9:f3:ef …..

The MAC Address “ether 08:00:27:e9:f3:ef can be matched to your Mac Address on the Oracle VM VirtualBox Manager this points to the Host-only Adapter, which is used for the SCAN addresses.

Internal Network ‘intnet’
enp0s8: flags=…..
inet 10.100.128.101 netmask 255.255.255.0 broadcast 10.100.128.255
ether 08:00:27:69:f2:7a …..
enp0s8:1:…..
inet 169.254.127.3 netmask 255.255.0.0 broadcast 169.254.255.255
ether 08:00:27:69:f2:7a…..

NAT ( this is normally disabled as it resets the /etc/resolv.conf file)
enp0s9: flags=…..
ether 08:00:27:29:4b:42…..

The NAT can be enabled to allow for internet connectivity, for running yum and other tasks.

DIG (querying to the localhost):

[oracle@node1 ~]$ dig node1
; <<>> DiG 9.9.4-RedHat-9.9.4-38.el7_3.3 <<>> node1;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39638;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:;node1. IN A
;; ANSWER SECTION:node1. 0 IN A 10.100.127.101
;; Query time: 0 msec;; SERVER: 127.0.0.1#53(127.0.0.1);; WHEN: Mon Jul 03 18:37:38 PDT 2017;; MSG SIZE  rcvd: 39

[oracle@node1 ~]$ dig node2
; <<>> DiG 9.9.4-RedHat-9.9.4-38.el7_3.3 <<>> node2;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41193;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:;node2. IN A
;; ANSWER SECTION:node2. 0 IN A 10.100.127.102
;; Query time: 0 msec;; SERVER: 127.0.0.1#53(127.0.0.1);; WHEN: Mon Jul 03 18:38:16 PDT 2017;; MSG SIZE  rcvd: 39

[oracle@node1 ~]$ dig node1-priv
; <<>> DiG 9.9.4-RedHat-9.9.4-38.el7_3.3 <<>> node1-priv;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36828;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:;node1-priv. IN A
;; ANSWER SECTION:node1-priv. 0 IN A 10.100.128.101
;; Query time: 0 msec;; SERVER: 127.0.0.1#53(127.0.0.1);; WHEN: Mon Jul 03 18:39:16 PDT 2017;; MSG SIZE  rcvd: 44

and so on…

PING

[oracle@node1 ~]$ ping node2 -c 3
PING node1.alinafe.com (10.100.127.102) 56(84) bytes of data.
64 bytes from node1.alinafe.com (10.100.127.102): icmp_seq=1 ttl=64 time=0.033 ms
64 bytes from node1.alinafe.com (10.100.127.102): icmp_seq=2 ttl=64 time=0.038 ms
64 bytes from node1.alinafe.com (10.100.127.102): icmp_seq=3 ttl=64 time=0.041 ms

— node1.alinafe.com ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.033/0.037/0.041/0.006 ms

ARP

[root@node1 ~]# arp -a
node-scan.alinafe.com (10.100.127.106) at 08:00:27:f0:ab:4c [ether] on enp0s3
node2.alinafe.com (10.100.127.102) at 08:00:27:f0:ab:4c [ether] on enp0s3
? (169.254.210.217) at 08:00:27:64:66:3e [ether] on enp0s8
node-scan.alinafe.com (10.100.127.105) at 08:00:27:f0:ab:4c [ether] on enp0s3
node-scan.alinafe.com (10.100.127.107) at <incomplete> on enp0s3
node2-priv.alinafe.com (10.100.128.102) at 08:00:27:64:66:3e [ether] on enp0s8
node1-vip.alinafe.com (10.100.127.103) at <incomplete> on enp0s3
gateway (10.0.4.2) at 52:54:00:12:35:02 [ether] on enp0s9
node2-vip.alinafe.com (10.100.127.104) at 08:00:27:f0:ab:4c [ether] on enp0s3

NETSTAT

[oracle@node1 ~]$ netstat -s
Ip:
6563 total packets received

1876 fragments created
Icmp:
0 ICMP messages received

ICMP output histogram:
Tcp:
25 active connections openings
1……..
238 segments send out
0 segments retransmitted
0 bad segments received.
18 resets sent
Udp:
4678 packets received
……..
5 TCP sockets finished time wait in fast timer
……

NSLOOKUP

[oracle@node1 oracle]# nslookup node2
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: node2.alinafe.com
Address: 10.100.127.102

Advertisements