linux
《linux菜鸟入门》linux网络管理 -凯发ag旗舰厅登录网址下载
●管理网络
1.ip基础知识
ipv4/ipv6
32位
172.25.0.10/255.255.255.0
2.配置ip
<<图形化>>
1。图形界面
nm-connection-editor
2.文本化图形
nmtui
ifconfig 查看或者临时设定主机ip的工具
ifconfig 网络接口 查看这个接口上的 ip
ifconfig 网络接口 ip netmask 子网掩码 临时设定ip
ifconfig eth0 172.25.254.100 netmask 255.255.255.0
systemctl restart network 重新启动网络基本服务
systemctl restart networkmanager 网络智能管理服务
<<命令>>
ifconfig 网卡 ip netmask 临时设定
nmcli :
system ststus network
connection add type ethernet con-name westos ifname eth0 autoconnect yes
nmcli connection add type ethernet con-name westos ifname ip4 ip/24
nmcli connection add delete westos
nmcli connection show
nmcli connection down westos
nmcli connection up westos
nmcli connection modify westos ipv4.addresses newip/24
nmcli connection modify westos ipv4.method
nmcli device connect
nmcli device disconnect
nmcli device show
nmcli device status
<<文件>>
dhcp 动态获取
vim /etc/sysconfig/network-scripts/ifcfg-eth0
device=eth0
bootproto=dhcp
onboot=yes
name=eth0
:wq
systemctl restart network
static|none 静态网络
vim /etc/sysconfig/network-scripts/ifcfg-eth0
device=eth0
bootproto=static|none
onboot=yes
ipaddr(x)=172.25.0.100
netnask=172.25.0.100 | prefis0=24 子网掩码
name=eth0
:wq
systemctl restart network
如果要设置多个ip 就在x位置
转载于:https://blog.51cto.com/12157236/1861116
总结
以上是凯发ag旗舰厅登录网址下载为你收集整理的《linux菜鸟入门》linux网络管理的全部内容,希望文章能够帮你解决所遇到的问题。
如果觉得凯发ag旗舰厅登录网址下载网站内容还不错,欢迎将凯发ag旗舰厅登录网址下载推荐给好友。
- 上一篇: 记录一次postfix无法收取邮件和my
- 下一篇: