[root@cowjin1 etc]# cat nsswitch.conf
# Generated by authselect on Sun Feb 9 18:46:51 2025
# Do not modify this file manually.
# If you want to make changes to nsswitch.conf please modify
# /etc/authselect/user-nsswitch.conf and run 'authselect apply-changes'.
#
# Note that your changes may not be applied as they may be
# overwritten by selected profile. Maps set in the authselect
# profile takes always precedence and overwrites the same maps
# set in the user file. Only maps that are not set by the profile
# are applied from the user file.
#
# For example, if the profile sets:
# passwd: sss files
# and /etc/authselect/user-nsswitch.conf contains:
# passwd: files
# hosts: files dns
# the resulting generated nsswitch.conf will be:
# passwd: sss files # from profile
# hosts: files dns # from user file
passwd: files sss systemd
group: files sss systemd
netgroup: sss files
automount: sss files
services: sss files
# Included from /etc/authselect/user-nsswitch.conf
#
# /etc/nsswitch.conf
#
# Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# Valid databases are: aliases, ethers, group, gshadow, hosts,
# initgroups, netgroup, networks, passwd, protocols, publickey,
# rpc, services, and shadow.
#
# Valid service provider entries include (in alphabetical order):
#
# compat Use /etc files plus *_compat pseudo-db
# db Use the pre-processed /var/db files
# dns Use DNS (Domain Name Service)
# files Use the local files in /etc 👈 /etc/passwd 파일에서 먼저 검색
# hesiod Use Hesiod (DNS) for user lookups
# nis Use NIS (NIS version 2), also called YP
# nisplus Use NIS+ (NIS version 3)
#
# See `info libc 'NSS Basics'` for more information.
#
# Commonly used alternative service providers (may need installation):
#
# ldap Use LDAP directory server
# myhostname Use systemd host names
# mymachines Use systemd machine names
# mdns*, mdns*_minimal Use Avahi mDNS/DNS-SD
# resolve Use systemd resolved resolver
# sss Use System Security Services Daemon (sssd)👈SSSD을 사용해 LDAP이나 Active Directory에서 검색
# systemd Use systemd for dynamic user option
# winbind Use Samba winbind support
# wins Use Samba wins support
# wrapper Use wrapper module for testing
#
# Notes:
#
#
# WARNING: Running nscd with a secondary caching service like sssd may
# lead to unexpected behaviour, especially with how long
# entries are cached.
#
# Installation instructions:
#
# To use 'db', install the appropriate package(s) (provide 'makedb' and
# libnss_db.so.*), and place the 'db' in front of 'files' for entries
# you want to be looked up first in the databases, like this:
#
# passwd: db files
# shadow: db files
# group: db files
✅ passwd, shadow, group
file sss: /etc/passwd, /etc/shadow, /etc/group 파일과 SSSD를 사용해 사용자와 그룹 정보를 확인
# In order of likelihood of use to accelerate lookup.
shadow: files sss
hosts: files dns myhostname
✅ hosts: 호스트 이름 해석을 위해 /etc/hosts 파일, DNS, 그리고 systemd의 호스트 이름 확인을 사용
- /etc/hosts 파일에 Public IP, Private IP, VIP 정보를 기록하고, DNS 서버를 통해 추가 확인
aliases: files
ethers: files
gshadow: files
# Allow initgroups to default to the setting for group.
# initgroups: files
networks: files dns
✅ networks: 네트워크 정보 해석 시 /etc/networks파일과 DNS 서버를 사용
protocols: files
publickey: files
rpc: files
1. 호스트 이름 해석(hosts)
- LDAP/AD연동
- NIS/NFS 환경
- 호스트 이름 해석: Oracle Listener 또는 클러스터 환경에서 호스트 이름을 IP로 해석할 때
- RAC 환경: Oracle RAC에서 호스트 이름 및 네트워크 설정이 중요하기 때문에, 정확한 이름 해석을 위해 필요
- DNS 설정: hosts: file dns myhostname 설정 시, RAC 환경에서 호스트이름을 DNS로 해석한다.
# Public IP
#
192.168.0.101 node1-public
192.168.0.102 node2-public
# Private IP (Interconnect)
10.0.0.101 node1-priv
10.0.0.102 node2-priv
# Virtual IP (VIP)
# Virtual IP (VIP): 클러스터 노드 장애 시 Failover를 위해 사용하는 가상 IP.
192.168.0.111 node1-vip
192.168.0.112 node2-vip
# SCAN IP (Single Client Access Name)
192.168.0.121 rac-scan
192.168.0.122 rac-scan
192.168.0.123 rac-scan
## SCAN IP: 클러스터의 접속 주소. 3개의 IP를 DNS 라운드로빈 방식으로 설정.
1. 노드 간 통신
hosts: files dns
설정 시, DNS 서버가 /etc/resolv.conf
에 정의된 순서대로 조회한다.[root@cowjin1 etc]# cat /etc/resolv.conf
# Generated by NetworkManager 👈 NetworkManager에 의해 자동으로 생성된다.
nameserver 8.8.8.8
nameserver 210.220.163.82 👈 한국인터넷진흥원(KISA) DNS서버
nameserver 219.250.36.130 👈 한국통신(KT) DNS서버