Score:0

How to configure a /27 subnet on vlan Centos 7

cn flag

I have a dedicated server running Centos 7. I purchased a /27 subnet from my hosting provider. They said: "Your /27 subnet should be acceptable over vlan-interface with tag 18."

I asked them if they could configure the interface for me but they said they are not familiar with my OS. Unfortunately I'm not sure how to do this either. Everything I've tried has bricked my network interface.

Any help or step in the right direction is really appreciated. Thanks!

EDIT:
Here is my current network interface config: /etc/sysconfig/network-scripts/ifcfg-eno1

DEVICE=eno1
HWADDR=xx:c4:xx:c4:xx:14
IPV6INIT=no
ONBOOT=yes
BOOTPROTO=static
IPADDR=162.x.x.23
NETMASK=255.255.255.255
GATEWAY=216.x.x.1
PREFIX=32
DEFROUTE=yes
DNS1=8.8.8.8
DNS2=1.1.1.1
Score:0
za flag

Well, the /27 subnet has a

NETMASK=255.255.255.224

To make a 802.1q VLAN subinterface, you need to simply use a corresponding name, and tag that it is a VLAN:

DEVICE=eno1.18
VLAN=yes

Put all of this into /etc/sysconfig/network-scrips/ifcfg-eno1.18, together with other statements (IP address and so on).

Also create a ifcfg-eno1 file, to have a base interface of this VLAN subinterface configured. Don't set up any IP address on it:

DEVICE=eno1
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes

This is described in the reference for RHEL7, which is suitable for CentOS 7 (and for Oracle Linux 7) as well.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.