can we communicate using mac address? - networking

I got a question
Can we communicate with only using mac address with a computer which is in my network?
So i said yes.
Because when we communicating using arp protocol we only use mac address.
I want to know whether my answer and justification is right or not?

You are correct. ARP does communicate on the same subnet using MAC addresses. Your answer could be improved to include that the computers have to be on the same subnet. It could be further improved to reveal that a router can be attacked so that it turns into a switch and opens its subnets on wired and wireless to reside on the same subnet as far as ARP is concerned. The attacks are ARP flooding and ARP poisoning.

Related

Are there any alternative internet addresses to IPv4 and IPv6?

When I hear/read about internet address, it is always IPv4 address or its successor IPv6 address? But as far as I know, these are not built into the internet itself. Instead, these addresses are defined and used by the IP protocol. In that case, why isn't there an alternative protocol?
If it is there, does that use a different internet address? I never heard any addresses like this!! My device's IP address is decided by my ISP. Instead if I'm using some other protocol, address for that also will be provided by my ISP?
Also, does MAC address have alternatives? For this, I think the answer is 'no'. Because, MAC address is built into the device while manufacturing. So, I want to use a different protocol, which uses a different kind of address, then entire device has to be changed! Is this correct? If not, what are the other hardware addresses like MAC?
Is it possible to have a communication network without IP? Sure.
But the internet, by definition, is a network of networks that use TCP/IP to communicate. IP is the gule that makes it possible to the point that you could argue that the IPv4 internet is a separate network than the IPv6 one.

How does a computer know other computer's IP address on a local network?

I'm currently learning about ARP and L2/L3 networking - would someone be able to help out? If I use an ethernet cable to connect my laptop (A) to another laptop (B), it could use ARP to find out B's MAC address based on B's IP address. Then, any ethernet frames could be sent and accepted by B.
But how does A know B's IP address in the first place? What if there is a switch (L2 device) in between A and B? Does this change the answer? What if there was a router in between (an L3 device)?
Usually, a switch/Router will assign an IP.
The question is unclear -
find out B's MAC address based on B's IP address.
B's MAC address is not based on B's IP.
A MAC is associated to the hardware (but somewhat assignable/cloneable) where as an IP is assigned. Either by DHCP or statically by an admin.
Effectively, you need a switch/router to make what you're defining work.
EDIT:
you can connect two computers direct, but you still need to give each a static IP address so they can find each other - this would likely not be ona network so the IP sub-network doesn't matter.
It still has very little to do with MAC.
If two PC's hand-shake, they'll see each others MAC.
It sends out a broadcast packet to the broadcast MAC address asking "who has the IP address x.x.x.x" which goes to all computers on that broadcast domain. If a computer sees that packet that owns the IP address "x.x.x.x" it will send a unicast reply back to the MAC address of the original requestor with its MAC address which will then be cached for further communication.
It doesn't know the IP unless you tell it. You say "the default gateway is 192.168.1.1" and it will start trying to talk to 192.168.1.1 etc.
If there is a router in between, all traffic to the remote device would go to the MAC of the router and your computer wouldn't be doing any ARP lookups other than that router.
Switches wouldn't matter for this, all they do is make the broadcast domain bigger. With a cable the broadcast domain is just you and the remote device. With a switch, it expands that to all devices connected to the same switch (or VLAN in the switch)
But how does A know B's IP address in the first place?
It doesn't know. At least there's no general method to find out.
The IP address of any resource needs to be supplied by "something else". You need to either provide the address yourself, resolve it from a (also provided) DNS name, read it from a file, ... Alternatively, you need to provide some kind of auto discovery between the nodes (broadcast, multicast, LLDP, ...) or provide a commonly known discovery service, registration server or similar.
What if there is a switch (L2 device) in between A and B?
That changes nothing but excludes link-level discovery (unless it's a "dumb" switch that simply forwards those frames).
What if there was a router in between (an L3 device)?
That eliminates broadcast and multicast from the picture. (Multicast could be routed but that is unlikely for discovery and I won't dive into that.)

Difference in Ethernet and Wireless IP addresses?

This is probably a pretty basic question with a fairly simple answer, but I was just wondering if anyone could clarify why there is a different IP address for my Ethernet connection and my Wireless LAN connection, rather than just one IP address for the actual machine?
It's because they are different connections. Each interface, hard wired or wired, will have its own IP address. The IP itself is assigned by your router. If you are concerned with what pool your IP is assigned from, you need to go into your setup utility and see what is allocated for wireless, and what is wired.
This same thing would happen if you had 2 ethernet cards in your machine. Each one would have it's own IP.
In other words, the IP is a unique identifier as per device, not each machine. You will have as many IPs as you have devices.

How to enable forwarding for a multicast IP on the private network

I'm trying to get Age of Empires II (AoE2) to work on my LAN. AoE2 is notorious for it's connectivity problems on modern systems, probably because it used a now deprecated network framework called DirectPlay (in DX9) and the code probably wasn't robust back in the day either.
When I host a LAN game on a computer (win7) for AoE2, Wireshark shows my computer sending a couple packets via SSDP protocol to the multicast address 239.255.255.250. This actually goes to my router (for forwarding I assume) and my router returns a packet using ICMP protocol that says "Destination unreachable (Port unreachable)". Because nothing is forwarded to the other computers on the network, they can't see the game that the host has created.
I think I need to get the application/windows7 to send the packet as something like a broadcast, or I need to get the router to broadcast packets going to that multicast address. Does anyone have thoughts or suggestions on how to do this?
My router/gateway is running DD-WRT firmware v24-sp2.
My first guess is you're using wifi, by default most systems disable multicast on wifi because it can have a detrimental effect on the time slicing that wifi uses. however for just a couple machines it shouldn't be an issue.
here's how to disable multicasting but it should point you in the right direction for enabling it: ddwrt multicast
Secondly make sure they are all in the same VLAN a VLAN is defined as a "broadcast domain" meaning machines on separate VLANs will NEVER get broadcast or multicast from other VLANs without some trickery.
Lastly make sure you've enabled multicasting between LAN ports I believe the option is "multicast forward"
Edit: Just a few things to add to the list in case others have this issue. Broadcasting doesn't exist in ipv6, also a machine running ipv6 MAY NOT see broadcasts from a machine on ipv4 and a machine on ipv4 WILL NOT see multicasts to an ipv6 multi-cast address.
Have you tried LogMeIn Hamachi?
Is not a LAN client itself but it creates a fake Online-LAN and gives you a working IP that will allow you to play with who have it.

How to discover the MAC address of machines in and over a network?

How do I discover the MAC address of machines in a network?
I need to discover the machines that are available just with only BIOS installed (no operating system present). And I need to find the MAC address of machines that are up.
I won't have physical access to the machines. This is for baremetal discovery!
You can use WinPcap to monitor the Ethernet traffic on your network in the same collision domain. So you could learn all the MAC addresses just as a switch does. You could also fake some DHCP messages in order to create some traffic. But this only works with PXE (which is actually made for this scenario) and in your own collision domain.
Since the machines probably don't have IP addresses, I don't think you have a chance to actively query them. They would need to answer packets sent to the broadcast MAC and for e.g. ICMP echo requests, they'd need to send packets with something like 0.0.0.0 as a source IP. This is common and allowed for BOOTP/DHCP, but I haven't seen anything like this implemented by BIOSes yet.
Maybe just logging all MACs that go over the wire with a tool like arpwatch would help? If the machines have PXE booting enabled, you should at least see some DHCP DISCOVERs, before they leave into eternal silence.
A just-not-as-"nice" solution as the ones suggested above (working over a network is just comfortable):
If you have physical access to the machines: Plug in a monitor and look the MAC address up in the BIOS. If for some reason the MAC address isn't listed in the BIOS, you could enable PXE. After reboot, when PXE is initializing, you're going to see the MAC address.
Try the arp command. I am not sure it will be really helpful for you as it might only work for PC with an IP address (and likely to have an OS).
If your computers are connected to a switch I guess you can have this information from it. Many "modern" switches are able to provide you with that information, should you know which PC is connected to which port on the switch.

Resources