Update:
It seems it was an issue with the load balancer settings. It is now working with the configuration I show below.
Question:
I need to translate these instructions for RedHat into netplan settings (my current translation seems broken):
Overview:
This server is sitting behind a load balancer. The instructions to setup the communication with the load balancer (for RedHat) are:
- Edit
/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
IPADDR=172.16.1.2
NETMASK=255.255.0.0
NETWORK=172.16.0.0
BROADCAST=172.16.255.255
ONBOOT=yes
- Edit
/etc/sysconfig/network-scripts/route-eth1
172.16.0.0/16 dev eth1 scope link proto kernel table 128
default via 172.16.1.1 dev eth1 table 128
- Edit
/etc/sysconfig/network-scripts/rule-eth1
172.16.1.2 from table 128
NOTE: Load Balancer's IP is: 172.16.1.1
My translation is (netplan : Ubuntu 22.04):
network:
ethernets:
eth1:
addresses:
- 172.16.1.2/16
routes:
- to: 0.0.0.0/0
via: 172.16.1.1
table: 128
routing-policy:
- from: 172.16.0.0/16
table: 128
ip route
shows:
172.16.0.0/16 dev eth1 proto kernel scope link src 172.16.1.2
And ip a
shows:
4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether fa:16:3e:3f:40:83 brd ff:ff:ff:ff:ff:ff
inet 172.16.1.2/16 brd 172.16.255.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::f816:3eff:fe3f:4083/64 scope link
valid_lft forever preferred_lft forever
NOTE: I have other 2 more interfaces set in this server, a public IP address and a private local address:
eth0:
addresses:
- xxx.xxx.10.100/24
routes:
- to: 0.0.0.0/0
via: xxx.xxx.10.1
nameservers:
addresses:
- xxx.xxx.xxx.219
- xxx.xxx.xxx.31
eth2:
addresses:
- 10.0.0.10/24
Questions:
- Is there something wrong with my translation?
- Why
ip route
doesn't shows the table (Is that normal)? - If I specify
metric
underroutes
makes a difference in this scenario? - Is
routes.to
(0.0.0.0/0
) correct, or should I use172.16.0.0/16
?
Tests:
- Ping works to load balancer
- Ports 80/443 can be accessed to this server directly
Problem:
- Ports 80/443 shows "filtered" when testing the Load Balancer's IP address
0 Answers