zoukankan      html  css  js  c++  java
  • Centos配置网卡子接口

    1、检查OS是否加载802.1q模块:

    方法一:

    [root@rs2 ~]# modinfo 8021q

    方法二:

    [root@rs2 ~]# modinfo -F filename 8021q

     

    方法三:

    [root@rs2 ~]# modprobe --first-time 8021q

     

    2、如果没有加载如何加载802.1q模块:

    [root@rs2 ~]# modprobe 8021q           ###加载模块

    [root@rs2 ~]# lsmod | grep 8021q          ##检查模块是否正常加载

    3、在父接口中创建子接口:

    [root@rs2 ~]# cd /etc/sysconfig/network-scripts/

    [root@rs2 network-scripts]# cp ifcfg-eno16777736 ifcfg-eno16777736.bak      ##备份网卡配置

    [root@rs2 network-scripts]# vi ifcfg-eno16777736           #配置父接口

    TYPE=Ethernet

    BOOTPROTO=none

    NAME=eno16777736

    DEVICE=eno16777736

    ONBOOT=yes

    [root@rs2 network-scripts]# vi ifcfg-eno16777736.100         #配置子接口,100表示vid

    BOOTPROTO=none

    NAME=eno16777736.100

    DEVICE=eno16777736.100

    ONBOOT=yes

    IPADDR=192.168.10.20

    PREFIX=24

    NETWORK=192.168.10.1

    VLAN=yes                                    ###开启vlan,表示此接口为vlan接口

    4、重启网络:

    systemctl restart network

  • 相关阅读:
    配置步骤
    swap区
    Oracle的left join中on和where的区别
    drop与truncate
    关于trace
    oracle执行计划连接方式
    oracle系统结构
    查询存档
    oracle统计信息
    分区索引
  • 原文地址:https://www.cnblogs.com/good-study/p/10313410.html
Copyright © 2011-2022 走看看