Network Configuration for centos 7.5 O & M

Source: Internet
Author: User
Use dhclient to automatically obtain IP addresses

[[email protected] ~]# dhclient -r[[email protected] ~]# dhclientvi /etc/
[[email protected] ~]# ip add1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00    inet 127.0.0.1/8 scope host lo       valid_lft forever preferred_lft forever    inet6 ::1/128 scope host       valid_lft forever preferred_lft forever2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000    link/ether 00:0c:29:93:47:04 brd ff:ff:ff:ff:ff:ff    inet 192.168.1.16/24 brd 192.168.1.255 scope global dynamic ens33       valid_lft 84782sec preferred_lft 84782sec    inet6 fe80::bbca:2655:139:aa19/64 scope link noprefixroute       valid_lft forever preferred_lft forever

Check whether the network route gateway is correct

[[email protected] ~]# route -nKernel IP routing tableDestination     Gateway         Genmask         Flags Metric Ref    Use Iface0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 ens33192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 ens33192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 ens33
VI/etc/sysconfig/network-scripts/ifcfg-ens33 type = Ethernet proxy_method = none browser_only = No bootproto = DHCP defroute = Yes route = No route 6init = Yes route 6_autoconf = Yes route 6_defroute = Yes route = no need 6_addr_gen_mode = stable-privacy name = ens33 UUID = 4aa87787-3b5c-4985-9b43-24f247fc71c1 device = ens33 onboot = yes # change the original value to Yes

Restart NETWORK SERVICE

 systemclt restart network.service

Network Configuration for centos 7.5 O & M

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.