Enable Nic in Linux

Source: Internet
Author: User

The ifconfig command can be used to view information about active Linux NICs and IP addresses, subnet masks, and MAC addresses.

  1. [Root @ localhost ~] # Ifconfig
  2. Eth0 link encap: Ethernet hwaddr 08: 00: 27: D4: 71: 2D
  3. Inet ADDR: 192.168.1.104 bcast: 255.255.255.255 mask: 255.255.255.0
  4. Inet6 ADDR: fe80: a00: 27ff: fed4: 712d/64 scope: Link
  5. Up broadcast running Multicast MTU: 1500 Metric: 1
  6. RX packets: 1693 errors: 0 dropped: 0 overruns: 0 frame: 0
  7. TX packets: 255 errors: 0 dropped: 0 overruns: 0 carrier: 0
  8. Collisions: 0 FIG: 1000
  9. RX Bytes: 118346 (115.5 kib) TX Bytes: 53987 (52.7 kib)
  10. Interrupt: 10 Base Address: 0xd020
  11. Lo link encap: local loopback
  12. Inet ADDR: 127.0.0.1 mask: 255.0.0.0
  13. Inet6 ADDR: 1/128 scope: Host
  14. Up loopback running MTU: 16436 Metric: 1
  15. RX packets: 7 errors: 0 dropped: 0 overruns: 0 frame: 0
  16. TX packets: 7 errors: 0 dropped: 0 overruns: 0 carrier: 0
  17. Collisions: 0 txqueuelen: 0
  18. RX Bytes: 672 (672.0 B) TX Bytes: 672 (672.0 B)

Eth0 is a network card of a Linux host, and lo is a local loopback

Ifconfig eth0 up # enable Nic
Ifconfig eth0 down # enable Nic
Ifconfig eth0 192.168.1.101 # You can specify a static address for the host.

To use DHCP allocation, run the dhclient command.
Enter dhclient directly on the terminal :)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.