Network Administratoin ÀÐÀ½:735 [ Chapter Networking Overview ] 1. OSI 7 layer °¢ °èÃþ ¼ø¼­º° À̸§. _______________________ | 7 | Application | ----------------------- | 6 | Presentatoin | ----------------------- | 5 | Session | ----------------------- | 4 | Transport | ----------------------- | 3 | Network | ----------------------- | 2 | Data Link | ----------------------- | 1 | Physical | ----------------------- Open System Interconnection 2. °¢ °èÃþÀÇ ¿ªÇÒ 1) Physical Layer * Protocol modelÀÇ H/W level·Î ÀüÀÚÀû signal¿¡ ÀÇÇØ Á¦¾îµÈ´Ù. 2) Date Link Layer * ARP, RARP ARP´Â IP address¸¦ Ethernet address·Î mapping RARP´Â Ethernet address¸¦ IP address·Î mapping * packetÀÇ ÇüÅ·Πdata Àü¼Û packet = ethernet header + ip header + tcp header + data 3) Network Layer * IP - IP address¸¦ »ç¿ë data¸¦ º¸³»°í ¹ÞÀ» ¼ö ÀÖµµ·Ï IP header¸¦ ±¸¼º/Çؼ® - outgoing½Ã (»óÀ§ layer ---> ÇÏÀ§ layer): »óÀ§ layerÀÎ Transport Layer¿¡¼­ ¹ÞÀº frame¿¡ IP header¸¦ ºÙÀδÙ. - incoming½Ã (ÇÏÀ§ layer ---> »óÀ§ layer): Àü¼ÛµÇ¾î¿Â data°¡ ºÐÇÒ(fragment)µÇ¾ú´ÂÁö¸¦ È®ÀÎÇÏ¿© ºÐÇÒµÈ °æ¿ì´Â ¿ø·¡ÀÇ data¸¦ Á¶ÇÕÇÏ¿© Transport Layer·Î ³Ñ°ÜÁÜ. * datagramÀÇ ÇüÅ·Πdata¸¦ ³Ñ°ÜÁØ´Ù. datagram = ip header + tcp header + data 4) Transport Layer * addressing ¹æ¹ý: port number * TCP - TCP connection¿¡ ÀÇÇØ º¸³»Áø data´Â ¹Ýµå½Ã ´ëÀÀµÇ´Â(peer)»ó´ë°¡ ¹Þ´Â´Ù. »ó´ë°¡ data¸¦ Èê·Á¹ö¸®Áö ¾Êµµ·Ï flow controlÀ» Çϰųª Àü¼ÛÁß¿¡ error°¡ ¹ß»ýÇÑ °æ¿ì ÀÚµ¿ÀûÀ¸·Î ÀçÀü¼ÛÇÑ´Ù. - data Àü¼Û½Ã ÀÏÀÏÀÌ virtual circuit(°¡»óȸ¼±)À» ¼³Á¤ÇÑ´Ù. - TCP header ±¸¼º. * UDP - connectionless, unreliable datagram protocol - datagramÀÇ loss³ª failÀ» recoveryÇÒ ¹æ¹ýÀÌ ¾ø´Ù. - »ç¿ë¿¹ ' È®½ÇÇÑ µ¥ÀÌŸ Àü¼ÛÀÌ ±×¸® Áß¿äÄ¡ ¾ÊÀº Åë½Å¿¡ »ç¿ëÇÑ´Ù. ' ½Å·Ú¼ºÀÌ ¸Å¿ì ³ôÀº ȸ¼±À» »ç¿ëÇÑ Åë½Å¿¡ »ç¿ëÇÑ´Ù. ' »ç¿ëÀÚ ÇÁ·Î±×·¥µîÀÇ »óÀ§ÃþÀÌ È®½ÇÇÑ µ¥ÀÌŸ Àü¼ÛÀ» ´ë½ÅÇÒ ¼ö ÀÖ´Â °æ¿ì. ' Çѹø¿¡ ¸¸È襤 »ó´ë¿¡°Ô µ¥ÀÌŸ¸¦ Àü´ÞÇÏ°íÀÚ ÇÒ ¶§ »ç¿ëÇÑ´Ù. - UDP header¸¦ ±¸¼º. * TCP¸¦ »ç¿ëÇÒÁö UDP¸¦ »ç¿ëÇÒÁö´Â »ç¿ëÀÚ¿¡ ÀÇÇØ invokeµÇ´Â network applicationÀÌ ¾î´À protocolÀ» »ç¿ëÇÏ´ÂÁö¿¡ µû¶ó ´Ù¸£´Ù. ¿¹) telnet - TCP¿¡ user request¸¦ Àü´Þ domain name service - UDP¿¡ user request¸¦ Àü´Þ. 5) Session Layer * ½Ã½ºÅÛ ¶Ç´Â Àü¼Û ¿¬°á°£ÀÇ failÀ̳ª À̺¥Æ®¸¦ Ä¡·áÇϰųª À籸¼ºÇÏ°í, Åë½Å ¾îÇø®ÄÉÀ̼ǰ£ÀÇ ¿¬¼ÓÀûÀÎ °ü¸®¿Í À¯Áöº¸¼ö¸¦ ÇÑ´Ù. 6) Presentation Layer * ¾îÇø®ÄÉÀÌ¼Ç ¼­ºñ½º µ¥ÀÌŸ¸¦ Àü¼ÛÇϱâÀ§ÇØ »ç¿ëµÇ¾îÁú ¼ö ÀÖ´Â µ¥ÀÌŸ Æ÷¸äÀ» °ü¸®ÇÒ »Ó¸¸¾Æ´Ï¶ó ÀÎÄÚµù°ú µðÄÚµùµîÀ» ÇÑ´Ù. 7) Application Layer * °³º°ÀûÀÎ ³×Æ®¿öÅ© ¾îÇø®ÄÉÀ̼ÇÀ» Æ÷ÇÔÇÑ´Ù. 3. ¾îÇø®ÄÉÀÌ¼Ç °èÃþ¿¡¼­ »ç¿ëµÇ´Â ´ëÇ¥Àû ÇÁ·Î±×·¥µé * telnet, ftp , tftp, "r"command series, NIS, DNS, nfs, sendmail 4. IP AddressÀÇ Class ±¸ºÐ A Class : 1-127.*.*.* B Class : 128-191.0-255.*.* C Class : 192-223.0-255.0-255.*. D Class : 224-239.0-255.0-255.0-255 5. netmaskÀÇ ÀÇ¹Ì¹× »ç¿ë½Ã ÀåÁ¡ * ÀÇ¹Ì : ³×Æ®¿öÅ© ¾îµå·¹½º¸¦ À§ÇØ ¹Ì¸® Á¤ÇÑ IP addressÀÇ ºÎºÐÀ» Á¤ÇÑ°ÍÀÌ´Ù. * ÀåÁ¡ : -NetworkÀÇ Àü¹ÝÀûÀÎ TrafficÀ» °¨¼ÒÇÏ°í Network»óÀÇ Ã£°íÀÚÇÏ´Â IP address¸¦ º¸´Ù »¡¸® ãÀ» ¼ö ÀÖ°ÔÇÑ´Ù. -¹æ´ëÇÑ ÇÑ networkÀ» ÂÉ°³¼­ »ç¿ëÇÒ ¼ö ÀÖ´Ù. [ Chapter Network Design and Development Planning ] 1. Basic Networking Terms and Concepts * Networking Models * Comparing Two Networking Models * The Client-Server Model * Types of Addressing * Using the TCP/IP Model to Exchange Data 2. LANÀ¸·Î¼­ EthernetÀÇ Æ¯¼º, ¼³Ä¡½Ã À¯ÀÇ»çÇ× Æ¯¼º: * High-bandwith data transfer (10 Mbytes/s maximum) rates * Low error rate and offers error detection but not correction * Connectionless protocol;no guaranteed frame delivery * No buffering or flow-control when sending messages À¯ÀÇ»çÇ× * õÀåÀ» ÅëÇؼ­ coaxial cableÀ» »ç¿ëÇÒ¶§´Â Àü·ù µµ°üÀ̳ª Çü±¤µîÀ» ÇÇÇؾßÇÑ´Ù. * network ¸í¼¼¼­¿¡ Áö½ÃµÈ°Íó·³ network»ó¿¡ 1024¸¦ ³ÑÁö¾Ê°í 100À̳ª ±×ÀÌ»óÀÇ ³ëµå ¸¦ °¡Á®¾ßÇÑ´Ù. * thick Ethernet coax·Î´Â ´ÜÁö 2.5m * ´Ù¸¥ µÎ ³ëµå»çÀÌ¿¡´Â ¿ÀÁ÷ ÇÑ°³ ¶Ç´Â µÎ°³ÀÇ ¸®ÇÇÅ͸¦ ³õ¾Æ¾ßÇÑ´Ù. 3. CSMA/CD ¼³¸í Carrier Sense Multiple-Access Collision Detection LANÀÇ °¢ client°¡ µ¿½Ã¿¡ Åë½Å¼±À» »ç¿ëÇÒ ¶§ ¹ß»ýÇÒ ¼ö ÀÖ´Â Ãæµ¹À» ¸·¾ÆÁÖ´Â ÇÁ·ÎÅäÄÝÀÌ´Ù. Åë½Åȸ¼±ÀÇ »ç¿ë¿©ºÎ¸¦ ¹Ý¼ÛÆĸ¦ ÅëÇØ Áø´ÜÇÑ ÈÄ ÆÐŶÀ» Àü¼ÛÇÏ´Â ¹æ½ÄÀ¸·Î, ³×Æ®¿öÅ©ÀÇ ºÎÇÏ°¡ Å©´Ù´Â ´ÜÁ¡ÀÌ ÀÖ´Ù. 4. LAN¼³Ä¡½Ã °í·ÁÇØ¾ß ÇÒ »çÇ×########## 5. Repeater/Bridge/GatewayÀÇ ±¸ºÐ * Repeater - OSiÀÇ physiacl layer¿¡ ÇØ´çÇÏ´Â ±â´ÉÀ» ¼öÇàÇÑ´Ù. Àü¼Û½ÅÈ£ÀÇ ÁõÆø°ú Àç»ýÀ» ±âº»±â´ÉÀ¸·Î ÇÏ¿© LANÀ» »óÈ£Á¢¼ÓÇϰųª °Å¸®¸¦ ¿¬Àå½ÃÅ°°í Á¢¼ÓµÇ´Â ÀåÄ¡ÀÇ ¼ö¸¦ Áõ°¡½ÃÅ°´Âµ¥ »ç¿ëµÈ´Ù. Áï, ÁÖµÈ ±â´ÉÀº µÎ °³ÀÇ LANÀ» °ß°á½ÃÄÑ µ¥ÀÌŸ bit¸¦ ÇϳªÀÇ LAN segment ¿¡¼­ ´ÙÀ½ segment·Î Àü¼ÛÇÏ´Â °úÁ¤¿¡¼­ ½ÅÈ£ÀÇ °¨¼â¸¦ º¸ÀåÇØ ÁÜÀ¸·Î½á µÎ °³ÀÇ LANÀ» ¹°¸®ÀûÀ¸·Î ¿¬°áµÈ ÇϳªÀÇ ³×Æ®¿÷À¸·Î ¸¸µé¾î ÁØ´Ù. ±¸Ã¼ÀûÀÎ ¿ëµµ´Â µÎ°³ ¶Ç´Â ±× ÀÌ»óÀÇ LANÀ» repeate·Î ¿¬°áÇÔÀ¸·Î½á Àüü ³×Æ®¿öÅ©ÀÇ °Å¸®¸¦ È®ÀåÇÏ´Â °ÍÀÌ´Ù. * Bridge - OSI ¸ðµ¨ÀÇ µ¥ÀÌŸ ¸µÅ© °èÃþÁß MAC°èÃþ¿¡¼­ ±â´ÉÇÑ´Ù. ¸®ÇÇÅÍ¿Í´Â ´ëÁ¶ÀûÀ¸·Î µÎ segment »çÀÌ¿¡¼­ datalink layer°£ÀÇ ÆÐŶ Àü¼ÛÀ» ´ã´çÇÏ´Â ÀåÄ¡ÀÌ´Ù. ±â´É¿¡ µû¶ó ¿©·¯°¡Áö·Î ±¸ºÐµÇÁö¸¸ LANÀ» ¿¬°áÇÏ´Â ¹æ½Ä¿¡ µû¶ó local, remote bridge·Î ³ª´«´©´Â °ÍÀÌ °¡Àå ÀϹÝÀûÀÌ´Ù. local bridge´Â Áö¿ªÀûÀ¸·Î ¸Å¿ì °¡±îÀÌ ÀÖ´Â µÎ LAN segment¸¦ Á÷Á¢ ¿¬°á½ÃÄÑÁÖ´Â bridge·Î ¿¹¸¦ µé¾î ÇϳªÀÇ ´ë±Ô¸ð °Ç¹°³»¿¡ ÀÖ´Â ¼Ò±Ô¸ð LANµéÀ» ÇϳªÀÇ Ä¿´Ù¶õ ³×Æ®¿÷À¸·Î ¿¬°áÇϴµ¥ »ç¿ëµÈ´Ù. remote bridge´Â ¼­¿ï¿¡ ÀÖ´Â º»»çÀÇ LAN°ú Áö¹æ¿¡ ºÐ»êµÇ¾î ÀÖ´Â Áö»çÀÇ LAN°ú °°ÀÌ Áö¸®ÀûÀ¸·Î ¸Õ°Å¸®¿¡ ¶³¾îÁ® ÀÖ´Â µÎ LANÀ» ¿¬°áÇÏ´Â ¿ëµµ·Î »ç¿ëµÇ´Âµ¥ ´ë°³ÀÇ °æ¿ì µÎ bridge°£Àº °øÁ߸ÁÀ» ÅëÇÏ¿© ¿¬°áÇÏ°í ÀÖ´Ù. * Gateway - µÎ °³ÀÇ ÄÄÇ»ÅÍ ³×Æ®¿÷À» ¿¬°á½ÃÄÑ ÁÖ´Â ½Ã½ºÅÛÀ¸·Î LAN°ú LAN »çÀÌÀÇ µ¥ÀÌŸ Á߰踦 ´ã´çÇÏ´Â Åë½Å ¼­¹ö¸¦ ÀÏÄ´´Ù. Çϵå¿þ¾î¿Í ÇÁ·ÎÅäÄÝ, NOS°¡ ÀüÇô ´Ù¸¥ PC, ´ëÇü±âÁ¾, ¹Ì´Ï±Þ ÄÄÇ»ÅÍ µîÀÌ ³×Æ®¿÷¿¡¼­ »ç¿ëµÇ´Â ¼­·Î ´Ù¸¥ ÇÁ·ÎÅäÄÝÀ» º¯È­½ÃÄÑ °áÇÕ½ÃÄÑ ÁØ´Ù. [ Chapter Network Configuration ] 1. Ethernet frame¿¡ Æ÷ÇԵǴ Á¤º¸ ---------------------------- | Destination IP address | ---------------------------- | Source IP address | ---------------------------- | | | | Transport | Data | -----------------------------| header | |------- | Destination | Source | Type | | | CRC | | Ethernet |Ethernet| | | | | | address |address | | | | | ------------------------------------------------------------------ |<------------------------ Ethernet Frame ------------------------>| 2. Ethernet¼³Ä¡½ÃÀÇ Guidline########## 3. receiver systemÀº sender systemÀÇ Ethernet Address¸¦ ¾îµð¼­ ±¸Çϴ°¡?########## 4. 'arp" command¸¦ »ç¿ë permanent ARP table¿¡ Ethernet address¸¦ Ãß°¡ÇÏ´Â ¹æ¹ý # arp -s hostname ether_address ex) jhkim# arp -s lily 8:0:20:18:73:60 È®ÀÎ) jhkim# arp lily lily (158.44.203.14) at 8:0:20:18:73:60 permanent (expire after 20 min) 5. ARP¿¡ ´ëÇÑ Àü¹ÝÀûÀÎ ¼³¸í IP Address¸¦ Ethernet address¿¡ ¸ÊÇÎÇϱâ À§ÇØ »ç¿ëµÈ ARP(Address Resolution Protocol) Å×À̺íÀ» display, controlÇÏ´Â °ÍÀÌ´Ù. arp -a : Çö ARP¿£Æ®¸®ÀÇ ¸ðµç°ÍÀ» º¸¿©ÁØ´Ù. P - Publish S - Static U - Unresolved M - Mapping arp -d hostname : hostname¿¡ °ü°èµÇ´Â ¿£Æ®¸®¸¦ »èÁ¦ÇÑ´Ù. arp -s hostname ether_address [ temp ] [ pub ] [ trail ] : ARP ¿¡Æ®¸®¸¦ ÷°¡ÇÑ´Ù. 6. RARP¿¡ ´ëÇÑ Àü¹ÝÀûÀÎ ¼³¸í (Reverse Address Resolution Protocol) * Network Configuration Information - IP Information - Ethernet Information * Diskless Systems : diskless systemÀ» »ç¿ëÇϱâ À§Çؼ­´Â IP address¸¦ Æ÷ÇÔÇÏ´Â ÃʱâÈ­ÇϱâÀ§Çؼ­ RARP¸¦ »ç¿ëÇؾ߸¸ ÇÑ´Ù. 7. automatic network address configuration¿¡ °ü·ÃµÇ´Â È­Àϵé /etc/inittab, /etc/rcS ---> /etc/rcS.d/S30routusr.sh /etc/inet/hosts, /etc/hostname.*[0-9] /etc/nodename, /etc/defaultrouter 8. "sys-unconfig"ÀÇ ¿ëµµ ¹× ±¸Ã¼Àû ±â´É ½Ã½ºÅÛÀÇ È¯°æÀ» ÃʱâÈ­ÇÏ´Â ¸í·É¾îÀÌ´Ù. /etc/inet/hosts ---> /etc/inet/hosts.saved. restores : /etc/inet/hosts, /etc/TIMEZONE remove : /etc/hostname.*[0-9], /etc/nodename, /etc/defaultdomain, /etc/net/*/hosts /etc/inet/netmasks, /etc/shadow disable : NIS, NIS+ 9. ifconfig -a command °á°ú Çؼ®ÇÏ´Â ¹æ¹ý jhkim# ifconfig -a lo0: flags=849 mtu 8232 inet 127.0.0.1 netmask ffffff00 le0: flags=863 mtu 1500 inet 158.44.203.19 netmask ffffff00 broadcast 158.44.203.255 ether 0:3:e3:c1:2:13 lo0 : Loopback interface flags : flag argument UP, DOWN : interface¸¦ ÅëÇؼ­ packetÀ» send, redeiveÇÒ ¼ö ÀÖ´Ù(UP),¾ø´Ù(DOWN) NOTRAILERS : IP packetÀÇ non-standard encapsulationÀ» Áö¿øÇÏÁö ¾Ê´Â´Ù. RUNNING : interface°¡ È£½ºÆ®¿¡ ÀÇÇؼ­ Àνĵȴٴ ÀǹÌ. MULTICAST : multicast address¸¦ Áö¿øÇÑ´Ù. mtu (Maximum Transfer Unit) : network layer¿¡¼­ packet fragmentationÀ» °áÁ¤ÇÑ´Ù. inet : Internet address netmask : network layer¿¡¼­ incoming, outgoing packetÀÌ Àû¿ëµÈ´Ù. broadcast : ¸ðµç È£½ºÆ®µé¿¡°Ô ¸Þ¼¼Áö¸¦ Àü¼ÛÇϴµ¥ »ç¿ë. ether : Ethenet Address 10. Troubleshooting Network Configuration * All interfaces are UP * The IP address is correct * The netmask is correct * The broadcast address is correct 11. subnettingÀÇ ÀÌÁ¡ * network»ó¿¡¼­ broadcastµÇ´Â routing trafficÀÇ ¾çÀ» °¨¼Ò½Ãų ¼ö ÀְԵȴÙ. * ¸ðµç host°¡ ÇϳªÀÇ physical network»ó¿¡ ÀÖÀ» ÇÊ¿ä°¡ ¾ø°Ô µÇ´Â Á¡. - SRI·Î ºÎÅÍ Ãß°¡ÀÇ network number¸¦ ¾òÁö ¾Ê°í¼­µµ ÇÑ networkÀÌ È®ÀåÀÌ °¡´ÉÇÏ°Ô µÈ´Ù. - "nework »ç¿ëÀ» ¸¹ÀÌ ÇÏ´Â ºÎ·ù"¸¦ ºÐ¸®½Ãų ¼ö ÀÖ°Ô µÈ´Ù. ¿¹¸¦ µé¾î, ¾î´À ÇÑ groupÀÌ network load°¡ Å« programÀ» »ç¿ëÇÑ´Ù¸é ´Ù¸¥ ÀÏ¹Ý »ç¿ëÀÚµé°ú ºÐ¸®ÇÔÀ¸·Î½á ±× programÀÌ Àüü network performance¸¦ ÀúÇϽÃÅ°´Â °ÍÀ» ¸·À» ¼ö ÀÖ´Ù. 12. subnettingÀÇ ±¸Çö ÀýÂ÷, °¢ ½Ã½ºÅÛ¿¡¼­ ±¸Çö½Ã »ç¿ë command¿Í È­Àϵé. 1. »õ·Î¿î network/subnet topology°áÁ¤ - ¸î°³ÀÇ physical subnetÀ¸·Î ºÐ¸®ÇÒ °ÍÀÎÁö¸¦ °áÁ¤. - subnet°£ÀÇ router·Î½á ¾²ÀÏ machineÀ» °áÁ¤ÇÑ´Ù. - subnet»óÀÇ hostµéÀÇ À§Ä¡¸¦ °áÁ¤ÇÑ´Ù. - IP addressÀÇ ¸î°³ÀÇ bit°¡ network number·Î ¾²ÀÏÁö¸¦ °áÁ¤ÇÑ´Ù.(network class) 2. subnet»óÀÇ machineµé¿¡ host address¸¦ ÇÒ´çÇÑ´Ù. 3. »õ·ÎÀÌ ÇÒ´çµÈ IP address¿¡ ¸ÂÃç /etc/hosts fileÀ» º¯°æÇÑ´Ù. 4. Reboot all machine 5. Á¤È®È÷ »ç¿ëµÇ¾ú´ÂÁö check (IP address,netmask,broadcast) = ifconfig command 13. Static Routing/Dynamic RoutingÀÇ Â÷ÀÌÁ¡. * Static Routing - Ä¿³Î¿¡ ÀÖ´Â Å×À̺íµéÀÌ ½Ã½ºÅÛÀÌ ºÎÆõɶ§ Á¤ÀÇµÇ°í ¹Ù²îÁö ¾Ê´Â´Ù. * Dynamic Routing - Ä¿³ÎÀÌ ÀÖ´Â Å×À̺íµéÀÌ ³×Æ®¿÷ÀÌ ¹Ù²ð¶§¸¶´Ù ¶ó¿ìÆà µ¥¸ó¿¡ ÀÇÇØ updateµÈ´Ù. Solaris machineµéÀº ¸ðµÎ È£½ºÆ®µé »çÀÌ¿¡ ¶ó¿ìÆà Á¤º¸¸¦ ±³È¯ÇÏ´Â "in.routed"¸¦ Á¦°øÇÑ´Ù. 14. ICMP¶õ ¹«¾ùÀΰ¡, ±â´É. (Internet Control Message Protocol) * internet layer»ó¿¡¼­ IP¸¦ °øÁ¸ÇÏ°í, IP¸¦ À§ÇÑ error¿Í diagnosticÀ» Á¦°øÇÑ´Ù. * IP»ó¿¡ Á¸ÀçÇÏ´Â datagram protocolÀÌ´Ù. * Destination unreachable - network, host, protocol, port´Â ȹµæÇÒ ¼ö ¾ø´Ù. - ¸Þ¼¼Áö´Â user programÀ¸·Î º¸³»Áø´Ù. * Source quench [ Chapter Network Services ] 1. port number¶õ ¹«¾ùÀΰ¡? * port³ª address space¸¦ ÀÌ¿ëÇϱâ À§ÇØ ¿äûµÇ°Å³ª Á¦°øµÇ´Â °¢°¢ÀÇ network service´Â ±× ¼­ºñ½º¸¦ À§ÇØ º¸Á¸µÈ´Ù.ÀϹÝÀûÀ¸·Î Àß ¾Ë·ÁÁø Æ÷Æ®¸¦ ÅëÇؼ­ ¼­¹ö¿¡ Åë½ÅÀ» ÇÏ°í ±× ¹ÛÀÇ Æ÷Æ®¸¦ ÅëÇؼ­ clientÀÎ works°¡ Á¸ÀçÇÑ´Ù. * ÇÑ port´Â physical port°¡ login ¼­ºñ½º¸¦ Á¦°øÇϱâ À§Çؼ­ »ç¿ëµÇ´Â °Íó·³,ÀÌ·± ¼­ºñ½º¸¦ À§ÇØ »ç¿ëÇÏ´Â Ä¿³Î addressÀÌ´Ù. * /etc/inet/services file 2. RPC¶õ ¹«¾ùÀΰ¡? * Remote Procedure Call * ÀÌµé ·çƾµéÀº ³×Æ®¿÷À» ÅëÇÑ ´Ù¸¥ ½Ã½ºÅÛ°ú ±³·ùÇϱâ À§Çؼ­ C Language·Î ±¸ÇöµÆ´Ù. ¸ÕÀú, client´Â ¼­¹ö¿¡ request¸¦ º¸³»°í, request¸¦ ¹ÞÀº ¼­¹ö´Â requestµÈ ¼­ºñ½º¸¦ ¼öÇàÇϱâ À§Çؼ­ 󸮷çƾÀ» callÇÏ°í ÀÀ´äÀ» º¸³»°Ô µÈ´Ù. 3. RPC process°¡ startµÇ´Â °úÁ¤########## * /etc/inet/inetd.conf * /etc/rpc * rpc.nisd,mountd,nfsd --> inetd,rwalld,sprayd,admind [ Chapter Network Performance and Tuning ] 1. performance activity °¢ ´Ü°è * Application level * kernel level * System configuration level * Network level 2. tuning¿¡ °ü·ÃÇÑ °í·Á»çÇ×, ¸ñÀûµî * Responsiveness to pleas for better performance * Network and server evaluation * Capacity planning purposes 3. performance tuning processes? * Establish Metrics (±âÁØÇ¥) * Gather Data * Identify Bottlenecks * Test Hypothesis * Analyze Data * Implement Solution * Observe Problem 4. Monitoring Performance¸í·É¾îµé(iostat, vmstat, sar, ps, netstat, nfsstat...) * iostat (Å͹̳ΰú µð½ºÅ© ÀÔ.Ãâ·ÂÀ» ÃøÁ¤) jhkim# iostat -xtc 5 2 extended disk statistics tty cpu disk r/s w/s Kr/s Kw/s wait actv svc_t %w %b tin tout us sy wt id fd0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 1 248 10 6 33 51 sd0 5.7 0.7 126.4 12.1 0.2 0.1 48.5 1 9 sd2 0.0 0.0 0.2 0.0 0.0 0.0 24.3 0 0 sd3 5.7 1.4 33.3 29.0 0.1 0.1 33.5 1 8 extended disk statistics tty cpu disk r/s w/s Kr/s Kw/s wait actv svc_t %w %b tin tout us sy wt id fd0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 85 1 3 13 83 sd0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 sd2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 sd3 10.0 2.0 46.4 16.0 0.2 0.2 34.3 2 16 # disk µð½ºÅ© À̸§ # r/s ÃÊ´ç Àϱâ # w/s ÃÊ´ç ¾²±â # Kr/s ÃÊ´ç Àбâ Kbytes # Kw/s ÃÊ´ç ½º±â Kbytes # wait queue length # actv removed from the queue but not yet completed # svc_t queue non-empty * vmstat(ÇÁ·Î¼¼¼­,°¡»ó ¸Þ¸ð¸®, µð½ºÅ©, Æ®·¦, CPU) jhkim# vmstat 1 5 procs memory page disk faults cpu r b w swap free re mf pi po fr de sr f0 s0 s2 s3 in sy cs us sy id 0 0 0 122296 2712 0 17 152 28 131 0 46 0 6 0 7 140 443 130 10 6 84 0 1 0 80164 3008 0 17 0 0 0 0 0 0 0 0 0 93 130 60 3 2 95 0 1 0 80164 3008 0 5 0 0 0 0 0 0 0 0 2 73 121 47 1 6 93 0 1 0 80164 3008 0 5 0 0 0 0 0 0 0 0 0 83 66 34 0 1 99 0 1 0 80164 3004 0 6 4 0 0 0 0 0 0 0 1 100 66 38 1 0 99 * sar (only 2.x, ½Ã½ºÅÛ ¾×Ƽ¹öƼ ¸®Æ÷ÅÍ) * ps (ÇÁ·Î¼¼¼­ »óź¸±â) * netstat (³×Æ®¿÷¿¡ °ü°èµÈ Á¤º¸¸¦ º¸¿©ÁØ´Ù) jhkim# netstat -i 1 input le0 output input (Total) output packets errs packets errs colls packets errs packets errs colls 157020 0 2287 1 76 157543 0 2810 1 76 29 0 0 0 0 29 0 0 0 0 19 0 0 0 0 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 0 0 0 0 13 0 0 0 0 13 0 0 0 0 13 0 0 0 0 # Collision Rates = 76 / 2287 * 100 = 3.32% collision rate * nfsstat (Ä¿³Î»óÀÇ RPC, NFS¿¡ °üÇÑ Á¤º¸¸¦ º¸¿©ÁØ´Ù.) jhkim# nfsstat -cnrs Server rpc: Connection oriented: calls badcalls nullrecv badlen xdrcall dupchecks dupreqs 0 0 0 0 0 0 0 Connectionless: calls badcalls nullrecv badlen xdrcall dupchecks dupreqs 0 0 0 0 0 0 0 Server nfs: calls badcalls 0 0 Version 2: (0 calls) null getattr setattr root lookup readlink read 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% wrcache write create remove rename link symlink 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% mkdir rmdir readdir statfs 0 0% 0 0% 0 0% 0 0% Version 3: (0 calls) null getattr setattr lookup access readlink read 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% write create mkdir symlink mknod remove rmdir 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% rename link readdir readdir+ fsstat fsinfo pathconf 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% commit 0 0% Client rpc: Connection oriented: calls badcalls badxids timeouts newcreds badverfs timers 0 0 0 0 0 0 0 cantconn nomem interrupts 0 0 0 Connectionless: calls badcalls retrans badxids timeouts newcreds badverfs 0 0 0 0 0 0 0 timers nomem cantsend 0 0 0 Client nfs: calls badcalls clgets cltoomany 0 0 0 0 Version 2: (0 calls) null getattr setattr root lookup readlink read 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% wrcache write create remove rename link symlink 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% mkdir rmdir readdir statfs 0 0% 0 0% 0 0% 0 0% Version 3: (0 calls) null getattr setattr lookup access readlink read 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% write create mkdir symlink mknod remove rmdir 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% rename link readdir readdir+ fsstat fsinfo pathconf 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% commit 0 0% # options - c : Diplay client information n : Display NFS information r : Display RPC information s : Display server information 5. network monitoring * netstat, snoop * snoop (capture and inspect network packets) 6. Performance Tuning Guidelines * Recall the factors that lead to poor network performance * Use performance monitoring commands to find performance bottlenecks * Describe solutions to improve performance [ DNS Overview ] 1. DNSÀÇ service°³³ä DNS´Â TCP/IP¸¦ ÀÌ¿ëÇÑ ÀÀ¿ë°èÃþÀÇ protocol·Î¼­ ±× ±â´ÉÀº ³×Æ®¿÷»óÀÇ Host¿¡ °üÇÑ Á¤º¸¸¦ Áú¹®ÇÏ°í ÀÀ´äÇÏ´Â °ÍÀ̸ç NIS¿Í´Â ´Þ¸® Domain°£ÀÇ access°¡ °¡´ÉÇÏ´Ù. ¶ÇÇÑ, TCP/IP ³×Æ®¿÷»óÀÇ ¸ðµç ÁÖ¼Ò´Â 4°³ÀÇ ¼ýÀÚ¿Í "."À¸·Î ÀÌ·ç¾îÁ® ÀÖ´Ù. ÀÌ·± ÁÖ¼Ò ÇüŸ¦ °¡¸®ÄÑ IP address¶ó°í ºÎ¸£°í ÀÎÅ׳ݻóÀÇ ¸ðµç HostµéÀº °¢ÀÚÀÇ À¯ÀÏÇÑ IP address¸¦ NIC(Network Information Center)·ÎºÎÅÍ ºÎ¿©¹Þ°Ô µÈ´Ù. ±×·¯³ª ÀÌ·¯ÇÑ ¼ýÀÚÇüÀÇ ÁÖ¼Ò º¸´Ù ±â¾ïÇϱ⠽±°í ¸í·áÇÑ address¸¦ ÀÌ¿ëÇÏ°Ô µÈ °ÍÀÌ ¹Ù·Î Domain addressÀÌ´Ù. 2. °¢ ¿ë¾î Á¤Àǵé (Name Service, Namespace, Domain, Name Server, Resolver) * Name Service - dns server·Î ÀÛµ¿Çϱâ À§Çؼ­ /etc/init.d/inetsvc /etc/rc2.d/S72inetsvc ¿Í hard link°¡ µÇ¾îÀִµ¥, in.named daemonÀÌ µ¹¸é¼­ Name Service¸¦ ¼öÇÚÇÑ´Ù. * Namespace - networkÀ» ±¸¼ºÇÏ°í ÀÖ´Â ¸ðµç È£½ºÆ®µéÀÇ ÁýÇÕ. * Domain - °¢ ±â°ü¿¡ ÁÖ¾îÁö´Â ³×Æ®¿÷»ó¿¡¼­ »ç¿ëÇÏ´Â À̸§À̸ç "."À¸·Î ±¸ºÐÇÑ´Ù. * Name Server - Namespace¸¦ °ü¸®ÇÏ°í ¿ÏÀüÇÑ Á¤º¸¸¦ °®°íÀÖ´Ù. * Resolver - machine À̸§µéÀ» ¾Ë±âÀ§ÇØ ÇÊ¿äÇÑ ¾îÇø®ÄÉÀ̼ǵé¾È¿¡¼­ ÄÄÆÄÀÏµÈ ¶óÀ̺귯¸®. - ÀÌ·¯ÇÑ ·çƾµéÀº client requestµé¿¡ ÀÀ´äÇϱâÀ§ÇØ ³×ÀÓ ¼­¹ö·ÎºÎÅÍ È£½ºÆ® Á¤º¸¸¦ ÃßÃâÇس½´Ù. 3. DNS¿Í °ü·ÃµÈ È­Àϵé - /etc/named.boot, /etc/resolv.conf, /etc/nssiwtch.conf - /etc/named.boot¿¡ ÁöÁ¤µÈ directory¿Í dns map fileµé * name.boot - ¼­¹ö·Î¼­ µ¿ÀÛÇϱâ À§ÇÑ profileÀ» ÀÛ¼ºÇÏ¿© booting½Ã checkÈÄ in.named¸¦ µ¿ÀÛ½ÃÅ°´Â °ÍÀ¸·Î ¼­¹öÀÇ µ¿ÀÛÀ» ÃëÇÑ´Ù. * resolv.conf - client·Î ÀÛµ¿Çϱâ À§Çؼ­ ¾î¶² ³×ÀÓ ¼­¹ö¸¦ »ç¿ëÇÒ °ÍÀÎÁö Á¤ÇÑ´Ù. * nsswitch.conf - name service switch file * /etc/named.boot file ; /etc/named.boot, 1995/4/01 | ; | directory /usr/local/dns | ; | ; type domain source host/file backup file | ; | cache . root.cache | primary trigem.co.kr tg.zone | primary 44.158.in-addr.arpa tg.rev | primary 0.0.127.in-addr.arpa local.rev - root.cache : root zone¿¡ ´ëÇÑ ¼­¹öµéÀ» ÁöÁ¤ÇÑ´Ù. - tg.zone : root domain¾È¿¡¼­ ¸ðµç host¿¡ ´ëÇÑ data¸¦ Æ÷ÇÔÇÏ´Â file - tg.rev : reserse address domain¿¡ ´ëÇÑ primary name server ¸¦ ³ªÅ¸³½ hostÀÌ´Ù. address-to-name(inverse) mappingÀ» Áö¿øÇÑ´Ù. - local.rev : loopback network¿¡ ´ëÇÑ primary name server¿¡ ´ëÇØ ±â¼ú ÇÒ fileÀÌ´Ù. 4. /etc/nsswitch.* filesÀÇ¹Ì * nsswitch.conf - name service switch¸¦ À§ÇÑ configurations file * nsswitch.nis - "files"¿Í "nis"¸¦ »ç¿ëÇÏ´Â »ùÇà configurations file * nsswitch.nisplus - "files"¿Í "nisplus"¸¦ »ç¿ëÇÏ´Â »ùÇà configurations file. * nsswitch.files - "files"´Üµ¶À¸·Î »ç¿ëÇÏ´Â »ùÇà configurations file. 5. DNS server°¡ client IP request¸¦ ó¸®ÇÏ´Â ÀýÂ÷ * Client(Resolver) ==Queries==> [Server(in.named) --> Central cache --> Local domain information] ==Queries==> [Foreign name server(in.named) --> Central cache --> Local domain information] ==Responses==> Server(in.named) ==>Responses ==> Client(Resolver) 6. name serverÀÇ debugging¹æ¹ý ex) jhkim# ps -ef |grep named jhkim# kill -9 named.pid jhkim# more /var/tmp/named_dump.db À߸øµÈ ºÎºÐÀ» ¼öÁ¤ÇÑ´Ù,±×¸®°í debug mode·Î in.named¸¦ ¼öÇàÇÑ´Ù. jhkim# in.named -d 1 jhkim# more /var/tmp/named.run * Increasing the debugging level: jhkim# kill -USR1 `cat /etc/named.pid` jhkim# more /var/tmp/named.run * Decreasing the debugging level: jhkim# kill -USR2 `cat /etc/named.pid` jhkim# more /var/tmp/named.run [ Chapter NIS + ] 1. NIS, NIS+Â÷ÀÌÁ¡ NIS NIS+ flat name space hierarchical(UPdate¿Í º¯È­¸¦ ½±°Ô °ü¸®ÇÑ´Ù.) - º¸¾È°ú »ç¼ÒÇÑ °Í±îÁö control - update´Â ¸Å¿ìºü¸£´Ù. single key-value pairs multiple key-value pairs(Ưº°ÇÑ Å°ÀÇ Æ¯º°ÇÑ °ª¿¡ ±Ù°Å¸¦ µÎ°í ãÀ» ¼ö ÀÖ´Ù.) 2. NIS+ÀÇ Àü¹ÝÀûÀÎ ¼³¸í * ¸Å¿ì Å« ³×Æ®¿÷À» À§ÇØ serve small·Î ¼³°èµÈ enterprise level nameing serviceÀÌ´Ù. 3. NIS+»ç¿ë»óÀÇ ÀÌÁ¡ * ´õÀÌ»ó Àü´ÞµÈ mapµéÀ» ¾ò±â À§ÇØ 24½Ã°£ ÀÌ»óÀ» ±â´Ù¸± ÇÊ¿ä°¡ ¾ø´Ù. ºü¸¥ update. ±×·¡¼­ ¾î¶°ÇÑ º¯È­¿¡µµ ¸Å¿ì ½±°í ½±°Ô updateÇÑ´Ù. * ¸¹Àº trouble¾øÀÌ ¸ðµç µµ¸ÞÀεéÀ» ÅëÇؼ­ ¼±È¸ÇÒ ¼ö ÀÖ´Ù. * local sysadminÀº ¿£Æ®¸®µéÀÇ ¸î¸î Çʵ带 º¯È­ÇÒ ¼ö ÀÖ´Â ±×·±ÇÑ policies¸¦ ¼ÂÆà ÇÒ ¼ö ÀÖ´Ù. [ Chapter Jumpstart - Automatic Installation ] 1. Jumpstart feature * Solaris 2.x operating ȯ°æÇÏ¿¡¼­ »ç¿ë°¡´ÉÇÑ ÀÚµ¿ ÀνºÅç ÇÁ·Î¼¼¼­ÀÌ´Ù. * ¹Ì¸®¼³Á¤µÈ ¼ÒÇÁÆ®¿þ¾î·Î »õ·Î¿î ½Ã½ºÅÛÀ» ÀνºÅçÇϱâ À§Çؼ­ »ç¿ëµÈ´Ù. 2. Jumpstart°¡ ÀÛµ¿ÇÏ´Â ÀýÂ÷ * networkÀ¸·ÎºÎÅÍ ºÎÆõȴ٠===> boot server¿¡ "in.rarpd"daemon½ÇÇà(¼­¹ö´Â Ŭ¶óÀ̾ðÆ® ÀÇ ¾îµå·¹½º¸¦ ¸®ÅÏÇÑ´Ù ===> boor server·ÎºÎÅÍ client stub¸¦ ¾ò±âÀ§ÇØ "tftp"»ç¿ë ===> boot server»ó¿¡¼­ "inetd"daemon½ÇÇà(JumpStart boot image°¡ client¿¡ µÇµ¹·Á º¸³»Áø´Ù ===> client·ÎºÎÅÍ JumpStart boot image°¡ "hostconfig"¸¦ ¹ß»ýÇÑ´Ù ===> name server°¡ Ŭ¶óÀ̾ðÆ®ÀÇ "bootparams"Å×ÀÌºí¿¡ Á¤º¸¸¦ ¸®ÅÏÇÑ´Ù ===> client°¡ boot parameter¸¦ °®À»¶§ ºÎÆ® ÇÁ·Î±×·¥ÀÌ ºÎÆ® ¼­¹ö·ÎºÎÅÍ "/(root)"¸¦ ¸¶¿îÆ®ÇÏ°í "/kernel/unix"¸¦ ½ÇÇàÇÑ´Ù, "init"ÇÁ·Î±×·¥ÀÌ ´Ù¸¥ °Íµéµµ ½ÇÇàÇÑ´Ù ===> client´Â "bootparams"Á¤º¸¸¦ ÀÌ¿ëÇؼ­ configuration server¸¦ ã´Â´Ù, Ŭ¶óÀ̾ðÆ®´Â configuration directory¸¦ ¸¶¿îÆ®ÇÏ°í "sysidtool"ÀÌ ½ÇÇàµÈ´Ù. 3. JumpstartÀÇ customizing configurationÀ» À§ÇÑ actions jhkim# cd /export/install/jumpstart jhkim# cp rules rules.org jhkim# vi rules [ make changes as per your need] 4. auto-install feature 5. Network install½Ã serverÀÇ ±â´É/¿ªÇÒ * Configuration server - ÀÚµ¿ ÀνºÅç ÇÁ·Î¼¼¼­¸¦ ¼öÇàÇÏ´Â µ¿¾È Ä¿½ºÅ͸¶ÀÌÁîµÈ configuration fileµéÀ» Æ÷ÇÔÇÑ´Ù. * Install server - ÀÚµ¿ ÀνºÅç 󸮵¿¾È »ç¿ëÇϱâ À§Çؼ­ client machineÀ» À§ÇØ Solaris 2.2 media¸¦ Á¦°øÇÑ´Ù. install server¿Í configuration server´Â Á¾Á¾ °°Àº ½Ã½ºÅÛÀÌ´Ù. * Boot server - ³×Æ®¿÷ Á¢±Ù°ú ºÎÆÃÀ» À§ÇÑ ±â´ÉÀ» ¼­ºê³Ý»ó¿¡¼­ client installÀ» Á¦°øÇÑ´Ù. [ Chapter Sendmail ] 1. EmailÀÇ ÀåÁ¡ * ÀÎÅͳݿ¡¼­ °¡Àå ¸¹ÀÌ »ç¿ëµÇ´Â ¼­ºñ½ºÀÌ°í, ´ëºÎºÐÀÇ ¸Þ¼¼Áö°¡ °£´ÜÇÑ ÇüÅÂÀÇ ÅؽºÆ®ÀÌ°í ÀϹÝÀûÀÎ ±×·¡ÇÈÀ̹ÌÁö ÆÄÀϵµ Email·Î ÁÖ°í ¹ÞÀ» ¼ö ÀÖ´Ù. 2. mail alias resolution°ú °ü·ÃµÈ È­Àϵé°ú ±× ±â´É ¹× customizing¹æ¹ý? * mailtool(.mailrc aliases) ===> /usr/lib/sendmail(other mail transports) ===> Local(/etc/mail/aliases) ===> NIS+ aliases ===> NIS aliases map :nsswitch.conf ===> .forward file ===> Local dellivery machanism 3. sendmail daemonÀÇ ±â´Éµé * ÇÑ»ç¶÷ ¶Ç´Â ¿©·¯»ç¶÷¿¡°Ô ¸Þ¼¼Áö¸¦ Àü´ÞÇÑ´Ù. * ³×Æ®¿÷À» ÅëÇؼ­ ¸Þ¼¼Áö¸¦ ¶ó¿ìÆÃÇØÁØ´Ù. * sendmailÀº user interface ·çƾÀ» ÀǹÌÇÏÁö´Â ¾Ê´Â´Ù. * sendmailÀº ¹Ì¸® Á¤ÀÇµÈ ¸Þ¼¼ÁöµéÀ» µô¸®¹öÇϱâ À§Çؼ­¸¸ »ç¿ëµÈ´Ù. * local network¿¡ ´Ù¸¥ ¾Ë·ÁÁø hostµé¿¡°Ô Á÷Á¢ÀûÀ¸·Î ¸ÞÀÏÀ» ¶ó¿ìÆ®ÇÑ´Ù. * ÆíÁö°¡ µô¸®¹ö¸®µÇÁö ¾ÊÀº°ÍÀ» ¾Ë°ÔµÇ¸é ±×°ÍÀº º¸³»Áø °÷À¸·Î µÇµ¹·ÁÁö°í ±× ÆíÁö´Â dead.letter¿¡ ³²°ÔµÈ´Ù. 4. sendmail.cf file¿¡ Á¤ÀǵǴ ³»¿ëµé? * router¿¡ ¹°·ÁÀÖ´Â hostname(name server)°ú ±×°ÍÀÇ domainnameÀ» Á¤ÀÇÇÑ´Ù. * »ç¿ëÇÏ´Â Mailer¸¦ ÁöÁ¤ÇÑ´Ù. * default mail gateway¸¦ ÁöÁ¤ÇÑ´Ù. 5. standard rewriting rules´Â? * Rule Set 3 - local-address@host-domain * Rule Set 0 - destination°ú ¸ÞÀÏÀ» º¸³»±âÀ§ÇØ »ç¿ëÇÏ´Â ¸ÞÀÏ·¯ ÇÁ·Î±×·¥À» °áÁ¤ÇÑ´Ù. * Rule Set R - mail-specific recipient rewriting * Rule Set S - mail-specific sender rewriting * Rule Set 4 - internalºÎÅÍ external form±îÁö ¸Þ¼¼Áö¿¡ ÀÖ´Â ¸ðµç À̸§µéÀ» °áÁ¤ÇÑ´Ù. * Rule Set D - sender domain addition * Rule Set 1 - FromÀ» °áÁ¤ÇÑ´Ù * Rule Set 2 - To, Cc¸¦ °áÁ¤ÇÑ´Ù.