B / Y / U / S
HOME À¥ È£½ºÆà µµ¸ÞÀÎ ¸Å´º¾ó °í°´Áö¿ø ¼³Á¤Á¤º¸ °èÁ¤½Åû 2024-12-27 Friday 
À¥ È£½ºÆÃ
# °øÁö »çÇ×
# ÀÚÁÖ ¹¯´Â Áú¹®
# Áú¹®°ú ´äº¯
# °¡ÀÔ ¹®ÀÇ
Ä¿¹Â´ÏƼ
# ÀÚÀ¯°Ô½ÃÆÇ
# ¸®´ª½ºÆÁ
# ¾ÆÀÌÅ¥ Å×½ºÆ®
# ³»È¨ ¼Ò°³
# °Ö·¯¸®
# ÀÚ·á½Ç

  ¸®´ª½ºÆÁ  Go Unix Power Tools Online Book Go Bash Guide
Read No. 148 article 2002-05-02 00:46:45
NickName   Ç®ºñ´©
Subject   ifconfig & route
ftp://chongnux.klug.or.kr/pub/Chongnux/Courses/Base1/CMD_ifconfig_route.txt

		ifconfig & route
___________________________________________________________________

±Û¾´ÀÌ: Chongnux Team

       À±¿µÇÑ(shee at chongnux.klug.or.kr)

ȨÆäÀÌÁö: http://chongnux.klug.or.kr/
ÀÛ¼ºÀÏ: 2001. 12. 03. (¿ù) 19:28:53 KST
¹ö  Á¯: 1.0
Å×½ºÆ®: RedHat7.2 English Version

ÀÌ ¹®¼­´Â ´©±¸³ª ÀÚÀ¯·Ó°Ô »ç¿ëÀÌ °¡´ÉÇϸç,¸¹Àº µµ¿òÀÌ µÇ¾úÀ¸¸é ÇÕ´Ï´Ù.
( ´Ü, »ó¾÷ÀûÀÏ °æ¿ì Chongnux TeamÀÇ Çã¶ôÀÌ ÀÖ¾î¾ß ÇÕ´Ï´Ù. )
___________________________________________________________________

¸ñÂ÷
0.ifconfig
 0.1.ifconfig ¶õ ?
 0.2.ifconfig examples
1.route
 1.1.route ¶õ ?
 1.2.route examples
2.ÀÌ´õ³Ý ¼³Á¤Çϱâ
3.ÆÁ
 3.1. ÀÌ´õ³Ý¿¡ aliasing °É±â
 3.2. ÀÌ´õ³Ý ¹«Â÷º° ¸ðµå·Î ¸¸µé±â 
4.Âü°í
___________________________________________________________________

0.ifconfig
0.1.ifconfig ¶õ ?
 ³×Æ®¿öÅ© ÀÎÅÍÆäÀ̽º ¼³Á¤ ¸í·É¾î

 Á»´õ »ó¼¼ÇÑ ³»¿ë
 : man ifconfig


0.2.ifconfig examples

 [ ÀÌ´õ³Ý¿¡ IP¿Ã¸®±â ]

 -[ SYNOPSIS ]-----------------
 | ifconfig ethn ip-address up |
  -----------------------------

 ex1) 211.112.37.201 ip¸¦ eth0¿¡ ¿Ã¸®±â
 ifconfig eth0 211.112.37.201 up

 ex2) 211.112.37.201 ip¸¦ eth0¿¡¼­ ³»¸®±â
 ifconfig eth0 211.112.37.201 up

 ex3) eth0 ÀÌ´õ³Ý ³»¸®°í ¿Ã¸®±â
 ifconfig eth0 down
 ifconfig eth0 up

 ex4) eth0¿¡ ipÇÏ°í netmask, broadcast °ª ³Ö±â
  ifconfig eth0 211.112.37.210 netmask 211.112.37.128 broadcast 211.112.37.255 up


1.route
1.1. route ¶õ ?
 ¶ó¿ìÆà Å×À̺íÀÇ ³»¿ëÀ» º¸¿©ÁÖ°í °ü¸®ÇØÁÖ´Â ¸í·É¾î

 Á»´õ »ó¼¼ÇÑ ³»¿ë
 : man route

1.2. route examples

 [ ÀÌ´õ³Ý ¶ó¿ìÅÍ ¿Ã¸®±â ]

  -[ SYNOPSIS ]-----------------
 | route add default gw host ip |
  ------------------------------

 ex1) 211.112.37.1 µðÆúÆ® °ÔÀÌÆ®¿þÀÌ ¿Ã¸®±â
 route add default gw 211.112.37.1

 ex2) 211.112.37.1 µðÆúÆ® °ÔÀÌÆ®¿þÀÌ ³»¸®±â
 route del default gw 211.112.37.1

 ex3) 192.168.0.0 ¶ó¿ìÆà Å×ÀÌºí ¿Ã¸®°í ³»¸®±â
 route del -net 192.168.0.0 dev eth0 netmask 255.255.255.0
 *»ç¼³ IP¸¦ ÃßÃàÇÒ¶§ ÀÌÅͳݿ¡ ¶ó¿ìÆÃÀ» ¿Ã·Á ÁØ´Ù.

 ex4) 192.168.0.6ÇÑ °³ÀÇ È£½ºÆ® ¶ó¿ìÆà °æ·Î eth0 Ãß°¡
 route add -host 192.168.0.6 dev eth0
 *·£Å¸µå°¡ 2°³ÀÎ °æ¿ì °¢°¡ÀÇ È£½ºÆ®¿¡ °üÇÑ ¶ó¿ìÆà °æ·Î¸¦ ¿Ã·ÁÁÖ´Â °ÍÀÌ ºü¸¥ ¶ó¿ì
  ÆÃÀ» °¡´ÉÇÑ°Ô ÇØÁØ´Ù.


2. ÀÌ´õ³Ý ¼³Á¤Çϱâ
 ´ëºÎºÐ netconfig¸¦ ÀÌ¿ëÇÏ¿© ¼¼ÆÃÀÌ °¡´É Çϸé
  - /etc/sysconfig/network
  - /etc/sysconfig/network-scripts/ifcfg-eth0
  - /etc/resolv.conf
 È­ÀÏÀ» Á÷Á¢ ÆíÁýÀ» Çصµ µÈ´Ù.

 ¼öµ¿À¸·Î ¼³Á¤ÇÏ°í ½ÍÀ¸¸é °£´ÜÈ÷ ´ÙÀ½°ú °°ÀÌ Äֿܼ¡¼­ ¸í·É¾î¸¦ ³»¸®¸é ÀÌÅͳÝÀ» ¼³Á¤
 ÇÒ¼ö°¡ ÀÖ´Ù.

 ## ÀÌ´õ³Ý¿¡ ip ¿Ã¸®±â
 ]# ifconfig eth0 211.112.37.209 netmask 211.112.37.128 broadcast 211.112.37.255

 ## °ÔÀÌÆ® ¿þÀÌ ¿Ã¸®±â
 ]# route add default gw 211.112.37.129

 ## ³×ÀÓ¼­¹ö ³Ö±â
 ]# cat nameserver 168.126.63.1 > /etc/resolv.conf

 ## ÀÌ³Ê³Ý »óÅ ȮÀÎ
 ]# ifconfig eth0
  eth0      Link encap:Ethernet  HWaddr 00:E0:98:8A:8A:CD
            inet addr:211.112.37.209  Bcast:211.112.37.255  Mask:255.255.255.0
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:2557 errors:0 dropped:21 overruns:0 frame:101
            TX packets:582 errors:0 dropped:0 overruns:0 carrier:0
            collisions:43
            RX bytes:425812 (415.8 Kb)  TX bytes:69630 (67.9 Kb)

 ## °ÔÀÌÆ® ¿þÀÌ È®ÀÎ
 ]# route
 Kernel IP routing table
 Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
 211.112.37.0    *               255.255.255.0   U     0      0        0 eth0
 127.0.0.0       *               255.0.0.0       U     0      0        0 lo
 default         211.112.37.129  0.0.0.0         UG    0      0        0 eth0

 ## ÃÖÁ¾ Á¤°Ë
 # ping yahoo.com
 PING yahoo.com (216.115.108.245) from 211.112.37.209 : 56(84) bytes of data.
 64 bytes from img5.yahoo.com (216.115.108.245): icmp_seq=0 ttl=244 time=151.721 
msec
 64 bytes from img5.yahoo.com (216.115.108.245): icmp_seq=1 ttl=244 time=133.886 
msec

 --- yahoo.com ping statistics ---
 3 packets transmitted, 2 packets received, 33% packet loss
 round-trip min/avg/max/mdev = 133.886/142.803/151.721/8.925 ms

3.ÆÁ 
 3.1. ÀÌ´õ³Ý¿¡ aliasing °É±â
  
  ]# ifconfig eth0:0 211.112.37.210 netmask 211.112.37.128 broadcast 
211.112.37.255 up 
  ]# ifconfig eth0:0
     eth0:0    Link encap:Ethernet  HWaddr 00:E0:98:8A:8A:CD  
               inet addr:211.112.37.210  Bcast:211.112.37.255  Mask:255.255.255.0
               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  * ÀÌ´õ³Ý ¿¡¾ó¸®¾Æ½ÌÀº ÇÑ °³ÀÇ ÀÌ´õ³Ý¿¡ ¿©·¯°³ÀÇ ip¸¦ ºÎ¿© ÇÒ¶§ »ç¿ëµÈ´Ù.
    ¸Å½ºÄ¿·¹À̵ùÀ» ÇÒ¶§ 2°³ÀÇ ÀÌ´õ³ÝÀÌ ¾ø¾îµµ ÇÑ°³ÀÇ ÀÌ´õ³Ý Ä«µå·Î °¡´ÉÇÑ °ÍÀº
    ¿¡¾ó¸®¾Æ½ÌÀ» ÀÌ¿ëÇϱ⠶§¹®ÀÌ´Ù.


 3.2. ÀÌ´õ³Ý ¹«Â÷º° ¸ðµå·Î ¸¸µé±â 
 
 ³Ö±â

 ]# ifconfig eth0 promisc
 ]# ifconfig | grep PROMISC
    UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1

 »©±â 

 ]# ifconfig eth0 -promisc 
 ]# ifconfig | grep PROMISC



4.Âü°í 

  http://www.ictp.trieste.it/~radionet/1998_school/networking_tasks/
Regist Addr [ 192.168.0.2 ] ¸ñ·Ïº¸±â À­±Û ¾Æ·§±Û
Á¤±ÔÇ¥Çö½Ä [ »ó¼¼ °Ë»ö ]
Page Loading [ 0.03 Sec ] SQL Time [ 0 Sec ]

Copyleft 1999-2024 by JSBoard Open Project
Theme Designed by IDOO And follow GPL2

°³ÀÎÁ¤º¸ Ãë±Þ¹æħ ÀÌ¿ë ¾à°ü »çÀÌÆ® ¸Ê ¾îµå¹Î °ü¸®