Two Nic, different VLAN, default gateway

Issues related to configuring your network
Post Reply
goandy84
Posts: 4
Joined: 2014/10/13 08:20:18

Two Nic, different VLAN, default gateway

Post by goandy84 » 2019/02/27 15:19:34

Hi, i need use just only one gateway for two nic on different vlan,

i have this configuration

Ethernet 1 (ens32)

Code: Select all

TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=ens32
UUID=b3f03d48-6356-4c80-b1e7-283a241cd9fc
DEVICE=ens32
ONBOOT=yes
DNS1=172.16.0.76
IPADDR=172.16.0.213
PREFIX=24
GATEWAY=172.16.1.254
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
Ethernet 2 (ens34)

Code: Select all

HWADDR=00:50:56:B1:F3:F1
TYPE=Ethernet
BOOTPROTO=none
DNS1=172.16.0.76
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=ens34
UUID=a4bbae85-7ba2-44e2-bf50-187832c27941
ONBOOT=yes
IPADDR=172.16.131.240
PREFIX=24
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
How can i drive network traffic of ens34 though gateway of ens32?

Thank you all for any help

stevemowbray
Posts: 460
Joined: 2012/06/26 14:20:47

Re: Two Nic, different VLAN, default gateway

Post by stevemowbray » 2019/02/27 15:37:14

I think that's what will happen if you fix your network configuration: your IP address is in network 172.16.0.0/24 and the gateway 172.16.1.254 is not.

goandy84
Posts: 4
Joined: 2014/10/13 08:20:18

Re: Two Nic, different VLAN, default gateway

Post by goandy84 » 2019/02/27 15:55:51

yes i have already fix it but the issue still persist

Code: Select all

HWADDR=00:50:56:B1:BC:02
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=ens32
UUID=a0d85339-d032-496a-b9a6-517d462f8849
DEVICE=ens32
ONBOOT=yes
IPADDR=172.16.0.213
PREFIX=23
GATEWAY=172.16.1.254

stevemowbray
Posts: 460
Joined: 2012/06/26 14:20:47

Re: Two Nic, different VLAN, default gateway

Post by stevemowbray » 2019/02/27 16:19:14

Have you also changed it on the gateway?

goandy84
Posts: 4
Joined: 2014/10/13 08:20:18

Re: Two Nic, different VLAN, default gateway

Post by goandy84 » 2019/02/27 16:36:37

Gateway is correct

IP 172.16.0.213
NM 255.255.254.0
GW 172.16.1.254

stevemowbray
Posts: 460
Joined: 2012/06/26 14:20:47

Re: Two Nic, different VLAN, default gateway

Post by stevemowbray » 2019/02/28 12:01:56

I mean, has the netmask on the gateway also been changed?

User avatar
jlehtone
Posts: 2149
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Two Nic, different VLAN, default gateway

Post by jlehtone » 2019/03/01 21:23:33

stevemowbray wrote:
2019/02/28 12:01:56
I mean, has the netmask on the gateway also been changed?
Lets make that more general:
Does every device connected to a subnet agree what the subnet actually is?

Post Reply