Wednesday, 2024-05-15, 1:50 AM
ဟက္ကာဖိုရမ္
Main Registration Login
Welcome, Guest · RSS
[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
Forum » NETWORKING » Networking Tutorial » TCP/IP ကို Command Prompt မွ Configure လုပ္ျခင္း
TCP/IP ကို Command Prompt မွ Configure လုပ္ျခင္း
ဟတ္ကာDate: Wednesday, 2009-11-18, 7:44 PM | Message # 1
Major
Group: Administrators
Messages: 91
Reputation: 0
Status: Offline
TCP/IP ကို Command Prompt မွ Configure လုပ္ျခင္း
TCP/IP setting မ်ားျဖစ္ေသာ IP address, Subnet Mask, Default Gateway, DNS နဲ႕ WINS address မ်ားအစရိွသည္တို႕ကို Netsh.exe ကိုအသုံးျပဳၿပီးေတာ့ျပင္ဆင္ႏိုင္ပါတယ္။
Netsh.exe ဟာ command-line script utility ျဖစ္ၿပီးေနာက္သူက local (သို႕) remote ရဲ႕ network configuration ကိုလွမ္းၿပီးေတာ့ၾကည္႕ႏိုင္သလို ျပင္ဆင္ႏိုင္ပါတယ္။ script ေရးၿပီးေတာ့ server ရဲ႕ network configure ကိုျပင္ဆင္လို႕လည္းရတယ္။
Netsh.exe ကို Windows 2000 ေနာက္ပိုင္းသုံးလို႕ရပါတယ္။

Netsh ကိုသုံးၿပီးေတာ့ ေအာက္ပါမ်ားကိုလုပ္ႏိုင္ပါတယ္။

* Configure interfaces
* Configure routing protocols
* Configure filters
* Configure routes
* Configure remote access behavior for Windows-based remote access routers that are running the Routing and Remote Access Server (RRAS) Service
* Display the configuration of a currently running router on any computer
* Use the scripting feature to run a collection of commands in batch mode against a specified router.

Netsh ကိုသုံးၿပီးေတာ့ TCP/IP setting ကိုၾကည္႕ခ်င္တယ္ဆိုရင္။ေအာက္ပါ command ကို command prompt တြင္ရိုက္ထည္႕ပါ။
netsh interface ip show config

Netsh ကိုသုံးၿပီးေတာ့ IP address ၊ TCP/IP နဲ႕ ပတ္သတ္ေသာ အျခားေသာ setting မ်ားကိုအလြယ္တကူျပင္ႏိုင္ပါတယ္။
ဥပမာ
ေအာက္ေဖာ္ျပပါ command ဟာ Local Area Connection လို႕နာမည္ေပးထားတဲ့ Static IP address ျဖစ္တဲ့ 192.168.0.100 နဲ႕ subnet mask 255.255.255.0 နဲ႕ default gateway ျဖစ္တဲ့ 192.168.0.1 တို႕အျဖစ္ျပင္မွာပါ။
netsh interface ip set address name=”Local Area Connection” static 192.168.0.100 255.255.255.0 192.168.0.1 1

ေနရာႏွစ္ေနရာအတြက္ IP Setting ႏွစ္ခုကိုအလြယ္တကူအေျပာင္းအလဲလုပ္ဖို႕လိုအပ္လာခဲ့ရင္ ဥပမာအေနနဲ႕ ရုံးမွာသုံးဖို႕ IP တစ္ခုနဲ႕ အိမ္မွာသုံးဖို႕ IP တစ္ခုႏွစ္ေနရာအတြက္အလြယ္တကူေျပာင္းလဲလို႕ရပါတယ္။ ႏွစ္ခုတည္းမကဘူးကိုယ္ႀကိဳသေလာက္ေျပာင္းလဲႏိုင္ပါတယ္။ ကိုယ့္မွာ IP ေတြ အမ်ားႀကီးေျပာင္းလဲဖို႕လိုလာၿပီဆိုရင္ေပါ့…….
netsh ဟာ network configuration မ်ားကို သိမ္းဆည္းႏိုင္ သလို ျပန္လည္ထည္႕သြင္းႏိုင္ပါတယ္။

ပထမဆုံး ေနရာ ၁ အတြက္ လိုအပ္တဲ့ IP address, Subnet Mask, Default Gateway, DNS နဲ႕ WINS address ကိုထည္႕သြင္းပါ။
ထည္႕သြင္းၿပီးရင္တဲ့ IP setting ကို text file အေနျဖင့္သိမ္းဆည္းဖို႕ေအာက္ပါ command ကို command prompt တြင္ရိုက္ထည္႕ပါ။
netsh -c interface dump > c:’location1.txt

ဒုတိယေနရာ ၂ အတြက္လည္းအေပၚကအတိုင္းလိုအပ္တဲ့ setting မ်ားကိုျဖည္႕၍ေအာက္ပါ command ကို command prompt တြင္ရိုက္ထည္႕ပါ။
netsh -c interface dump > c:’location2.txt

အခုဆိုရင္ c:\ ေအာက္မွာ location1.txt နဲ႕ location2.txt ဆိုတဲ့ဖိုင္ႏွစ္ဖိုင္ကိုေတြ႕မွာပါ။ ေနာက္ထပ္ေနရာမ်ား IP မ်ားရိွေသးခဲ့ရင္အေပၚကအတိုင္း IP setting ေတြကို သိမ္းဆည္းလို႕ရပါတယ္။

ၿပီးရင္ေတာ့ ကိုယ္ကေနရာ ၁ ေရာက္လို႕ ေနရာ ၁ ရဲ႕ IP setting ကိုသုံးဖို႕လိုအပ္လာၿပီဆိုရင္ေအာက္ပါအတိုင္း command prompt မွေန၍ ေအာက္က command ကိုရိုက္ထည္႕ၿပီး ေနရာ ၁ ရဲ႕ IP setting ကို ထည္႕သြင္းပါ
netsh -f c:’location1.txt

ေနရာ ၂ ကိုေရာက္ရင္ေတာ့ေအာက္ပါအတိုင္းရိုက္ထည္႕ပါ။
netsh -f c:’location2.txt

ေနရာ၃၊ ၄၊ ၅ ရိွခဲ့ရင္လည္းအဲ့ဒီ့အတိုင္းပဲေပါ့……

-f ဆိုတဲ့ ေနရာမွာ exec ဆိုတာကိုလဲေျပာင္းလဲသုံးစြဲလို႕ရပါတယ္
netsh exec c:’location2.txt

DHCP ဆာဗာမွ IP address ကို အလိုအေလွ်ာက္ရရိွတယ္ဆိုရင္ေအာက္ပါအတိုင္း NIC ကို netsh သုံးၿပီးေတာ့ ျပင္ဆင္လို႕ရပါတယ္။
netsh interface ip set address “Local Area Connection” dhcp

DNS နဲ႕ WINS address ကိုေကာျပင္ခ်င္ပါသလား…………ဒါကေတာ့ DNS ကိုဥပမာအေနနဲ႕ျပင္ျပထားတာပါ……
netsh interface ip set dns “Local Area Connection” static 192.168.0.200

ဒါကေတာ့ WINS ကို ဥပမာအေနနဲ႕ျပင္ျပထားတာပါ………..
netsh interface ip set wins “Local Area Connection” static 192.168.0.200

DNS settings ကို Dynamically ရခ်င္တယ္ဆိုရင္ေတာ့
netsh interface ip set dns “Local Area Connection” dhcp
လို႕ရိုက္ထည္႕ရပါမယ္……….

 
Forum » NETWORKING » Networking Tutorial » TCP/IP ကို Command Prompt မွ Configure လုပ္ျခင္း
  • Page 1 of 1
  • 1
Search:

Powered by uCoz