Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #262933 > unrolled thread

Debian installer refuses to setup IP address if gateway is no in the same subnet

Started byMihamina RKTMB <mihamina@atscom.io>
First post2023-10-30 23:00 +0100
Last post2023-10-31 16:10 +0100
Articles 12 — 6 participants

Back to article view | Back to linux.debian.user


Contents

  Debian installer refuses to setup IP address if gateway is no in the  same subnet Mihamina RKTMB <mihamina@atscom.io> - 2023-10-30 23:00 +0100
    Re: Debian installer refuses to setup IP address if gateway is no in  the same subnet Jeffrey Walton <noloader@gmail.com> - 2023-10-30 23:10 +0100
      Re: Debian installer refuses to setup IP address if gateway is no  in the same subnet "Marco M." <mm@dorfdsl.de> - 2023-10-31 11:20 +0100
        Re: Debian installer refuses to setup IP address if gateway is no in  the same subnet Reco <recoverym4n@enotuniq.net> - 2023-10-31 15:10 +0100
    Re: Debian installer refuses to setup IP address if gateway is no in  the same subnet Dan Ritter <dsr@randomstring.org> - 2023-10-30 23:40 +0100
      Re: Debian installer refuses to setup IP address if gateway is no in  the same subnet Mihamina RKTMB <mihamina@atscom.io> - 2023-10-31 14:20 +0100
        Re: Debian installer refuses to setup IP address if gateway is no in  the same subnet Dan Ritter <dsr@randomstring.org> - 2023-10-31 15:10 +0100
          Re: Debian installer refuses to setup IP address if gateway is no in  the same subnet Mihamina RKTMB <mihamina@atscom.io> - 2023-10-31 15:40 +0100
    Re: Debian installer refuses to setup IP address if gateway is no in  the same subnet Henning Follmann <hfollmann@itcfollmann.com> - 2023-10-31 13:40 +0100
      Re: Debian installer refuses to setup IP address if gateway is no  in the same subnet "Marco M." <mm@dorfdsl.de> - 2023-10-31 14:20 +0100
      Re: Debian installer refuses to setup IP address if gateway is no in  the same subnet Mihamina RKTMB <mihamina@atscom.io> - 2023-10-31 15:00 +0100
        Re: Debian installer refuses to setup IP address if gateway is no in  the same subnet Henning Follmann <hfollmann@itcfollmann.com> - 2023-10-31 16:10 +0100

#262933 — Debian installer refuses to setup IP address if gateway is no in the same subnet

FromMihamina RKTMB <mihamina@atscom.io>
Date2023-10-30 23:00 +0100
SubjectDebian installer refuses to setup IP address if gateway is no in the same subnet
Message-ID<HuIsF-1YBN-5@gated-at.bofh.it>
Hi all,

I rent a dedicated server where I installed an hypervisor and purchased 
failover public IPv4 IPs routed to that server.

When configuring the Debian VMs to use those failover IPs, I have to

- set the address to /32: "ip addr add $IP/32 dev eth0"

- set the traffic to the gateway to go through the NIC: "ip route add 
$GW dev eth0"

- set the default route to go via the gateway: "ip route add default via 
$GW"

As I set the IP address to a /32, the gateway is not (never) in the 
subnet of the VM.

When using the Debian installer, at the networking setup, the installer 
refuses that setting: the gateway is not in the subnet of the set IP 
address.

The workaround I use is either to

- finish the installation without network and then at reboot, setup the 
network

- manually setup the network during installation in another console

But isn't there a way to make the Debian installer accept that the 
gateway is not in the subnet of the set IP address?

Regards

[toc] | [next] | [standalone]


#262934 — Re: Debian installer refuses to setup IP address if gateway is no in the same subnet

FromJeffrey Walton <noloader@gmail.com>
Date2023-10-30 23:10 +0100
SubjectRe: Debian installer refuses to setup IP address if gateway is no in the same subnet
Message-ID<HuICq-1YUa-3@gated-at.bofh.it>
In reply to#262933
On Mon, Oct 30, 2023 at 5:53 PM Mihamina RKTMB <mihamina@atscom.io> wrote:
>
> I rent a dedicated server where I installed an hypervisor and purchased
> failover public IPv4 IPs routed to that server.
>
> When configuring the Debian VMs to use those failover IPs, I have to
>
> - set the address to /32: "ip addr add $IP/32 dev eth0"
>
> - set the traffic to the gateway to go through the NIC: "ip route add
> $GW dev eth0"
>
> - set the default route to go via the gateway: "ip route add default via
> $GW"
>
> As I set the IP address to a /32, the gateway is not (never) in the
> subnet of the VM.
>
> When using the Debian installer, at the networking setup, the installer
> refuses that setting: the gateway is not in the subnet of the set IP
> address.
>
> The workaround I use is either to
>
> - finish the installation without network and then at reboot, setup the
> network
>
> - manually setup the network during installation in another console
>
> But isn't there a way to make the Debian installer accept that the
> gateway is not in the subnet of the set IP address?

It should not matter, if I recall correctly. Anything the machine does
not know how to route goes out on the default interface. That should
be the 0.0.0.0 entry in the routing table.

Maybe you need to help the installer along, and set the default route
for the machine? Perhaps using an alternate virtual terminal, like
FN+F5. I believe the command is `route add default gw {IP-ADDRESS}
{INTERFACE-NAME}`.

Jeff

[toc] | [prev] | [next] | [standalone]


#262958 — Re: Debian installer refuses to setup IP address if gateway is no in the same subnet

From"Marco M." <mm@dorfdsl.de>
Date2023-10-31 11:20 +0100
SubjectRe: Debian installer refuses to setup IP address if gateway is no in the same subnet
Message-ID<HuU0N-26ct-11@gated-at.bofh.it>
In reply to#262934
Am 30.10.2023 um 18:07:20 Uhr schrieb Jeffrey Walton:

> It should not matter, if I recall correctly. Anything the machine does
> not know how to route goes out on the default interface. That should
> be the 0.0.0.0 entry in the routing table.

Although, that entry must be there and the via IP must be on the same
ethernet link.
When adding the address 10.0.0.45/24, 10.0.0.0/24 will show up in the
routing table as directly connected. A route 0.0.0.0/0 via 10.0.0.1 can
be used. If you configure 0.0.0.0/0 via 172.16.0.1, then it will not
know on which NIC that is.
That might be the reason for that failure, as that case is uncommon in
most networks.

> Maybe you need to help the installer along, and set the default route
> for the machine? Perhaps using an alternate virtual terminal, like
> FN+F5. I believe the command is `route add default gw {IP-ADDRESS}
> {INTERFACE-NAME}`.

sudo ip route add <GW-IP> dev <if>
sudo ip route add 0.0.0.0/0 via <GW-IP>

should work fine.
net-tolls is not installed by default, so command "route" is not
available.

[toc] | [prev] | [next] | [standalone]


#262967 — Re: Debian installer refuses to setup IP address if gateway is no in the same subnet

FromReco <recoverym4n@enotuniq.net>
Date2023-10-31 15:10 +0100
SubjectRe: Debian installer refuses to setup IP address if gateway is no in the same subnet
Message-ID<HuXBn-28pP-9@gated-at.bofh.it>
In reply to#262958
	Hi.

On Tue, Oct 31, 2023 at 11:13:04AM +0100, Marco M. wrote:
> > Maybe you need to help the installer along, and set the default route
> > for the machine? Perhaps using an alternate virtual terminal, like
> > FN+F5. I believe the command is `route add default gw {IP-ADDRESS}
> > {INTERFACE-NAME}`.
> 
> sudo ip route add <GW-IP> dev <if>
> sudo ip route add 0.0.0.0/0 via <GW-IP>

Actually, you can do it in a single command:

ip ro a default via <GW-IP> dev <if> onlink

Reco

[toc] | [prev] | [next] | [standalone]


#262936 — Re: Debian installer refuses to setup IP address if gateway is no in the same subnet

FromDan Ritter <dsr@randomstring.org>
Date2023-10-30 23:40 +0100
SubjectRe: Debian installer refuses to setup IP address if gateway is no in the same subnet
Message-ID<HuJ5n-1Z3B-3@gated-at.bofh.it>
In reply to#262933
Mihamina RKTMB wrote: 
> Hi all,
> 
> I rent a dedicated server where I installed an hypervisor and purchased
> failover public IPv4 IPs routed to that server.
> 
> When configuring the Debian VMs to use those failover IPs, I have to
> 
> - set the address to /32: "ip addr add $IP/32 dev eth0"
> 
> - set the traffic to the gateway to go through the NIC: "ip route add $GW
> dev eth0"
> 
> - set the default route to go via the gateway: "ip route add default via
> $GW"
> 
> As I set the IP address to a /32, the gateway is not (never) in the subnet
> of the VM.
> 
> When using the Debian installer, at the networking setup, the installer
> refuses that setting: the gateway is not in the subnet of the set IP
> address.
> 
> The workaround I use is either to
> 
> - finish the installation without network and then at reboot, setup the
> network
> 
> - manually setup the network during installation in another console
> 
> But isn't there a way to make the Debian installer accept that the gateway
> is not in the subnet of the set IP address?

No.

I presume that your server rental includes an address on an IPv4 or IPv6
network via DHCP or as a static assignment. That is how the
server reaches everything else, the default.

You can add more IPs to that interface. If your upstream network
sends traffic there, your machine can recognize it as
appropriate. How should responses go out?

If the IPs are v4 /32 each, the response cannot go out that way.
There is no "way" there. If your upstream network allows it,
your server can use the v4 /32 as the return address, while
sending out to the default router. But you must have an
interface which sits on the same network as the default router.

Note that you are never deleting the IP that your upstream
assigned you. 

Here's what to do after install:

ip addr add $IP/32 dev eth0

that should be all you need, unless there are other things you
aren't telling us.

-dsr-

[toc] | [prev] | [next] | [standalone]


#262963 — Re: Debian installer refuses to setup IP address if gateway is no in the same subnet

FromMihamina RKTMB <mihamina@atscom.io>
Date2023-10-31 14:20 +0100
SubjectRe: Debian installer refuses to setup IP address if gateway is no in the same subnet
Message-ID<HuWOZ-27U8-1@gated-at.bofh.it>
In reply to#262936
On 10/31/23 01:18, Dan Ritter wrote:
> Mihamina RKTMB wrote:
>> Hi all,
>>
>> I rent a dedicated server where I installed an hypervisor and purchased
>> failover public IPv4 IPs routed to that server.
>>
>> When configuring the Debian VMs to use those failover IPs, I have to
>>
>> - set the address to /32: "ip addr add $IP/32 dev eth0"
>>
>> - set the traffic to the gateway to go through the NIC: "ip route add $GW
>> dev eth0"
>>
>> - set the default route to go via the gateway: "ip route add default via
>> $GW"
>>
>> As I set the IP address to a /32, the gateway is not (never) in the subnet
>> of the VM.
>>
>> When using the Debian installer, at the networking setup, the installer
>> refuses that setting: the gateway is not in the subnet of the set IP
>> address.
>>
>> The workaround I use is either to
>>
>> - finish the installation without network and then at reboot, setup the
>> network
>>
>> - manually setup the network during installation in another console
>>
>> But isn't there a way to make the Debian installer accept that the gateway
>> is not in the subnet of the set IP address?
> No.
>
> I presume that your server rental includes an address on an IPv4 or IPv6
> network via DHCP or as a static assignment. That is how the
> server reaches everything else, the default.
>
> You can add more IPs to that interface. If your upstream network
> sends traffic there, your machine can recognize it as
> appropriate. How should responses go out?
>
> If the IPs are v4 /32 each, the response cannot go out that way.
> There is no "way" there. If your upstream network allows it,
> your server can use the v4 /32 as the return address, while
> sending out to the default router. But you must have an
> interface which sits on the same network as the default router.


Here you find an example of ISP documentation describing the fact the IP 
address is not in the same subnet as the gateway: 
https://help.ovhcloud.com/csm/en-dedicated-servers-network-bridging?id=kb_article_view&sysparm_article=KB0043731#step-4-configure-the-virtual-machines

|ADDITIONAL_IP can be any single IP you purshased, and you see the 
netmask set to|

|255.255.255.255 There is no mention to the host (VMWare) IP address in 
the VM|

[toc] | [prev] | [next] | [standalone]


#262966 — Re: Debian installer refuses to setup IP address if gateway is no in the same subnet

FromDan Ritter <dsr@randomstring.org>
Date2023-10-31 15:10 +0100
SubjectRe: Debian installer refuses to setup IP address if gateway is no in the same subnet
Message-ID<HuXBn-28pP-7@gated-at.bofh.it>
In reply to#262963
Mihamina RKTMB wrote: 
> 
> On 10/31/23 01:18, Dan Ritter wrote:
> > Mihamina RKTMB wrote:
> > > But isn't there a way to make the Debian installer accept that the gateway
> > > is not in the subnet of the set IP address?

> > No.


[OVH docs reference omitted]

You asked a question, you got the answer. What you want is not a
reasonable thing for the general-purpose installer to cover, and
it does not.

Your configuration is a special case. You know how to get what 
you want. If you want to petition the installer maintainers to
cover your special case, you can certainly ask them. I would not
expect it to happen before the next stable release, if at all.

-dsr-

[toc] | [prev] | [next] | [standalone]


#262970 — Re: Debian installer refuses to setup IP address if gateway is no in the same subnet

FromMihamina RKTMB <mihamina@atscom.io>
Date2023-10-31 15:40 +0100
SubjectRe: Debian installer refuses to setup IP address if gateway is no in the same subnet
Message-ID<HuY4p-28yU-3@gated-at.bofh.it>
In reply to#262966
On 10/31/23 16:46, Dan Ritter wrote:
> Mihamina RKTMB wrote:
>> On 10/31/23 01:18, Dan Ritter wrote:
>>> Mihamina RKTMB wrote:
>>>> But isn't there a way to make the Debian installer accept that the gateway
>>>> is not in the subnet of the set IP address?
>>>>
>>> No.
>>>
>>>
>>> [OVH docs reference omitted]
>>>
>>> You asked a question, you got the answer. What you want is not a
>>> reasonable thing for the general-purpose installer to cover, and
>>> it does not.

Understood. Thank you.

[toc] | [prev] | [next] | [standalone]


#262960 — Re: Debian installer refuses to setup IP address if gateway is no in the same subnet

FromHenning Follmann <hfollmann@itcfollmann.com>
Date2023-10-31 13:40 +0100
SubjectRe: Debian installer refuses to setup IP address if gateway is no in the same subnet
Message-ID<HuWch-27rB-9@gated-at.bofh.it>
In reply to#262933
On Mon, Oct 30, 2023 at 06:17:18PM +0300, Mihamina RKTMB wrote:
> Hi all,
> 
> I rent a dedicated server where I installed an hypervisor and purchased
> failover public IPv4 IPs routed to that server.
> 

Of course not! Some host _on_your_subnet_ must be responsible for
forwarding the packages. And a route has to be set so your machine knows
where to send the packages beyond your local subnet to. That is the
gateway. It is just a shortcut to define the default route.

So the installer is right.

-H 



-- 
Henning Follmann           | hfollmann@itcfollmann.com

[toc] | [prev] | [next] | [standalone]


#262962 — Re: Debian installer refuses to setup IP address if gateway is no in the same subnet

From"Marco M." <mm@dorfdsl.de>
Date2023-10-31 14:20 +0100
SubjectRe: Debian installer refuses to setup IP address if gateway is no in the same subnet
Message-ID<HuWOZ-27U8-3@gated-at.bofh.it>
In reply to#262960
Am 31.10.2023 um 08:35:48 Uhr schrieb Henning Follmann:

> Of course not! Some host _on_your_subnet_ must be responsible for
> forwarding the packages.

It is possible to define another specific direct connected route to
your router and use that with source addresses that are not on the
same subnet.
Although, the router also needs that route.

[toc] | [prev] | [next] | [standalone]


#262964 — Re: Debian installer refuses to setup IP address if gateway is no in the same subnet

FromMihamina RKTMB <mihamina@atscom.io>
Date2023-10-31 15:00 +0100
SubjectRe: Debian installer refuses to setup IP address if gateway is no in the same subnet
Message-ID<HuXrH-2877-5@gated-at.bofh.it>
In reply to#262960
On 10/31/23 15:35, Henning Follmann wrote:
> On Mon, Oct 30, 2023 at 06:17:18PM +0300, Mihamina RKTMB wrote:
>> Hi all,
>>
>> I rent a dedicated server where I installed an hypervisor and purchased
>> failover public IPv4 IPs routed to that server.
>>
> Of course not! Some host _on_your_subnet_ must be responsible for
> forwarding the packages. And a route has to be set so your machine knows
> where to send the packages beyond your local subnet to. That is the
> gateway. It is just a shortcut to define the default route.
>
What you describe is what happens on home or office network. On 
datacenter networks, it can be much different.

Look at this documentation: 
https://help.ovhcloud.com/csm/en-dedicated-servers-network-bridging?id=kb_article_view&sysparm_article=KB0043731#step-4-configure-the-virtual-machines

|ADDITIONAL_IP can be any single IP you purshased, and you see the 
netmask set to|

|255.255.255.255 There is no mention to the host (VMWare) IP address in 
the VM |

||

||

[toc] | [prev] | [next] | [standalone]


#262971 — Re: Debian installer refuses to setup IP address if gateway is no in the same subnet

FromHenning Follmann <hfollmann@itcfollmann.com>
Date2023-10-31 16:10 +0100
SubjectRe: Debian installer refuses to setup IP address if gateway is no in the same subnet
Message-ID<HuYxr-28Z5-7@gated-at.bofh.it>
In reply to#262964
On Tue, Oct 31, 2023 at 04:15:30PM +0300, Mihamina RKTMB wrote:
> 
> On 10/31/23 15:35, Henning Follmann wrote:
> > On Mon, Oct 30, 2023 at 06:17:18PM +0300, Mihamina RKTMB wrote:
> > > Hi all,
> > > 
> > > I rent a dedicated server where I installed an hypervisor and purchased
> > > failover public IPv4 IPs routed to that server.
> > > 
> > Of course not! Some host _on_your_subnet_ must be responsible for
> > forwarding the packages. And a route has to be set so your machine knows
> > where to send the packages beyond your local subnet to. That is the
> > gateway. It is just a shortcut to define the default route.
> > 
> What you describe is what happens on home or office network. On datacenter
> networks, it can be much different.
> 
> Look at this documentation: https://help.ovhcloud.com/csm/en-dedicated-servers-network-bridging?id=kb_article_view&sysparm_article=KB0043731#step-4-configure-the-virtual-machines
> 
> |ADDITIONAL_IP can be any single IP you purshased, and you see the netmask
> set to|
> 
> |255.255.255.255 There is no mention to the host (VMWare) IP address in the
> VM |
> 
> ||
> 
> ||
> 



[]  You  understand ip networking


-H

-- 
Henning Follmann           | hfollmann@itcfollmann.com

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web