Netscaler DSR(Direct Server Return) Configuration

IBM Cloud์—์„œ ์ œ๊ณตํ•˜๋Š” Load Balancer ์ค‘์— Network Throughput ๊ธฐ์ค€์œผ๋กœ ๊ตฌ๋งค ๊ฐ€๋Šฅํ•œ Netscaler DSR ๊ตฌ์„ฑ ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์ž‘์„ฑํ•˜์˜€์Šต๋‹ˆ๋‹ค.
*DSR ์„ค์ •์€ Load Balancing ์„ค์ • ์ค‘์— ๊ฐ€๋Šฅํ•จ์œผ๋กœ Server๋กœ Load Balancing ์„ค์ •ํ•˜๋Š” ๋‚ด์šฉ์„ ํฌํ•จํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

Load Balancer๋Š” ์ผ๋ฐ˜์ ์œผ๋กœ Web Server ์•ž์— ์œ„์น˜ํ•˜์—ฌ, Traffic์„ Balancing ํ•ด์ฃผ๋Š” ์—ญํ• ์„ ํ•˜๊ณ  ์žˆ๋Š”๋ฐ Push Notification ๋“ฑ๊ณผ ๊ฐ™์ด ๋Œ€๋Ÿ‰์˜ Traffic์„ ์™ธ๋ถ€๋กœ ์ „์†กํ•  ๋•Œ Load Balancer์— ๊ณผ๋„ํ•˜๊ฒŒ ๋ถ€ํ•˜๊ฐ€ ๊ฑธ๋ฆฌ๊ฑฐ๋‚˜, Network Throughput์„ ํ•œ๊ณ„์น˜๊นŒ์ง€ ์‚ฌ์šฉํ•˜์—ฌ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

Netscaler Load Balancer๋Š” ์ด๋Ÿฌํ•œ ๋ฌธ์ œ์ ์„ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ๋Š” DSR(Direct Server Return) ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜์—ฌ ๋“ค์–ด์˜ค๋Š” Traffic์— ๋Œ€ํ•ด์„œ๋งŒ Load Balancer๋ฅผ ๊ฑฐ์ณ๊ฐ€๊ณ , ์™ธ๋ถ€๋กœ ๋‚˜๊ฐ€๋Š” Traffic(Outbound)์— ๋Œ€ํ•ด Load Balancer๋ฅผ ๊ฑฐ์น˜์ง€ ์•Š๊ณ  Server์—์„œ ๋ฐ”๋กœ Traffic์ด ๋‚˜๊ฐ€๋Š” ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

DSR Architecture

์ฐธ๊ณ ๋งํฌ : https://support.citrix.com/article/CTX110501

ํ•„์š” ์‚ฌํ•ญ :
– Netscaler VPX 1๋Œ€, Web Server 1๋Œ€

Control.softlayer.com์—์„œ SSL VPN์„ ์—ฐ๊ฒฐํ•œ ํ›„, Netscaler VPX ๊ด€๋ฆฌํŽ˜์ด์ง€๋กœ ์ ‘์†ํ•ฉ๋‹ˆ๋‹ค.

๊ด€๋ฆฌํŽ˜์ด์ง€์— ์ ‘์†ํ•œ ํ›„, Congifuration ํƒญ > System ๋ฉ”๋‰ด > Settings ๋กœ ์ ‘์†ํ•˜์—ฌ โ€˜Configure Modesโ€™ ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

๋นจ๊ฐ„ ๋ฐ•์Šค์˜ โ€˜MAC based forwardingโ€™์„ ์ฒดํฌ ํ›„, OK ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

Traffic Management ํƒญ > Load Balancing ๋ฉ”๋‰ด > Services๋กœ ์ ‘์†ํ•˜์—ฌ โ€˜Addโ€™ ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
*์—ฌ๊ธฐ์„œ ์–ธ๊ธ‰ํ•˜๋Š” Service๋Š” Load Balancing ๋Œ€์ƒ์ธ Server๋ฅผ ์ง€์นญํ•ฉ๋‹ˆ๋‹ค.

Service Name, Server IP, Protocol, Port๋ฅผ ์ž‘์„ฑ ํ›„, ์•„๋ž˜ Settings ๋ฉ”๋‰ด์—์„œ ๋นจ๊ฐ„ ๋ฐ•์Šค์˜ โ€˜Use Source IPโ€™๋ฅผ ์ฒดํฌ ํ›„ OK ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์‹œ Traffic Management ํƒญ > Load Balancing ๋ฉ”๋‰ด > Virtual Servers๋กœ ์ ‘์†ํ•˜์—ฌ โ€˜Addโ€™ ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

Name, Protocol, IP, Port๋ฅผ ์„ค์ •ํ•ด ์ค€ ํ›„, ํ•˜๋‹จ ๋นจ๊ฐ„ ๋ฐ•์Šค์˜ Redirection Mode๋ฅผ โ€˜MAC Basedโ€™๋กœ ๋ณ€๊ฒฝํ•ด ์ค๋‹ˆ๋‹ค.

์„ค์ • ์™„๋ฃŒ ํ›„, ๋นจ๊ฐ„ ๋ฐ•์Šค์˜ Service ํ•ญ๋ชฉ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

์ขŒ์ธก ์ƒ๋‹จ์˜, Add Binding ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

Click to select ์˜์—ญ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

๊ธฐ์กด์— ์ƒ์„ฑํ•œ Service๋“ค์ด ๋ณด์ด๋ฉฐ, ํ•„์š”ํ•œ Service๋ฅผ ์„ ํƒ ํ›„ OK ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

์„ ํƒํ•œ Service๊ฐ€ ๋‚˜ํƒ€๋‚˜๋ฉด Bind ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

์ตœ์ข…์ ์œผ๋กœ ๋“ฑ๋ก๋œ Service๋“ค์„ ํ™•์ธ ํ›„, Close ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

๊ทธ ํ›„, ํ•˜๋‹จ์˜ Protection ํ•ญ๋ชฉ์˜ ์—ฐํ•„๋ชจ์–‘์„ ํด๋ฆญํ•˜์—ฌ ํŽธ์ง‘ ์ฐฝ์œผ๋กœ ๋“ค์–ด๊ฐ‘๋‹ˆ๋‹ค.

๋งŒ์•ฝ Protection ํ•ญ๋ชฉ์ด ๋ฐ”๋กœ ๋ณด์ด์ง€ ์•Š๋Š”๋‹ค๋ฉด, ์šฐ์ธก ๋ฉ”๋‰ด๋ฅผ ์‚ดํŽด๋ณด์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค.

Protection ํ•ญ๋ชฉ์˜ Connection Failover ์˜ต์…˜์„ โ€˜STATELESSโ€™๋กœ ๋ณ€๊ฒฝ ํ›„, OK ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

์ด๋กœ์จ Netscaler์—์„œ DSR ๊ตฌ์„ฑ์€ ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
๋‹ค์Œ์€ Server Level์—์„œ ์„ค์ •ํ•˜๋Š” ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค.

– Linux

VIP ์„ค์ •
#ifconfig lo:0 [VIP address] netmask 255.255.255.255 up

ARP ์„ค์ •

#sysctl -w net.ipv4.conf.lo.arp_ignore=1
#sysctl -w net.ipv4.conf.lo.arp_announce=2
#sysctl -w net.ipv4.conf.all.arp_ignore=1
#sysctl -w net.ipv4.conf.all.arp_announce=2

– Windows
์žฅ์น˜ ๊ด€๋ฆฌ์ž๋ฅผ ์—ด์–ด, Action > Add Legacy Hardware๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

Add Hardware ๋งˆ๋ฒ•์‚ฌ์—์„œ Network Adapter๋ฅผ ์„ ํƒ ํ›„, Microsoft์˜ โ€˜Microsoft KM-TEST Loopback Adapterโ€™๋ฅผ ์„ ํƒํ•˜์—ฌ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

์„ค์น˜ ์™„๋ฃŒ ํ›„, Network Adapter์˜ IP ์…‹ํŒ… ์ฐฝ์œผ๋กœ ์ ‘์†ํ•˜์—ฌ Advanced > WINS ํƒญ > NetBIOS setting ์˜์—ญ์˜ โ€˜Disable NetBIOS over TCP/IPโ€™ ์˜ต์…˜์„ ํด๋ฆญ ํ•ฉ๋‹ˆ๋‹ค.

DNS ํƒญ์—์„œ Virtual IP๋ฅผ ๋“ฑ๋กํ•œ ํ›„, ํ•˜๋‹จ์˜ โ€˜Register this connectionโ€™s addresses in DNSโ€™ ์˜ต์…˜์„ ์ฒดํฌ ํ›„, OK ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ์„ค์ •์„ ์™„๋ฃŒ ํ•ฉ๋‹ˆ๋‹ค.

DSR ์„ค์ • ์™„๋ฃŒ ํ›„, Web Server์—์„œ Client IP๋ฅผ ํ™•์ธํ•ด ๋ณด๋ฉด Load Balancer IP๊ฐ€ ์•„๋‹Œ Server์˜ IP๊ฐ€ ์ฐํžˆ๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์— ๋Œ€ํ•œ ๋Œ“๊ธ€์ด 1๊ฑด ์žˆ์Šต๋‹ˆ๋‹ค"Netscaler DSR Configuration"

  1. ์ž˜ ์ฝ์—ˆ์Šต๋‹ˆ๋‹ค.

ํ† ๋ก  ์ฐธ๊ฐ€

์ด๋ฉ”์ผ์€ ๊ณต๊ฐœ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ํ•„์ˆ˜ ์ž…๋ ฅ์ฐฝ์€ * ๋กœ ํ‘œ์‹œ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค