From: "Taylor, Grant" <gtaylor@riverviewtech.net>
To: netfilter@lists.netfilter.org
Subject: Re: How make virtual interfaces ( subinterfaces ) on linux machine
Date: Tue, 05 Dec 2006 14:13:13 -0600 [thread overview]
Message-ID: <4575D2D9.4020308@riverviewtech.net> (raw)
In-Reply-To: <428559.74702.qm@web56206.mail.re3.yahoo.com>
Elvir Kuric wrote:
> I want to know is there some manual or even better
> book how to make virtual interfaces ( subinterfaces )
> on linux machine and attach VLANs which are
> implemented on switch to these virtaul interfaces.
I'm not quite sure exactly what you mean by virtual interfaces.
Presently, you can easily create virtual / logical interfaces for any given
VLAN for a physical interface. Do some reading on vconfig if you want /
need more information. Or, reply and I'll be happy to help.
You could do something as crazy as this, which I have successfully done before.
ifconfig eth0 0.0.0.0 up
ifconfig eth1 0.0.0.0 up
ifenslave bond0 eth0 eth1
vconfig add bond0 1
vconfig add bond0 2
ifconfig bond0.1 1.0.0.1 netmask 255.0.0.0 up
ifconfig bond0.1:1 1.255.255.254 netmask 255.0.0.0 up
ifconfig bond0.2 2.0.0.1 netmask 255.0.0.0 up
ifconfig bond0.2 2.0.0.1 netmask 255.0.0.0 up
brctl addbr bri0
brctl addif bri0 bond0.1
brctl addif bri0 bond0.2
ifconfig bri0 3.0.0.1 netmask 255.0.0.0 up
ifconfig bri0:1 3.255.255.254 netmask 255.0.0.0 up
Then use IPTables / EBTables / ARPTables to your heart's content. If you
enable layer 3 matching on layer 2 for ebtables, you can use IPTables to
filter bridged traffic.
In the above scenario, you end up with the following interfaces:
eth0
eth1
bond0
bond0.1
bond0.1:1
bond0.2
bond0.2:1
bri0
bri0:1
I hope that helps. If you have any other questions, fire away. Sorry, I'm
not sure of any concise manual, per say, but there are a few man pages for
each command that you can use in conjunction with other commands. :)
Grant. . . .
P.S. Router-On-A-(Bonded and / or VLAN)-Stick is fun and can be very
useful. :} When you start combining a layer 2 managed switch with a Linux
box things get VERY interesting. Can you say load sharing across 8 cable
modems on a router with 2 NICs...
next prev parent reply other threads:[~2006-12-05 20:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-05 19:49 How make virtual interfaces ( subinterfaces ) on linux machine Elvir Kuric
2006-12-05 20:13 ` Taylor, Grant [this message]
2006-12-05 20:15 ` Pollywog
2006-12-06 6:34 ` Elvir Kuric
2006-12-06 6:40 ` Grant Taylor
2006-12-06 11:05 ` Petr Pisar
2006-12-06 12:20 ` Elvir Kuric
2006-12-06 7:57 ` Clemens
2006-12-06 8:09 ` Grant Taylor
2006-12-06 8:21 ` Clemens
2006-12-07 11:41 ` Alexandru Dragoi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4575D2D9.4020308@riverviewtech.net \
--to=gtaylor@riverviewtech.net \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.