• 10.2-3 ifup&ifdown:激活与禁用网络接口


    ifup:激活网络接口

        ifup 和 ifdown 命令用于激活指定的网络接口。ifup命令其实是一个Shel脚本,有Shel基础的读者可以使用which命令来找到这个脚本并读一读。命令可读取配置文件/etc/sysconfig/network和/etc/sysconfig/network-scripts/ifcfg-<configuration>对网络接口进行相应的操作。   

    ifdown:禁用网络接口

    [root@cs6 ~]# ifdown eth1
    [root@cs6 ~]# ifconfig 
    eth0 Link encap:Ethernet HWaddr 00:AA:BB:CC:DD:EE  
              inet addr:10.0.0.100 Bcast:10.0.0.255 Mask:255.255.255.0
              inet6 addr: fe80::20c:29ff:fe8c:6a04/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
              RX packets:16249 errors:0 dropped:0 overruns:0 frame:0
              TX packets:7819 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:20914267 (19.9 MiB) TX bytes:634620 (619.7 KiB)
     
    eth0:0 Link encap:Ethernet HWaddr 00:AA:BB:CC:DD:EE  
              inet addr:10.0.0.101 Bcast:10.0.0.255 Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
     
    eth0:1 Link encap:Ethernet HWaddr 00:AA:BB:CC:DD:EE  
              inet addr:10.0.0.8 Bcast:10.0.0.255 Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
     
    lo Link encap:Local Loopback  
              inet addr:127.0.0.1 Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING MTU:65536 Metric:1
              RX packets:6 errors:0 dropped:0 overruns:0 frame:0
              TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:504 (504.0 b) TX bytes:504 (504.0 b)
     
  • 相关阅读:
    Linux实战(2):Linux传输文件
    Linux实战(1):装机一键设置脚本初级版
    Docker实战(4):Docker错误记一笔
    Docker实战(3):Tomcat部署
    Docker实战(5)升级Docker版本后的报错
    Promise
    创建数据库
    wepy中组件之间通信方法
    javascript —— 禁止通过 Enter 键提交表单
    input禁止复制、粘贴、剪切
  • 原文地址:https://www.cnblogs.com/fadewalk/p/10840735.html
Copyright © 2020-2023  润新知