• centos7网卡配置vlan


    添加VLAN ID 为2000网络

    [root@localhost network-scripts]# cat ifcfg-eno1 
    TYPE=Ethernet
    PROXY_METHOD=none
    BROWSER_ONLY=no
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    NAME=eno1
    UUID=542ca061-4b34-4b18-ab4a-946eef1d9449
    DEVICE=eno1
    ONBOOT=yes
    IPV6INIT=no
    
    [root@localhost network-scripts]# cat ifcfg-eno1.2000 
    BOOTPROTO=static
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    PHYSDEV=eno1
    NAME=eno1.2000
    ONBOOT=yes
    TYPE=Vlan
    VLAN_ID=2000
    
    IPADDR=192.168.24.54
    NETMASK=255.255.255.0
    GATEWAY=192.168.24.254
    
    
    [root@localhost network-scripts]# ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host 
           valid_lft forever preferred_lft forever
    2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
        link/ether 08:f1:ea:91:52:22 brd ff:ff:ff:ff:ff:ff
    3: ens1f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq portid 20677c005ae8 state DOWN qlen 1000
        link/ether 20:67:7c:00:5a:e8 brd ff:ff:ff:ff:ff:ff
    4: eno5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq portid 48df37831e40 state UP qlen 1000
        link/ether 48:df:37:83:1e:40 brd ff:ff:ff:ff:ff:ff
    5: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
        link/ether 08:f1:ea:91:52:23 brd ff:ff:ff:ff:ff:ff
    6: ens1f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq portid 20677c005aec state DOWN qlen 1000
        link/ether 20:67:7c:00:5a:ec brd ff:ff:ff:ff:ff:ff
    7: eno6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq portid 48df37831e48 state UP qlen 1000
        link/ether 48:df:37:83:1e:48 brd ff:ff:ff:ff:ff:ff
    8: eno3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
        link/ether 08:f1:ea:91:52:24 brd ff:ff:ff:ff:ff:ff
    9: eno4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
        link/ether 08:f1:ea:91:52:25 brd ff:ff:ff:ff:ff:ff
    11: eno1.2067@eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
        link/ether 08:f1:ea:91:52:22 brd ff:ff:ff:ff:ff:ff
        inet 192.168.24.54/24 brd 192.168.24.255 scope global eno1.2067
           valid_lft forever preferred_lft forever
        inet6 fe80::af1:eaff:fe91:5222/64 scope link 
           valid_lft forever preferred_lft forever
    
    # eno1.2067@eno1 即为添加VLAN的网络。
    
  • 相关阅读:
    luncence
    git与svn与github与码云的区别
    redis缓存在项目中的使用
    大宗风控体系“药不能停”:一线实战高手解密衍生品交易风险管控的三个层级!
    永恒的风控:大宗商品贸易融资背后的核心风险该如何规避?
    达信:深度解读COSO新版企业风险管理框架(ERM)
    DataOps Reading Notes
    SDN Reading Notes
    给某mooc站点准备的FE大纲
    《财富》杂志推荐的75本商业必读书?
  • 原文地址:https://www.cnblogs.com/bugbeta/p/15237662.html
Copyright © 2020-2023  润新知