标签:res 退出 prefix info scripts ack com config stat
本机?
选择【NAT设置】设置网关IP
保存退出。
# vi /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
BOOTPROTO=static
NAME=ens33
IPADDR=10.0.0.10
PREFIX=24
GATEWAY=10.0.0.2
DNS1=114.114.114.114
DNS2=8.8.8.8
DEVICE=ens33
ONBOOT=yes
重启网络服务
systemctl restart network
查看IP
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
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 forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:fd:15:fe brd ff:ff:ff:ff:ff:ff
inet 10.0.0.10/24 brd 10.0.0.255 scope global ens33
valid_lft forever preferred_lft forever
标签:res 退出 prefix info scripts ack com config stat
原文地址:https://blog.51cto.com/14576542/2465451