필터 지우기
필터 지우기

get computer IP problem

조회 수: 46 (최근 30일)
Yu Li
Yu Li 2018년 11월 6일
댓글: Stephan 2018년 11월 7일
I use command [status,result] = system('arp -a'), to get the IP address of my computer. there are lots of IP in the variable 'result', such as dynamic, staticstic, etc.
meanwhile, the result are also found to be different at different day. for example, using the same command, the variable 'result' is different between yesterday and today.
just want know what paramters in the 'result' is fixed in the machine, which will not changed with time?
Thanks!
Yu
  댓글 수: 2
Steven Lord
Steven Lord 2018년 11월 7일
What do you plan to do with this information? If we know your ultimate goal, we may be able to offer a way to achieve that goal without having to parse text returned by a system command.
Stephan
Stephan 2018년 11월 7일

댓글을 달려면 로그인하십시오.

채택된 답변

Stephan
Stephan 2018년 11월 6일
편집: Stephan 2018년 11월 6일
Hi,
try:
[~, result] = system('ipconfig')
result:
Windows-IP-Konfiguration
Ethernet-Adapter LAN-Verbindung:
Verbindungsspezifisches DNS-Suffix: **.*********.de
IPv4-Adresse . . . . . . . . . . : **.***.**.**
Subnetzmaske . . . . . . . . . . : 255.255.255.0
Standardgateway . . . . . . . . . : **.***.**.*
for more detailed information use:
[~, result] = system('ipconfig -all')
The arp gives the adress Resolution protocoll - not your IP adress.
  댓글 수: 3
Walter Roberson
Walter Roberson 2018년 11월 7일
IPv4 address is not likely to be unique for your machine.
Yu Li
Yu Li 2018년 11월 7일
thank you

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by