Linux Advanced Management (III)

Source: Internet
Author: User
Tags aliases

Lesson 7: Online bindings, sub-interfaces

  1. Mii-toll eth0, view online status
  2. Ethtool Ehto Check the physical characteristics of the network,-I display network card driver,-s check NIC status
  3. IP aliases: Linux supports the configuration of multiple IP addresses on a physical network card, which is used to implement sub-interface-like functions called IP aliases
  4. The CentOS or Rhel system is enabled by default NetworkManager to network card management for user convenience, if you need to disable NetworkManager using sub-interfaces

    Service NetWorkManager

    Chkconfig Networkmanger

  5. Ip addr Add 192.168.1.1/24 dev eth0 label eth0:0,eth0:0 The second 0 is the alias number and the second can have a full name of Eth0:1
  6. To permanently add an IP alias, you need to add an alias profile under/etc/sysconfig/network-scripts/: ifcfg-eth0:0, Content:

    device=eth0:0

    ipaddr=10.1.1.1

    Prefix=24

    Onparent=yes

  7. Multi-NIC binding for increased bandwidth and stability. After binding, the physical network card is no longer used directly, and the IP address is configured on the bundled logical NIC.
  8. Linux support NIC binding mode: Mode 0: Balanced polling; Mode 1: Active backup; Mode 3: Broadcast mode
  9. NIC binding configuration: The full name of the logical NIC after binding is: Bondn,n is numbered, such as/DEV/BOND0,/dev/bond1
  10. Create a configuration file that binds the NIC:/etc/sysconfig/network-scripts/ifcfg-bond0

    Device=bond0

    ipaddr=192.168.1.200

    Prefix=24

    Onboot=yes

    Bootproto=none

    Userctl=no

    bonding_opts= "Mode=1 millmon=50"

  11. Modify the configuration file for each physical NIC that belongs to the logical Nic:/etc/sysconfig/network-scripts/ifcfg-eth0

    Device=eth0

    Bootproto=none

    Onboot=yes

    Master=bond0

    Slave=yes

    Userctl=no

    Then the NIC adds driver support:/etc/modprobe.d/bonding.conf

    Alias bond0 Bonding

Linux Advanced Management (III)

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.