aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/dir.dox
blob: 8497a2f64cc5b393f0a18179c6772397963b6a64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * Copyright (c) 2013 Cisco and/or its affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
@dir
@brief Layer 2 Forwarding Code.

This directory contains the source code for basic Layer 2 forwarding.

*/
/*? %%clicmd:group_label Layer 2 CLI %% ?*/
et int ip address tap-0 192.168.1.1/24 vagrant@localhost:~$ sudo vppctl set int state tap-0 up To turn on packet tracing for the tap interface: vagrant@localhost:~$ sudo vppctl trace add tapcli-rx 10 Now, to set up and try the other end: vagrant@localhost:~$ sudo ip addr add 192.168.1.2/24 dev foobar vagrant@localhost:~$ ping -c 3 192.168.1.1 To look at the trace: vagrant@localhost:~$ sudo vppctl show trace And to stop tracing: vagrant@localhost:~$ sudo vppctl clear trace Other fun things to look at: The vlib packet processing graph: vagrant@localhost:~$ sudo vppctl show vlib graph which will produce output like: Name Next Previous ip4-icmp-input error-punt [0] ip4-local ip4-icmp-echo-request [1] vpe-icmp4-oam [2] To read this, the first column (Name) is the name of the node. The second column (Next) is the name of the children of that node. The third column (Previous) is the name of the parents of this node. To see this README again: cat /vagrant/README