Re: Two VLANs with same IP
Ben Greear <[email protected]>
| Newsgroups | gmane.linux.drivers.vlan |
|---|---|
| Organization | Candela Technologies |
| Message-ID | <[email protected]> |
Rui Cristo wrote: > I have a problem to solve that is to create two VLANs, like vlan10 and > vlan20, and make them have the SAME IP address and I want to create > sockets for each. > How can I bind the sockets to each VLAN instead of binding them to its > IP? If I bind with it's IP I can't control wich VLAN to choose. That sounds like a horrible thing to do! You could try the SO_BINDTODEVICE sockopt, but not sure if it will do what you want. Perhaps adding the two VLANs to a bridge and setting the IP on the bridge would be more appropriate? Ben -- Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com