Problem about VLAN

How to create VLAN with multiple parent NICs?
Code:
ifconfig vlan0 create
ifconfig vlan0 vlan 100 vlandev em0 up
ifconfig em0 up
I only know this way, but I want vlan 100 have mutiple parent NICs.
How to?
 
I think you might be confusing vlan virtual devices with vlan ids. You can create several vlan devices (such as vlan0, vlan1) that each one will have a different parent real interface (such as em0, em1), but have the same vlan id (like vlan 100 in your example). Then you can do whatever you want with them, eg. you can assign IPs to them, you can bridge them and make them have the same broadcast domain, etc.
 
mamalos said:
I think you might be confusing vlan virtual devices with vlan ids. You can create several vlan devices (such as vlan0, vlan1) that each one will have a different parent real interface (such as em0, em1), but have the same vlan id (like vlan 100 in your example). Then you can do whatever you want with them, eg. you can assign IPs to them, you can bridge them and make them have the same broadcast domain, etc.

I want to create a vlan that have several parent real interfaces.eg:
Code:
ifconfig vlan0 vlan 100 vlandev em0 vlandev em1 up
BUT, it's wrong!
Code:
ifconfig vlan0 vlan 100 vlandev bridge0 up
It's also wrong!
I just want the vlan100 up when em0 down!
 
I am not sure I understand what you wish to do. If you bridge your vlan interfaces, instead of creating a vlan interface with a parent interface that is a bridge interface, won't work for your case?
 
mamalos said:
I am not sure I understand what you wish to do. If you bridge your vlan interfaces, instead of creating a vlan interface with a parent interface that is a bridge interface, won't work for your case?

topology:
Code:
   S W I T C H 1 (STP - ROOT ,Gi0/0,Gi0/1 and Gi0/2 are designated ports)
Gi0/ 0   1   2
     |   |   |
     |   |   |
em   0   1   2
      FreeBSD
em   3   4   5
     |   |   |
     |   |   |
Gi0/ 0   1   2
   S W I T C H 2  (STP - Gi0/0 is Root port,Gi0/1 and Gi0/2 are in Blocked state)
configuration:
Code:
FreeBSD:
ifconfig bridge0 create
ifconfig bridge0 addm em0 addm em3 -stp em0 -stp em3 up
ifconfig em0 up
ifconfig em3 up

ifconfig bridge1 create
ifconfig bridge1 addm em1 addm em4 -stp em1 -stp em4 up
ifconfig em1 up
ifconfig em4 up

ifconfig bridge2 create
ifconfig bridge2 addm em3 addm em5 -stp em3 -stp em5 up
ifconfig em3 up
ifconfig em5 up

ifconfig vlan0 create
ifconfig vlan0 vlan 100 vlandev em0 192.168.0.254/24 up

If em0's state is down, the two SWITCHS can't connect to the Freebsd with VLAN 100.
 
you mean?:
Code:
FreeBSD:
ifconfig vlan0 create
ifconfig vlan0 vlan 100 vlandev em0 192.168.0.254/24 up

ifconfig bridge0 create
ifconfig bridge0 addm em0 addm em3 addm vlan0 -stp em0 -stp em3 up
ifconfig em0 up
ifconfig em3 up

ifconfig bridge1 create
ifconfig bridge1 addm em1 addm em4 addm vlan0 -stp em1 -stp em4 up
ifconfig em1 up
ifconfig em4 up

ifconfig bridge2 create
ifconfig bridge2 addm em3 addm em5 addm vlan0 -stp em3 -stp em5 up
ifconfig em3 up
ifconfig em5 up
 
spartacus,

I am not very familiar with Cisco semantics, so I am not really sure if I still understand you correctly. But from what I understand, what I'd suggest you to do is:

Code:
# ifconfig vlan0 create vlan 100 vlandev em0 up
# ifconfig vlan1 create vlan 100 vlandev em3 up

and then bridge vlan0 and vlan1, something like:

# ifconfig bridge0 create addm vlan0 addm vlan1 up

I am not sure if you need stp, this depends on your topology. This means that both em0 and em3 read traffic from vlan-id 100 via their respective virtual interfaces (vlan0 and vlan1), and that the virtual interfaces are bridged.

If that's what you need, it is very easy to deal with the rest of your interfaces accordingly.

Hope this helped.
 
mamalos said:
spartacus,

I am not very familiar with Cisco semantics, so I am not really sure if I still understand you correctly. But from what I understand, what I'd suggest you to do is:

Code:
# ifconfig vlan0 create vlan 100 vlandev em0 up
# ifconfig vlan1 create vlan 100 vlandev em3 up

and then bridge vlan0 and vlan1, something like:

# ifconfig bridge0 create addm vlan0 addm vlan1 up

I am not sure if you need stp, this depends on your topology. This means that both em0 and em3 read traffic from vlan-id 100 via their respective virtual interfaces (vlan0 and vlan1), and that the virtual interfaces are bridged.

If that's what you need, it is very easy to deal with the rest of your interfaces accordingly.

Hope this helped.

Thank you, this is what I need. Thank you help me all.
 
Back
Top