Re: arp table - same mac address shows two ip addresses

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/18/2018 10:45 AM, Grant Taylor wrote:
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. }:-)

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.

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.



--
Grant. . . .
unix || die

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux