I am trying to configure squid with my Ubuntu 16.04 server. I configured everything with my first subnet (which shares the gateway with my server's IP address). My provider has added 2 different networks to my server, and I can't add the second half to my interface. For clarity purposes, I will use fake IP to explain my problem:
My server IP: 126.96.36.199
sudo ip addr gives me:
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: enp1s0f0: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether ac:1f:6b:9b:31:f2 brd ff:ff:ff:ff:ff:ff 3: enp1s0f1: mtu 1500 qdisc mq state UP group default qlen 1000 link/ether ac:1f:6b:9b:31:f3 brd ff:ff:ff:ff:ff:ff inet 188.8.131.52/25 brd 184.108.40.206 scope global enp1s0f1 valid_lft forever preferred_lft forever inet6 fe80::ae1f:645f:f22b:31f3/64 scope link valid_lft forever preferred_lft forever
So as I understand I have 2 network adapters to work:
First network I received:
220.127.116.11 18.104.22.168 22.214.171.124 ... ... ... 126.96.36.199
Gateway of my first network: 188.8.131.52
Second network I received:
184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 ... ... ... 126.96.36.199
Second network gateway: 188.8.131.52
My default Network Interfaces setting (with only my server IP added):
auto lo iface lo inet loopback auto enp1s0f1 iface enp1s0f1 inet static address 184.108.40.206 netmask 255.255.255.128 gateway 220.127.116.11
I have added the first half of my network using the following method:
auto lo iface lo inet loopback auto enp1s0f1 iface enp1s0f1 inet static address 18.104.22.168 netmask 255.255.255.128 gateway 22.214.171.124 auto enp1s0f1:1 iface enp1s0f1:2 inet static address 126.96.36.199 netmask 255.255.255.128 auto enp1s0f1:2 iface enp1s0f1:2 inet static address 188.8.131.52 netmask 255.255.255.128 ..... (and so on) auto enp1s0f1:124 iface enp1s0f1:124 inet static address 184.108.40.206 netmask 255.255.255.128
Now when I try to do the same for the second part, that's where my problem occurs.
I tried to use the same adapter and add this to my network interface:
auto enp1s0f1:125 iface enp1s0f1:125 inet static address 220.127.116.11 netmask 255.255.255.128 gateway 18.104.22.168
and tried to use the other free adapter:
auto enp1s0f0 iface enp1s0f0 inet static address 22.214.171.124 netmask 255.255.255.128 gateway 126.96.36.199
After changing this in my interfaces file I do the old
service networking restart however I receive
Job for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.
The error occurs due to:
Failed to bring up enp1s0f1:125. (method 1) or
Failed to bring up enp1s0f0. (method 2)
What exactly am I doing wrong here?
Thanks in advance and I hope I have given enough information!