Linux Networking Learning Links

veth : tüp şeklinde tanımdır. İki adet virtual eth interface yaratır ve bir birine bağlar.

$ sudo ip link add veth0 type veth peer name veth1
$ ip link show type veth
4: veth1@veth0:  mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 92:e3:6f:51:b7:96 brd ff:ff:ff:ff:ff:ff
5: veth0@veth1:  mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether aa:4c:fd:e3:cc:a1 brd ff:ff:ff:ff:ff:ff

TYPE := [ bridge | bond | can | dummy | ifb | ipoib | macvlan | macvtap | vcan | veth | vlan | vxlan | ip6tnl | ipip | sit | gre| gretap | ip6gre | ip6gretap | vti | nlmon | geneve | macsec ]

Bu noktada yaratılan iki interface ip verip erişim sağlayabilirsiniz. Fakat iki interface’de aynı namespace üzerinde olacağı için erişim aralarındaki tunnel üzerinden olmaz!

Genel olarak bu tarz bir veth tüneli kurmaktaki amaç farklı namespace’leri bir birine bağlamaktır.

linux routing : https://blog.scottlowe.org/2013/05/30/a-use-case-for-policy-routing-with-kvm-and-open-vswitch/

Veth Devices, Network Namespaces and Open vSwitch

https://blog.scottlowe.org/2013/05/29/a-quick-introduction-to-linux-policy-routing/

Linux Name Spaces : VRF tanımlamak gibi linux üzerinde farklı routing/paket iletim alanları yaratmaktır.

ip link : standart name space üzerindeki link’leri listeler.

ip netns list ile mevcut name space’ler listenelir. Ayrıca add/del vb komutlar ile eklenir veya silinir.

ip netns exec namespaceismi ile istenilen namespace üzerinde exec komutları çalıştırılabilir. ip netns exec RED ip link gibi.

 

 

TUN, TAP and Veth – Virtual Networking Devices Explained

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.