diff options
author | Keith Burns (alagalah) <alagalah@gmail.com> | 2016-09-10 14:55:04 -0700 |
---|---|---|
committer | Chris Luke <chris_luke@comcast.com> | 2016-09-11 20:33:27 +0000 |
commit | 61a7a7fb9f82dc43ee6b60247d9bd0ac2329a642 (patch) | |
tree | f3256ccbb1fb9580f12349c05996ee10913c8c89 /vnet/vnet/l2/l2_input.c | |
parent | 0024dfb30700dd0a8efb881d3b1d02d749a17587 (diff) |
Move CLI examples from wiki to code - VPP-165
Change-Id: I50ad0d79a6ffaf0a51848abf2c5ed57e83c8640f
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
Diffstat (limited to 'vnet/vnet/l2/l2_input.c')
-rw-r--r-- | vnet/vnet/l2/l2_input.c | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/vnet/vnet/l2/l2_input.c b/vnet/vnet/l2/l2_input.c index ef1e00ce66b..c5f4891aec3 100644 --- a/vnet/vnet/l2/l2_input.c +++ b/vnet/vnet/l2/l2_input.c @@ -834,6 +834,17 @@ done: } /* *INDENT-OFF* */ +/*? + * + * @cliexpar + * @cliexstart{set interface l2 bridge} + * Interfaces in a bridge-domain forward packets to other interfaces in the same bridge-domain based on destination mac address. + * To add an interface to bridge-domain 5 use: + * vpp# set interface l2 bridge GigabitEthernet2/0/0 5 + * A split-horizon group can also be specified. This defaults to 0 if not specified. + * vpp# set interface l2 bridge GigabitEthernet2/0/0 5 1 + * @cliexend + ?*/ VLIB_CLI_COMMAND (int_l2_bridge_cli, static) = { .path = "set interface l2 bridge", .short_help = "set interface to L2 bridging mode in <bridge-domain ID> [bvi] [shg]", @@ -884,9 +895,18 @@ done: } /* *INDENT-OFF* */ +/*? + * L2 Cross-connect two interfaces + * @cliexpar + * @cliexstart{set interface l2 xconnect} + * To cross-connect two interfaces, put both into L2 cross-connect mode. All packets received on one interface will be transmitted to the other. + * vpp# set interface l2 xconnect GigabitEthernet2/0/0 GigabitEthernet2/0/1 + * vpp# set interface l2 xconnect GigabitEthernet2/0/1 GigabitEthernet2/0/0 + * @cliexend + ?*/ VLIB_CLI_COMMAND (int_l2_xc_cli, static) = { .path = "set interface l2 xconnect", - .short_help = "set interface to L2 cross-connect mode with <peer interface>", + .short_help = "set interface l2 xconnect <interface> <peer interface>", .function = int_l2_xc, }; /* *INDENT-ON* */ @@ -923,7 +943,16 @@ done: } /* *INDENT-OFF* */ -VLIB_CLI_COMMAND (int_l3_cli, static) = { +/*? + * + * @cliexpar + * @cliexstart{cmd} + * Interfaces can be set in either L3 (routed) mode or L2 (xconnect or bridged) mode. + * Interfaces are in L3 mode by default. To return an interface to L3 mode, use: + * vpp# set interface l3 GigabitEthernet2/0/0 + * @cliexend + ?*/ + VLIB_CLI_COMMAND (int_l3_cli, static) = { .path = "set interface l3", .short_help = "set interface to L3 mode", .function = int_l3, |