zoukankan      html  css  js  c++  java
  • Linux网络配置

    ifconfig工具

    ifconfig常用用法

    • ifconfig : 查看主机激活状态的网络接口情况; 输出结果中:lo 是表示主机的回坏地址,eth0 表示第一块网卡, 其中 HWaddr 表示网卡的物理地址(MAC地址); inet addr 用来表示网卡的IP地址,Bcast表示广播地址,Mask表示掩码地址
    • ifconfig -a : 查看主机所有(包括没有被激活的)网络接口的情况
    • ifconfig eth0 : 查看特定网络接口的状态
    • ifconfig eth0 down = ifup eth0 : 如果eth0是激活的,就把它终止掉。此命令等同于 ifdown eth0;
    • ifconfig eth0 up = ifdown eth0 : 激活eth0 ; 此命令等同于 ifup eth0 
    • ifconfig eth0 192.168.1.99 broadcast 192.168.1.255 netmask 255.255.255.0 : 配置 eth0的IP地址、广播地址和网络掩码; 
    • ifconfig eth0 192.168.1.99 broadcast 192.168.1.255 netmask 255.255.255.0 up : 配置IP地址、网络掩码、广播地址的同时,激活网卡eth0
    • ifconfig eth1 hw ether 00:11:00:00:11:22 : 设置网卡的物理地址(MAC地址)。其中 hw 后面所接的是网络接口类型, ether表示以太网, 同时也支持 ax25 、ARCnet、netrom等,详情请查看 man ifconfig ; 

    网络设备的配置

    /etc/sysconfig/network-scripts/ifcfg-xxxx,此处的xxxx为ens33

    分配ip地址工具

    ifconfig

  • 相关阅读:
    CF Hello 2020 E.New Year and Castle Construction
    HTML 简介
    グランドエスケープ
    CF 1244 C
    N皇后解法以及位运算优化
    CF
    动态规划TG.lv(1) (洛谷提高历练地)
    搜索Ex (洛谷提高历练地)
    数字图像处理——图像增强
    数字图像处理——图像的几何变换
  • 原文地址:https://www.cnblogs.com/ingy0923/p/8646174.html
Copyright © 2011-2022 走看看