You are not logged in.
Hello, I'm trying to configure a VLAN with the netctl application. I have a primary network interface (eno1) configured with DHCP.
$ cat eno1
Description='A basic dhcp ethernet connection'
Interface=eno1
Connection=ethernet
IP=dhcp
Then, I copied the VLAN-static example from examples directory, and change it to my needs.
$ cat voip
Description='Virtual LAN 10 on interface eno1'
Interface=eno1.10
Connection=vlan
# The variable name is plural, but needs precisely one interface
BindsToInterfaces=eno1
VLANID=10
IP=static
Address="10.4.5.203/24"
Hostname="x"
I can't ping another host, for example:
$ ping 10.4.5.75
PING 10.4.5.75 (10.4.5.75) 56(84) bytes of data.
From 10.4.5.203 icmp_seq=1 Destination Host Unreachable
From 10.4.5.203 icmp_seq=2 Destination Host Unreachable
From 10.4.5.203 icmp_seq=3 Destination Host Unreachable
What I'm missing?
Last edited by vitor (2018-05-21 16:32:39)
Offline
Once you start the profiles, what can you see from the services which (should be) are started?
systemctl status netctl@eno1
systemctl status netctl@voip
Offline
The commands output:
x:~ $ systemctl status netctl@eno1
● netctl@eno1.service - A basic dhcp ethernet connection
Loaded: loaded (/etc/systemd/system/netctl@eno1.service; enabled; vendor preset: disabled)
Active: active (exited) since Mon 2018-05-14 11:23:57 -03; 1 weeks 0 days ago
Docs: man:netctl.profile(5)
Main PID: 551 (code=exited, status=0/SUCCESS)
Status: "online"
Tasks: 1 (limit: 4915)
Memory: 4.9M
CGroup: /system.slice/system-netctl.slice/netctl@eno1.service
└─716 dhcpcd -4 -q -t 30 -L eno1
May 14 15:56:59 x dhcpcd[716]: eno1: carrier lost
May 14 15:56:59 x dhcpcd[716]: eno1: deleting route to 192.168.16.0/22
May 14 15:56:59 x dhcpcd[716]: eno1: deleting default route via 192.168.16.1
May 14 15:57:08 x dhcpcd[716]: eno1: carrier acquired
May 14 15:57:08 x dhcpcd[716]: eno1: IAID a9:09:6a:6d
May 14 15:57:08 x dhcpcd[716]: eno1: rebinding lease of 192.168.17.184
May 14 15:57:08 x dhcpcd[716]: eno1: probing address 192.168.17.184/22
May 14 15:57:13 x dhcpcd[716]: eno1: leased 192.168.17.184 for 7200 seconds
May 14 15:57:13 x dhcpcd[716]: eno1: adding route to 192.168.16.0/22
May 14 15:57:13 x dhcpcd[716]: eno1: adding default route via 192.168.16.1
x:~ $ systemctl status netctl@voip
● netctl@voip.service - Networking for netctl profile voip
Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static; vendor preset: disabled)
Active: active (exited) since Mon 2018-05-21 13:28:48 -03; 18h ago
Docs: man:netctl.profile(5)
Process: 16318 ExecStart=/usr/lib/netctl/network start voip (code=exited, status=0/SUCCESS)
Main PID: 16318 (code=exited, status=0/SUCCESS)
Status: "online"
May 21 13:28:48 x systemd[1]: Starting Networking for netctl profile voip...
May 21 13:28:48 x network[16318]: Starting network profile 'voip'...
May 21 13:28:48 x systemd[1]: Started Networking for netctl profile voip.
May 21 13:28:48 x network[16318]: Started network profile 'voip'
Thanks!
Offline
Now it rings a bell: you've created a profile which just doesn't do anything other than starting a service.
In order for this to work, the physical interface eno1 shouldn't acquire any ip address, and you would want to create 2 different vlans (one for data and one for voip).
Assuming that 192.168.16.0/22 is your network and 192.168.16.1 is your gateway, your hosts go from 192.168.16.1 to 192.168.19.254, so you'd like to have e.g. 192.168.16.0/23 as vlan10 and 192.168.18.0/23 as vlan20 (which should have another gateway such as 192.168.19.1).
It's not really important to stay within the same subnet, but there must be a device somewhere in your network that works as a gateway for the VLAN you want to use (indeed, netctl 'vlan-static' example contains that field).
Most importantly, I think you're missing a switch that supports 802.1Q and some basic idea about how VLANs work.
This seems an XY problem: why do you want to create a vlan? What is your final goal?
Offline
I thought that just by copy the vlan-static example would do the work. It's not the switch because, on Windows machine, I can reach this network. Maybe I lack some VLAN knowledge.
My goal is to access the IP phone web interface that runs on 10.4.5.0/24. There is no VoIP traffic in eno1 interface.
I don't understand why I would have to create 2 VLAN's and why my physical interface eno1 shouldn't acquire an IP from DHCP.
Thank you once again.
Offline
It's not the switch because, on Windows machine, I can reach this network.
So there's a switch (and the IP phone is not tagging its traffic with a vlan ID)?
My goal is to access the IP phone web interface that runs on 10.4.5.0/24
If you mean access as in managing or monitoring your IP phone through a dedicated web interface, you just need to know what's the gateway of that IP phone and add it to your netctl voip profile.
Else, you should make sure that both the PC and the IP phone know the route to each other (this is not relevant if the router is just one and it shares a default route to both of them).
Offline