Skip to contentSkip to conversation

arp table - same mac address shows two ip addresses

DISCUSSION Leroy Tennison 4 participants 17 messages Oct 16, 2018 – Oct 21, 2018

lore
Share & tools
lore
#0 lore raw

KDEuMi4zLjQgaXMgYW4gYXJiaXRyYXJ5IHJlcGxhY2VtZW50IGJ1dCBkb2Vzbid0IGFmZmVjdCB0 aGUgYmFzaWMgaXNzdWUpICBXaGF0IGlzIGNhdXNpbmcgdGhpcz8gIFRoZSBzeXN0ZW1zIGluIHF1 ZXN0aW9uIGhhdmUgb25seSBvbmUgaW50ZXJmYWNlIHBlciBzdWJuZXQgYnV0IGJvdGggc3lzdGVt cyBoYXZlIG11bHRpcGxlIE5JQ3Mgd2hpY2ggYXJlIG9uIHRoZSBzYW1lIHN1Ym5ldHMuICBXaGF0 IEkgbWVhbiBpcyB0aGlzOiAgb24gYm90aCBzeXN0ZW1zIE5JQzEgY29ubmVjdHMgdG8gc3VibmV0 IDEsIE5JQzIgdG8gc3VibmV0IDIgYW5kIHNvIG9uIGZvciBmaXZlIE5JQ3MgYW5kIGRpZmZlcmVu dCBzdWJuZXRzLiAgVGhlIHN1Ym5ldHMgZG8gaGF2ZSBkaWZmZXJlbnQgSVAgcmFuZ2VzIChubyBv dmVybGFwKS4gIDEwLjIyMi4xMDkuMyBkb2VzIGhhcHBlbiB0byBiZSBvbiB0aGUgc2FtZSBzeXN0 ZW0gYXMgMS4yLjMuNCBidXQgaXQgZG9lc24ndCBoYXZlIHRoZSBzYW1lIG1hYyBhZGRyZXNzIGFu ZCBpdCBpcyBhIHBoeXNpY2FsIGludGVyZmFjZS4NCg0KQWRkcmVzcyAgICAgICAgICAgICBIV1R5 cGUgICBIV0FkZHJlc3MgICAgICAgICAgIEZsYWdzICBNYXNrICAgSWZhY2UNCjEwLjIyMi4xMDku MyAgICAgZXRoZXIgICAgICAgICAgYmM6MzA6NWI6YTY6YzQ6YmYgIEMgICAgICAgICAgICAgICAg ICAgIGV0aDkNCi4NCi4NCi4NCjEuMi4zLjQgIC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lbWluYXRlIHRoaXMgbWVzc2FnZSBvciBh bnkgcGFydCBvZiBpdC4gSWYgeW91DQpoYXZlIHJlY2VpdmVkIHRoaXMgbWVzc2FnZSBpbiBlcnJv ciwgcGxlYXNlIG5vdGlmeSB0aGUgc2VuZGVyDQppbW1lZGlhdGVseSBieSBlLW1haWwgYW5kIGRl bGV0ZSBhbGwgY29waWVzIG9mIHRoZQ0KbWVzc2FnZS4NCg0K

#1 lore raw
Quoted 1 line · Leroy Tennison

(1.2.3.4 is an arbitrary replacement but doesn't affect the basic issue) What is causing this? The systems in question have only one interface per subnet but both systems have multiple NICs which are on the same subnets. What I mean is this: on both systems NIC1 connects to subnet 1, NIC2 to subnet 2 and so on for five NICs and different subnets. The subnets do have different IP ranges (no overlap). 10.222.109.3 does happen to be on the same system as 1.2.3.4 but it doesn't have the same mac address and it is a physical interface.

I can't tell for sure. Are the NICs connected to the same L2 network segment / broadcast domain?

This almost sounds as if NIC1 is responding to ARP requests for NIC{2..5}.

Quoted 3 lines
Address        HWType   HWAddress           Flags   Mask   Iface
10.222.109.3   ether    bc:30:5b:a6:c4:bf   C              eth9
1.2.3.4        ether    bc:30:5b:a6:c4:bf   C              eth9

Unfortunately this doesn't clearly indicate if the NICs are using the same L2 network segment / broadcast domain or not.

Signature · 2 lines
Grant. . . .
unix || die
#2 lore raw
In reply to Leroy Tennison

Hi,

Quoted 11 lines · Grant Taylor
Quoted 9 lines · Leroy Tennison

(1.2.3.4 is an arbitrary replacement but doesn't affect the basic issue) What is causing this? The systems in question have only one interface per subnet but both systems have multiple NICs which are on the same subnets. What I mean is this: on both systems NIC1 connects to subnet 1, NIC2 to subnet 2 and so on for five NICs and different subnets. The subnets do have different IP ranges (no overlap). 10.222.109.3 does happen to be on the same system as 1.2.3.4 but it doesn't have the same mac address and it is a physical interface.

Quoted 4 lines

I can't tell for sure. Are the NICs connected to the same L2 network segment / broadcast domain?

This almost sounds as if NIC1 is responding to ARP requests for NIC{2..5}.

Linux may do that...

Quoted 6 lines
Quoted 3 lines
Address        HWType   HWAddress           Flags   Mask   Iface
10.222.109.3   ether    bc:30:5b:a6:c4:bf   C              eth9
1.2.3.4        ether    bc:30:5b:a6:c4:bf   C              eth9

Unfortunately this doesn't clearly indicate if the NICs are using the same L2 network segment / broadcast domain or not.

...especially if the NICs are in different broadcast domains (VLANs).

I am not saying that is the case here, just that it might be the case. That would be an instance of the "weak host model" problem (see RFC 1122, section 3.3.4.2, "Weak ES Model"). The problem is primarily that some expectations about network separation are not fulfilled by the end-system.

Thanks,
Erik

Signature · 3 lines
It's impossible to learn very much by simply sitting in a lecture,
or even by simply doing problems that are assigned.
                        -- Richard P. Feynman
#3 lore raw
In reply to Leroy Tennison
Quoted 3 lines · Erik Auerswald

Linux may do that...

...especially if the NICs are in different broadcast domains (VLANs).

I was thinking that it would happen if the NICs were in the /same/ broadcast domain. I.e. NIC1 heard saw an ARP for NIC3's IP before NIC3 saw it. Thus NIC1 and NIC3 (and likely the others) were in the same broadcast domain.

I can't think of another reason why NICs would see ARP requests for IPs bound to other NICs if they weren't in a common broadcast domain. - Sure there are other things, but that would usually involve issues on the sending side or magic smoke in the middle.

Quoted 1 line

I am not saying that is the case here, just that it might be the case.

If the NICs are connected to a common broadcast domain, then I think chances are good that it's the "weak host model" problem.

Quoted 1 line

That would be an instance of the "weak host model" problem (see RFC 1122, section 3.3.4.2, "Weak ES Model"). The problem is primarily that some expectations about network separation are not fulfilled by the end-system.

(I need to brush up on RFC 1122 § 3.3.4.2. Thank you for the reference point.)

I don't know that it's that end systems don't / can't fulfill the network separation. I think that Linux can be configured to (better) fulfill it via Kernel tunables and / or a combination of ARPTables / IPTables.

I recently read that IPs are supposed to belong to hosts, not individual NICs there on, in TCP/IP Illustrated - Volume 1 - Second Edition. This jives with what I've commonly experienced.

I think part of the problem is a disconnect in what people expect and what TCP/IP specifications state.

Signature · 2 lines
Grant. . . .
unix || die
#4 lore raw
In reply to Leroy Tennison

Hi,

Quoted 10 lines · Grant Taylor
Quoted 3 lines · Erik Auerswald

Linux may do that...

...especially if the NICs are in different broadcast domains (VLANs).

I was thinking that it would happen if the NICs were in the /same/ broadcast domain. I.e. NIC1 heard saw an ARP for NIC3's IP before NIC3 saw it. Thus NIC1 and NIC3 (and likely the others) were in the same broadcast domain.

Quoted 4 lines

I can't think of another reason why NICs would see ARP requests for IPs bound to other NICs if they weren't in a common broadcast domain. - Sure there are other things, but that would usually involve issues on the sending side or magic smoke in the middle.

One example I experienced are misconfigured end-systems using IP addresses from network A in the broadcast domain of network B. The gateway for both networks was based on the Linux kernel. Misconfigured hosts were able to reach their gateway without problems (the ARP request was answered from the "wrong" interface, any interface accepts any IP destined for the host).

Quoted 10 lines
Quoted 1 line

I am not saying that is the case here, just that it might be the case.

If the NICs are connected to a common broadcast domain, then I think chances are good that it's the "weak host model" problem.

Quoted 4 lines

That would be an instance of the "weak host model" problem (see RFC 1122, section 3.3.4.2, "Weak ES Model"). The problem is primarily that some expectations about network separation are not fulfilled by the end-system.

Quoted 7 lines

(I need to brush up on RFC 1122 § 3.3.4.2. Thank you for the reference point.)

I don't know that it's that end systems don't / can't fulfill the network separation. I think that Linux can be configured to (better) fulfill it via Kernel tunables and / or a combination of ARPTables / IPTables.

AFAIK one can configure ARP to separate more, but not competely. Using bridges is said to allow for more separation, but I have not yet tested this.

Quoted 3 lines

I recently read that IPs are supposed to belong to hosts, not individual NICs there on, in TCP/IP Illustrated - Volume 1 - Second Edition. This jives with what I've commonly experienced.

For version 4, but this changes with version 6. ;-)

Quoted 2 lines

I think part of the problem is a disconnect in what people expect and what TCP/IP specifications state.

I'd say the same. But part of the problem is that the weak host model is a bit more surprising than the strong host model. In my experience this is especially true when a weak host is used as a router.

Thanks,
Erik

Signature · 4 lines
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.
                        -- Brian W. Kernighan
#5 lore raw
In reply to Leroy Tennison

RXJpayBBdWVyc3dhbGQgd3JvdGUgIk9uZSBleG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b2RlIGFzIGNsZXZlcmx5IGFzIHBvc3NpYmxlLCB5b3UgYXJlLA0K YnkgZGVmaW5pdGlvbiwgbm90IHNtYXJ0IGVub3VnaCB0byBkZWJ1ZyBpdC4NCiAgICAgICAgICAg ICAgICAgICAgICAgIC0tIEJyaWFuIFcuIEtlcm5pZ2hhbg0K

#6 lore raw
In reply to Leroy Tennison

Hi Leroy,

Quoted 1 line · Leroy Tennison

Erik Auerswald wrote "One example I experienced are misconfigured end-systems ..." - Could you explain this a little more thoroughly? Are you saying that, given a system with 172.16.30.1 address on network A and 10.20.30.1 address on network B that an application is sending to the A network using the 10... address rather than the 172... address? If so was the application configured to use a particular IP address?

What I meant was a host configured for network A but connected to network B:

ES 10.20.30.47/24 <-----> GW Iface 172.16.30.1/24

The gateway (GW) did have the IP address 10.20.30.1/24 on another interface, and the end-system (ES) used that IP address as its default gateway. ES and GW could ping each other. The GW was a PC with Linux kernel and GNU userland. Thus the "application" on the multi-NIC PC was Linux.

Quoted 1 line

You also wrote "The gateway for both networks was based on the Linux kernel." Could you be a little more specific? Were multiple routing tables being used along with 'ip rule' entries or was it a "nexthop with weights" situation or something else?

Just one routing table. A PC with several NICs, GNU/Linux, and ipforwarding acting as a "router".

Quoted 1 line

I'm just trying to better understand the situations you encountered so I can recognize them in the future.

In the above mentioned situation, of which I have forgotten most of the details, end-systems that should no longer have been able to reach their old Linux-based default gateway, because IP addresses and VLANs were changed, but the end-systems used the pre-change configuration, still had full network connectivity.

When using Linux on a PC with several NICs, expect the unexpected. ;)

Thanks,
Erik

Signature · 2 lines
Do things that have never been done before.
                        -- Russell Kirsch
#7 lore raw
In reply to Leroy Tennison
Quoted 1 line · Erik Auerswald

Hi,

Hi,

Quoted 1 line

One example I experienced are misconfigured end-systems using IP addresses from network A in the broadcast domain of network B. The gateway for both networks was based on the Linux kernel. Misconfigured hosts were able to reach their gateway without problems (the ARP request was answered from the "wrong" interface, any interface accepts any IP destined for the host).

I feel like there are details pertinent to the conversation that I'm not privy to. Including shared or separate broadcast domains, routing, IP addressing scheme, etc. Most of which would need to be known from both ends of the communications to be able to even speculate.

Quoted 1 line

AFAIK one can configure ARP to separate more, but not competely. Using bridges is said to allow for more separation, but I have not yet tested this.

I'm going to be doing some testing in this area, partially around this conversation and other very similar conversations.

Quoted 1 line

For version 4, but this changes with version 6. ;-)

Would you please elaborate?

I've not run across anything indicating such. I've not gotten far enough in the reading that I'm doing to delve this deep into IPv6 yet.

Quoted 1 line

I'd say the same. But part of the problem is that the weak host model is a bit more surprising than the strong host model. In my experience this is especially true when a weak host is used as a router.

I assume that the weak host (end system) model is easier to code for, thus more likely to be used on single homed hosts (end systems) a they are the vast majority compared to multi-homed hosts (E.S.).

Quoted 1 line

Thanks,

Thank you! Good discussion that is banging some of my brain cells together.

Signature · 2 lines
Grant. . . .
unix || die
#8 lore raw
In reply to Leroy Tennison
Quoted 9 lines · Erik Auerswald

What I meant was a host configured for network A but connected to network B:

ES 10.20.30.47/24 <-----> GW Iface 172.16.30.1/24

The gateway (GW) did have the IP address 10.20.30.1/24 on another interface, and the end-system (ES) used that IP address as its default gateway. ES and GW could ping each other. The GW was a PC with Linux kernel and GNU userland. Thus the "application" on the multi-NIC PC was Linux.

Just one routing table. A PC with several NICs, GNU/Linux, and ipforwarding acting as a "router".

In the above mentioned situation, of which I have forgotten most of the details, end-systems that should no longer have been able to reach their old Linux-based default gateway, because IP addresses and VLANs were changed, but the end-systems used the pre-change configuration, still had full network connectivity.

I'll admit that such is a non-intuitive behavior.

However I've learned that such is the expected behavior of a "weak end system", which Linux does by default. I say "by default" because I think it's possible to change Linux's behavior.

Quoted 1 line

When using Linux on a PC with several NICs, expect the unexpected. ;)

Or, change the default so that you get different results.

Signature · 2 lines
Grant. . . .
unix || die
#9 lore raw
In reply to Leroy Tennison

Hi,

Quoted 9 lines · Grant Taylor
Quoted 6 lines · Erik Auerswald

One example I experienced are misconfigured end-systems using IP addresses from network A in the broadcast domain of network B. The gateway for both networks was based on the Linux kernel. Misconfigured hosts were able to reach their gateway without problems (the ARP request was answered from the "wrong" interface, any interface accepts any IP destined for the host).

Quoted 5 lines

I feel like there are details pertinent to the conversation that I'm not privy to. Including shared or separate broadcast domains, routing, IP addressing scheme, etc. Most of which would need to be known from both ends of the communications to be able to even speculate.

The original question was a bit scarce on details, thus I substituted pertinent experience of my own. This is not necessarily easy to follow. ;)

Quoted 6 lines
Quoted 3 lines

AFAIK one can configure ARP to separate more, but not competely. Using bridges is said to allow for more separation, but I have not yet tested this.

I'm going to be doing some testing in this area, partially around this conversation and other very similar conversations.

Please tell us about your results.

Quoted 3 lines
Quoted 1 line

For version 4, but this changes with version 6. ;-)

Would you please elaborate?

In IPv6, addresses are assigned to interfaces. This is obvious with link-local addresses, but true for differently scoped addresses as well. I am sorry, but I do not know the RFC off the top of my head.

OK, had to search...

RFC 8200, Internet Protocol, Version 6 (IPv6) Specification, section 2:

"interface a node's attachment to a link."
"address an IPv6-layer identifier for an interface or a set of
interfaces."

RFC 4291, IP Version 6 Addressing Architecture, section 2.1:

"IPv6 addresses of all types are assigned to interfaces, not nodes."

Quoted 3 lines

I've not run across anything indicating such. I've not gotten far enough in the reading that I'm doing to delve this deep into IPv6 yet.

IPv6 is an interesting rabbit hole to dive into. ;)

Quoted 8 lines
Quoted 4 lines

I'd say the same. But part of the problem is that the weak host model is a bit more surprising than the strong host model. In my experience this is especially true when a weak host is used as a router.

I assume that the weak host (end system) model is easier to code for, thus more likely to be used on single homed hosts (end systems) a they are the vast majority compared to multi-homed hosts (E.S.).

They might even be a bit simpler to use without a 100% correct networking configuration. ;)

Quoted 1 line

Thank you! Good discussion that is banging some of my brain cells together.

Likewise. :)

Thanks,
Erik

Signature · 2 lines
I think of math as a splendid way to learn to think straight.
                        -- Bjarne Stroustrup
#10 lore raw
In reply to Leroy Tennison
Quoted 1 line · Erik Auerswald

Hi,

Hi,

Quoted 1 line

The original question was a bit scarce on details, thus I substituted pertinent experience of my own. This is not necessarily easy to follow. ;)

Fair enough.

Quoted 1 line

Please tell us about your results.

Will do.

My intention is to create the following configuration using network namespaces:

(A)---1---(B)---2---(C)

Where A, B, and C are the test network namespaces and 1 and 2 are vEth pairs between them.

I was originally going to start with one test, see if A could communicate with B via 2.B.

After your earlier email about hosts moving from one physical network to another, I'm going to see if 1 can be configured with 2.A and communicate with 2.B via the 1 network.

I'll share the commands I use to create the lab topology and subsequent commands to test.

Quoted 1 line

In IPv6, addresses are assigned to interfaces. This is obvious with link-local addresses, but true for differently scoped addresses as well. I am sorry, but I do not know the RFC off the top of my head.

Fair enough.

Quoted 1 line

OK, had to search...

;-)

Thank you.

Quoted 9 lines

RFC 8200, Internet Protocol, Version 6 (IPv6) Specification, section 2:

"interface a node's attachment to a link."
"address an IPv6-layer identifier for an interface or a set of
interfaces."

RFC 4291, IP Version 6 Addressing Architecture, section 2.1:

"IPv6 addresses of all types are assigned to interfaces, not nodes."

That is quite succinct. I'm glad that's codified.

Quoted 1 line

IPv6 is an interesting rabbit hole to dive into. ;)

Yep.

I've done a fair bit with IPv6 at a shallow level. I'm now going to be reading more and getting into a deeper level.

Quoted 1 line

They might even be a bit simpler to use without a 100% correct networking configuration. ;)

I think that a single homed machine with a single IPv4 address (ignoring loopback) is quite simple. Even if it has a routing table with more than a default gateway.

Quoted 1 line

Likewise. :)

:-)

Signature · 2 lines
Grant. . . .
unix || die
#11 lore raw
In reply to Leroy Tennison
Quoted 7 lines · Grant Taylor

My intention is to create the following configuration using network namespaces:

(A)---1---(B)---2---(C)

Where A, B, and C are the test network namespaces and 1 and 2 are vEth pairs between them.

I was originally going to start with one test, see if A could communicate with B via 2.B.

I can get ARP to respond. But I've not gotten ICMP to function yet. It looks like it may be, funny enough, an ARP issue. B has two ARP entries for A's IP, one from the what it learned from A's ARP request and an incomplete entry. I've not done any more investigation to see if I can make this work. Yet. }:-)

Quoted 1 line

After your earlier email about hosts moving from one physical network to another, I'm going to see if 1 can be configured with 2.A and communicate with 2.B via the 1 network.

I think I'm going to need to reconfigure the network a bit to have B function as a router with A being on the wrong interface. Probably something like this:

(A)---1---(B)---2---(C)

           |
           3
           |
          (D)

Such that A looks like it moved from the 3 network to the 1 network. With C being something on the other side of "the router", B.

Quoted 1 line

I'll share the commands I use to create the lab topology and subsequent commands to test.

Here are the commands that I used:

ip netns add a
ip netns add b
ip netns add c
ip link add name a type veth peer name b
ip link set dev a netns b
ip link set dev b netns a
ip link add name b type veth peer name c
ip link set dev b netns c
ip link set dev c netns b

ip netns exec a ip link set dev b up
ip netns exec b ip link set dev a up
ip netns exec b ip link set dev c up
ip netns exec c ip link set dev b up
ip netns exec a ip addr add 192.0.2.1/24 dev b
ip netns exec b ip addr add 192.0.2.2/24 dev a
ip netns exec b ip addr add 198.51.100.2/24 dev c
ip netns exec c ip addr add 198.51.100.3/24 dev b
ip netns exec a ip addr add 198.51.100.1/24 dev b

Note: These commands are a reconstruction for others, I actually have aliases and scripts that do much of this behind the scenes for me. Let me know if you can't reproduce something.

Initially, B wouldn't respond to ARP requests from A for 198.51.100.2 when I tried to ping it. I found that I had to reset rp_filter to it's default value of 0. — I keep rp_filter set to 1 on my machines.

Once I had the network namespace TCP/IP stacks set to defaults, B did in fact respond to A's ARP request for an IP on the 2nd network.

I've not done any testing beyond that yet.

Signature · 2 lines
Grant. . . .
unix || die
#12 lore raw
In reply to Leroy Tennison
Quoted 1 line · Grant Taylor

I can get ARP to respond.  But I've not gotten ICMP to function yet.  It looks like it may be, funny enough, an ARP issue.  B has two ARP entries for A's IP, one from the what it learned from A's ARP request and an incomplete entry.  I've not done any more investigation to see if I can make this work.  Yet.  }:-)

Okay. I've done some more investigating and I think it is more of a routing issue than /just/ an ARP issue. In short, the kernel doesn't quite know what to do with the traffic destined to one subnet with an ARP entry for a different interface than the subnet is on.

Quoted 9 lines

I think I'm going to need to reconfigure the network a bit to have B function as a router with A being on the wrong interface.  Probably something like this:

(A)---1---(B)---2---(C)
           |
           3
           |
          (D)

Such that A looks like it moved from the 3 network to the 1 network. With C being something on the other side of "the router", B.

This wasn't enough.

Quoted 1 line

Once I had the network namespace TCP/IP stacks set to defaults, B did in fact respond to A's ARP request for an IP on the 2nd network.

rp_filter (Reverse Path Filtering) seems to also protect ARP.

The biggest issue that I can see with arp_filter is that it may disclose information about other interfaces on a router. Where as if arp_filter is enabled, then the information won't be leaked.

rp_filter vs arp_filter rp_filter will only protect incorrect routed paths. arp_filter will protect disclosure / leakage from correct routed paths.

I plan on starting to keep arp_filter enabled in addition to rp_filter on my machines. At least until I have a reason not to do so.

Signature · 2 lines
Grant. . . .
unix || die
#13 lore raw
In reply to Leroy Tennison
Quoted 1 line · Erik Auerswald

That would be an instance of the "weak host model" problem (see RFC 1122, section 3.3.4.2, "Weak ES Model").

I read that Mac OS X and Windows Vista (and later) use the strong host model by default.

TCP/IP Illustrated - Volume 1 - Second Edition § 5.6.1 on page 222.

Signature · 2 lines
Grant. . . .
unix || die
#14 lore raw
In reply to Leroy Tennison
Quoted 8 lines · Leroy Tennison

(1.2.3.4 is an arbitrary replacement but doesn't affect the basic issue) What is causing this? The systems in question have only one interface per subnet but both systems have multiple NICs which are on the same subnets. What I mean is this: on both systems NIC1 connects to subnet 1, NIC2 to subnet 2 and so on for five NICs and different subnets. The subnets do have different IP ranges (no overlap). 10.222.109.3 does happen to be on the same system as 1.2.3.4 but it doesn't have the same mac address and it is a physical interface.

Address HWType HWAddress Flags Mask Iface
10.222.109.3 ether bc:30:5b:a6:c4:bf C eth9
.
.
.
1.2.3.4 ether bc:30:5b:a6:c4:bf C eth9

On Linux (and many other OSes with IPv4 capability) an IPv4 unicast address belongs to the entire host, not a specific network interface. With "typical" settings, the kernel will willingly send ICMP redirects. If it's annoying to see the addresses from "foreign" addresses show in the MAC table, consider disabling send and receive of redirects on both systems.

sysctl:
net.ipv4.conf.*.accept_redirects
net.ipv4.conf.*.send_redirects

Probably shouldn't do this if either of the hosts forwards IP packets though [1], particularly if packets IP forward more than once.

[1] Usual caveat here: if you "know what you're doing" then disregard this sentence.

#15 lore raw
In reply to Leroy Tennison
Quoted 21 lines · On 2018-10-21 22:16, [email protected] wrote:
Quoted 8 lines · Leroy Tennison

(1.2.3.4 is an arbitrary replacement but doesn't affect the basic issue) What is causing this? The systems in question have only one interface per subnet but both systems have multiple NICs which are on the same subnets. What I mean is this: on both systems NIC1 connects to subnet 1, NIC2 to subnet 2 and so on for five NICs and different subnets. The subnets do have different IP ranges (no overlap). 10.222.109.3 does happen to be on the same system as 1.2.3.4 but it doesn't have the same mac address and it is a physical interface.

Address HWType HWAddress Flags Mask Iface
10.222.109.3 ether bc:30:5b:a6:c4:bf C eth9
.
.
.
1.2.3.4 ether bc:30:5b:a6:c4:bf C eth9

On Linux (and many other OSes with IPv4 capability) an IPv4 unicast address belongs to the entire host, not a specific network interface. With "typical" settings, the kernel will willingly send ICMP redirects. If it's annoying to see the addresses from "foreign" addresses show in the MAC table, consider disabling send and receive of redirects on both systems.

sysctl:
net.ipv4.conf.*.accept_redirects
net.ipv4.conf.*.send_redirects

Quoted 5 lines

Probably shouldn't do this if either of the hosts forwards IP packets though [1], particularly if packets IP forward more than once.

[1] Usual caveat here: if you "know what you're doing" then disregard this sentence.

... And as usual, while researching this, I found settings that might be even more relevant to your situation:

...linux/Documentation/networking/ip-sysctl.txt:

- arp_announce
- arp_ignore

which may be more useful for keeping each host's neighbor table "clean" of foreign addresses, and is probably safer than disabling ICMP redirects.

Cheers, and apologies for replying to my reply.

#16 lore raw
In reply to Leroy Tennison
Quoted 4 lines · On 10/21/2018 04:24 PM, [email protected] wrote:

... And as usual, while researching this, I found settings that might be even more relevant to your situation:

...linux/Documentation/networking/ip-sysctl.txt:

There's LOTS of good information in that file.

Quoted 2 lines

- arp_announce
- arp_ignore

I am fond of arp_filter (1) and rp_filter (1).

It makes a host behave more like a strong end system (RFC 1122).

Quoted 2 lines

which may be more useful for keeping each host's neighbor table "clean" of foreign addresses, and is probably safer than disabling ICMP redirects.

Agreed.

Quoted 1 line

Cheers, and apologies for replying to my reply.

Apology returned to sender as it was unnecessary. ;-)

Signature · 2 lines
Grant. . . .
unix || die