Cov txheej txheem:

Kuv yuav hloov kuv tus IP chaw nyob hauv CentOS li cas?
Kuv yuav hloov kuv tus IP chaw nyob hauv CentOS li cas?

Video: Kuv yuav hloov kuv tus IP chaw nyob hauv CentOS li cas?

Video: Kuv yuav hloov kuv tus IP chaw nyob hauv CentOS li cas?
Video: Lis Yaj Pov : Hauv Sab Ntsuj Plig 2024, Kaum ib hlis
Anonim

Configure Static IP Chaw nyob hauv CentOS

  1. Cov ntaub ntawv xav tau rau kev teeb tsa network yog nyob rau hauv /etc/sysconfig/network-scripts.
  2. Koj yuav pom default configuration zoo li no,
  3. Tam sim no hloov cov configuration rau qhov no,
  4. Ces cawm tus cov ntaub ntawv, txuag nias ctrl + x tawm thiab nias y kom paub meej.
  5. Tam sim no rov pib dua tus kev pabcuam network los ntawm kev muab tus hais kom ua,

Tsuas yog li ntawd, kuv tuaj yeem hloov pauv kuv tus IP chaw nyob hauv Linux li cas?

I. Hloov HostName Ntawm Kab hais kom ua

  1. Siv hostname hais kom hloov pauv Hostname.
  2. Hloov cov ntaub ntawv /etc/hosts.
  3. Hloov kho cov ntaub ntawv /etc/sysconfig/network.
  4. Pib dua Network.
  5. Hloov ip-chaw nyob Ib ntus Siv ifconfig.
  6. Hloov ip-chaw nyob mus ib txhis.
  7. Hloov kho /etc/hosts file.
  8. Pib dua Network.

Tsis tas li, kuv yuav nrhiav tau kuv qhov chaw nyob IP hauv CentOS li cas? Txoj Kev 1 – Tshawb xyuas IP ntawm Command ( CentOS 8) Qhib lub davhlau ya nyob twg los ntawm nias CTRL + ALT + T ntawm koj CentOS qhov system. Tam sim no ntaus nram qab no IP txib kom saib tam sim no IP chaw nyob configured ntawm koj qhov system.

Dhau li ntawd, kuv yuav hloov kuv qhov chaw nyob IP ntawm Linux li cas?

Rau hloov koj tus IP chaw nyob ntawm Linux , siv tus "ifconfig" hais kom ua raws li tus npe ntawm koj network interface thiab tus tshiab IP chaw nyob hloov rau koj lub computer. Kom muab tus subnet npog, koj tuaj yeem ntxiv "netmask" clause ua raws li tus subnet npog los yog siv tus CIDR daim ntawv ncaj qha.

Ifconfig nyob qhov twg?

Tej zaum koj tab tom nrhiav rau qhov hais kom ua /sbin/ ifconfig . Yog tias tsis muaj cov ntaub ntawv no (sim ls /sbin/ ifconfig ), cov lus txib yuav cia li tsis raug ntsia. Nws yog ib feem ntawm pob net-cov cuab yeej, uas tsis tau teeb tsa los ntawm lub neej ntawd, vim tias nws tau deprecated thiab superseded los ntawm cov lus txib ip los ntawm pob iproute2.

Pom zoo: