LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-01-2023, 04:29 AM   #1
mickyjohn
LQ Newbie
 
Registered: Jun 2022
Posts: 16

Rep: Reputation: 10
How to add VLAN in Debian 11 ?


I have a VLAN configuration which i wish to add to Debian 11 Debian GNU/Linux 11 (bullseye) but no success. I followed the tutorial on internet. Although VLAN is added but i can not ping the VLAN address. Surperisingly i also experimented to add VLAN on Ubuntu server (Ubuntu 22.04.2 LTS) it worked flawlessly and the ping was also working.
On Debian 11 i tired:

Code:
#apt install vlan
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
vlan is already the newest version (2.0.5).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded
root@air:~# modprobe 8021q
root@air:~# lsmod | grep 8021q
8021q                  32768  0
garp                   16384  1 8021q

#nano /etc/network/interfaces.d/vlans
auto vlan40
iface vlan40 inet static
    address 10.54.252.3
    netmask 255.255.254.0
    gateway 10.54.252.1
    dns-nameservers 10.53.2.200
    vlan-raw-device wlan0

#ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether e4:5f:01:33:0b:00 brd ff:ff:ff:ff:ff:ff
    inet 10.53.30.98/16 brd 10.53.255.255 scope global dynamic noprefixroute eth0
       valid_lft 42461sec preferred_lft 37061sec
    inet6 fe80::2d3b:4d78:11d6:e24d/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether e4:5f:01:33:0b:01 brd ff:ff:ff:ff:ff:ff
    inet 10.54.252.128/23 brd 10.54.253.255 scope global noprefixroute wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::3a63:2117:ee26:688e/64 scope link 
       valid_lft forever preferred_lft forever
5: vlan40@wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether e4:5f:01:33:0b:01 brd ff:ff:ff:ff:ff:ff
    inet 10.54.252.3/23 brd 10.54.253.255 scope global vlan40
       valid_lft forever preferred_lft forever
    inet6 fe80::cdb1:77d5:c854:1787/64 scope link 
       valid_lft forever preferred_lft forever
    inet6 fe80::e65f:1ff:fe33:b01/64 scope link tentative 
       valid_lft forever preferred_lft forever

~# sysctl -p
net.ipv4.ip_forward = 1
# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

Moreover as soon as VLAN is added i can also not ping the wlan0 IP.

On ubuntu serve i added the VLAN by editing netplan file and it working. If it is interesting my hardware is Raspberry pi 4.
 
Old 03-02-2023, 03:30 PM   #2
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
https://wiki.debian.org/NetworkConfiguration
  1. ...
  2. ...
  3. ...
  4. ...
  5. Up?
 
  


Reply

Tags
debian 11, network manager, vlan tagging, vlans



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Private VLAN: proxy_arp_pvlan flag in mac-vlan interface in debian kernel thanigz2589 Linux - Networking 0 08-25-2020 01:45 PM
Route non-vlan packet to a vlan interface mic.sed Linux - Networking 2 04-23-2010 02:39 AM
VLan help on Cisco 870 to Linux vlan spide21 Linux - Networking 4 07-30-2009 08:20 AM
DHCP Config for VLAN's using 1NIC and non VLAN router. scottgutman Linux - Networking 1 07-22-2009 01:41 AM
VLAN configuration - native VLAN and setting PVID kumarwaiting Linux - Networking 0 07-24-2006 02:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration