DNS 설정 관련 질문

mirr187의 이미지

최근에 업무 문제로 DNS를 보고 있는데, Bind9 을 기준으로 보고 있습니다.. 처음 보는 쪽이다보니...;;

named.conf
>>

zone "mirr.com" {
type master;
file "/etc/bind/zone/mirr.zone";
};
zone "0.168.192.in-addr.arpa" {
type master;
file "/etc/bind/zone/mirr.rev";
};

named.conf.options
>>

options {
rrset-order {
class IN type A name "*.mirr.com" order fixed;
};
};

mirr.zone
>>

$TTL 10

@ IN SOA ns.mirr.com. root.mirr.com. (
2001071500 ; Serial
10 ; Refresh
20 ; Retry
30 ; Expire
10 ) ; Minimum
IN NS ns.mirr.com.
mirr.com. IN A 192.168.0.200
www.mirr.com. 10 IN A 192.168.0.100 ; Primary
www.mirr.com. 10 IN A 192.168.0.200 ; Secondary

위와 같이 설정을 해 두었습니다.

root@ubuntu-1:/etc/bind/zone# nslookup www.mirr.com
Server: 192.168.0.36
Address: 192.168.0.36#53

Name: www.mirr.com
Address: 192.168.0.100
Name: www.mirr.com
Address: 192.168.0.200

과 같이 나오는데, 192.168.0.100을 Primary로 ,192.168.0.200을 Secondary 로 사용할려고 합니다.

그래서 Primary가 donw되었을 때 Secondary의 값을 넘겨주었으면 하는데, DNS에서 그런 설정이 가능한지 궁금합니다..

현재 순서를 고정으로 해두었고, load balance 가 목적이 아닌 일종의 백업 용도로 사용하기 위한 것입니다..

현재 설정으로 ping www.mirr.com을 수행시 Primary 가 다운되어도 계속해서 첫번째 주소로만 되기에.. 다음걸로 넘어가는 방법이 있는지가 궁금합니다..

만약, 위와 같이 하는 다른 방법이 있다면 알려주시면 감사하겠습니다.

ilover2의 이미지

DNS 라운드로빈을 구현하셔도 해당 서버가 살아있는지는
체크하지 않기 때문에 다운된 서버로도 트랙픽이 갈 수 있어요.
보통 기업에서는 L4 스위치로 서비스 체크하며 분산을 많이하죠.(비싸긴하지만;)

말씀하신대로 구현을 하겠다면 DNS 서버에서 분산하려는 서버로
ping 체크를 걸어놓고 down 시에 해당 zone 파일을 변경하도록
스크립트를 작성하면 될 것 같습니다.

아직까지 그렇게 구현해 본적은 없지만
즉흥적으로 생각난거라 해보면 재밌을 것 같네요.^^;

---[ '70 라면된다! ]---------------------------
실패의 경우의 수를 줄이면 성공의 확률은 높아진다.

---[ '70 라면된다! ]---------------------------
실패의 경우의 수를 줄이면 성공의 확률은 높아진다.

mirr187의 이미지

답변 감사합니다 ^^

저도 그 방법을 생각해보고 있긴 한데.. 기존에 가능한 방법이 있지 않겠나.. 해서 물어본건데..
역시나... 하나 간단하게 짜 봐야겠군요..ㅋ

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.