Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

MAC and IP addresses

Status
Not open for further replies.

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,641
Helped
302
Reputation
606
Reaction score
297
Trophy points
1,363
Activity points
18,251
Hello,

Can the same IP address be shared between 2 MAC address?
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,174
Helped
1,140
Reputation
2,299
Reaction score
1,114
Trophy points
1,403
Location
Brazil
Activity points
53,285
At different networks shouldn't exists any apparent reason to impede doing that.
At the same network, unnecessary to say that cannot.
 

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,641
Helped
302
Reputation
606
Reaction score
297
Trophy points
1,363
Activity points
18,251
Consider a PC with a WiFi and Wired LAN. 2 MACs - 1 IP. Am I correct?
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,174
Helped
1,140
Reputation
2,299
Reaction score
1,114
Trophy points
1,403
Location
Brazil
Activity points
53,285
Both conections could even be routed to the same subnet, but should necessarily have different IPs.
 
  • Like
Reactions: shaiko

    shaiko

    points: 2
    Helpful Answer Positive Rating

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,285
Helped
13,997
Reputation
28,247
Reaction score
12,647
Trophy points
1,393
Location
Bochum, Germany
Activity points
275,267
Both conections could even be routed to the same subnet
That's in fact the standard situation in a wired network with attached WLAN access points. A host with both interfaces connected to the network must have two IPs. Otherwise an ARP request would be answered by both interfaces with different MAC addresses, indicating an IP address conflict.
 
  • Like
Reactions: shaiko

    shaiko

    points: 2
    Helpful Answer Positive Rating

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,273
Trophy points
1,413
Location
Southwest, USA
Activity points
62,484
Can the same IP address be shared between 2 MAC address?
The short answer:

Typically no, especially if the devices are located on the same subnetwork and the Internet Protocol (IP) is utilized.

The long answer:

The Internet Protocol (IP) makes use of the Address Resolution Protocol (ARP) to translate assigned IP addresses to the actual device's MAC address, or also commonly referred to as the hardware or physical address, to which the specific IP address is assigned. The ARP accomplishes this task by broadcasting a query (ARP request) requesting the device assigned a specific IP address respond (ARP reply) with its MAC address, which are then stored in a reference table within the ARP cache. The ARP cache has a specific Time To Live (TTL) duration which when expired, triggers the ARP cache to be flushed and aforementioned process to begin again.

Keeping in mind, IP communications are essentially established like so:

IP Address -> MAC Address ---------------> MAC Address -> IP Address

Rather than:

IP Address -------------------------> IP Address

Therefore, if the same IP address is assigned to two different Ethernet interfaces, i.e., two different MAC address, a conflict exists and typically triggers what is commonly referred to as ARP or MAC flapping, which can in turn can generate all sort of errors and timeouts at various levels of the network. For example, if such a conflict is detected on a system with a Windows OS, it will typically generate a warning or error message, both displaying it at the console level and logging it in the events logs.

Ethernet switches also make use of a similar technique, by building a MAC address to Port table, which in turn allows the switch to determine which Ethernet port to send packets destine for a particular MAC address, i.e., a specific device's Ethernet interface connected to that switch's port, as opposed to simply broadcasting those packets to all its Ethernet ports as would a Ethernet hub. The selectivity described is one of the primary differences between an Ethernet switch and an Ethernet hub.

You can examine the current ARP table on most OSs by issuing a command similar to arp -a, in a terminal or command window elevated to administrator privileges.


BigDog
 
  • Like
Reactions: shaiko

    shaiko

    points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top