![]() ![]() link/loopback: The media access control (MAC) address of the interface.qlen 1000: The maximum length of the transmission queue.The default is to place them all in a group called "default." group default: Interfaces can be grouped logically.state UNKNOWN: This can be DOWN (the network interface is not operational), UNKNOWN (the network interface is operational but nothing is connected), or UP (the network is operational and there is a connection).The noqueue discipline means "send instantly, don't queue." This is the default qdisc discipline for virtual devices, such as the loopback address. There are different queuing techniques called disciplines. It schedules the transmission of packets. qdisc noqueue: A qdisc is a queuing mechanism.This is the size of the largest chunk of data this interface can transmit. ![]() The physical networking layer (layer one) is also up. lo: The network interface name as a string.Let's break down all the information we received: The second is the actual (external) IP address the computer has on the local area network (LAN). The first IP address is the (internal) loopback address used to communicate within the computer. The ip command tries to be helpful and provides a bunch of information about the interface, too. IP addresses are associated with network interface controllers (NICs). Well, you're out of luck unless you can have the client volunteer that information and transmit via other means.We see two IP addresses, along with a lot of other information. ![]() #look for the output line describing our IP address #run the external command, break output into lines So, if you are building some kind of LAN based system and your clients are on the same ethernet segment, then you could get the MAC address by parsing the output of arp -n (linux) or arp -a (windows).Įdit: you ask in comments how to get the output of an external command - one way is to use backticks, e.g. The client MAC address will not be available to you except in one special circumstance: if the client is on the same ethernet segment as the server. You can get the client IP from $_SERVER Client MAC address Server MAC addressįor the MAC address, you could parse the output of netstat -ie in Linux, or ipconfig /all in Windows. You can get the server IP address from $_SERVER. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |