Solution:
So here's how we fix it:
Remove the kernel's networking interface rules file so that it can be regenerated
# rm -f /etc/udev/rules.d/70-persistent-net.rules
Restart the VM
# reboot
Update your interface configuration file
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
Remove the macaddr entry or update it to the new macaddr for the interface (listed in this file:/etc/udev/rules. d/70-persistent-ne
1. How to obtain the MAC address of a local machine from Android:
You need to add permissions to the androidmanifest. xml file:
public String getLocalMacAddress() { WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); WifiInfo info = wifi.getConnectionInfo(); return info.getMacAddress(); }
2. How to obtain the local
This method passed the Motorola milestone test. This function is used to obtain the IP address and MAC address of the local machine. First, create a project and modify the androidmanifest. xml file to add user permissions, as shown below.
Modify/RES/layout/Main. XML as follows.
The main code is as follows (getipmac
Imports systemImports system. Diagnostics
Public class macaddressPublic Function getmac (byval IP as string) as stringDim str1 as string = string. EmptyTryDim str2 as string = string. EmptyDim info1 as processstartinfo = new processstartinfo ()Dim process1 as process = new process ()
Info1.filename = "NBTSTAT"Info1.redirectstandardinput = falseInfo1.redirectstandardoutput = trueInfo1.arguments = "-a" + IPInfo1.useshellexecute = falseProcess1 = process
In C #CodeTo call the doscommand: NBTSTAT-A 192.168.0.11
Then, extract the MAC address from the returned string.
However, you must note that this command will cache some information, which will be automatically cleared after a period of time. However, if the server administrator sets the cache on the server to a small value, the subsequent C # still calls this command, which will cause the server cache ov
Obtain the client NicMacAddress andIPAddress methods(I)
Author:CodeMessy
In progressB/SFor structured systems, we often need to obtain some client information, suchIPAndMacIn combination with identity authentication. InASP. NETMedium,To obtain the serverMacIt is easy, but you need to obtainMacThe address does take a long time. The usual practice is to callWIN32APIOr directly callNBTSTATThere are a lot of problems with this, and another method is to
IP address Private Sub button1_click (ByVal sender as System.Object, ByVal e as System.EventArgs) Handles Button1.Click
Dim Wmi as New System.Management.ManagementObjectSearcher ("SELECT * from Win32_NetworkAdapterConfiguration")
TextBox1.Text = ""
For each wmiobj as ManagementObject in Wmi.get
If CBool (Wmiobj ("ipenabled")) Then
TextBox1.Text + + IP (
Copy Code code as follows:
The code was found on the internet, but it was modified.
The reason is that your notebook has more than one network card, will appear to get you do not network or disable the network card information, the solution: Add Restrictions:
Objobject.dnsserversearchorder!=null
With this restriction, you will be able to access the networking client's network card IP address
Links: https://www.zhihu.com/question/36730567/answer/83083851Source: KnowCopyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.Multicast IP conversion to a multicast MAC address is a 32:1 mapping relationship.Multicast IP Addre
C # Implementation of the acquisition router MAC address, router extranet address. For the router MAC address, it is important to know the user name and password of the router Web management system. As for the access to the router's extranet
The MAC address of the computer is fixed, but the IP address can be set up and changed. If the terminal arbitrarily modifies the IP address, may cause the LAN IP
using the API functions provided by the Windows SDK GetAdaptersInfo () can obtain the network card name of all network cards, network card description, network card MAC address, network card IP, network card type and other information, and ip_adapter_info structure storage, Use Getifentry () to obtain the state of the network card, can effectively determine wheth
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.