当前位置:网站首页>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
边栏推荐
- C51 minimum system board infrared remote control LED light on and off
- Virtual machine VMware: due to vcruntime140 not found_ 1.dll, unable to continue code execution
- Processes, jobs, and services
- 02 - bare metal and RTOS development modes: five development modes of bare metal and the introduction of RTOS
- STM32 infrared communication 2
- Pit stepping record: Supervisor log return information: redis extension is not installed
- Raspberry pie 4B Getting Started Guide
- Record the problem that the system file cannot be modified as an administrator during the development process
- QT wmic command obtains some hardware information
- Desk lamp control panel - brightness adjustment timer
猜你喜欢
Minecraft 1.16.5模组开发(五十) 书籍词典 (Guide Book)
Minecraft 1.16.5 module development (50) guide book
The class imported by idea import clearly exists, but it is red?
Record the problem that the system file cannot be modified as an administrator during the development process
Adjacency matrix representation of weighted undirected graph (implemented in C language)
Local unloading traffic of 5g application
Final review -php learning notes 11-php-pdo database abstraction layer
FreeRTOS timer group
Stm32g0 Tim interrupt use
線程池——C語言
随机推荐
Promise async/await
String application -- string violent matching (implemented in C language)
Desk lamp control panel - brightness adjustment timer
Pool de Threads - langage C
LabVIEW program code update is slow
Binary tree related operations (based on recursion, implemented in C language)
将本地电脑文件复制到虚拟机系统中详细方法
Lt268 the most convenient TFT-LCD serial port screen chip in the whole network
grep命令用法
网络安全-VLAN和Tunk方法详解
大学刚毕业不知道做什么工作怎么办?
视频播放器(一):流程
Minecraft 1.16.5 module development (50) guide book
[most complete] install MySQL on a Linux server
Merge: extension click the El table table data to expand
Next initializesecuritycontext failed: unknown error (0x80092012) - the revocation function cannot check whether the certificate is revoked.
JS create PDF file
Can introduction
Experiment 1: comprehensive experiment [process on]
Introduction to go language pointer