< 返回业界新闻列表

Centos7增加、删除IP LINUX系统增加删除IP怎么操作

发布时间:22-11-22    来源: 蓝海科技 IDC

增加IP

1.查看当前IP信息:


ifconfig


[root@vlmwxlzjhculhkx ~]# ifconfig


eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500


        inet 100.100.100.100  netmask 255.255.255.0  broadcast 100.100.100.255


        inet6 xx::xx:xx:xx:xx  prefixlen 64  scopeid 0x20<link>


        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)


        RX packets 1072491326  bytes 71902281992 (66.9 GiB)


        RX errors 0  dropped 0  overruns 0  frame 0


        TX packets 15681045  bytes 18917811748 (17.6 GiB)


        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


2.增加IP100.100.100.101 和子网掩码


 


ifconfig eth0:1 100.100.100.101 netmask 255.255.255.0 up


 


[root@vlmwxlzjhculhkx ~]# ifconfig eth0:1 100.100.100.101 netmask 255.255.255.0 up


1


3.查看


 


[root@vlmwxlzjhculhkx ~]# ifconfig


eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500


        inet 100.100.100.100  netmask 255.255.255.0  broadcast 100.100.100.255


        inet6 xx::xx:xx:xx:xx  prefixlen 64  scopeid 0x20<link>


        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)


        RX packets 1072491326  bytes 71902281992 (66.9 GiB)


        RX errors 0  dropped 0  overruns 0  frame 0


        TX packets 15681045  bytes 18917811748 (17.6 GiB)


        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


 


eth0:1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500


        inet 100.100.100.101  netmask 255.255.255.0  broadcast 100.100.100.255


        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)


eth0:1就是新加的IP了


删除IP


1.查看当前IP


[root@vlmwxlzjhculhkx ~]# ifconfig


eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500


        inet 100.100.100.100  netmask 255.255.255.0  broadcast 100.100.100.255


        inet6 xx::xx:xx:xx:xx  prefixlen 64  scopeid 0x20<link>


        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)


        RX packets 1072491326  bytes 71902281992 (66.9 GiB)


        RX errors 0  dropped 0  overruns 0  frame 0


        TX packets 15681045  bytes 18917811748 (17.6 GiB)


        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


eth0:1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500


        inet 100.100.100.101  netmask 255.255.255.0  broadcast 100.100.100.255


        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)


2.记住要删除的IP,比如我们要删除100.100.100.101


ifconfig eth0:1 down


[root@vlmwxlzjhculhkx ~]# ifconfig eth0:1 down


TAG标签: 传奇服务器 bluem2服务器 服务器 高防服务器 物理机

相关推荐

传奇业务如何选择服务器?这几点需要了解! >点击查看详情<

Windows服务器双重验证、远程桌面二重验证轻松上手指南教程、远程登录二级密码验证 >点击查看详情<

设置远程桌面连接DRP长期不断开的注册表策略设置,远程桌面RDP长期不操作断开设置。 >点击查看详情<

2008服务器系统打开exe打开文件安全警告怎么关闭?无法验证发布者。 >点击查看详情<

如何查看服务器开机、关机、重启记录?2008server系统异常开关机重启查询。 >点击查看详情<

服务器里面怎么能显示文件后缀,扩展名?比如txt zip的后缀怎么显示出来? >点击查看详情<

windows2008系统不小心设置了其他的桌面背景,如何恢复为默认的好看的淡蓝色背景。 >点击查看详情<

2008系统复制粘贴失效,某个界面无法复制但是其他界面可以,怎么处理?经验分享。 >点击查看详情<

服务器右击某个文件夹的时候特别卡顿怎么办?右击空白没问题,右击文件文件夹非常卡。 >点击查看详情<

选择网站Web服务器的配置该考虑哪些方面? >点击查看详情<

服务器通用请求返回值,常见的IIS报错情况及原因。 >点击查看详情<

如何查询服务器端口被占用情况,被哪个程序进程占用了?查看某个端口是否开启? >点击查看详情<

2008server系统宝塔面板,windows linux面板如何一键迁移?批量转移网站数据? >点击查看详情<

2008server系统怎么批量转移备份恢复IIS网站、配置、应用池? >点击查看详情<

2008系统物理机怎么设置多界面?多用户?多桌面?一步解决! >点击查看详情<

在线客服

请选择对应客服进行沟通

  • QQ:29240180

    蓝海科技客服

  • QQ:858561202

    24小时技术支持

在线客服

QQ咨询

请选择对应客服进行沟通

  • 29240180

    蓝海科技-完美

  • 754430

    蓝海科技-血色

  • 286244121

    蓝海科技-阿海

  • 273184838

    蓝海科技-残阳

  • 23751168

    蓝海科技-红尘

  • 29240180

    大客户代理咨询

QQ咨询

公众号