Dobry den, mam server ubuntu 14.04 server. Siet mam nastavenu takto:
Ide o primarnu siet a podsiet (vlan)
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 18.15.3.143
netmask 255.255.255.192
network 18.15.3.128
broadcast 18.15.3.191
gateway 18.15.3.129
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8
dns-search fns.uniba.sk
# VLAN40 for DHCP server
auto eth0.40
iface eth0.40 inet static
address 18.15.5.150
netmask 255.255.255.0
#gateway 18.15.5.1
vlan-raw-device eth0
Na serveri bezia primarne dve sluzby. web-server a dhcp server. DHCP server funguje cez subnet vlan40 (18.15.5.0).
A este web server, ktory bezi na ip 18.15.3.143. Vsetko funguje dobre, ale ak sa chcem pripojit na web-server zo subnetu 18.15.5.0 (vlan40), takstranku neotvori, okrem tohto subnetu sa dokaze pripojit na ten server cely svet. Akonahle ten interface eth0.40 vypnem tak sa uz dokaze subnet (18.15.5.0) pripojit.
tcpdump vypisuje toto:
15:31:55.005346 IP 18.15.5.160.59979 > domena.sk.https: Flags [S], seq 802408223, win 14600, options [mss 1460,sackOK,TS val 6133771 ecr 0,nop,wscale 6], length 0
15:31:55.209997 IP 18.15.5.160.59981 > domena.sk.https: Flags [S], seq 4125392294, win 14600, options [mss 1460,sackOK,TS val 6133791 ecr 0,nop,wscale 6], length 0
15:31:58.018442 IP 18.15.5.160.59979 > domena.sk.https: Flags [S], seq 802408223, win 14600, options [mss 1460,sackOK,TS val 6134072 ecr 0,nop,wscale 6], length 0
Ping funguje takto:
cely svet =>18.15.3.143 (pinguje)
subnet 18.15.5.0 => 18.15.3.143 (NEpinguje)
subnet 18.15.5.0 => 18.15.5.1 (pinguje)