2

I have laptop which I sometimes connect to my LAN via wireless or wired connection (addresses are assigned via DHCP from the same subnet). I wonder how to setup common IP address on Ubuntu 20.04 to be able always connect via same IP address (for example to ssh).

I'm not asking about same IP address on Wi-Fi and ethernet connections. I looking for solution to add "common" address to Ubuntu that will work via wired/wireless connection regardless which one is currently active.

2
  • Use a Static IP address???
    – Wasif
    Commented Aug 5, 2020 at 9:21
  • As @WasifHasan mentioned, a static IP should be set on the router - for the MAC address, you'll list both the WiFi and ethernet MAC; the format they need to be in will vary by what DHCP server the router is using, but will likely require a whitespace between the two MACs, possibly encapsulated by either a single or double quote.
    – JW0914
    Commented Aug 5, 2020 at 11:15

1 Answer 1

3

Add your "common" IP to loopback interface with prefix /32:

ip address add IP/32 dev lo

Sorry - I don't know how to make it pernament on Ubuntu (netplan config? systemd?).

Any way. This IP will be accessible on WIFI/Ethernet (proxyarp will take care of this) - no matter which connection is active in the moment ("lo" interface is always active).

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .