Switches, Hubs, and Modems
cancel
Showing results for 
Search instead for 
Did you mean: 

vlan trunk to debian host, host has trouble with Internet connection

Guido Kostons
Occasional Visitor

vlan trunk to debian host, host has trouble with Internet connection

I have a router (m0n0wall) with 2 nics.
One nic for wlan the other I use for vlan trunk to port 26 of my Procurve 2626 switch.

I created 3 vlans in router and switch.
port range 1-8 untagged on vlan22
port range 9-16 untagged on vlan44
port range 17-24 untagged on vlan66
port 26 trunk all vlans to router lan nic

Now I want to use my Samba server and send broadcasts on my 3 vlans. I connected my Debian etch Samba server on switch port 17 and tagged port 17 for all 3 vlans.

Then I configured vlans on the debian host.
My /etc/network/interfaces
-----------------
# VLAN interface for LAN (VLAN 0)
auto vlan22
iface vlan22 inet static
address 192.168.168.3
netmask 255.255.255.224
vlan_raw_device eth0

# VLAN interface for DMZ (VLAN 2)
auto vlan66
iface vlan66 inet static
address 192.168.166.2
netmask 255.255.255.224
gateway 192.168.166.1
vlan_raw_device eth0

### static routing ###
post-up route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.166.1
pre-down route del -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.166.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.166.1
dns-search kostons.net

# VLAN interface for WLAN2 (VLAN 3)
auto vlan88
iface vlan88 inet static
address 10.10.10.66
netmask 255.255.255.192
vlan_raw_device eth0
-----------------

After reboot the samba server is on al vlans like i want them to be but when I run "apt-get update" on the debian host its not able to reach the internet. Wen I lynx to google.com thats working oke though.

Wen I try to ssh into the debian host from a host on one of the vlans I can't get in.
Wen I ping the samba system all pings are received and echoed back so no problem there.

I'm at the end of my ideas of what might be the problem I can't reach the Internet and/or can't ssh into the host on port 17. But when i ping Internet hosts it works.

I'm able to lynx to google.com but i'm unable to lynx to www.debian.org.

I set static routes and default gateway on the debian samba machine.

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.166.0 0.0.0.0 255.255.255.224 U 0 0 0 vlan66
192.168.168.0 0.0.0.0 255.255.255.224 U 0 0 0 vlan22
10.10.10.64 0.0.0.0 255.255.255.192 U 0 0 0 vlan88
0.0.0.0 192.168.166.1 0.0.0.0 UG 0 0 0 vlan66

Samba is reachable on windows network on all vlans but I want the debian host also to be able to update from the Internet and I want to be able to ssh into it. wich I can't right now and don't understand why.

Kind regards, Guido
2 REPLIES
Ari Yrjölä
Advisor

Re: vlan trunk to debian host, host has trouble with Internet connection

How about like this:


auto eth0.22 eth0.66 eth0.88
iface eth0.22 inet static
address 192.168.168.3
netmask 255.255.255.224

auto eth0.66
iface eth0.66 inet static
address 192.168.166.2
netmask 255.255.255.224
gateway 192.168.166.1

auto eth0.88
iface eth0.88 inet static
address 10.10.10.66
netmask 255.255.255.192
Guido Kostons
Occasional Visitor

Re: vlan trunk to debian host, host has trouble with Internet connection

Hello Ari Yrjölä
Thank for your message and help
It did not help though.

With your interfaces config the problem is still the same.

I can ping all hosts on the Internet.
I can lynx to some sites like google.com but debian.org does not work with lynx.
Very strange behavior.

Samba is on all 3 vlans that part works with mine and also with your interfaces config.

I stil can't ssh into the debian host and on the debian host I can't "apt-get update".

Wen I "nslookup debian.org" that works normaly too.

Maybe you stil have some other ideas what might be going on? I would be very happy if this problem would be solved.