From 5e36c3cd6b74d0b6adf483934eebbf50f5f570b2 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Tue, 30 Oct 2018 10:24:17 -0400 Subject: DOC-ONLY: document packet intialization from scratch Minor clean-up in the home gateway use-case documentation Change-Id: I7d3aaea8cec62248daf7814b21a8acb574ac12a1 Signed-off-by: Dave Barach --- docs/usecases/homegateway.rst | 45 +++++-------------------------------------- 1 file changed, 5 insertions(+), 40 deletions(-) (limited to 'docs/usecases') diff --git a/docs/usecases/homegateway.rst b/docs/usecases/homegateway.rst index f6d7ec9a329..077d5a2a961 100644 --- a/docs/usecases/homegateway.rst +++ b/docs/usecases/homegateway.rst @@ -77,9 +77,9 @@ vpp configuration:: set int state GigabitEthernet0/14/0 up comment { dhcp server and host-stack access } - tap connect lstack address 192.168.1.2/24 - set int l2 bridge tapcli-0 1 - set int state tapcli-0 up + create tap host-if-name lstack host-ip4-addr 192.168.1.2/24 host-ip4-gw 192.168.1.1 + set int l2 bridge tap0 1 + set int state tap0 up comment { Configure NAT} nat44 add interface address GigabitEthernet3/0/0 @@ -96,13 +96,11 @@ vpp configuration:: comment { bin dns_enable_disable } comment { see patch below, which adds these commands } service restart isc-dhcp-server - add default linux route via 192.168.1.1 Patches ------- -You'll need this patch to add the "service restart" and "add default -linux route" commands:: +You'll need this patch to add the "service restart" command:: diff --git a/src/vpp/vnet/main.c b/src/vpp/vnet/main.c index 6e136e19..69189c93 100644 @@ -144,40 +142,7 @@ linux route" commands:: +}; +/* *INDENT-ON* */ + - +static clib_error_t * - +add_default_linux_route_command_fn (vlib_main_t * vm, - + unformat_input_t * input, - + vlib_cli_command_t * c) - +{ - + int rv __attribute__((unused)); - + ip4_address_t ip4_addr; - + u8 *cmd; - + - + if (!unformat (input, "%U", unformat_ip4_address, &ip4_addr)) - + return clib_error_return (0, "default gateway address required..."); - + - + cmd = format (0, "/sbin/route add -net 0.0.0.0/0 gw %U", - + format_ip4_address, &ip4_addr); - + vec_add1 (cmd, 0); - + - + rv = system (cmd); - + - + vlib_cli_output (vm, "%s", cmd); - + - + vec_free(cmd); - + - + return 0; - +} - + - +/* *INDENT-OFF* */ - +VLIB_CLI_COMMAND (add_default_linux_route_command, static) = { - + .path = "add default linux route via", - + .short_help = "Adds default linux route: 0.0.0.0/0 via ", - + .function = add_default_linux_route_command_fn, - +}; - +/* *INDENT-ON* */ - + - + + Using the temporal mac filter plugin ------------------------------------ -- cgit 1.2.3-korg