●VLAN作成
[root@rhel74 network-scripts]# nmcli con add type vlan con-name vlan21 ifname vlan21 dev enp0s9 id 21 ip4 192.168.21.114/24 ipv4.never-default yes ipv6.method
ignore ipv4.may-fail no
接続 'vlan21' (d00b2918-17ae-4753-a1cc-d93c047b45b0) が正常に追加されました。
[root@rhel74 network-scripts]# cat ifcfg-vlan21
VLAN=yes
TYPE=Vlan
DEVICE=vlan21
PHYSDEV=enp0s9
VLAN_ID=21
REORDER_HDR=yes
GVRP=no
MVRP=no
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPADDR=192.168.21.114
PREFIX=24
DEFROUTE=no
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=vlan21
UUID=d00b2918-17ae-4753-a1cc-d93c047b45b0
ONBOOT=yes
[root@rhel74 network-scripts]# nmcli con show vlan21
connection.id: vlan21
connection.uuid: d00b2918-17ae-4753-a1cc-d93c047b45b0
connection.stable-id: --
connection.interface-name: vlan21
connection.type: vlan
connection.自動接続: yes
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.timestamp: 1551468748
connection.read-only: no
connection.permissions: --
connection.zone: --
connection.マスター: --
connection.slave-type: --
connection.autoconnect-slaves: -1 (default)
connection.secondaries: --
connection.gateway-ping-timeout: 0
connection.metered: 不明
connection.lldp: -1 (default)
802-3-ethernet.ポート: --
802-3-ethernet.speed: 0
802-3-ethernet.duplex: --
802-3-ethernet.auto-negotiate: no
802-3-ethernet.mac-address: --
802-3-ethernet.cloned-mac-address: --
802-3-ethernet.generate-mac-address-mask:--
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: manual
ipv4.dns: --
ipv4.dns-search: --
ipv4.dns-options: (デフォルト)
ipv4.dns-priority: 0
ipv4.addresses: 192.168.21.114/24
ipv4.gateway: --
ipv4.routes: --
ipv4.route-metric: -1
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: --
ipv4.dhcp-timeout: 0
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: --
ipv4.dhcp-fqdn: --
ipv4.never-default: yes
ipv4.may-fail: no
ipv4.dad-timeout: -1 (default)
ipv6.method: ignore
ipv6.dns: --
ipv6.dns-search: --
ipv6.dns-options: (デフォルト)
ipv6.dns-priority: 0
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.addr-gen-mode: stable-privacy
ipv6.dhcp-send-hostname: yes
ipv6.dhcp-hostname: --
ipv6.token: --
vlan.parent: enp0s9
vlan.id: 21
vlan.flags: 1 (ヘッダーの順序変更・
vlan.ingress-priority-map: --
vlan.egress-priority-map: --
proxy.method: none
proxy.browser-only: no
proxy.pac-url: --
proxy.pac-script: --
GENERAL.名前: vlan21
GENERAL.UUID: d00b2918-17ae-4753-a1cc-d93c047b45b0
GENERAL.デバイス: vlan21
GENERAL.状態: アクティベート済み
GENERAL.デフォルト: いいえ
GENERAL.デフォルト6: いいえ
GENERAL.VPN: いいえ
GENERAL.ゾーン: --
GENERAL.DBUS パス: /org/freedesktop/NetworkManager/ActiveConnection/12
GENERAL.CON パス: /org/freedesktop/NetworkManager/Settings/9
GENERAL.スペックオブジェクト: --
GENERAL.マスターパス: --
IP4.アドレス[1]: 192.168.21.114/24
IP4.ゲートウェイ: --
IP6.アドレス[1]: fe80::a00:27ff:feac:2b5b/64
IP6.ゲートウェイ: --
[root@rhel74 ~]# tcpdump -i enp0s9 -vvv -e
tcpdump: listening on enp0s9, link-type EN10MB (Ethernet), capture size 262144 bytes
19:53:01.864362 08:00:27:ea:b4:c4 (oui Unknown) > 08:00:27:ac:2b:5b (oui Unknown), ethertype 802.1Q (0x8100), length 102: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 47980, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.100.113 > rhel74.oradomain: ICMP echo request, id 9120, seq 1, length 64