networking - How to configure range of static IPs (/22) in Ubuntu 16 Server? - Ask Ubuntu
i’m having trouble getting /22 subnet working on ubuntu 16 server. outside world, cannot ping ips assigned vlan except .2
ubuntu server network config:
root@server15:~# cat /etc/network/interfaces # file describes network interfaces available on system # , how activate them. more information, see interfaces(5). source /etc/network/interfaces.d/* # loopback network interface auto lo iface lo inet loopback # 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 implemented resolvconf package, if installed dns-nameservers xxx.xxx.33.61 xxx.xxx.33.62 dns-search domain.com
tried method too...can't ping ip .1 , .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 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
also added line in interfaces, still doesn't work
#add internal route route add -net xxx.53.16.0/22 gw xxx.53.16.1 dev eno1 root@server15:~# sudo service networking restart
Comments
Post a Comment