1

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?

2 Answers2

1

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

KikoV
  • 160
  • 4
  • 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? –  Jul 26 '10 at 12:53
  • to access LAN ip address... no... just routes as usual. – KikoV Jul 28 '10 at 00: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? –  Aug 03 '10 at 13:47
0

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
  • 125
  • 1
  • 5