network stack network performance is the highest, bridge mode needs to be evaluated.Kubernetes uses a flat network model that requires each pod to have a globally unique ip,pod that directly communicates across hosts. At present, the more mature plan is to use flannel. Flannel has several modes of operation, namely UDP, VXLAN, HOST-GW, and aws-vpc. AWS-VPC has platform limitations we do not consider that UDP performance is poor. Focus on testing Vxla
1. Connect a Linux host to the network and need to configure network-related settingsGenerally includes:Host NameIp/netmaskRouting: Default gatewayDNS ServerPrimary DNS ServerSecondary DNS serverSecond time DNS server2. Static designation:Ifcfg:ifconfig,route,netstatIp:object{link,addr,route},ss,tcSystem-config-network-tui (Setup)Configuration fileCentos 7: Network Configuration ToolNmcli,nmtui,nm-connection-editorDynamic allocation:Dhcp:dynamic Host Configuration ProtocolIfconfigIfconfig-aIfcon
(type of sevice) domain Linux Advanced routing-Dev--Physical interfaceFwmark--iptables labelAction taken in addition to specifying the routing table, you can also specify the following actions:Table indicates which tables are usedNat Transparent GatewayProhibit discards the package and sends the COMM. Adm. ICMP information for prohiitedReject simply discard the packageUnreachable discards the packet and sends the NET unreachable ICMP informationAfter the routing table is added, you can add rout
gateway---Immediate effect: # route add default GW 192.168.1.1Restart Effective: Modify/etc/sysconfig/network-scripts/ifcfg-eth0---Modify DNS---Modify/etc/resolv.conf to take effect immediately after modification, restart is also valid---Modify host name---immediate effect: # hostname Test1 Restart effective: Modify/etc/sysconfig/network1. Add the DNS server address by editing the Ifcfg-eth0 configuration file under the Vi/etc/sysconfig/network-scrip
. routeYou can use the route command to configure and view the configuration of the kernel route table.For example:(1) route added to the host.# Route add-host 192.168.1.2 dev eth0: 0# Route add-host 10.20.30.148 gw 10.20.30.40(2) route added to the network.# Route add-net 10.20.30.40 netmask 255.255.255.248 eth0# Route add-net 10.20.30.48 netmask 255.255.255.248 gw 10.20.30.41# Route add-net 192.168.1.0/24
I used to set multiple ip addresses of different network segments on the local machine, and then switch the route so that different network segments can go out through different gateways, you can access multiple networks at the same time. However, I often find that some problems may occur, so I decided to use the most primitive method to solve the problem, that is, to use only the ip address of a certain network segment, in this way, you need to constantly change the IP address. Of course, this
In either case, the host will save or update the local ARP cache table.
1. When receiving the "ARP broadcast-request" Packet
2. When an "ARP non-broadcast-reply" packet is received
We can see that the ARP Protocol has no authentication mechanism, and any host in the LAN can forge ARP packets at will. The ARP protocol design is inherently flawed.
Assume that there are three hosts (GW refers to the gateway) in the LAN. The host name, IP address, and MAC
The process deadlock occurs when you use the routeadd command. Please give me some advice! -- Linux general technology-Linux programming and kernel information. The following is a detailed description. My C program executes system ("route del default; route add default gw 2.11.2.1 dev eth3"); after several processes are started, the parent process is killed, the executed shell process becomes an orphan process. As a result, the process is deadlocked a
up
(4) disable the device.
# Ifconfig eth0 down
(5) view the configuration of the specified network interface.
# Ifconfig eth0
(6) view all network interface configurations.
# Ifconfig
2. route
You can use the route command to configure and view the configuration of the kernel route table.
For example:
(1) route added to the host.
# Route add? Host 192.168.1.2 dev eth0: 0
# Route add? Host 10.20.30.148 gw 10.20.30.40
(2) route added to the network.
1. Add the following content to the/etc/rc. Local file:Note: eth0 binds the Intranet IP address eth1 and the Internet IP Address################[Root @ rhnat01 root] # vi/etc/rc. Local#! /Bin/sh## This script will be executed * after * all the other init scripts.# You can put your own initialization stuff in here if you don't# Want to do the full sys V style init stuff.Touch/var/lock/subsys/localRoute add-net 0.0.0.0 GW Internet gateway netmask 0.0.0.
enabled) running (indicating that the network card is connected) multicast (supporting Multicast) MTU: 1500 (maximum transmission unit): 1500 bytes
4. Five Elements: Statistics on received and sent data packets
Row 7: number of bytes of received and sent data.
(1) configure the IP address of eth0 and activate the device.
# Ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
(2) configure the IP address of the eth0 alias device eth0: 1 and add a route.
# Ifconfig eth0: 1 192.168.1.3
1. ifconfigYou can use the ifconfig command to configure and view the network interface configuration.
For example:
(1) configure the IP address of eth0 and activate the device.
# Ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
(2) configure the IP address of the eth0 alias device eth0: 1 and add a route.
# Ifconfig eth0 192.168.1.3
# Route add-host 192.168.1.3 dev eth0: 1
(3) activate the device.
# Ifconfig eth0 up
(4) disable the device.
# Ifconfig eth0 down
(5) view the configuration of t
settings under the command line, using the set DNS command, you can enter set dns /? View the usage method.
Finally, we save these commands as a bat file (setip192168423.bat ):CopyCodeThe Code is as follows: @ echo offRem ETH // ETH is the name of the network adapter, which can be queried in the network connection, for example, "Local Connection"Set Eth = "Local Link"Rem IP // ip address you want to changeSet IP = 192.168.4.23Rem GW //
Use the following command to configure the Ethernet
1. ifconfig
You can use the ifconfig command to configure and view the network interface configuration.
For example:
1) configure the IP address of eth0 and activate the device.
# Ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
2) configure the IP address of eth0: 1 and add a route.
# Ifconfig eth0: 1 192.168.1.3
# Route add-host 192.168.1.3 dev eth0: 1
3) activate the device.
# Ifconfig eth0: 1 up
4) disable the device.
# Ifconfig eth0: d
I used to set multiple ip addresses of different network segments on the local machine, and then switch the route so that different network segments can go out through different gateways, you can access multiple networks at the same time. However, I often find that some problems may occur, so I decided to use the most primitive method to solve the problem, that is, to use only the ip address of a certain network segment, in this way, you need to constantly change the IP address. Of course, this
Linux under route commandIn order for the device to access another subnet, you need to increase the routing to the sub-network in the device, here are some information. The basic operations are as follows:In general, to be able to access other subnets to set up the route, for example, your host is in 192.168.10.0/24, and you want to access the 192.168.20.0/24 network host, of course, you know a gateway IP, For example 192.168.10.1 (must be on the same subnet as your host), you can configure the
One: Use the route command to add use the route command to add the route, the machine restarts or the network card restarts after the route is invalidated, method: //added to the host Route #route add–host192.168.1.11deveth0#routeadd–host 192.168.1.12gw192.168.1.1//routes added to the network #routeadd–net192.168.1.11 netmask255.255.255.0eth0#routeadd–net192.168.1.11 netmask255.255.255.0gw192.168.1.1#routeadd–net 192.168.1.0/24eth1//Add a default gateway #routeadddefaultgw192.168.2.1/ /Remove R
SELinux user mappingpasswd GWTo increase the use of GW, one thing to note, useradd add a user, do not forget to set a password for him, or the system will not be logged on by default(It can be unlocked with usermod-u GW and cannot be fully unlocked after version six, but manually removed in/etc/passwd!) No.2, modify the userusermod-d/home/test-g test2 GWChange the login directory of the test user to/home/t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.