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

I have bridged eth0 and wlan0, and have given a static ip for the br0 interface. I wanted to have a vlan interface. I did modprobe 8021q and I did the following:

vconfig add br0 5
ifconfig br0.5 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255 up

Then I tried to ping from br0.5 to my router that has 192.168.1.1 ip, which can be accessed via br0.

ping -I br0.5 192.168.1.1

The replay I get is Destination Host Unreachable.

Here is the output of cat /proc/net/vlan/br0.5:

br0.5  VID: 5    REORDER_HDR: 1  dev->priv_flags: 1
         total frames received            0
          total bytes received            0
      Broadcast/Multicast Rcvd            0

      total frames transmitted          329
       total bytes transmitted        20447
            total headroom inc            0
           total encap on xmit          329
Device: br0
INGRESS priority mappings: 0:0  1:0  2:0  3:0  4:0  5:0  6:0 7:0
 EGRESS priority mappings:

But the vlan interface can be pinged from other hosts. I pinged the ip of br0.5 (192.168.1.100) form a host on the network and it responded to the pings. So why can't I use br0.5 to reach for other hosts on the network?

EDIT 1:

Output of iptables -vL:

Chain INPUT (policy ACCEPT 823 packets, 215K bytes)
 pkts bytes target     prot opt in     out     source               destination                                                                              

Chain FORWARD (policy ACCEPT 5 packets, 671 bytes)
 pkts bytes target     prot opt in     out     source               destination                                                                              

Chain OUTPUT (policy ACCEPT 705 packets, 220K bytes)
 pkts bytes target     prot opt in     out     source               destination 
share|improve this question
    
Do you have any netfilter/firewall rules in the kernel that might be interface specific? what is the output of iptables -L? –  JeffG Mar 7 '11 at 16:08
    
Please use iptables -vL otherwise it won't specify which interface the rules apply to. –  Scott Pack Mar 7 '11 at 16:18
    
BTW, what are you planning on doing with this VLAN? –  Zoredache Mar 7 '11 at 17:48
    
This sounds like a routing problem. /sbin/route -n –  JeffG Mar 7 '11 at 18:30
    
@Zoredache I want to use vlan because I can access internet (WAN) and LAN over one physical network. So br0 will be my LAN interface and br0.5 will be my WAN interface. The machine will do NAT routing. –  nixnotwin Mar 8 '11 at 4:06

1 Answer 1

up vote 3 down vote accepted

I did the following: ifconfig br0.5 192.168.1.100 netmask 255.255.255.0... Then I tried to ping from br0.5 to my router that has192.168.1.1 ip...

You need to use a separate subnet for the two networks. So VLAN 1 is currently 192.168.1.0/24, you might want to use 192.168.5.0/24 for your VLAN 5.

share|improve this answer
    
I tried using a a second subnet that could be accessed via br0, br0 was 192.168.0.0/24 and br0.5 was 192.168.1.0/24, and it didn't work. –  nixnotwin Mar 8 '11 at 4:01

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.