FreeBSD에서의 IPv6 라우터 구성 방법

김상범, 한국통신 통신망연구소



1. 머리말

    일반적으로 라우터는 패킷 forwarding 위주의 전용 라우터(Dedicated Router)와 2개 이상의 인터페이스를 지닌 범용 컴퓨터를 개조하여 만든 호스트 기반 라우터(Host-based Router)로 분류된다.  IPv6 라우터도 cicso 라우터와 같은 전용 라우터와 PC나 워크스테이션을 개조하여 만든 호스트 기반 라우터가 있다.

     IPv6 전용 라우터는 가격이 워낙 높기 때문에 실험용으로 사용하기에는 부담이 크다.  그러나 호스트 기반 라우터는 저렴한 PC나 안정적인 워크스테이션을 필요에 따라 개조하여 사용하고 필요성이 없어지면 다시 범용 컴퓨터로 활용할 수 있다.

    호스트 기반 라우터를 제작하려면 2개 이상의 인터페이스 카드를 지닌 컴퓨터 하드웨어, 운영체제, IPv6 스택 소프트웨어, 라우팅 소프트웨어가 있어야 한다.  PC의 경우 2장의 LAN 카드, PC용 운영체제, KAME, INRIA 등의 IPv6 스택 소프트웨어, gated, bgpd, zebra, mrtd 등의 라우팅 소프트웨어가 필요하다.  선택은 제작자의 자유이지만 본 TM에서는 안정성을 우선으로 하여 펜티엄급 PC, 2장의 ethernet 카드, FreeBSD 3.2 운영체제, FreeBSD 3.2 용 KAME IPv6 스택, bgpd 라우팅 데몬 프로세스를 사용한 기본적인 PC IPv6 라우터의 제작을 설명한다.  이 라우터는 라우팅 기능을 중지시키면 IPv6 단말로 사용이 가능하다.

    초보자가 손쉽게 IPv6 라우터를 구성하고자 할 때 필요한 구성 요소는 다음과 같다.

네트워크와 연결된 펜티엄급 PC (4GB 하드 디스크, 2장의 LAN 카드)
FreeBSD 3.2 운영체제
KAME IPv6 소프트웨어
KAME 소프트웨어에 포함된 bgpd 데몬


2. FreeBSD 3.2 설치

    펜티엄급 CPU에 주 메모리가 16MB 이상이고 하드 디스크 용량이 4GB 정도인 PC를 준비한다.  PC를  라우터로 사용하려면 2장의 LAN 카드가 설치되어 네트워크와 연결되어 있어야 한다. 먼저 라우터의 이름과 도메인, IPv4 주소, 게이트웨이, 네임 서버, 네트워크 마스크를 알고 있어야 한다.  또한 bgp4+ peering을 위한 AS 번호, 연결될 상대 측 AS 번호, 상대측 라우터 IPv4 주소, 상대측 라우터 IPv6 주소를 알고 있어야 한다.

    FreeBSB 3.2는 2장의 플로피 디스크로 부팅 디스켓을 만들 수 있다. 다음 URL에 들어 가서 부팅 디스켓을 만든다.

                             FreeBSD 한국 사이트:  http://www.kr.freebsd.org/

    플로피 디스크를 준비된 PC에 넣고 부팅을 시킨다.  X developer 관련 부분을 선택하여 FreeBSD를 설치한다.  라우터의 이름과 IP 주소, 게이트웨이, 네임 서버, 도메인 이름도 넣어 준다.  하드 디스크가 한 개일 경우 auto partition으로 설정하면 되고, 두 개일 경우 하나는 auto partition을 하고 다른 하나는 적절히 create 명령을 통해 partition을 한다. FTP passive 방식을 선택하여 네트워크를 통해 운영체제가 설치되는 동안 기다린다.

    FreeBSD 3.2가 설치되면 마우스 타입과 포트를 지정한다.  X server 메뉴에 대해 비디오 카드 종류와 모니터 해상도, mode selection을 정확히 지정해야 X 윈도우 사용에 있어서 문제가 없다.   Add User를 사용해서 임시 사용자 계정을 만든다.  이제 플로피 디스크를 제거하고 재부팅을 시키는 것으로 FreeBSD 3.2설치가 완료된다.  



3.  IPv6 스택 설치

    FreeBSD 3.2에 대해 /usr/local 디렉토리에 일본 KAME IPv6 소프트웨어를 설치한다.  이는 다음 사이트에서 다운로드 받을 수 있다.

                       ftp://ftp.kame.net/pub/kame/snap

여기서 가장 최근의 FreeBSD 3.2용 KAME 소프트웨어를 다운로드 받는다.  개발 진행 중인 소프트웨어를 다운로드 받는 요령은 우선 release 판이 있는가 보고 없으면 stable 상태의 소프트웨어를 다운로드 받는다.  Stable 판도 없으면 snap 소프트웨어 중에서 가장 최신의 것을 받도록 한다.

    모두 다운로드 받았으면 소프트웨어 패키지를 풀어 낸다. 이 때 명령어는 다음과 같다.

                         gzip  -c  -d  kame-1999xxxx-fbsd32-xxxxxx.tgz  |  tar  -xvf  -

이 때 kit 라는 디렉토리가 생기고 그 안에 INSTALL 파일이 있다.  이 INSTALL 파일을 주의깊게 보면서 KAME 소프트웨어 패키지를 설치한다.


4.  환경 설정

    처음 IPv6 라우터를 제작하는 사람이 애를 먹는 부분이 이 환경 설정 부분이다.  기본적인 내용으로 차근 차근 설명하면 다음과 같다.

4.1  rc 파일

/etc/rc 파일 끝 부분(exit 0 명령어 앞에)에 다음 스크립트를 추가한다.

#-------------------v6 configuration---------------------#
[ -f /usr/local/v6/etc/rc.net6 ] && sh /usr/local/v6/etc/rc.net6

#----------------tunnelling information-----------------#
[ -f /etc/rc.ipv6 ] && sh /etc/rc.ipv6

#-----------------------v6 routing-------------------------#
/usr/local/v6/sbin/bgpd -c /usr/local/v6/etc/bgpd.conf

#----------------------route advertise--------------------#
/usr/local/v6/sbin/rtadvd <내부 인터페이스 이름>



4.2  rc.conf 파일

/etc/defaults/rc.conf 파일에서 다음 사항을 수정한다.

hostname="<호스트 전체 이름>"  # Set this!

network_interfaces="인터페이스1   인터페이스2    lo0"
ifconfig_인터페이스1="inet <IPv4 주소>  netmask <IPv4 마스크>"
ifconfig_인터페이스2="inet <IPv4 주소>  netmask  <IPv4 마스크>"


defaultrouter="<IPv4 주소>"          # Set to default gateway (or NO).

gateway_enable="YES"            # Set to YES if this host will be a gateway.
router_enable="NO"              # Set to YES to enable a routing daemon.

moused_enable="YES"     # Run the mouse daemon.



4.3  rc.net6

/usr/local/v6/etc/rc.net6 파일은 rc.net6.sample 파일을 복사한 후 다음 부분을 수정한다.


ip6router=YES

iface="인터페이스1   인터페이스2"
prefix_인테페이스1="IPv6 prefix"
prefix_인터페이스2="IPv6 prefix"

#iface="ed0" #comment 처리가 필요

# route6d
#       [ -x $route6d ] && $route6d $route6dflags    #comment 처리가 필요



4.4  rc.ipv6 파일

    /etc/rc.ipv6 파일은 터널링 정보를 담고 있다.  다음은 ep0와 vx0 인터페이스를 지닌 라우터에 대한 실제 예를 나타낸다.  먼저 gifconfig를 정해주고 ifconfig를 정해주어야 한다.  마지막에 default 경로를 잡아준다.


#----------------my system---------------#
/usr/local/v6/sbin/prefix ep0 3ffe:502:3:100:: prefixlen 64
/usr/local/v6/sbin/ifconfig ep0 inet6 3ffe:502:3:100::20:af38:e4ce prefixlen 64 alias

/usr/local/v6/sbin/prefix vx0 3ffe:502:3:101:: prefixlen 64
/usr/local/v6/sbin/ifconfig vx0 inet6 3ffe:502:3:101::a0:2496:1c67 prefixlen 64 alias

#-----------------to KAIST---------------#
/usr/local/v6/sbin/gifconfig gif0 203.255.255.84 192.249.24.26
/usr/local/v6/sbin/ifconfig gif0 inet6 3ffe:502:3:100::20:af38:e4ce 3ffe:502:3:2:290:27ff:
fe43:121f alias

#-----------------to ETRI----------------#
/usr/local/v6/sbin/gifconfig gif1 203.255.255.84 129.254.254.82
/usr/local/v6/sbin/ifconfig gif1 inet6 3ffe:502:3:100::20:af38:e4ce 3ffe:2e00::20:af86:f99
6 alias

#---------------default route------------#
/usr/local/v6/sbin/route add -inet6 default 3ffe:502:3:2:290:27ff:fe43:121f



4.5  bgpd.conf 파일

    /usr/local/v6/etc/bgpd.conf 파일에는 ripng와 bgpd4+ 관련 정보를 넣어 준다.  다음 역시 실제 예를 나타낸다.  

autonomoussystem 9270;
routerid 203.255.255.84;

# RIPng
rip yes {
        interface vx0 default originate;
        interface gif0 noripin noripout;
        interface gif1 noripin noripout;
};

# aggregation (RIPng)
aggregate 3ffe:502:3:100::/56 {
          proto direct interface gif0 {all;};
};

# BGP4+
bgp yes {
        # KAIST
        group type external peeras 7622 {
              peer 3ffe:502:3:2:290:27ff:fe43:121f;
        };
        # ETRI
        group type external peeras 3559 {
              peer 3ffe:2e00::20:af86:f996;
        };
};

# export list
export proto bgp as 7622 {
       proto direct interface ep0 {all;};
};
export proto bgp as 3559 {
       proto direct interface ep0 {all;};
};



5.  라우팅 개시

환경 설정이 모두 끝나면  다음 명령으로 rebooting 시키면 라우터로 동작한다.

    sync;sync;sync;shutdown -r  now

이때 연결할 (bgp4+ peering을 시도할) 상대 측에게 연락을 취하여 서로 AS 번호, 라우터의 IPv4 주소, IPv6 주소를 교환하여 환경 설정 파일에 입력하도록 한다.

    지금까지는 가장 기본적인 IPv6 라우터 제작 방법을 설명하였고 이외에 QoS, bgp4+ 라우팅, KAME 코드 등에 대해 추가로 알려면 다음 URL을 참고하면 된다.  

   한편 한국통신 통신망연구소 인터넷기술연구실에 의문사항에 대해 E-mail을 보내는 방법도 있다.

  

AltQ:            ftp://ftp.csl.sony.co.jp/pub/kjc/
RSVP:         ftp://ftp.isi.edu/rsvp/release/
IPv6:            http://www.kame.net/
GateD:        http://www.gated.org/
2006/03/17 06:29 2006/03/17 06:29
Trackback address :: http://4ellene.net/tt/trackback/794
  1. casino games

    Tracked from casinos 2009/03/30 13:01  삭제

    no deposit online casino

  2. Tracked from rape my body 2009/04/13 03:21  삭제

    rape mpg

  3. true rape stories

    Tracked from underage rape 2009/04/14 13:27  삭제

    tranny rape

  4. bdsm thumbs

    Tracked from bdsm toons 2009/04/15 06:27  삭제

    bdsm tgp

  5. rape films

    Tracked from girl forced sex 2009/06/29 03:36  삭제

    illegal rape

  6. school rape

    Tracked from forced wife 2009/06/29 04:56  삭제

    rape board

  7. rape pics

    Tracked from rape anal 2009/06/29 05:28  삭제

    rape sex videos

  8. forced orgasms

    Tracked from nude girl forced 2009/06/29 18:38  삭제

    darksites rape

  9. extreme anal

    Tracked from rape sister 2009/06/29 21:11  삭제

    rape xxx

  10. stories about rape

    Tracked from rape fetish porn 2009/06/30 03:24  삭제

    hentai forced sex

  11. group rape

    Tracked from forced dog sex 2009/06/30 11:50  삭제

    extreme fucking

  12. forced sex vids

    Tracked from bizarre extreme sex 2009/06/30 12:16  삭제

    underground rape porn

  13. xxx rape videos

    Tracked from rape asian 2009/06/30 19:36  삭제

    hardcore rape porn

  14. porn rape scene

    Tracked from rape sister 2009/06/30 22:43  삭제

    erotic rape stories

  15. forced sex mpegs

    Tracked from porno rape 2009/07/01 09:26  삭제

    virgin rape

  16. date rape porn

    Tracked from stories of rape 2009/07/01 09:38  삭제

    rape porn sites

  17. forced bi sex

    Tracked from rape and forced sex movies 2009/07/01 14:00  삭제

    gangbang rape

  18. rape movies

    Tracked from asian rape videos 2009/07/02 01:14  삭제

    simulated rape

  19. extreme fucking

    Tracked from doctor rape 2009/07/02 07:11  삭제

    brother sister rape

  20. rape fetish porn

    Tracked from drug rape 2009/07/02 13:29  삭제

    underground rape porn

  21. rape tales

    Tracked from lesbian forced sex 2009/07/03 12:48  삭제

    xxx rape

  22. forced dog sex videos

    Tracked from rape fantasy stories 2009/07/03 17:54  삭제

    teen forced sex

  23. hentai rape

    Tracked from toon rape 2009/07/03 19:16  삭제

    reality porn rape

  24. femdom rape

    Tracked from rape in high school 2009/07/05 19:00  삭제

    daughter rape

  25. extreme lolita sex

    Tracked from rape mpg 2009/07/07 00:29  삭제

    rape in a van porn

  26. club usa casino bonus

    Tracked from online casino betting 2009/07/10 03:31  삭제

    online casinos no deposit bonus

  27. casino online games

    Tracked from casino gaming table 2009/07/10 06:23  삭제

    club usa casino bonus

  28. free online casino games

    Tracked from online gambling casinos 2009/07/10 06:48  삭제

    online casino games for mac

  29. online casino gaming

    Tracked from internet casino 2009/07/10 07:20  삭제

    online usa casinos

  30. american online casinos

    Tracked from golden casino http 2009/07/11 19:55  삭제

    usa online casino

  31. online casino register

    Tracked from casino directory 2009/07/12 02:38  삭제

    casino websites

  32. online casino

    Tracked from new online casinos 2009/07/12 06:48  삭제

    no deposit online casinos

  33. no deposit online casino listings usa

    Tracked from casino bonus 2009/07/12 15:53  삭제

    online casino blackjack

  34. online casinos accepting all usa players

    Tracked from online betting casinos 2009/07/12 23:03  삭제

    no deposit online casino listings usa

  35. online casino s

    Tracked from free online casino gambling 2009/07/13 14:17  삭제

    online casino games

  36. free online casino gambling

    Tracked from free online casino chip 2009/07/13 17:53  삭제

    casino game onlino

  37. casino directory

    Tracked from casino online games 2009/07/14 00:08  삭제

    online gambling casinos

  38. gambling money for online casino

    Tracked from online casino gaming 2009/07/14 10:02  삭제

    casino open usa

  39. no download casino

    Tracked from reputable online casino 2009/07/14 21:54  삭제

    online casino betting

  40. gambling money for online casino

    Tracked from online casino slot 2009/07/15 01:35  삭제

    online gambling casino

  41. online casino bonus

    Tracked from online casino $10 minimum deposit 2009/07/15 10:42  삭제

    online casino code

  42. online casinos no deposit bonuses

    Tracked from american online casinos 2009/07/15 16:56  삭제

    no deposit online casino

  43. online casino game

    Tracked from online casion 2009/07/16 03:28  삭제

    online casino gaming

  44. casino bonus

    Tracked from casino web sites 2009/07/16 09:21  삭제

    online casinos

  45. online casino australia

    Tracked from online casinos no deposit 2009/07/16 12:14  삭제

    casino money

  46. gambling money for online casino

    Tracked from grand online casino 2009/07/17 00:48  삭제

    grand online casino

  47. new online casinos

    Tracked from online casino code 2009/07/17 03:19  삭제

    online casinos no deposit bonuses

  48. online casino betting

    Tracked from online casino game 2009/07/17 17:14  삭제

    gambling money for online casino

  49. casino casinos online

    Tracked from top ten online casinos 2009/07/17 20:34  삭제

    new online casino

  50. virtual casino

    Tracked from casino money 2009/07/18 05:29  삭제

    us online casinos

  51. online free casino

    Tracked from american casinos online play 2009/07/19 11:55  삭제

    download online casino games

  52. shemale masturbating

    Tracked from shemale fucks girl 2009/07/20 06:19  삭제

    hot shemales

  53. shemale tube

    Tracked from latin tranny 2009/07/20 14:14  삭제

    transvestite videos

  54. transexual videos

    Tracked from tranny girls 2009/07/20 22:21  삭제

    ladyboy free movies

  55. hot tranny

    Tracked from transvestite stories 2009/07/21 00:36  삭제

    shemale lesbian

  56. big tits transexuals

    Tracked from post op transexuals 2009/07/21 11:20  삭제

    post op ladyboy

  57. tranny cumshot

    Tracked from shemale creampie 2009/07/21 23:40  삭제

    shemale vanity

  58. futanari stories

    Tracked from tranny tgp 2009/07/22 10:54  삭제

    transvestite links

  59. transvestite bdsm

    Tracked from tranny dating 2009/07/22 17:00  삭제

    ladyboy jizz

  60. ladyboy video

    Tracked from transsexual pic 2009/07/22 21:21  삭제

    shemale canada

  61. transvestite fuck

    Tracked from transexual women 2009/07/23 02:37  삭제

    shemale clips

  62. transgender fiction

    Tracked from teen shemales 2009/07/23 02:44  삭제

    black transsexual

  63. ladyboy jacking off

    Tracked from futanari clips 2009/07/23 10:35  삭제

    ladyboy mint

  64. transexual chat

    Tracked from ladyboys 2009/07/23 12:18  삭제

    shemale

  65. transsexual services

    Tracked from tranny on tranny 2009/07/23 12:49  삭제

    ladyboy cock

  66. m2f transsexuals

    Tracked from younger trannies 2009/07/23 19:36  삭제

    tranny lesbian

  67. futanari links

    Tracked from transexual dating 2009/07/24 06:14  삭제

    transvestites in bondage

  68. ladyboy doggystyle

    Tracked from shemale sex 2009/07/24 09:00  삭제

    black transsexuals

  69. incest stories

    Tracked from incest sex 2009/09/06 06:06  삭제

    incest pictures

  70. fuck my sister wet wet pussy

    Tracked from sister sex 2009/09/06 12:42  삭제

    little sister

  71. mom and son sex

    Tracked from mom and daughter son 2009/09/07 07:16  삭제

    mom and son sex galleries

  72. family nudist galleries

    Tracked from family nude 2009/09/07 20:32  삭제

    family orgy

  73. daddy fuck me

    Tracked from daddy and little girl fantasy 2009/09/08 00:45  삭제

    daddy fucks daughter

  74. nude family

    Tracked from my sisters hot friend 2009/09/08 08:36  삭제

    nude sister

  75. incest comics

    Tracked from incest cartoon 2009/09/08 10:46  삭제

    incest forum

  76. Fucked Her Son

    Tracked from incest lesbian stories 2009/09/08 13:59  삭제

    Moms Fucking Sons

  77. dad and daughter

    Tracked from dad with sis son sex mom 2009/09/09 02:50  삭제

    dad fucking virgin daughter

  78. lesbian twin sister

    Tracked from lesbian sisters 2009/09/09 03:27  삭제

    lesbian incest

  79. Mom Mature Son Gallery

    Tracked from Free Mom And Son Sex 2009/09/09 08:26  삭제

    Mom Strips for Son

  80. mother son incest

    Tracked from mother son daughter sex 2009/09/09 20:56  삭제

    mother son porn

  81. Taboo Family Sex

    Tracked from nude family 2009/09/09 21:38  삭제

    Family Incest Galleries

  82. bondage videos

    Tracked from bondage video 2009/09/11 08:00  삭제

    bondage wizard

  83. bondage fuck

    Tracked from bondage fix 2009/09/11 10:34  삭제

    bondage fucking

  84. rope bondage

    Tracked from real torture 2009/09/12 04:52  삭제

    rubber bondage

  85. bondage fairies

    Tracked from bondage directory 2009/09/12 09:54  삭제

    bondage fix

  86. sado maso

    Tracked from sado 2009/09/12 13:56  삭제

    schoolgirl bondage

  87. rubber bondage

    Tracked from rope bondage 2009/09/13 04:07  삭제

    sado

  88. bondage wizard

    Tracked from bondage watch 2009/09/13 05:33  삭제

    boob torture

  89. bbw bondage

    Tracked from bbw bdsm 2009/09/13 20:02  삭제

    bdsm anal

  90. bdsm tgp

    Tracked from bdsm teen 2009/09/14 09:45  삭제

    bdsm thumbs

  91. lesbian bdsm

    Tracked from latex bondage 2009/09/14 12:03  삭제

    lesbian bondage

  92. anime bondage

    Tracked from anime bdsm 2009/09/14 22:59  삭제

    asian bdsm

  93. cbt torture pain

    Tracked from brutal bdsm 2009/09/15 16:51  삭제

    chastity torture

  94. hogtied bondage

    Tracked from hardcore bondage 2009/09/15 20:22  삭제

    latex bdsm

  95. groin torture

    Tracked from girls in bondage 2009/09/15 22:41  삭제

    hand domination

  96. bedroom bondage

    Tracked from bdsm ws 2009/09/16 01:57  삭제

    bondage

  97. torture porn

    Tracked from torture navel needle 2009/09/16 06:00  삭제

    torture sex

  98. bdsm videos

    Tracked from bdsm video 2009/09/16 10:39  삭제

    bdsm vids

  99. bdsm movies

    Tracked from bdsm humiliation 2009/09/17 12:34  삭제

    bdsm pain

  100. incest toons

    Tracked from incest taboo forum 2009/09/27 12:24  삭제

    lesbian incest

  101. lesbian incest

    Tracked from incest art 2009/09/28 15:08  삭제

    brother sister incest

  102. lesbian twin sister

    Tracked from lesbian sisters 2009/09/29 01:04  삭제

    lesbian twin sisters

  103. mother daughter fuck

    Tracked from incest mother and daughter 2009/09/29 13:02  삭제

    mom and daughter

  104. sister fucking brother

    Tracked from simpsons family sex 2009/10/02 16:56  삭제

    sister incest

  105. lesbian incest

    Tracked from lesbian twin sister 2009/10/02 21:57  삭제

    mother daughter sex

  106. brother and sister sex

    Tracked from anime incest 2009/10/03 05:41  삭제

    brother and sister sex stories

  107. daughter sex

    Tracked from dad fucks daughter 2009/10/03 09:47  삭제

    father daughter sex

  108. silent screams bdsm

    Tracked from teen bdsm 2009/10/20 07:39  삭제

    amateur bondage

  109. male bondage

    Tracked from mature bondage 2009/10/21 06:45  삭제

    men in bondage

  110. silent screams bdsm

    Tracked from teen bdsm 2009/10/21 08:43  삭제

    amateur bondage

  111. bondage gear

    Tracked from bondage girl 2009/10/21 15:36  삭제

    bondage girls

  112. lesbian bondage

    Tracked from light bondage 2009/10/21 17:47  삭제

    lolita bondage

  113. kaspersky activation keys all ver kiskav oct crack

    Tracked from kaspersky activation keys all ver kiskav oct 2011/05/06 06:49  삭제

    kaspersky activation keys all ver kiskav oct serial

Comments List

  1. alia shawkat nude 2008/05/23 04:58

  2. erotic orgy 2008/05/23 07:51

Write a comment.

[로그인][오픈아이디란?]