aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-10-29 18:39:58 +0900
committerDavid S. Miller <davem@davemloft.net>2017-10-29 18:39:58 +0900
commitaad93c70b9a3b80dbc383a31e77a119f69bdd856 (patch)
tree35d21de9cf2d9e240a999597379d040aa9d1397f /Documentation
parenttools: bpftool: add bash completion for bpftool (diff)
parentipvlan: implement VEPA mode (diff)
downloadlinux-dev-aad93c70b9a3b80dbc383a31e77a119f69bdd856.tar.xz
linux-dev-aad93c70b9a3b80dbc383a31e77a119f69bdd856.zip
Merge branch 'ipvlan-private-vepa'
Mahesh Bandewar says: ==================== add 'private' and 'vepa' attributes to ipvlan modes IPvlan has always been operating in bridge-mode for its supported modes i.e. if the packets are destined to the adjacent neighbor dev, then IPvlan driver will switch the packet internally without needing the packets to hit the wire or get routed. However, there are situations where this bridge-mode is not needed. e.g. two private processes running inside two namespaces which are having one IPvlan slave each for its namespace but sharing the master. These processes should reach the outside world through the master device but at the same time the bridge function should not work. Currently that's not possible hence the private attribute for the selected mode comes in play. VEPA or 802.1Qbg on the other hand has limited appeal with IPvlan since IPvlan uses the mac-address of the lower device. So packets that are destined to the adjacent neighbor slave-dev will have same src and dest mac. When these packets reach the external switch/router, they will send you the redirect message which the host will have to deal with. Having said that this attribute will have appeal in debugging as IPvlan will not switch / short-circuit packets internally. e.g. using VEPA mode with lower-device in loopback mode will avoid some complicated set-ups that use non-local-bind with some route jugglery. This patch-set implements these attributes for the existing modes that IPvlan has. Please see individual patches for their detailed implementation. A subsequent ip-utils patch is needed and will be sent soon. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/networking/ipvlan.txt42
1 files changed, 38 insertions, 4 deletions
diff --git a/Documentation/networking/ipvlan.txt b/Documentation/networking/ipvlan.txt
index 1fe42a874aae..812ef003e0a8 100644
--- a/Documentation/networking/ipvlan.txt
+++ b/Documentation/networking/ipvlan.txt
@@ -22,9 +22,21 @@ The driver can be built into the kernel (CONFIG_IPVLAN=y) or as a module
There are no module parameters for this driver and it can be configured
using IProute2/ip utility.
- ip link add link <master-dev> name <slave-dev> type ipvlan mode { l2 | l3 | l3s }
-
- e.g. ip link add link eth0 name ipvl0 type ipvlan mode l2
+ ip link add link <master> name <slave> type ipvlan [ mode MODE ] [ FLAGS ]
+ where
+ MODE: l3 (default) | l3s | l2
+ FLAGS: bridge (default) | private | vepa
+
+ e.g.
+ (a) Following will create IPvlan link with eth0 as master in
+ L3 bridge mode
+ bash# ip link add link eth0 name ipvl0 type ipvlan
+ (b) This command will create IPvlan link in L2 bridge mode.
+ bash# ip link add link eth0 name ipvl0 type ipvlan mode l2 bridge
+ (c) This command will create an IPvlan device in L2 private mode.
+ bash# ip link add link eth0 name ipvlan type ipvlan mode l2 private
+ (d) This command will create an IPvlan device in L2 vepa mode.
+ bash# ip link add link eth0 name ipvlan type ipvlan mode l2 vepa
4. Operating modes:
@@ -54,7 +66,29 @@ works in this mode and hence it is L3-symmetric (L3s). This will have slightly l
performance but that shouldn't matter since you are choosing this mode over plain-L3
mode to make conn-tracking work.
-5. What to choose (macvlan vs. ipvlan)?
+5. Mode flags:
+ At this time following mode flags are available
+
+5.1 bridge:
+ This is the default option. To configure the IPvlan port in this mode,
+user can choose to either add this option on the command-line or don't specify
+anything. This is the traditional mode where slaves can cross-talk among
+themseleves apart from talking through the master device.
+
+5.2 private:
+ If this option is added to the command-line, the port is set in private
+mode. i.e. port wont allow cross communication between slaves.
+
+5.3 vepa:
+ If this is added to the command-line, the port is set in VEPA mode.
+i.e. port will offload switching functionality to the external entity as
+described in 802.1Qbg
+Note: VEPA mode in IPvlan has limitations. IPvlan uses the mac-address of the
+master-device, so the packets which are emitted in this mode for the adjacent
+neighbor will have source and destination mac same. This will make the switch /
+router send the redirect message.
+
+6. What to choose (macvlan vs. ipvlan)?
These two devices are very similar in many regards and the specific use
case could very well define which device to choose. if one of the following
situations defines your use case then you can choose to use ipvlan -