Network virtualization technology
OpenVSwitch: virtual switch
VLAN, VXLAN
Virtual router
What is VLAN?
Virtual LAN: LAN refers to the range from broadcast frame to node, that is, the range of direct communication;
VLAN:
MAC address based
Port implementation based on switch
Implementation based on IP address
User based implementation
Type of switch interface:
access link
Link: trunk link
VLAN aggregation mode:
IEEE 802.1q
ISL: Inter Switch Link
VLAN Routing:
Router:
Access link: router provides an interface for each VLAN
Aggregation link: router only provides one interface to the switch
Three layer switch:
Network virtualization:
Complex virtualized networks:
netns
OpenVswitch
OVS: Be based on C Language development, 802.1q, trunk, access NIC bonding NetFlow, sFlow Qos Configuration and strategy GRE, VxLAN, OpenFlow OVS Components of: ovs-vswitchd: OVS daemon,Realize data message exchange function, and Linux The core compatible modules implement the stream based switching technology together; ovsdb-server: Lightweight database service, mainly saving the entire OVS Configuration information of, such as interface, exchange content VLAN Wait, ovs-vswithed The exchange function of is based on this library; ovs-dpctl: Configure the tool program of switch core module to control forwarding rules; ovs-vsctl: Used to get or change ovs-vswitchd The configuration information of will be saved to ovsdb-server Medium; ovs-appctl ovsdbmonitor: gui Tool display ovsdb-server Data information in; ovs-controller: Flow control tools ovs-ofctl ovs-pki: by openflow Create management pki Command line tools;
Experimental environment:
Operating system: CentOS 6.6
IP address: 172.16.100.6
Kernel: 2.6.32-504.el6.x86 ʄ
[root@kvm ~]# modinfo 8021q filename: /lib/modules/3.10.0-862.el7.x86_64/kernel/net/8021q/8021q.ko.xz version: 1.8 license: GPL alias: rtnl-link-vlan retpoline: Y rhelversion: 7.5 srcversion: A57F0AC30965A554203D4E3 depends: mrp,garp intree: Y vermagic: 3.10.0-862.el7.x86_64 SMP mod_unload modversions signer: CentOS Linux kernel signing key sig_key: 3A:F3:CE:8A:74:69:6E:F1:BD:0F:37:E5:52:62:7B:71:09:E3:2B:96 sig_hashalgo: sha256 [root@kvm ~]# modprobe 8021q [root@kvm ~]# yum info vconfig Name : vconfig Arch : x86_64 Version : 1.9 Release : 8.1.el6 Size : 178 k Repo : installed From repo : anaconda-CentOS-201410241409.x86_64 Summary : Linux 802.1q VLAN configuration utility URL : http://www.candelatech.com/~greear/vlan.html License : GPLv2+ Description : The vconfig program configures and adjusts 802.1q VLAN parameters. [root@kvm ~]# ls /proc/net/vlan/ config
Experimental environment:
node1:
Operating system: CentOS 6.6
IP address: 172.16.100.6
Kernel: 2.6.32-504.el6.x86 ʄ
Network card 1: VMnet0
Network card 2: VMnet1
Network card 3: VMnet8
node2:
Operating system: CentOS 6.6
IP address: 172.16.100.6
Kernel: 2.6.32-504.el6.x86 ʄ
Network card 1: VMnet0 172.16.100.20
Network card 2: VMnet1
Network card 3: VMnet2
node3:
Operating system: CentOS 6.6
IP address: 172.16.100.6
Kernel: 2.6.32-504.el6.x86 ʄ
Network card 1: VMnet0 172.16.100.30
Network card 2: VMnet1
Network card 3: VMnet2
node2:
[root@node2 network-scripts]# ifconfig eth0 Link encap:Ethernet HWaddr 00:0C:29:90:D0:92 inet addr:172.16.100.20 Bcast:172.16.100.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe90:d092/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1402 errors:0 dropped:0 overruns:0 frame:0 TX packets:1191 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:119155 (116.3 KiB) TX bytes:118239 (115.4 KiB) eth1 Link encap:Ethernet HWaddr 00:0C:29:90:D0:A6 inet addr:192.168.10.7 Bcast:192.168.10.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe90:d0a6/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:20 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:1244 (1.2 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
node3:
[root@node3 network-scripts]# ifconfig eth0 Link encap:Ethernet HWaddr 00:0C:29:D6:6A:92 inet addr:172.16.100.30 Bcast:172.16.100.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fed6:6a92/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:681 errors:0 dropped:0 overruns:0 frame:0 TX packets:602 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:60082 (58.6 KiB) TX bytes:62754 (61.2 KiB) eth1 Link encap:Ethernet HWaddr 00:0C:29:D6:6A:A6 inet addr:192.168.10.8 Bcast:192.168.10.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fed6:6aa6/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:364 (364.0 b) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
node1: