Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Help! VLAN tagged and untagged routing

    I'm using my linux system (Linux as a IPTV media center (XBMC). My interface configuration is

    eth0      Link encap:Ethernet  HWaddr 00:01:2e:2b:12:6e
              inet addr:  Bcast:  Mask:
              inet6 addr: fe80::201:2eff:fe2b:126e/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:72695907 errors:0 dropped:0 overruns:0 frame:0
              TX packets:152520 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:64299304 (64.2 MB)  TX bytes:22220802 (22.2 MB)
    eth0.3999 Link encap:Ethernet  HWaddr 00:01:2e:2b:12:6e
              inet addr:  Bcast:  Mask:
              inet6 addr: fe80::201:2eff:fe2b:126e/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:839421 errors:0 dropped:0 overruns:0 frame:0
              TX packets:82 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:1131088026 (1.1 GB)  TX bytes:5180 (5.1 KB)
    eth0 network is for the "internet" traffic, eth0.3999 tagged interface is for IPTV multicast traffic. I had to manually add the following networks so the multicast works.

    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     *        U     0      0        0 eth0      *          U     0      0        0 eth0.3999       *            U     0      0        0 eth0.3999
    Wireshark gives me clearer picture

    I can clearly see IGMP messages exchange and that source address for the given multicast address (one of the IPTV channels) is

    Now here is the question. I always thought that routes are for the outbound traffic, so the kernel knows where to shift packets when it travels out of the box (packet generated by the application or packet received from another interface, but not meant for the current box). In VLAN it is a little bit different. I manually removed network

    $ route del -net netmask
    and channel playing stopped working. When I manually add route

    $ route add -net netmask dev eth0.3999
    channel playing starts to work again. UDP packages are present on the physical interface all the time. That confuses me. My Linux box is not multicast traffic originator, yet it still needs route to the originator so the channel playing works. Why? Is it the case that when tagged traffic comes to the physical port, kernel does not know where to shift tagged multicast traffic (on tagged eth0.3999 or untagged eth0)? And when I add the route it knows it has to shift it to the tagged interface eth0.3999? Is this true also for the inbound traffic?

    All the help or some link resources on the issue would much be appreciated.

    Thank you!

  2. #2
    hi rostfrei,

    Yes, I think you're right. Vlan must have a TAG and if you remove the route some packets cannot be identified as VLAN.

    I don't think it's the same thing for inbound traffic, because if they pass trough a router it should be able to route them to the right way... but I'm not sure.

  3. #3
    Just Joined!
    Join Date
    Jun 2004
    North Hollywood, CA


    In networking parlance, usually tagging is allowing multiple vlans over a single interface.

    And a route is a route. It is bidirectional. The way you are using the routes, per interface, sort of makes each interface a router, with specific addresses to deal with. So you are using your Linux system as a little router. Although this should not cause a problem, there are reasons for not doing it this way. Mostly, causing more overhead on each interface, which in turn will cause more CPU usage on the entire system.

    I have a Linux box that is my server and my file storage. On my router, I redirect all protocols to the server. But I do have to put my server's local IP address into my Windows system's hosts file. Otherwise, it would route out to the internet and then back to get to the server. That's sound like what is happening to you. Since multicast IP addresses are predesignated, unless you specify them in your internal network, the route would try to go out to the internet to try to find them.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts