អាក្លូ អាក្លូ Author
Title: មេរៀនទី២: Command បញ្ជា ifconfig
Author: អាក្លូ
Rating 5 of 5 Des:
ពាក្យបញ្ជា ifconfig ប្រើដើម្បី configure network interfaceហើយវាក៍ជាជំហ៊រ នៃ interface configurator នោះដែរ ។ ពាក្យបញ្ជានេះ ត្រូវបានគេប្រើប្រា...
ពាក្យបញ្ជា ifconfig ប្រើដើម្បី configure network interfaceហើយវាក៍ជាជំហ៊រ នៃ interface configurator នោះដែរ ។ ពាក្យបញ្ជានេះ ត្រូវបានគេប្រើប្រាស់យ៉ាងទូលំទូលាយ ក្នុងការធ្វើអោយ network interface ដំណើរការ និងបញ្ឈប់ដំណើរការ ។
នៅក្នុងអត្ថបទនេះ យើងនិងបង្ហាញ ៧ ចំនុច នៃការប្រើប្រាស់ របស់ពាក្យបញ្ជា ifconfig ៖a
បង្ហាញ network setting នៃ Ethernet Adapter
ពាក្យ ifconfig ពេលដែលប្រើដោយគ្នានអថេរភ្ជាប់ជាមួយវានិងបង្ហាញពីទិន្នន័យបច្ចុប្បន្នដែលកំពុងដំណើរការ នៃ interface ។ បើសិនជាមានអថេរ ជាឈ្មោះរបស់ interface នោះ ភ្ជាប់មកជាមួយ វាបង្ហាញទិន្នន័យ ទាំងអស់ដែលជា របស់ interface នោះ ។



# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:2D:32:3E:39:3B
inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::21d:92ff:fede:499b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:977839669 errors:0 dropped:1990 overruns:0 frame:0
TX packets:1116825094 errors:8 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2694625909 (2.5 GiB) TX bytes:4106931617 (3.8 GiB)
Interrupt:185 Base address:0xdc00
បង្ហាញ interface ទាំងអស់ រួមទាំង interface ដែលមិនដំណើរការ
# ifconfig -a
disable interface
# ifconfig eth0 down
Enable an Interface
# ifconfig eth0 up
ផ្ដល់ ip-address សំរាប់  interface
ផ្ដល់ ip-address : 192.168.2.2 សំរាប់ interface eth0 ៖
# ifconfig eth0 192.168.2.2
ប្ដូរ Subnet mask របស់ interface eth0 ៖
# ifconfig eth0 netmask 255.255.255.0
ប្ដូរ Broadcast address របស់ interface eth0 ៖
# ifconfig eth0 broadcast 192.168.2.255
ផ្ដល់ ip-address, netmask និង broadcast ក្នុងពេលជាមួយគ្នាសំរាប់ interface eht0 ៖
# ifconfig eth0 192.168.2.2 netmask 255.255.255.0 broadcast 192.168.2.255
ប្ដូរ MTU
វានិងប្ដូរ Maximum transmission unit (MTU) ទៅជា XX ។ MTU គឺជាចំនួន octets អតិបរមា របស់ interface ដែលអាចដំណើរការ បញ្ជូនមួយដង ។ សំរាប់ ethernet ចំនួន Maximum transmission គឺ ១៥០០ ។
# ifconfig eth0 mtu XX
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 ៖
# ifconfig eth0 promisc
ឧទាហរណ៍បន្តទៀតនេះនិង ដាក់ interface អោយនៅក្នុង normal mode ៖
# ifconfig eth0 -promisc

About Author

Advertisement

Post a Comment

 
Top