Modification Method:
- Most of the order forms are effective immediately and temporary;
- GUI Graphical Way,
- Modify the configuration file, restart the service is valid
1. Modify Host Name
set-/etc//etc/sysconfig/network
2. Network Interface Configuration
- VI Modifying a configuration file
- Ifconfig to view or set TCP/IP parameters for a network card
[[Email protected] ~]$ ifconfigenp0s31f6:flags=4163<UP,BROADCAST,RUNNING,MULTICAST> MTUEnp0/etho the largest transmission unit of the first physical NIC MTU packet Flags network interface status up .... (activity)inet192.168.1.125Netmask255.255.255.0Broadcast192.168.1.255 inet/inet Addr network card IP address netmask/mask subnet mask boadcast/bcast broadcast addressInet6 fe80::c133:9f47:a9f: thePrefixlen -ScopeID0x20<link> ine Nic IPv6ether c8:5b: the: -: AF: onTxqueuelen +(Ethernet) The physical address of the ETHER/HWADDR network card the MAC address Txqueuelen the length of the delivery queue RX packets4673305bytes3223334449(3.0GiB) RX Packets Total number of packets received RX errors0Dropped0Overruns0Frame0TX Packets2439350bytes305949223(291.7MiB) Total number of packets sent by TX packets TX Errors0Dropped0Overruns0Carrier0Collisions0Device Interrupt -Memory0xe1300000-e1320000 lo:flags= the<UP,LOOPBACK,RUNNING> MTU65536inet127.0.0.1Netmask255.0.0.0Inet6::1Prefixlen -ScopeID0x10Loop Txqueuelen1(Local Loopback) RX packets45571bytes3060724(2.9MiB) RX Errors0Dropped0Overruns0Frame0TX Packets45571bytes3060724(2.9MiB) TX Errors0Dropped0Overruns0Carrier0Collisions0Wlp1s0:flags=4099<UP,BROADCAST,MULTICAST> MTU theether B8:Bayi:98: 5a:7f: -Txqueuelen +(Ethernet) RX packets1284454bytes1267419395(1.1GiB) RX Errors0Dropped0Overruns0Frame0TX Packets913186bytes155893700(148.6MiB) TX Errors0Dropped0Overruns0Carrier0Collisions0
There are currently 3 network interface information, one is Enp0 is the system's first network card information; Lo represents the loopback loopback interface, which is the basis for Linux internal communication, and IP is always 127.0.0.1;
Ifconfig NIC name <ip address > netmask < subnet mask > This command takes effect immediately, but the configuration file is not modified.
Ifconfig eth0 192.168.1.10 netmask 255.255.255.0 set network card ifconfig eth0:1 192.168.1.10 netmask 255.255.255.0 eth0:1 to set up virtual NIC
MAC address, the world's only, is produced by network equipment manufacturers when writing to the internal card. The MAC address is a 48-bit hexadecimal number, separated by a colon c8:5b:76:25:af:01, the first six for the NIC manufacturer number, and the last six for the serial number. To change the MAC address, you need to disable the network card first, and then use the Ifconfig
Ifconfig network card name down disable NIC
Ifconfig nic name hw ether c8:5b:+:+: af:01 Modify NIC
Ifconfig network card name up enable NIC
Permanently modify the NIC profile to go to the/etc/sysconfig/network-scripts/ifcfg-eth0, and then restart the Web service network
What does the IP addr command see?
In addition, there are graphical configuration methods! (menu; system-config-network command; System-config-network-tui command)
Linux Network Basic configuration commands