-1

Hi (I hope this a the right place)

I'm working on ubuntu 18.04 with ifupdown (/etc/network/interfaces etc.), not netplan. I'm trying for several days on this difficulty.

one PC (A) with 2 cards : enp4s0 linked to my FAI (Internet 192.168.100.254) enp3s0 to 2 subnets (intranet) 192.168.1.0/24 and 192.168.3.0/24

on this PC (A) the command "ip a" gives :

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 50:3e:aa:16:2c:76 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.8/24 brd 192.168.1.255 scope global enp3s0
       valid_lft forever preferred_lft forever
    inet 192.168.3.8/24 brd 192.168.3.255 scope global enp3s0:0
       valid_lft forever preferred_lft forever
3: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether ac:16:2d:05:da:bd brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.1/24 brd 192.168.100.255 scope global enp4s0
       valid_lft forever preferred_lft forever

which correspond to the file "/etc/network/interfaces" :

auto enp4s0
  iface enp4s0 inet static
  address 192.168.100.1
  netmask 255.255.255.0
  dns-nameservers 194.2.0.20 8.8.8.8
  up route add default gw 192.168.100.254
  down route del default gw 192.168.100.254
auto enp3s0
  iface enp3s0 inet static
  address 192.168.1.8
  netmask 255.255.255.0
  dns-nameservers 194.2.0.20 8.8.8.8
  gateway 192.168.100.1
  up route add default gw 192.168.100.254
  down route del default gw 192.168.100.254
auto enp3s0:0
  iface enp3s0:0 inet static
  address 192.168.3.8
  netmask 255.255.255.0
  dns-nameservers 194.2.0.20 8.8.8.8
  gateway 192.168.100.1
  up route add default gw 192.168.100.254
  down route del default gw 192.168.100.254

This seems correct to me.

The command "route -n" gives :

Table de routage IP du noyau
Destination     Passerelle      Genmask         Indic Metric Ref    Use Iface
0.0.0.0         192.168.100.254 0.0.0.0         UG    0      0        0 enp4s0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 enp3s0
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 enp3s0
192.168.100.0   0.0.0.0         255.255.255.0   U     0      0        0 enp4s0

This seems correct to me.

The commande '"ipconfig" on 192.168.3.39 gives :

   Adresse IPv4. . . . . . . . . . . . . .: 192.168.3.39
   Masque de sous-réseau. . . . . . . . . : 255.255.255.0
   Passerelle par défaut. . . . . . . . . : 192.168.3.8

This seems correct to me.

Situation : Everything should be good, but it doesn't work (I think I make a mistake somewhere) The two subnets seems to be identical, ecept the notation enp3s0:0 ; the first works fine, not the other one.

From a PC 192.168.1.94 I can ping outside (8.8.8.8), 192.168.1.90, 192.168.3.39

From a PC 192.168.1.39 I can ping 192.168.1.94, 192.168.3.94 but not outside (8.8.8.8)

I did try to modify everything on PC (A) and on 192.168.3.39 (different gateways) ; no good results.

Any suggestions ? (Thank's in advance).

1 Answers1

0

Try enabling proxy-arp on that virtual interface. I believe the syntax is something like

sysctl net.ipv4.conf.eth0/1.proxy_arp

Proxy ARP may not be enabled on that virtual interface so your box will not respond to ARP requests on that interface, thus no traffice.

nepdev2
  • 11
  • 2
  • Thanks' nepdev2 I tried, with no success. I was a good idea I did not know, maybe some other parameters about ipforwarding ? I'lltry wit another PC as a router with two cards specialy to avoid the notation "0:0" but no success again... – romaillard Jun 13 '23 at 14:20