Estou com dificuldades para fazer com que uma sub-rede / 22 funcione em um servidor Ubuntu 16. Do mundo exterior, não consigo pingar nenhum IP atribuído à VLAN, exceto .2
Configuração de rede do servidor Ubuntu:
root@server15:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eno1
iface eno1 inet static
address xxx.53.16.2
netmask 255.255.252.0
network xxx.53.16.0
broadcast xxx.53.19.255
gateway xxx.53.16.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers xxx.xxx.33.61 xxx.xxx.33.62
dns-search domain.com
Tentei este método também ... não consigo pingar nenhum IP, exceto .1 e .2
root@server:~# ip addr add xxx.53.16.1/22 dev eno1
root@server:~# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
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
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether d4:be:d9:ed:fb:8a brd ff:ff:ff:ff:ff:ff
inet xxx.53.16.2/22 brd xxx.53.19.255 scope global eno1
valid_lft forever preferred_lft forever
inet xxx.xxx.16.1/22 scope global secondary eno1
valid_lft forever preferred_lft forever
inet6 fe80::d6be:d9ff:feed:fb8a/64 scope link
valid_lft forever preferred_lft forever
Também foi adicionada essa linha nas interfaces, mas ainda não funciona
#Add internal route
up route add -net xxx.53.16.0/22 gw xxx.53.16.1 dev eno1
root@server15:~# sudo service networking restart