Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jan 2009 17:09:50 +0300
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        Eitan Shefi <eitans@mellanox.co.il>
Cc:        freebsd-net@freebsd.org
Subject:   Re: When configuring 2 VLANs to be on the same subnet, only one works.
Message-ID:  <+3+JfrHHIEz9xs7kOtLRj9ebGAs@HEwlnNW4tuDdZ1V6ihYwW3pQ/cw>
In-Reply-To: <5D49E7A8952DC44FB38C38FA0D758EAD0173629B@mtlexch01.mtl.com>
References:  <5D49E7A8952DC44FB38C38FA0D758EAD0173629B@mtlexch01.mtl.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
EItan, good day.

Tue, Jan 13, 2009 at 03:09:11PM +0200, Eitan Shefi wrote:
> I use 2 directly connected FreeBSD-7.0 hosts.
> When I create 2 VLANs for the same interface (mtnic0), on each host, and
> configure the VLANs on each host to be on the same subnet:
> ping works only to one of the VLANs.
>  
> I run:
> On sw259: 
> /sbin/ifconfig vlan1 create vlan 1 vlandev mtnic0
> /sbin/ifconfig vlan2 create vlan 2 vlandev mtnic0
> /sbin/ifconfig vlan1 91.154.12.5 netmask 255.0.0.0
> /sbin/ifconfig vlan2 91.155.12.5 netmask 255.0.0.0
>  
> On sw260: 
> /sbin/ifconfig vlan1 create vlan 1 vlandev mtnic0
> /sbin/ifconfig vlan2 create vlan 2 vlandev mtnic0
> /sbin/ifconfig vlan1 91.154.12.6 netmask 255.0.0.0
> /sbin/ifconfig vlan2 91.155.12.6 netmask 255.0.0.0
>  
> Now on sw259 run: 
> ping 91.154.12.6 - works. 
> ping 91.155.12.6 - does not work. 

You're running two interfaces on the same /8 subnet at one host.  I bet
that your routing table specifies that packets both for 91.154.12.6 and
91.155.12.6 should go through the same interface, probably vlan1.  Could
you show output of 'netstat -rn', 'route get 91.154.12.6' and 'route get
91.155.12.6'?

Also try to spawn tcpdump on the interface that packets for 91.154.12.6
are routed to and look for the captured packets when pinging
91.155.12.6.  Your local firewall could also prevent packets from being
pushed to the network, but this actually depens on your configuration.
-- 
Eygene
 _                ___       _.--.   #
 \`.|\..----...-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' `         ,       __.--'      #  to read the on-line manual
 )/' _/     \   `-_,   /            #  while single-stepping the kernel.
 `-'" `"\_  ,_.-;_.-\_ ',  fsc/as   #
     _.-'_./   {_.'   ; /           #    -- FreeBSD Developers handbook
    {_.-``-'         {_/            #



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?+3+JfrHHIEz9xs7kOtLRj9ebGAs>