D
D
DVoropaev2017-07-25 12:00:15
Computer networks
DVoropaev, 2017-07-25 12:00:15

What will happen. If you connect a computer to 2 networks, with the same addresses?

Let's say we have a computer with two network cards. Both are connected to networks with the address 192.168.0.0 . The addresses are the same, but the networks are physically different (two routers are connected to the Internet, the addresses of the gateways are the same)
1) How does the computer choose which gateway to send packets to the Internet through?
2) If we need to access a device with the address 192.168.0.101, and this address is active on both networks, how will the computer behave? What happens if these devices have the same MAC? One hundred will be if it does not match.
3) What will happen if we specify our computer as a gateway in all networks on all devices? Can it happen that a packet destined for one network will go to another?
4) What about arp tables? Will there be two of them on our PC or one? And how will collisions be handled (one ip, 2 devices)
5) how to make trace in this case?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Cheremisin, 2017-07-25
@DVoropaev

Nothing good will happen. Since the ARP table is the same for everyone, although it indicates the interface through which the IP-MAC determination occurred.
Now imagine that with one IP there are two cards in different segments with different MAC

? (10.13.1.12) at 6c:88:14:35:c0:ec [ether] on enp6s0
? (10.13.1.12) at 28:cf:da:00:c2:a9 [ether] on enp3s0

We are trying to send a packet to 10.13.1.12 and it will leave, but to the first one it comes across (6c:88:14:35:c0:ec). Now, additionally, our ARP table goes rotten by timeout, and is updated when a packet arrives. As soon as a packet arrives from another MAC from the second segment, it will immediately become the first in the table. It follows from this that the MAC addresses for one IP will change completely arbitrarily, then one will work, then the other. Packets will disappear and everything will be buggy and slow down.
It is technically possible to statically specify a MAC-IP-Interface binding, but in this case there must be at least different IPs. And if we have different IPs, then why not make a virtual switch with one IP out of two interfaces?

A
Alexander, 2017-07-25
@NeiroNx

Packets will go to the interface with the lowest metric.

Y
Yaroslav, 2017-07-25
@DeD_61rus

It's easier to make two different sub-segments of the network on higher-standing devices and the problem will disappear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question