zoukankan      html  css  js  c++  java
  • Linux ifconfig命令

    一、简介

    ifconfig是Linux系统用来获取并修改网络接口配置信息的工具。

    注意:用ifconfig命令配置的网卡信息,在网卡重启后机器重启后,配置就不存在。要想将上述的配置信息永远的存的电脑里,那就要修改网卡的配置文件了。

    二、应用实例:

    实例1:显示网络设备信息(激活状态的)

    ifconfig

    实例2:启动关闭指定网卡

    ifconfig eth0 up     #启动网卡eth0  ifconfig eth0 down   #关闭网卡eth0

    实例3:为网卡配置和删除IPv6地址

    ifconfig eth0 add 33ffe:3240:800:1005::2/64   #为网卡eth0配置IPv6地址
    
    ifconfig eth0 del 33ffe:3240:800:1005::2/64   #为网卡eth0删除IPv6地址

    实例4:修改MAC地址

    ifconfig eth0 hw ether 00:AA:BB:CC:DD:EE
    实例5:配置IP地址
    ifconfig eth0 192.168.120.56 
    ifconfig eth0 192.168.120.56 netmask 255.255.255.0  
    ifconfig eth0 192.168.0.2/24 
    ifconfig eth0 192.168.120.56 netmask 255.255.255.0 broadcast 192.168.120.255

    实例6:启用和关闭ARP协议

    ifconfig eth0 arp    #开启网卡eth0 的arp协议;
    ifconfig eth0 -arp   #关闭网卡eth0 的arp协议;

    实例7:设置最大传输单元

    ifconfig eth0 mtu 1500

    实例8:开启eth0网卡的混合模式

    ifconfig  eth0  promisc
  • 相关阅读:
    数据库字典
    目录结构-模板目录
    vuex
    innerHTML,innertext,textContent区别
    组件传值
    深拷贝和浅拷贝
    关于element ui头像上传问题
    常用的字符串截取的方法
    接口报错之number值过大问题
    node_modules?
  • 原文地址:https://www.cnblogs.com/274914765qq/p/4430487.html
Copyright © 2011-2022 走看看