Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Debain mt-daapd server sharing songs over the network. Our network has a lot of different subnets and VLANS. The DAAP protocol isn't routeable. The server I have has two NICs installed, configured as follows:

auto eth0
auto eth1

iface eth0 inet static
address 172.21.1.20
netmask 255.255.0.0
gateway 172.21.1.1
network 172.21.0.0
broadcast 172.21.255.255

iface eth1 inet static
address 192.168.1.20
netmask 255.255.255.0
gateway 192.168.1.3
network 192.168.1.0
broadcast 192.168.1.255

What I would like to have happen is this: eth0 (on the server VLAN) should stay the same, eth1 should have an address in 5 VLANS attached to it: 172.17.1.20, 172.18.1.20, 172.19.1.20, 172.20.1.20, 172.21.1.20. I would like server software running on the server (mt-daapd, OCS, SSH, SAMBA) to be accessible from all VLANS. Most of this isn't a problem, but the mt-daapd (DAAP) isn't routeable across VLANs or subnets. How can I set this up?

share|improve this question
add comment

2 Answers 2

Install vlan package, and set this in the /et/network/interfaces

iface eth1.0101 inet static
   address 172.17.1.20
   netmask 255.255.255.0


iface eth1.0102 inet static
   address 172.18.1.20
   netmask 255.255.255.0


iface eth1.0103 inet static
   address 172.19.1.20
   netmask 255.255.255.0


iface eth1.0104 inet static
   address 172.20.1.20
   netmask 255.255.255.0


iface eth1.0105 inet static
   address 172.21.1.20
   netmask 255.255.255.0

You should enable ip_forward to allow traffic among them

share|improve this answer
1  
Don't forget the auto eth1.0101 eth1.0102 eth1.0103 eth1.0104 eth1.0105 at the beggining of the file! And remember configuring a encapsulation trunk dot1q in eth1 interface on the switch side! –  KikoV Jul 23 '10 at 20:03
    
Thanks! Do I have to do anything with the "route" command to add routes between VLANs at all? –  Chris Esposito Jul 26 '10 at 12:53
    
to access LAN ip address... no... just routes as usual. –  KikoV Jul 28 '10 at 0:16
    
The network traffic is not being forwarded to the VLAN interfaces... I did echo 1 > /proc/sys/net/ipv4/ip_forward Is there anything else I need to do to get the forwarding to work? –  Chris Esposito Aug 3 '10 at 13:47
add comment

The network traffic is not being forwarded to the VLAN interfaces... I did

echo 1 > /proc/sys/net/ipv4/ip_forward

Is there anything else I need to do to get the forwarding to work?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.