L1: Physical Layer
L2: Data link layer, MAC address based communication, connect via switch;
A peer transport, that is, a host on the switch sends a packet that is connected in the interchange
All machines on the machine can be received;
L3: Network layer, based on IP address, router device, connecting different network segments, routing
Select
Switch/Router differences:
1, the work level is different, the switch is in L2, the router is in the L3;
2, data forwarding according to the different objects:
The switch transmits the data frame based on the MAC address, and the router transmits IP packets based on the IP address;
3, solve the problem is different:
The switch makes the same network segment interworking/routers make multi-network segment interoperability;
IP Table
IP netns exec router-ns iptables-t nat-nl
Hybrid modules:
1. Receive all packets passing through the device (NIC)
2, generally used for network capture packet;
3, floating IP function realization
Check if the network card is turned on promiscuous mode;
[Email protected]:~# ifconfig br0
Br0 Link encap:ethernet HWaddr c8:0a:a9:57:70:b0
inet addr:222.132.16.52 bcast:222.132.16.255 mask:255.255.255.0
Inet6 ADDR:FE80::CA0A:A9FF:FE57:70B0/64 Scope:link
#UP broadcast RUNNING multicast# mtu:1500 metric:1
RX packets:32138224 errors:0 dropped:0 overruns:0 frame:0
TX packets:21550681 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3797977700 (3.7 GB) TX bytes:4267007875 (4.2 GB)
The Network foundation of OpenStack