• 查看Linux系统网卡信息


    nmcli是一款能够方便我们配置网络的工具,能够轻松的查看网卡信息或网络状态:

    实例1:查看网卡信息

    [root@localhost ~]# nmcli connection show
    名称         UUID                                  类型            设备
    virbr0-nic   7f3a7bb5-a7ab-440c-b87f-d94e6f4dd96b  802-3-ethernet  virbr0-nic
    virbr0       ff7c93dd-05ae-4794-9030-77218b2ad5dd  bridge          virbr0
    eno16777736  ce2fa92b-adf1-4323-84c2-988f2ffcd07d  802-3-ethernet  eno16777736

    实例2:查看网卡的连接状态

    [root@localhost ~]# nmcli device status
    设备         类型      状态    CONNECTION
    virbr0       bridge    连接的  virbr0
    eno16777736  ethernet  连接的  eno16777736
    virbr0-nic   ethernet  连接的  virbr0-nic
    lo           loopback  未管理  --

    实例3:查看网卡的详细信息

    [root@localhost ~]# nmcli connection show eno16777736
    connection.id:                          eno16777736
    connection.uuid:                        ce2fa92b-adf1-4323-84c2-988f2ffcd07d
    connection.interface-name:              eno16777736
    connection.type:                        802-3-ethernet
    connection.autoconnect:                 yes
    connection.autoconnect-priority:        0
    connection.timestamp:                   1473736348
    connection.read-only:                   no
    connection.permissions:
    connection.zone:                        --
    connection.master:                      --
    connection.slave-type:                  --
    connection.autoconnect-slaves:          -1 (default)
    connection.secondaries:
    connection.gateway-ping-timeout:        0
    connection.metered:                     未知
    802-3-ethernet.port:                    --
    802-3-ethernet.speed:                   0
    802-3-ethernet.duplex:                  --
    802-3-ethernet.auto-negotiate:          yes
    802-3-ethernet.mac-address:             --
    802-3-ethernet.cloned-mac-address:      --
    802-3-ethernet.mac-address-blacklist:
    802-3-ethernet.mtu:                     自动
    802-3-ethernet.s390-subchannels:
    802-3-ethernet.s390-nettype:            --
    802-3-ethernet.s390-options:
    802-3-ethernet.wake-on-lan:             1 (default)
    802-3-ethernet.wake-on-lan-password:    --
    ipv4.method:                            auto
    ipv4.dns:
    ipv4.dns-search:
    ipv4.addresses:
    ipv4.gateway:                           --
    ipv4.routes:
    ipv4.route-metric:                      -1
    ipv4.ignore-auto-routes:                no
    ipv4.ignore-auto-dns:                   no
    ipv4.dhcp-client-id:                    --
    ipv4.dhcp-send-hostname:                yes
    ipv4.dhcp-hostname:                     --
    ipv4.never-default:                     no
    ipv4.may-fail:                          yes
    ipv6.method:                            auto
    ipv6.dns:
    ipv6.dns-search:
    ipv6.addresses:
    ipv6.gateway:                           --
    ipv6.routes:
    ipv6.route-metric:                      -1
    ipv6.ignore-auto-routes:                no
    ipv6.ignore-auto-dns:                   no
    ipv6.never-default:                     no
    ipv6.may-fail:                          yes
    ipv6.ip6-privacy:                       -1 (未知)
    ipv6.dhcp-send-hostname:                yes
    ipv6.dhcp-hostname:                     --
    GENERAL.名称:                           eno16777736
    GENERAL.UUID:                           ce2fa92b-adf1-4323-84c2-988f2ffcd07d
    GENERAL.设备:                           eno16777736
    GENERAL.状态:                           已激活
    GENERAL.默认:                           是
    GENERAL.DEFAULT6:                       否
    GENERAL.VPN:                            否
    GENERAL.ZONE:                           --
    GENERAL.DBUS-PATH:                      /org/freedesktop/NetworkManager/ActiveConnection/0
    GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/Settings/0
    GENERAL.SPEC 对象:                      /
    GENERAL.MASTER-PATH:                    --
    IP4.地址[1]:                            192.168.157.135/24
    IP4.网关:                               192.168.157.2
    IP4.DNS[1]:                             192.168.157.2
    IP4.域[1]:                              localdomain
    DHCP4.选项[1]:                          requested_domain_search = 1
    DHCP4.选项[2]:                          requested_nis_domain = 1
    DHCP4.选项[3]:                          requested_time_offset = 1
    DHCP4.选项[4]:                          requested_broadcast_address = 1
    DHCP4.选项[5]:                          requested_rfc3442_classless_static_routes = 1
    DHCP4.选项[6]:                          requested_classless_static_routes = 1
    DHCP4.选项[7]:                          requested_domain_name = 1
    DHCP4.选项[8]:                          expiry = 1473738337
    DHCP4.选项[9]:                          domain_name = localdomain
    DHCP4.选项[10]:                         next_server = 192.168.157.254
    DHCP4.选项[11]:                         broadcast_address = 192.168.157.255
    DHCP4.选项[12]:                         dhcp_message_type = 5
    DHCP4.选项[13]:                         requested_subnet_mask = 1
    DHCP4.选项[14]:                         dhcp_lease_time = 1800
    DHCP4.选项[15]:                         routers = 192.168.157.2
    DHCP4.选项[16]:                         ip_address = 192.168.157.135
    DHCP4.选项[17]:                         requested_static_routes = 1
    DHCP4.选项[18]:                         requested_interface_mtu = 1
    DHCP4.选项[19]:                         requested_nis_servers = 1
    DHCP4.选项[20]:                         requested_wpad = 1
    DHCP4.选项[21]:                         requested_ntp_servers = 1
    DHCP4.选项[22]:                         requested_domain_name_servers = 1
    DHCP4.选项[23]:                         domain_name_servers = 192.168.157.2
    DHCP4.选项[24]:                         requested_ms_classless_static_routes = 1
    DHCP4.选项[25]:                         requested_routers = 1
    DHCP4.选项[26]:                         subnet_mask = 255.255.255.0
    DHCP4.选项[27]:                         network_number = 192.168.157.0
    DHCP4.选项[28]:                         requested_host_name = 1
    DHCP4.选项[29]:                         dhcp_server_identifier = 192.168.157.254
    IP6.地址[1]:                            fe80::20c:29ff:fe74:71c9/64
    IP6.网关:
  • 相关阅读:
    DAY 179 在Flask中使用MongoDB:Flask-MongoEngine
    DAY 178 oracle基础
    DAY 177 mongoengine
    DAY 176 redis教程
    存储器
    cpu
    java 类文件类型
    线程池
    CopyOnWrite容器
    ConcurrentHashMap
  • 原文地址:https://www.cnblogs.com/tdcqma/p/5867746.html
Copyright © 2020-2023  润新知