# Linux - virtual network commands
###### tags: `linux` `network`
```
create/delete vnet pair. (virtual nic pair)
#ip link add type veth
!!! default name is veth# , (# is a number)
#ip link add <veth name> type veth peer name <peer veth name>
#ip link delete <veth name>
create/delete network namespace
#ip netns add <namespace name>
#ip netns delete <namespace name>
assign vnet nic to namespace
#ip link set <veth name> netns <namespace name>
exec command in namespace
#ip netns exec <namespace name> <command>
EX.
#ip netns exec namespace1 ip link set veth0 up
#ip netns exec namespace1 ip address add 10.0.1.1/24 dev veth0
#ip netns exec namespace1 ping -c 3 10.0.1.2
connect linux bridge to openvswitch
#brctl addif <linux bridge name> <openvswitch port name>
check veth port's peer interface index
root@node-14:~# ethtool -S qvb5ba8794e-53
NIC statistics:
peer_ifindex: 22
check port and PID/process name
netstat -lnptu
```