Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Creating VLN interfaces on existing physcial interface: (7 Items)
   
Creating VLN interfaces on existing physcial interface  
Hi,

I have a requirement for creating a vlan interface for existing physcial ethernet interfaces. I tried the following 
command:

ifconfig en0 vlan 512 vlanif en0.512

The response was:

ifconfig: valid only with vlan(4) interfaces.

How do I go about creating an VLAN interfaces?

Thanks,
Santosh
Re: Creating VLN interfaces on existing physcial interface  
On Fri, Aug 01, 2008 at 04:02:07PM -0400, Santosh Kumar wrote:
> Hi,
> 
> I have a requirement for creating a vlan interface for existing physcial ethernet interfaces. I tried the following 
command:
> 
> ifconfig en0 vlan 512 vlanif en0.512
> 
> The response was:
> 
> ifconfig: valid only with vlan(4) interfaces.
> 
> How do I go about creating an VLAN interfaces?
> 

See 'use ifconfig'

# ifconfig vlan0 create vlan 1234 vlanif wm0
                                         ^^^
                                          |
                   Where this is the physical interface.


-seanb
Re: Creating VLN interfaces on existing physcial interface  
Hi Sean,

Im not sure how that would work. I read the documentation and I understand that the number associated with the "vlan" 
parameter would set up the physical interface.

 Im not sure if the command

ifconfig vlan0 vlan 512 vlanif en0 (in my case) would work for this. I actually tried the command  but got:

ifconfig: SIOCGIFFLAGS vlan0: No such device of address.

Here's the output of my ifconfig

en0: flags=8043<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        address: 00:1f:aa:ff:ff:e0
en1: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:1f:aa:ff:ff:e1
en2: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:1f:aa:ff:ff:e2
en3: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:1f:aa:ff:ff:e3
en4: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:1f:aa:ff:ff:e4
en5: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:1f:aa:ff:ff:e5
en6: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:1f:aa:ff:ff:e6
en7: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:1f:aa:ff:ff:e7
en8: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:1f:aa:ff:ff:e8
en9: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:1f:aa:ff:ff:e9
en10: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:1f:aa:ff:ff:ea
en11: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:1f:aa:ff:ff:eb
en12: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:1f:aa:ff:ff:ec
en13: flags=802<BROADCAST,SIMPLEX> mtu 1500
        address: 00:1f:aa:ff:ff:ed

I want to create a vlan interface for en0 here. I even looked at the ifconfig code and it looks like the interface name 
has to be starting with "vlan". How do I get such an interface?

Thanks,
Santosh
  
> On Fri, Aug 01, 2008 at 04:02:07PM -0400, Santosh Kumar wrote:
> > Hi,
> > 
> > I have a requirement for creating a vlan interface for existing physcial 
> ethernet interfaces. I tried the following command:
> > 
> > ifconfig en0 vlan 512 vlanif en0.512
> > 
> > The response was:
> > 
> > ifconfig: valid only with vlan(4) interfaces.
> > 
> > How do I go about creating an VLAN interfaces?
> > 
> 
> See 'use ifconfig'
> 
> # ifconfig vlan0 create vlan 1234 vlanif wm0
>                                          ^^^
>                                           |
>                    Where this is the physical interface.
> 
> 
> -seanb


Re: Creating VLN interfaces on existing physcial interface  

See my previous posting.  You're missing the 'create' keyword.
You can do it in one step as in my previous posting or break it
up as below:

# ifconfig vlan0 create
# ifconfig vlan0 vlan 512 vlanif en0

...

# ifconfig vlan0 destroy

-seanb

On Fri, Aug 01, 2008 at 04:28:39PM -0400, Santosh Kumar wrote:
> Hi Sean,
> 
> Im not sure how that would work. I read the documentation and I understand that the number associated with the "vlan" 
parameter would set up the physical interface.
> 
>  Im not sure if the command
> 
> ifconfig vlan0 vlan 512 vlanif en0 (in my case) would work for this. I actually tried the command  but got:
> 
> ifconfig: SIOCGIFFLAGS vlan0: No such device of address.
> 
> Here's the output of my ifconfig
> 
> en0: flags=8043<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
>         address: 00:1f:aa:ff:ff:e0
> en1: flags=802<BROADCAST,SIMPLEX> mtu 1500
>         address: 00:1f:aa:ff:ff:e1
> en2: flags=802<BROADCAST,SIMPLEX> mtu 1500
>         address: 00:1f:aa:ff:ff:e2
> en3: flags=802<BROADCAST,SIMPLEX> mtu 1500
>         address: 00:1f:aa:ff:ff:e3
> en4: flags=802<BROADCAST,SIMPLEX> mtu 1500
>         address: 00:1f:aa:ff:ff:e4
> en5: flags=802<BROADCAST,SIMPLEX> mtu 1500
>         address: 00:1f:aa:ff:ff:e5
> en6: flags=802<BROADCAST,SIMPLEX> mtu 1500
>         address: 00:1f:aa:ff:ff:e6
> en7: flags=802<BROADCAST,SIMPLEX> mtu 1500
>         address: 00:1f:aa:ff:ff:e7
> en8: flags=802<BROADCAST,SIMPLEX> mtu 1500
>         address: 00:1f:aa:ff:ff:e8
> en9: flags=802<BROADCAST,SIMPLEX> mtu 1500
>         address: 00:1f:aa:ff:ff:e9
> en10: flags=802<BROADCAST,SIMPLEX> mtu 1500
>         address: 00:1f:aa:ff:ff:ea
> en11: flags=802<BROADCAST,SIMPLEX> mtu 1500
>         address: 00:1f:aa:ff:ff:eb
> en12: flags=802<BROADCAST,SIMPLEX> mtu 1500
>         address: 00:1f:aa:ff:ff:ec
> en13: flags=802<BROADCAST,SIMPLEX> mtu 1500
>         address: 00:1f:aa:ff:ff:ed
> 
> I want to create a vlan interface for en0 here. I even looked at the ifconfig code and it looks like the interface 
name has to be starting with "vlan". How do I get such an interface?
> 
> Thanks,
> Santosh
>   
> > On Fri, Aug 01, 2008 at 04:02:07PM -0400, Santosh Kumar wrote:
> > > Hi,
> > > 
> > > I have a requirement for creating a vlan interface for existing physcial 
> > ethernet interfaces. I tried the following command:
> > > 
> > > ifconfig en0 vlan 512 vlanif en0.512
> > > 
> > > The response was:
> > > 
> > > ifconfig: valid only with vlan(4) interfaces.
> > > 
> > > How do I go about creating an VLAN interfaces?
> > > 
> > 
> > See 'use ifconfig'
> > 
> > # ifconfig vlan0 create vlan 1234 vlanif wm0
> >                                          ^^^
> >                                           |
> >                    Where this is the physical interface.
> > 
> > 
> > -seanb
> 
> 
> 
> 
> _______________________________________________
> Technology
> http://community.qnx.com/sf/go/post11366
> 
Re: Creating VLN interfaces on existing physcial interface  
Woops...Sorry. Pilot error...I guess Im not seeing things right. Sorry! and thanks.

-Santosh
> 
> 
> See my previous posting.  You're missing the 'create' keyword.
> You can do it in one step as in my previous posting or break it
> up as below:
> 
> # ifconfig vlan0 create
> # ifconfig vlan0 vlan 512 vlanif en0
> 
> ...
> 
> # ifconfig vlan0 destroy
> 
> -seanb
> 
> On Fri, Aug 01, 2008 at 04:28:39PM -0400, Santosh Kumar wrote:
> > Hi Sean,
> > 
> > Im not sure how that would work. I read the documentation and I understand 
> that the number associated with the "vlan" parameter would set up the physical
>  interface.
> > 
> >  Im not sure if the command
> > 
> > ifconfig vlan0 vlan 512 vlanif en0 (in my case) would work for this. I 
> actually tried the command  but got:
> > 
> > ifconfig: SIOCGIFFLAGS vlan0: No such device of address.
> > 
> > Here's the output of my ifconfig
> > 
> > en0: flags=8043<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
> >         address: 00:1f:aa:ff:ff:e0
> > en1: flags=802<BROADCAST,SIMPLEX> mtu 1500
> >         address: 00:1f:aa:ff:ff:e1
> > en2: flags=802<BROADCAST,SIMPLEX> mtu 1500
> >         address: 00:1f:aa:ff:ff:e2
> > en3: flags=802<BROADCAST,SIMPLEX> mtu 1500
> >         address: 00:1f:aa:ff:ff:e3
> > en4: flags=802<BROADCAST,SIMPLEX> mtu 1500
> >         address: 00:1f:aa:ff:ff:e4
> > en5: flags=802<BROADCAST,SIMPLEX> mtu 1500
> >         address: 00:1f:aa:ff:ff:e5
> > en6: flags=802<BROADCAST,SIMPLEX> mtu 1500
> >         address: 00:1f:aa:ff:ff:e6
> > en7: flags=802<BROADCAST,SIMPLEX> mtu 1500
> >         address: 00:1f:aa:ff:ff:e7
> > en8: flags=802<BROADCAST,SIMPLEX> mtu 1500
> >         address: 00:1f:aa:ff:ff:e8
> > en9: flags=802<BROADCAST,SIMPLEX> mtu 1500
> >         address: 00:1f:aa:ff:ff:e9
> > en10: flags=802<BROADCAST,SIMPLEX> mtu 1500
> >         address: 00:1f:aa:ff:ff:ea
> > en11: flags=802<BROADCAST,SIMPLEX> mtu 1500
> >         address: 00:1f:aa:ff:ff:eb
> > en12: flags=802<BROADCAST,SIMPLEX> mtu 1500
> >         address: 00:1f:aa:ff:ff:ec
> > en13: flags=802<BROADCAST,SIMPLEX> mtu 1500
> >         address: 00:1f:aa:ff:ff:ed
> > 
> > I want to create a vlan interface for en0 here. I even looked at the 
> ifconfig code and it looks like the interface name has to be starting with "
> vlan". How do I get such an interface?
> > 
> > Thanks,
> > Santosh
> >   
> > > On Fri, Aug 01, 2008 at 04:02:07PM -0400, Santosh Kumar wrote:
> > > > Hi,
> > > > 
> > > > I have a requirement for creating a vlan interface for existing physcial
>  
> > > ethernet interfaces. I tried the following command:
> > > > 
> > > > ifconfig en0 vlan 512 vlanif en0.512
> > > > 
> > > > The response was:
> > > > 
> > > > ifconfig: valid only with vlan(4) interfaces.
> > > > 
> > > > How do I go about creating an VLAN interfaces?
> > > > 
> > > 
> > > See 'use ifconfig'
> > > 
> > > # ifconfig vlan0 create vlan 1234 vlanif wm0
> > >                                          ^^^
> > >                                           |
> > >                    Where this is the physical interface.
> > > 
> > > 
> > > -seanb
> > 
> > 
> > 
> > 
> > _______________________________________________
> > Technology
>...
Re: Creating VLN interfaces on existing physcial interface  
As a quick question:

Why is it required to follow a strict naming convention for creating vlan interface? Or is it just a restriction with 
using ifconfig?

I plan to add vlan interfacesp programmatically. Can I name the interface to anything I want?

Thanks,
Santosh
Re: Creating VLN interfaces on existing physcial interface  
On Fri, Aug 01, 2008 at 04:47:56PM -0400, Santosh Kumar wrote:
> As a quick question:
> 
> Why is it required to follow a strict naming convention for creating vlan interface? Or is it just a restriction with 
using ifconfig?
> 
> I plan to add vlan interfacesp programmatically. Can I name the interface to anything I want?
> 

Nah, 'vlan' is a cloneable device.  See 'ifconfig -C'.  Different
cloneable devices have different properties: 'lo*' are always
loopback, 'vlan*' are always vlan ...

-seanb