1

I have a public network (A) and a private network (B) and would like to use a public IP on a host connected to a vlan in network B.

Three entities in this scenario

  • The ISP gateway: 10.0.10.1
  • The linux system: (Network A: 10.0.10.2/24, Network B: 10.0.10.3/24)
  • The internal host: 10.0.10.4

If the internal host's default gateway is 10.0.10.3, will traffic reach 10.0.10.1 assuming ip routing is enabled on the linux system?

If this behavior is not default, but possible, what configuration is required?

  • why do you need to have the two subnets the same? – jsotola Sep 27 '21 at 05:52
  • The Network A and network B is the same (10.0.10 both....) (And need to be same physically (ie: same physical ethernet lan.) – K-attila- Sep 27 '21 at 08:23
  • Not conveniently, if at all, just due to the way traffic forwarding works. Is there a specific reason for having the two networks in the same subnet in the first place? Having net A with subnet 10.0.10.0/24 and net B with subnet 10.0.11.0/24 allows forwarding the traffic using just basic routing. If both networks have a router, it might be possible with for example GRE tunnel, but even then both those IP addresses must be reserved to the Linux box in both networks. – Peregrino69 Sep 27 '21 at 11:21
  • To avoid any confusion, would you mind using public IP addresses where the IP addresses are really public and private IP addresses where they are not in the question? You can use addresses from RFC 5737 eg 192.0.2.1/24 . Then you could specify with more details your Linux router setup (available interface names etc.) – A.B Sep 29 '21 at 08:20
  • I'm using private address in this example and shouldn't change the functionality. I'm trying to get a selection of public IP's from my ISP connected to a VLAN behind my edge router. Currently I have the vlan bridged with the public uplink, but this is not ideal. – ACiD GRiM Oct 02 '21 at 04:18

0 Answers0