IP ¾Ë¸®¾Æ½Ì

¸®´ª½º Ä¿³Î 2.0 À» ÄÄÆÄÀÏ Çغ¸¸é network aliasing °ú ip aliasingÀ» ÁöÁ¤ÇÏ´Â ºÎºÐÀÌ ³ª¿Â´Ù. ¿©±â ±× ¿ëµµ¸¦ Àû´Â´Ù.

1. IP AliasingÀÇ °³³ä

IP aliasingÀ̶õ ÇÑ°³ÀÇ ÀÎÅÍÆäÀ̽º¿¡ µÎ°³ ÀÌ»óÀÇ ¾îµå·¹½º¸¦ ÁöÁ¤ÇÏ´Â°É ¸»ÇÑ´Ù. ¿¹¸¦µé¾î eth0¶õ ·£Ä«µå¿¡ µÎ°³ÀÇ IP ¾îµå·¹½º¸¦ ÁöÁ¤ÇϹǷμ­ µÑÁß ¾î´À ¾îµå·¹½º·Îµµ Á¢±ÙÀ» Çã¿ëÇÏ´Â°É ¸»ÇÑ´Ù. À̶§ µÎ°³ÀÇ ÁÖ¼Ò°¡ °°Àº ³×Æ®¿öÅ©¿¡ ¼ÓÇϸé IP AliasingÀÌ°í ´Ù¸¥ ³×Æ®¿öÅ©¿¡ ¼ÓÇϸé Network AliasingÀÌ´Ù.

2. IP aliasingÀÇ ÀÀ¿ë¹üÀ§

1) ¹öÃò¾óÀ¥(À¥È£½ºÆÃ)

À¥¼­¹ö¸¦ ¿î¿µÇϴµ¥´Â ²ç ¸¹Àº ºñ¿ëÀÌ µç´Ù. Çǽ÷Π±¸ÃàÇÏ´õ¶óµµ Çϵå¿þ¾î ºñ¿ë¸¸ ¾à 500¸¸¿ø¿¡ ÀÎÅÍ³Ý Àü¿ë¼± »ç¿ë·á°¡ ¿ù 50-60¸¸¿ø µç´Ù. °Å±â¿¡ ¿î¿µÀηµµ ÇÊ¿äÇÏ´Ù. µû¶ó¼­ ´Ü¼øÈ÷ ȨÆäÀÌÁö¸¸ ±¸ÃàÇÏ°íÀÚÇϸé ISPµéÀÌ Á¦°øÇÏ´Â À¥È£½ºÆÃÀ» ÀÌ¿ëÇϸéµÈ´Ù. À¥È£½ºÆÃÀ» ÀÌ¿ëÇÏ¸é ¿ù ¸î¸¸¿ø Á¤µµÀÇ ºñ¿ë¸¸ ÁöºÒÇϸé ȨÆäÀÌÁö¸¦ ¿î¿µÇÒ¼ö ÀÖ´Ù.(Á¦ÀÛºñ´Â º°µµ) Áï ISPµéÀÌ ÀÚ½ÅÀÇ È£½ºÆ®¿¡ ¾÷üÀÇ À¥¼­¹ö¸¦ ¿î¿µÇØÁÖ°í ¿ù »ç¿ë·á¸¦ ¹Þ´Â°É À¥È£½ºÆÃÀ̶óÇÑ´Ù.

À¥ È£½ºÆÃÀ» ÇÒ¶§ ÇÊ¿äÇÑ°Ô ¹Ù·Î ¹öÃò¾óÀ¥ ±â¹ýÀ¸·Î¼­ www.abc.co.kr °ú www.def.co.kr µÎ°³ÀÇ È¨ÆäÀÌÁö°¡ ÇÑ´ëÀÇ ÄÄÇ»ÅÍ¿¡¼­ ¿î¿µµÇ´Â°É ¸»ÇÑ´Ù. µÎ ȨÆäÀÌÁö´Â ¼­·Î µ¶¸³ÀûÀ¸·Î ±¸¼ºµÇ¸ç µµ¸ÞÀγ×ÀÓµµ ´Ù¸£¹Ç·Î ¿ÜºÎ¿¡¼­´Â µÎ ȨÆäÀÌÁö°¡ °°Àº ÄÄÇ»ÅÍ¿¡ ÀÖ´Ù´Â°É ¾Ë¼ö°¡ ¾ø´Ù. (µÎ°³¸¸ °¡´ÉÇÑ°Ô ¾Æ´Ï¶ó ´Ù¼ö°¡ °¡´ÉÇÏ´Ù)

¹öÃò¾óÀ¥À» ¸¸µé¶§ ÇÊ¿äÇÑ°Ô network aliasing ¶Ç´Â ip aliasingÀÌ´Ù. ¹°·Ð ¿©±â¿¡ ¼­·Î ´Ù¸¥ µµ¸ÞÀÎ ³×ÀÓ¿¡¼­ ¼­·Î ´Ù¸¥ ȨÆäÀÌÁö°¡ ¶ßµµ·Ï ÇØÁÖ´Â À¥¼­¹ö ÇÁ·Î±×·¥ÀÇ Áö¿øµµ ÇÊ¿äÇÏ´Ù. Apache À¥¼­¹ö ÇÁ·Î±×·¥ÀÇ httpd.conf¿¡º¸¸é virtual webÀ» ¼³Á¤ÇÏ´Â ºÎºÐÀÌ ÀÖ´Ù.
¾Æ·¡°¡ ±× ¿¹ÀÌ´Ù.

<VirtualHost kil.nungkul.co.kr>
ServerAdmin nungkul7@nungkul.co.kr
DocumentRoot /home/kil/web
ServerName kil.nungkul.co.kr
ErrorLog logs-kil/error_log
TransferLog logs-kil/access_log
</VirtualHost>


2) ¹öÃò¾ó ·£(Virtual LAN)


ÇϳªÀÇ ¹°¸®Àû ·£¿¡ µÎ°³ÀÇ ³í¸®Àû ·£ÀÌ Á¸ÀçÇÏ´Â°É ¹öÃò¾ó·£À̶óºÎ¸¥´Ù. Áï ·£Àº ÇϳªÁö¸¸ ³×Æ®¿÷ ¾îµå·¹½º°¡ ¼­·Î ´Ù¸¥ µÎ ±×·ìÀÇ ÄÄÇ»Å͵éÀÌ µ¿½Ã¿¡ ¿¬°áµÅ ÀÖÀ» °æ¿ì µÎ ÄÄÇ»ÅÍ ±×·ìÀº º°°³ÀÇ ·£À» ÀÌ·ç°í ÀÖÀ¸¹Ç·Î ¼­·Î µ¶¸³ÇÑ ³×Æ®¿÷À¸·Î ÀÛµ¿ÇÑ´Ù. ¹°·Ð ¶ó¿ìÅÍ°¡ Àְųª ¾î´À ÇÑ ÄÄÇ»ÅÍ¿¡ ·£Ä«µå°¡ µÎ°³ ²ÅÇô ÀÖ¾î µÎ°³ÀÇ ·£À» ¿¬°áÇØ ÁÖ°í ÀÖ´Ù¸é ÀÌ´Â µÎ°³ÀÇ ¹°¸®Àû ·£ÀÌÁö ÇÑ°³ÀÇ ·£ÀÌ ¾Æ´Ï´Ù.

¿¹¸¦µé¾î ȸ»çÀÇ ·£ÀÌ ¶ó¿ìÅ͸¦ ÅëÇØ ÀÎÅͳݰú ¿¬°áµÅ ÀÖ°í ÀÎÅÍ³Ý ¾îµå·¹½º°¡ 203.234.216.XXX¶ó°í ÇÏÀÚ. À̶§ ȸ»ç ·£¿¡ ¿¬°áµÈ ¸®´ª½º Çǽà ¾îµå·¹½º¸¦ 192.168.1.1·Î ÁöÁ¤Çϸé ȸ»ç ·£¿¡ ÀÖ´Â ´Ù¸¥ ÇǽõéÀº ³×Æ®¿÷¾îµå·¹½º(203.234.234.0)°¡ ¸®´ª½ºÀÇ ³×Æ®¿÷ ¾îµå·¹½º(192.168.1.0)¿Í ´Ù¸£¹Ç·Î ¸®´ª½º·Î loginÇÒ¼ö ¾ø´Ù. ¸¸¾à ¾î´À Çǽð¡ ¸®´ª½º·Î login ÇÏ·Á¸é ±× ÇǽÃÀÇ ÁÖ¼Ò¸¦ 192.168.1.X·Î ¹Ù²Ù¾î¾ßÇÑ´Ù.

ÀÌ °æ¿ì ȸ»çÀÇ ¹°¸®Àû ·£ ÇÑ°³¿¡ µÎ°³ÀÇ ³í¸®Àû ·£(203.234.216.0 °ú 192.168.1.0)ÀÌ Á¸ÀçÇÑ´Ù. À̸¦ ¹öÃò¾ó ·£À̶ó ºÎ¸¥´Ù. ¸¸¾à ÀÌ ·£¿¡ ¿¬°áµÈ ¸®´ª½º¿¡ µÎ ±×·ì¿¡ ÀÖ´Â Çǽð¡ ¸ðµÎ loginÇÒ¼ö ÀÖµµ·Ï ÇØÁÖ·Á¸é À̶§ ¹Ù·Î IP aliasingÀ» ¸®´ª½ºÀÇ ·£Ä«µå¿¡ Àû¿ëÇÏ¸é µÈ´Ù. Áï ¸®´ª½º ·£Ä«µå¿¡ 192.168.1.1 ¿Ü¿¡ 203.234.216.1 ¾îµå·¹½º¸¦ IP aliasingÀ» ÀÌ¿ëÇØ ºÎ¿©ÇÏ¸é µÎ ³í¸®Àû ·£¿¡ ¼ÓÇÑ ¸ðµç ÇǽõéÀº ¸®´ª½º¿¡ loginÇÒ¼ö ÀÖ´Ù.
À̱â¹ýÀº ȸ»çÀÇ º¸¾È¿ëÀ¸·Îµµ ÀÀ¿ëÀÌ °¡´ÉÇÏ´Ù. Áï ȸ»ç ³»ºÎ·£ Àü¿ë È£½ºÆ®¸¦ ÀÎÅͳݿ¡¼­ Á¢±ÙÀÌ ºÒ°¡´ÉÇÏ°Ô ¸¸µå´Âµ¥ ÀÌ ±â¹ýÀÌ »ç¿ëµÉ¼ö ÀÖ´Ù.

*. Âü°í

192.168.1.0 ³×Æ®¿÷ ÁÖ¼Ò´Â RFC(Request For Comment)¿¡¼­ ³»ºÎ ·£ Àü¿ëÀ¸·Î ÇÒ´çÇÑ ÁÖ¼ÒÀÌ´Ù. µû¶ó¼­ ¶ó¿ìÅÍ¿¡´Â ÀÌ ÁÖ¼Ò¸¦ ¿ÜºÎ·Î ¶ó¿ìÆÃÇÏ¸é ¾ÈµÈ´Ù.

3. IP aliasing ¼Â¾÷

¾Æ·¡´Â º»ÀÎÀÇ ¸®´ª½º Çǽÿ¡ IP aliasingÀ» ±¸ÇöÇÑ ¿¹ÀÌ´Ù. ÀÌ Çǽÿ¡´Â ·£Ä«µå¸¦ µÎ°³ ²Å¾Ò°í µÎ¹ø° ·£Ä«µå(eth1)¿¡ IP aliasingÀ» ±¸ÇöÇÏ¿´´Ù.

eth0ÀÇ IP ÁÖ¼Ò´Â 192.168.1.1
eth1˼ 150.1.254.1
eth1:0Àº 150.1.254.254 ÀÌ´Ù.

¿©±â¼­ eth1:0ÀÌ ¹Ù·Î IP aliasingÀ¸·Î ºÎ¿©ÇÑ ÁÖ¼ÒÀÌ´Ù. ÀÌ °æ¿ì´Â eth1¿¡ ºÎ¿©ÇÑ µÎ°³ÀÇ ÁÖ¼Ò°¡ °°Àº ³×Æ®¿÷¿¡ ¼ÓÇϹǷΠnetwork aliasingÀÌ ¾Æ´Ï°í IP aliasingÀÌ´Ù. ¾Æ·¡¿¡ IP aliasingÀ» ±¸ÇöÇϱâÀ§ÇÑ ifconfig¿Í route ¸í·É ¿¹ÀÌ´Ù.

(º»ÀÎÀº debianÀ» »ç¿ëÇϹǷΠ/etc/init.d/network ÆÄÀÏÀÓ)

*. ifconfig ¸í·É Àü¿¡ Ä¿³ÎÀ» ÄÄÆÄÀÏÇؼ­ network aliasing°ú ip aliasingÀ» ³Ö¾î¾ßÇÑ´Ù.


#! /bin/sh
# localhost ifconfig lo 127.0.0.1 route add -net 127.0.0.0 # # ethernet 1 # IPADDR=150.1.254.1 NETMASK=255.255.0.0 NETWORK=150.1.0.0 BROADCAST=255.255.255.255 GATEWAY=150.1.1.1 ifconfig eth1 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST} route add -net ${NETWORK} route add default gw ${GATEWAY} metric 1 # # ethernet 0 # ifconfig eth0 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 route add -net 192.168.1.0 # # ethernet-1 ip alias # ifconfig eth1:0 150.1.254.254 netmask 255.255.0.0 broadcast 150.1.255.255 route add -host 150.1.254.254 dev eth1:0 #
¾Æ·¡´Â ÀÌ ¸í·ÉÀ¸·Î ip aliasingÀ» ±¸ÇöÇßÀ»¶§ÀÇ ifconfig¿Í netstat -nr ¸í·É Ãâ·Â °á°úÀÌ´Ù
churlsu:~> ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0 UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 TX packets:0 errors:0 dropped:0 overruns:0   eth0 Link encap:10Mbps Ethernet HWaddr 00:60:8C:EC:78:1B inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 TX packets:0 errors:0 dropped:0 overruns:0 Interrupt:10 Base address:0x300   eth1 Link encap:10Mbps Ethernet HWaddr 00:A0:24:EA:95:B2 inet addr:150.1.254.1 Bcast:150.1.255.255 Mask:255.255.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:804 errors:0 dropped:0 overruns:0 TX packets:82 errors:0 dropped:0 overruns:0 Interrupt:5 Base address:0x210   eth1:0 Link encap:10Mbps Ethernet HWaddr 00:A0:24:EA:95:B2 inet addr:150.1.254.254 Bcast:150.1.255.255 Mask:255.255.0.0 UP BROADCAST RUNNING MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 TX packets:0 errors:0 dropped:0 overruns:0   churlsu:~> netstat -nr   Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 150.1.254.254 0.0.0.0 255.255.255.255 UH 1500 0 0 eth1:0 192.168.1.0 0.0.0.0 255.255.255.0 U 1500 0 0 eth0 150.1.0.0 0.0.0.0 255.255.0.0 U 1500 0 0 eth1 127.0.0.0 0.0.0.0 255.0.0.0 U 3584 0 0 lo 0.0.0.0 150.1.1.1 0.0.0.0 UG 1500 0 0 eth1 churlsu:~>
¹èö¼ö<
bae@www.linuxlab.co.kr>