Saturday, March 7, 2009

Cấu hình IP bằng Command Line

CẤU HÌNH IP BẰNG COMMAND LINE
I.Đặt IP và Gateway :
1).Đặt IP tĩnh.
Cú pháp : netsh interface ip add address local ip_moi SubnetMask
Ví dụ : netsh interface ip add address local 192.168.1.64 255.255.255.0

2).Đặt IP động (lấy từ DHCP Server)
Cú pháp : netsh interface ip set address Local dhcp

3).Đặt IP tĩnh cho máy có nhiều card mạng:

Cú pháp : netsh interface ip add address "tên card mạng cần cấu hình" ip_moi subnetmask
Ví dụ : netsh interface ip add address "Local Area Network 1" 192.168.1.10 255.255.255.0

4).Gateway :

Cú pháp : netsh interface ip add address local gateway=ip_modem gwmetric=number
Ví dụ : netsh interface ip add address local gateway=192.168.1.1 gwmetric=1

5).Đặt IP tĩnh và Gateway :

Cú pháp : netsh interface ip add address local ip_moi SubnetMask Gateway metric=number
Ví dụ : netsh interface ip add address local 192.168.1.100 255.255.255.0 192.168.1.1 1

II.Đặt DNS :
1).Đặt Primary DNS tĩnh.
Cú pháp : netsh interface ip add DNS local ip_isp
Ví dụ : netsh interface ip add dns local 203.113.131.1

2).Đặt Second,Third DNS tĩnh.
Cú pháp : netsh interface ip add DNS local ip_isp index=number
Ví dụ : netsh interface ip add dns local 203.113.131.2 index=2
netsh interface ip add dns local 203.131.188.1 index=3

3).Đặt DNS động.
Cú pháp : netsh interface ip set DNS local dhcp

III.Đặt WINS :
1).Đặt WINS tĩnh.
Cú pháp : netsh interface ip add WINS local ip_Wins
Ví dụ : netsh interface ip add wins local 192.168.1.100

2).Đặt WINS động.
Cú pháp : netsh interface ip set WINS local dhcp
Ví dụ : netsh interface ip set wins local dhcp

NIIT LongAn

No comments:

About Me

My photo
Định Tường, Yên Định, Vietnam
KakalosVinh45

Followers