설치환경
VMware VM 1, 2:
RAM: 4GB
HDD 1: 20GB
HDD 2: 3GB
NIC: eth0, eth1
OS: CentOS 6.6
PPAS: 9.4 version
1. Disabling SELINUX
vi /etc/selinux/config
SELINUX=disabled
2. Setting Hostname
vi /etc/sysconfig/network
node1:
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=cos1.local
GATEWAY=192.168.21.2
node2:
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=cos2.local
GATEWAY=192.168.21.2
3. Configuring network interfaces
node1:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
IPADDR=192.168.21.144
HWADDR="00:0C:29:5A:63:1A"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="93baf4a8-9049-4069-adcb-f50cc0bc2cec"
DNS1=8.8.8.8
vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE="eth1"
BOOTPROTO="static"
IPADDR=10.0.0.139
HWADDR="00:0C:29:5A:63:24"
ONBOOT="yes"
TYPE="Ethernet"
node 2:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
IPADDR=192.168.21.144
HWADDR="00:0C:29:5A:63:1A"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="93baf4a8-9049-4069-adcb-f50cc0bc2cec"
DNS1=8.8.8.8
vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE="eth1"
BOOTPROTO="static"
IPADDR=10.0.0.140
HWADDR="00:0C:29:5A:63:24"
ONBOOT="yes"
TYPE="Ethernet"
4. Configuring basic hostname resolution
Configuring /etc/hosts (same config on both nodes):
vi /etc/hosts
127.0.0.1 localhost cos1.local
::1 localhost cos1.local
192.168.21.160 dbip.local dbip
192.168.21.161 cos1.local cos1
192.168.21.162 cos2.local cos2
5. Checking network connectivity
Let's check if everything is fine:
node1:
Pinging node2 (thru LAN interface):
ping -c 2 node2
[root@node1 ~]# ping -c 2 node2
PING node2 (10.0.0.192) 56(84) bytes of data.
64 bytes from node2 (10.0.0.192): icmp_seq=1 ttl=64 time=0.089 ms
64 bytes from node2 (10.0.0.192): icmp_seq=2 ttl=64 time=0.082 ms
--- node2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.082/0.085/0.089/0.009 ms
Pinging node2 (thru cross-over interface):
ping -c 2 172.16.0.2
[root@node1 ~]# ping -c 2 172.16.0.2
PING 172.16.0.2 (172.16.0.2) 56(84) bytes of data.
64 bytes from 172.16.0.2: icmp_seq=1 ttl=64 time=0.083 ms
64 bytes from 172.16.0.2: icmp_seq=2 ttl=64 time=0.083 ms
--- 172.16.0.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.083/0.083/0.083/0.000 ms
node2:
Pinging node1 (thru LAN interface):
ping -c 2 node1
[root@node2 ~]# ping -c 2 node1
PING node1 (10.0.0.191) 56(84) bytes of data.
64 bytes from node1 (10.0.0.191): icmp_seq=1 ttl=64 time=0.068 ms
64 bytes from node1 (10.0.0.191): icmp_seq=2 ttl=64 time=0.063 ms
--- node1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.063/0.065/0.068/0.008 ms
Pinging node1 (thru cross-over interface):
ping -c 2 172.16.0.1
[root@node2 ~]# ping -c 2 172.16.0.1
PING 172.16.0.1 (172.16.0.1) 56(84) bytes of data.
64 bytes from 172.16.0.1: icmp_seq=1 ttl=64 time=1.36 ms
64 bytes from 172.16.0.1: icmp_seq=2 ttl=64 time=0.075 ms
--- 172.16.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.075/0.722/1.369/0.647 ms
댓글 없음:
댓글 쓰기