Thursday, January 3, 2013

៧ ឧទាហរណ៍នៃពាក្យបញ្ជា ifconfig



ពាក្យបញ្ជា ifconfig ប្រើដើម្បី​ configure network interfaceហើយវាក៍ជាជំហ៊រ នៃ interface configurator នោះដែរ ពាក្យបញ្ជានេះ ត្រូវបានគេប្រើប្រាស់យ៉ាងទូលំទូលាយ ក្នុងការធ្វើអោយ network interface ដំណើរការ និងបញ្ឈប់ដំណើរការ ។
នៅក្នុងអត្ថបទនេះ យើងនិងបង្ហាញ ៧ ចំនុច នៃការប្រើប្រាស់ របស់ពាក្យបញ្ជា ifconfig

image86.png

១. បង្ហាញ network setting នៃ Ethernet Adapter
ពាក្យ ifconfig ពេលដែលប្រើដោយគ្នានអថេរភ្ជាប់ជាមួយវានិងបង្ហាញពីទិន្នន័យបច្ចុប្បន្នដែលកំពុងដំណើរការ នៃ interface ។ បើសិនជាមានអថេរ ជាឈ្មោះរបស់ interface នោះ ភ្ជាប់មកជាមួយ វាបង្ហាញទិន្នន័យទាំងអស់ដែលជា របស់ interface នោះ ។

២. បង្ហាញ interface ទាំងអស់ រួមទាំង interface ដែលមិនដំណើរការ
៣. disable interface
៤. Enable an Interface
៥. ផ្ដល់ ip-address សំរាប់​ interface
ផ្ដល់ ip-address : 192.168.2.2 សំរាប់ interface eth0
ប្ដូរ Subnet mask របស់ interface eth0
ប្ដូរ Broadcast address របស់ interface eth0
ផ្ដល់ ip-address, netmask និង broadcast ក្នុងពេលជាមួយគ្នាសំរាប់ interface eht0
៦. ប្ដូរ MTU
វានិងប្ដូរ Maximum transmission unit (MTU) ទៅជា XX MTU គឺជាចំនួន octets អតិបរមា របស់ interface ដែលអាចដំណើរការ បញ្ជូនមួយដង ។ សំរាប់ ethernet ចំនួន Maximum transmission គឺ ១៥០០ ។
៧. Promiscuous mode
ជាជំហ៊ានដំបូង ពេលដែល network card ទទូល packet វានិងត្រួតពិនិត្យ packet នោះជារបស់ខ្លួន។បើសិនជា មិនមែន interface card នោះ និង drop packet នោះចោល ។ប៉ុន្ដែនៅក្នុង premiscuous mode ចំពោះ card មិន drop packet នោះទេ ។​វាជំនួស ទទួល គ្រប់ packet ទាំងអស់ ដែលឆ្លងកាត់ network card
ត្រូវមានសិទិ្ធ Superuser privilege ដើម្បី set interface នោះអោយនៅក្នុង premiscuous mode ។ ជាទូទៅ Tool ដែលសំរាប់ធ្វើការ monitor network គឺប្រើ premiscuous mode ដើម្បី capture packet ហើយ សំរាប់ analyze network traffic
ឧទាហរណ៍ខាងក្រោមនេះនិង ដាក់ interface អោយនៅក្នុង premiscuous mode
ឧទាហរណ៍បន្តទៀតនេះនិង ដាក់ interface អោយនៅក្នុង normal mode

No comments:

Post a Comment