当前位置:网站首页>Network, network card and IP configuration
Network, network card and IP configuration
2022-06-30 07:30:00 【My deep blue】
Linux Networks and services
VMware Network configuration on
1. bridge Bridging mode
A switch is connected between the virtual machine and the real machine ,
IP The address is in the same network segment
2. network
A routing machine is connected between the virtual machine and the real machine ,
IP The address is not in the same network segment
3. HostOnly
The virtual machine has nothing to do with the real machine
Linux Check out the Internet 、 see IP Wait for the order
- Write a message to the user write
write Online user name
Content 1
Content 2
//ctrl+D Save information
- Send a broadcast message wall
wall Content
// All online users can receive
- Send E-mail
mail user name
Read mail
mail
Parameters
d: Delete mail
h: Look at the list
q: sign out
- View the login and logout information of all users
1、last
2、astlog
List all users , Including users who cannot log in
lastlog -u User uid
// View users individually
- Network command netstat
netstat
Parameters
-t:TCP agreement
-U:UDP agreement r I
-1: monitor
-r: route
-n: Show IP Address and port number
Example :
netstat -tlun // View the port that this machine is listening to
netstat -an // View all network connections on this computer
netstat -rn // View the local routing table
- Configure the network setup(redhat Proprietary command )
- see IP Address :
ifconfig
ip addr show
- View the network card profile
ls /etc/sysconfig/network-scripts/
Important parameter :
TYPE=Ethernet/bridge: Pick up A type
BOOTPROTO=dhcp/static/none: After activating this interface , What protocol to use
ONBOOT=yes/no: Whether the boot is activated
DNS1=8.8.8.8: Set main DNS
DNS2=9.9.9.9: Set attachments DNS
IPADDR=192. 168.1.100: Set up |P Address |
PREFIX= 24:centQS Set mask
GATEWAY=192.168.1.254: Set up the gateway
NAME=static: Administrator's name
DEVICE=ens37 : Device name
- Restart the service
systemctl restart network
Linux Manual configuration IP Address
A graphical Linux When the server
A minimum Linux When the client
- Graphical Linux Manual configuration IP Address

- To minimize the Linux Manual configuration IP Address
- Graphical configuration
nmtui
- Command configuration
nmcli command
// List the current network card devices
nmcli connection show
// see ens33 Details of the network card
nmcli connection show'ens33'
// Set up DNS
nmcli connection modify network card ipv4.dns 8.8.8.8
// Add one more DNS
nmcli connection modify network card + ipv4.dns 9.9.9.9
// modify IP Address addresses, And gateway gw4
umcli connection modify network card ipv4 addresses 192.1 68.1.100/24 gw4 192.168.1.254
You also need to add a command
umcli connection down network card
umcli connection up network card
systemctl restart network
NIC teaming
The physical network card is always broken , To ensure the continuity of work , We need to bind the two physical network cards together
Redhat7 Use in teamd Daemon to complete 
teamd: The following procedures can be used to run :
- Five ways of polymerization
1、broadcast
Transmit every packet from all ports , Send a package , Every port ( Up and down ) Send one packet each
2、roundrobin
Transmit packets from each port in a round robin fashion , send out 10 A package , Every port ( Up and down ) Send each 5 A package
3、activebackup The aggregation of red hat learning
Failover run program , Monitor link changes and select the active port for
The data transfer .( The main line can't go , Running standby line )
4、loadbalance
Monitor traffic and use hash functions to try to achieve perfect balance when selecting ports for packet transmission . Reduce busy line transmission
5、lacp
The implementation of 802.3ad Link aggregation control protocol .
Network card aggregation steps
nmcli Commands can be used to create and manage groups and port interfaces , There are five steps :
- Create an interface group
nmcli connection add type team con-name lewis ifname lewis config '{
"runner":{
"name":"activeback"}}'
first lewis: Is the name of the reference connection ;
the second lewis: Is the interface name ;
JSON Is to specify the running program to be used : {
"runner":{
"nam"."METHOD"}'
- Identify the interface group ipv4/6 Properties of
1、 Must first assign ipv4.addresses, Then we can set ipv4.method manual
2、 Yes DHCP The server may not be configured
// To configure IP Address
nmcli connection modify lewis ipv4.addresses 192.169.1.1/24
// To configure
nmcli connection modify lewis ipv4.method manual
- Assign ports to interfaces
nmcli connection add type team-slave con-name p1 ifname ens37 master lewis
nmcli connection add type team-slave con-name p2 ifname ens38 master lewis
- start-up / Close the group interface and port interface
nmcli connection up lewis
- see team The state of
teamdctl lewis state
Configuration is successful , Two fast network cards become one network card
DNS- domain name
DNS: effect : take IP Address and WWW The domain name of the . Users don't need to remember IP Address , Just remember the domain name .
IP There are two kinds of mapping relationship between address and domain name
1、 Static mapping , Each device maintains its own mapping table , Only for the use of this equipment
2、 Dynamic mapping , build DNS The server , Configure... On this server WWW Domain name and IP Address mapping
- Check the domain name of this machine
hostname
- Modify the local domain name
1、 Temporary modification
hostname New local domain name
2、 permanent :
Modify the native file : vim /etc/hostname
Command to change : hostnamectl set- hostname New local domain name
边栏推荐
- Graphic explanation pads update PCB design basic operation
- Variable storage unit and pointer
- 期末複習-PHP學習筆記6-字符串處理
- Video player (I): process
- Assembly learning register
- Examen final - notes d'apprentissage PHP 6 - traitement des chaînes
- DXP shortcut key
- halcon:读取摄像头并二值化
- Basic operation command
- Processes, jobs, and services
猜你喜欢

FreeRTOS timer group

Test enumeration types with STM32 platform running RT thread

Mailbox application routine of running wild fire RT thread

STM32 register

Swiftui creates a beautiful custom press feedback button

Can introduction

Next initializesecuritycontext failed: unknown error (0x80092012) - the revocation function cannot check whether the certificate is revoked.

C language - student achievement management system

实验一、综合实验【Process on】

Introduction to go language pointer
随机推荐
线程池——C语言
The maximum expression in Oracle database message list is 1000 error
Implementation of binary search in C language
Halcon: read the camera and binary it
Application of stack -- using stack to realize bracket matching (C language implementation)
Error reporting record
Lt268 the most convenient TFT-LCD serial port screen chip in the whole network
Binary tree traversal
Private method of single test calling object
Introduction to go language pointer
Desk lamp control panel - brightness adjustment timer
Use of ecostruxure (3) creating composite function blocks
Promise async/await
LabVIEW程序代码更新缓慢
Golan common shortcut key settings
Parameter calculation of deep learning convolution neural network
Ad usage notes
Examen final - notes d'apprentissage PHP 6 - traitement des chaînes
01 - embedded learning route and career planning: embedded basic knowledge and development process
QT elementary notes