marmar24012 / Bash-Scripts

A Cumulative Of Bash Scripts Made To Make My Job Easier
0 stars 0 forks source link

Check for Virtual/ Service hostname/ IP address #57

Open marmar24012 opened 2 weeks ago

marmar24012 commented 2 weeks ago

Some clients are setup to use a Virtual hostname/ IP (VIP)/ Service IP (Floating IP).

If a VIP/ Service IP is used, make sure you see two IP’s (Persistent IP and Virtual IP) are enabled to the network interface.

NOTE: Check both MAIN APP and MAIN DB.

nslookup scclis ip -br addr view /etc/hosts

Example DENVR: vllabsbapp01:/> nslookup scclis scclis.hosp.dhha.org canonical name = vllabsbapp-vip.hosp.dhha.org. Name: vllabsbapp-vip.hosp.dhha.org Address: 10.90.5.235

To check (should see both Persistent IP & Virtual IP): vllabsbapp01:/> ip -brief addr show # APP ens192 UP 10.90.5.230/24 10.90.5.235/24

vllabsbora01:/> ip -brief addr show # DB ens192 UP 10.90.5.231/24 10.90.5.236/24

To add Virtual IP to network interface ens192: vllabsbapp01:/> ip addr add 10.90.5.235/24 dev ens192 # APP vllabsbora01:/> ip addr add 10.90.5.236/24 dev ens192 # DB

If you need to delete Virtual IP from network interface ens192: vllabsbapp01:/> ip addr del 10.90.5.235/24 dev ens192 # APP vllabsbora01:/> ip addr del 10.90.5.236/24 dev ens192 # DB