LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-30-2017, 12:54 AM   #1
raheel35
LQ Newbie
 
Registered: Nov 2017
Posts: 5

Rep: Reputation: Disabled
VLAN tag insertion on outgoing packet


I am working to insert vlan tags for some client macs on outgoing packets via native vlan. I have tried nh_hooks IN, OUT and Forward but didnt get any success.

What i want is either i can add tag to packet from client coming to native vlan and then send it via same vlan or is it possible that i can forward native vlan packet of some client based on their MAC to tagged vlan interface?

Any suggestion in netlink nh hooks code or kernel level code? or is it possible to do that via ebtables based on MAC?
 
Old 12-01-2017, 03:35 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,825

Rep: Reputation: 158Reputation: 158
If the packet is routed to VLAN interface, a VLAN tag will be added into packet.
 
Old 12-09-2017, 05:30 AM   #3
raheel35
LQ Newbie
 
Registered: Nov 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
If the packet is routed to VLAN interface, a VLAN tag will be added into packet.
yes my packet is by default route to native vlan, how can I change its route to tagged vlan interface as my wireless interface is bridge with native vlan but i want it to route to tagged vlan dynamically instead of native vlan. Any idea how can I do this?
 
Old 12-12-2017, 03:18 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,825

Rep: Reputation: 158Reputation: 158
My understanding, dynamic means that flow or session based. If so, you can use iptable to achieve this.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Adding/Removing VLAN Tag to an Incoming/Outgoing Packet elcapitan Linux - Networking 2 09-02-2021 06:42 PM
Sending ethernet packet with VLAN tag in C socket Praju26 Linux - Networking 9 07-01-2015 07:34 PM
[SOLVED] Why the eth0 send out the packet with tag vlan id 0 wesley_q Linux - Networking 3 03-02-2015 08:44 AM
vlan tag packet is stripped in eth1 not in eth2 interface? sargurus Linux - Networking 0 04-03-2014 11:44 AM
Route non-vlan packet to a vlan interface mic.sed Linux - Networking 2 04-23-2010 03:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:25 PM.

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