Home > database >  The native IP and virtual machine IP, gateway is not the same network segment
The native IP and virtual machine IP, gateway is not the same network segment

Time:09-29

PS: the RAC already installed, now mainly in up SQLPLUS or PL/SQL client connection;


Question 1: my computer local network segment is 192.168.100 of * *, and virtual machine IP192.168.159. * * is not the same network segment, the gateway is not the same network segment
The native network segment and the virtual machine is not the same network segment

IP and gateway to virtual machine and the machine to adjust a network segment do you

Node 1
[root @ node1 network - scripts] # cat/etc/hosts
# Do not remove the following line, or various designed
# that require network functionality will fail.
127.0.0.1 node1 localhost. Localdomain localhost
: : 1 localhost6. Localdomain6 localhost6

# eth0 public
Node1 192.168.159.11 node1.com
2 192.168.159.12 node2.com

# eth1 private
Node1 - priv 10.10.18.11 node1-priv.com
2 - priv 10.10.18.12 node2-priv.com


# virtual
192.168.159.13 node1 - VIP
node1-vip.com192.168.159.14 node2-vip.com VIP
2 -
# scan
Node - scan 192.168.159.15 node-scan.com
[root @ node1 network - scripts] # cat/etc/sysconfig/network - scripts/ifcfg - eth0
# Advanced Micro Devices (AMD) 79 c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.159.255
HWADDR=00:0 C: 29: B3:56: F6
IPADDR=192.168.159.11
# IPV6INIT=yes
IPV6_AUTOCONF=yes
NETMASK=255.255.255.0
NETWORK=192.168.159.0
ONBOOT=yes
[root @ node1 network - scripts] # cat/etc/sysconfig/network - scripts/ifcfg - eth1
# Advanced Micro Devices (AMD) 79 c970 [PCnet32 LANCE]
DEVICE eth1=
BOOTPROTO=static
BROADCAST=10.10.18.255
HWADDR=00:0 C: 29: B3:56:00
IPADDR=10.10.18.11
# IPV6INIT=yes
IPV6_AUTOCONF=yes
NETMASK=255.255.255.0
NETWORK=10.10.18.0
ONBOOT=yes

Node 2
/root @ 2 ~ # service iptables status
The firewall has stopped
/root @ 2 ~ # cat/etc/hosts
# Do not remove the following line, or various designed
# that require network functionality will fail.
127.0.0.1 2 localhost. Localdomain localhost
: : 1 localhost6. Localdomain6 localhost6

# eth0 public
Node1 192.168.159.11 node1.com
2 192.168.159.12 node2.com

# virtual
192.168.159.13 node1 - VIP
node1-vip.com192.168.159.14 node2-vip.com VIP
2 -
# eth1 private
Node1 - priv 10.10.18.11 node1-priv.com
2 - priv 10.10.18.12 node2-priv.com
# scan
Node - scan 192.168.159.15 node-scan.com
/root @ 2 ~ # cat/etc/sysconfig/network - scripts/ifcfg - eth0
# Advanced Micro Devices (AMD) 79 c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.159.255
HWADDR=00:0 C: 29:05:8 e: 0 C
IPADDR=192.168.159.12
NETMASK=255.255.255.0
NETWORK=192.168.159.0
ONBOOT=yes
/root @ 2 ~ # cat/etc/sysconfig/network - scripts/ifcfg - eth1
# Advanced Micro Devices (AMD) 79 c970 [PCnet32 LANCE]
DEVICE eth1=
BOOTPROTO=static
BROADCAST=10.10.18.255
HWADDR=00:0 C: 29:05:8 e: 16
IPADDR=10.10.18.12
NETMASK=255.255.255.0
NETWORK=10.10.18.0
ONBOOT=yes
# HOTPLUG=no

CodePudding user response:

If just for my own use, directly change the mode of the virtual machine to host mode, only to change the IP to automatically obtain, access to the IP, in according to the IP change for fixed IP
  • Related