当前位置:网站首页>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
边栏推荐
- Stm32g0 and FreeRTOS learning summary
- El input can only input numbers and has a decimal point. At most two digits can be reserved
- Is it safe to open a stock account by mobile phone? What do I need to prepare for opening an account?
- STM32 register on LED
- 03 - programming framework: Division of application layer, middle layer and driver layer in bare metal programming
- How to determine the size of the platform byte order?
- DXP software uses shortcut keys
- Can introduction
- I graduated this year, but I don't know what I want to do
- 02 - bare metal and RTOS development modes: five development modes of bare metal and the introduction of RTOS
猜你喜欢
![[most complete] install MySQL on a Linux server](/img/5d/8d95033fe577c161dfaedd2accc533.png)
[most complete] install MySQL on a Linux server

C language implements sequential queue, circular queue and chain queue

Merge: extension click the El table table data to expand

Sublime text 3 configuring the C language running environment

网络安全-抓包和IP包头分析

Variable storage unit and pointer

Calculation and parameter quantity of neural network
![[resolved] MySQL exception: error 1045 (28000): unknown error 1045, forgetting the initial password](/img/8a/4f369be1d23ced40994626cd3a9561.png)
[resolved] MySQL exception: error 1045 (28000): unknown error 1045, forgetting the initial password

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

next InitializeSecurityContext failed: Unknown error (0x80092012) - 吊销功能无法检查证书是否吊销。
随机推荐
Experiment 1: comprehensive experiment [process on]
Realization of dissolve effect in unity and its principle analysis
1.someip introduction
线程池——C语言
STM32 register
JS create PDF file
El input can only input numbers and has a decimal point. At most two digits can be reserved
線程池——C語言
QT msvc2015 compiler reports an error: error: lnk1158: unable to run "rc.exe"
期末複習-PHP學習筆記6-字符串處理
Network security - layer 3 switching technology and internal network planning
LabVIEW程序代码更新缓慢
Cypress nor flash driver - s29glxxxs
网络安全-路由原理
系统软件开发基础知识
nRF52832 GPIO LED
The maximum expression in Oracle database message list is 1000 error
DXP shortcut key
The simulation interface does not declare an exception and throws an exception
Test enumeration types with STM32 platform running RT thread