Multiple IP address on a physical network port

Hi,
I’ve installed a realtek 4 port eth card on a PC where Vyos is running. I’ve set a static ip address for every ethernet port.
this vyos machine is connected to a router with DHCP server.
If I do a network scan i found all the ip addresses of the realtek card I’ve set.
No bridge is set on the vyos machine.

why ?

is it possible to know trough vyos cmd line the ip adr of the linked eth port ?

So many questions.

  1. What ARP addresses (if any) do you see for the IPs of the other 3 Addresses?
  2. What was the network scan command you ran? Where did you run it from?
  3. What is the configuration on your VyOS box?
  4. What version of VyOS?
  5. Are you setting the VyOS box as your default gateway? If so, it’s going to know how to route to the other 3 addresses.
  6. Have you enabled Proxy Arp?
  7. Are all ports connected to the same VLAN?

etc etc. You’ve provided so little information it’s impossible to know the answer to your question.

1- no arp
2- ip scan with ip-advanced scanner software on windows
3- only ip address set for the ethernet port
4- latest rolling
5- no. just linked to other router
6- no
7- no vlan

I’ve only set the following

vyos@vyos:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface IP Address MAC VRF MTU S/L Description


eth0 192.168.1.101/24 98:b7:xx:xx:xx:40 default 1500 u/u
eth1 - 98:b7:xx:xx:xx:41 default 1500 u/D
eth2 - 98:b7:xx:xx:xx:42 default 1500 u/D
eth3 - 98:b7:xx:xx:xx:43 default 1500 u/D
eth4 192.168.1.102/24 90:1b:0e:xx:xx:6b default 1500 u/D
lo 127.0.0.1/8 00:00:00:00:00:00 default 65536 u/u
::1/128

from a client on the network I ping both the two addresses even only one ethernet port used

From the client where you can ping both addresses, what does the arp table say for

192.168.1.101 and
192.168.1.102

?

If I had to guess though, I suppose the broadcast arp for “Who has 192.168.1.102” is received by 192.168.1.101 and because 102 is also configured on that router, that router replies with “I have 192.168.1.102 at 90:1b:0e:xx:xx:6b” via the known route out eth0.

I don’t really know what the expected behaviour is on a Linux box when you have the same subnet configured on two different L3 interfaces in the same routing domain.

no, on the client the ARP table doesn’t show 192.168.1.10x addresses .

in any case I cannot ping any internet address from vyos box. " network is unreachable"

The client doesn’t show the ARP for them, but it can ping them? How?

What has the Internet got to do with this now? I’m very confused.

I 'd like to add the vyos box on a router lan (that is connected to the wan)

if I set as DHCP client I’m able to g out on the web . if I set a static ip address I cannot go the the web

I’m sorry I can’t help further. First we were debugging apparent LAN bridging but now it’s DHCP+Internet. This is such a confusing scattered approach I can’t help.

I tried to setup as dhcp client or single ethernet port static ip address on vyos box and I don’t see any multiple ip issue .

If I set up a different static ip address for every eth port i I’ve the issue.

this is the physical link schematic :

this is the vyos eth ports configuration :
vyos interfaces config

this is the arp table from a pc connected to the main router (where the vyos router is connected to) :

as you can see I found the same mac address with multiple Ip

this is the show interfaces command :

If you need isolation, all ports need their own IP subnet, now all of them are in the same subnet.
like
192.168.1.101/24
192.168.2.101/24
192.168.3.101/24
192.168.4.101/24

Technically you can use private vlan or more specific protected vlan to use the same subnet but enforce which interface are allowed to speak to which interface.

However I dont think VyOS supports this (mainly a switch feature and not a router feature).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.