Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Network testing tools and Ubuntu network configuration

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The test network tool tests the connectivity of the network on the command line

Show hostname

   hostname

Test network connectivity

   ping

Display the correct routing table

   ip route tracks rout

   traceroute

   tracepath

   mtr determines that the name server uses

   nslookup

   host

   digUbuntu Network configuration

Official website documentation:

Https://help.ubuntu.com/lts/serverguide/network-configuration.html.zh-CN

Configure automatic acquisition of IP

Cat / etc/netplan/01-netcfg.yaml

Network:

  version: 2

  renderer: networkd

  ethernets:

    ens33:

  dhcp4: yes

After modifying the Nic configuration file, you need to execute the command to take effect: netplan apply configuration static IP:

Cat / etc/netplan/01-netcfg.yaml

Network:

   version: 2

   renderer: networkd

   ethernets:

  eth0:

     addresses:

 -192.168.6.10 Universe 24

    -10.10.10.10 Compact 24

    gateway4: 192.168.6.1

    nameservers:

     search: [mydomain, otherdomain]

     addresses: [223.5.5.5, 8.8.8.8, 1.1.1.1]

View ip and gateway

Ip addr

Route-n

Check out DNSls-l / etc/resolv.conf

Lrwxrwxrwx 1 root root 39 Dec 12 11:36 / etc/resolv.conf

\ >.. / run/systemd/resolve/stub-resolv.confsystemd-resolve-- status modifies the host name

Hostnamectl set-hostname ubuntu1904

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report