LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 04-11-2012, 11:12 AM   #1
pbalakan
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Rep: Reputation: Disabled
Question on untagging concept in vlan in linux


I have a interface in linux, say eth2.
i have assigned a ip address to it (1.1.1.1).

And have a default route for all other networks via this interface (eth2).

Now, i have created a virtual interface for eth2 using vlan 10.

vconfig add eth2 10.

And assigned a ip address to eth2.10 (say 2.2.2.2)

Now, I want to know whether if i ping other IP address (5.5.5.1), will it go as untaggged? I suppose, it should go as untagged packet via eth2 since i have added a default route through this interface. But, I could see this packets are getting dropped in the peer end and the only way it can get dropped is when it has a tag. Can you please help me with this? Do I need to do any other additional configs?

Appreciate your help.

-thanks
Prabhu.
 
Old 04-11-2012, 01:47 PM   #2
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 880

Rep: Reputation: 184Reputation: 184
What next-hop is your default route pointing at?
 
Old 04-11-2012, 01:52 PM   #3
pbalakan
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
hi Pete,
Next hop points to 10.1.1.1 which is via eth2.

ip route add 10.1.1.1 dev eth2
arp -s 10.1.1.1 00:00:00:00:02:01
ip route add default via 10.1.1.1
 
Old 04-11-2012, 02:08 PM   #4
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 880

Rep: Reputation: 184Reputation: 184
That's rather a nasty way to configure anything. How have you configured the other end? I assume you have fixed the MAC address as per your ARP entry?
 
Old 04-11-2012, 02:11 PM   #5
pbalakan
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
yes. its a fixed mac which is programmed on the other end.
 
Old 04-11-2012, 02:35 PM   #6
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 880

Rep: Reputation: 184Reputation: 184
I'm not sure how your machine is supposed to distinguish weather its supposed to tag the frame or not. Your route resolves to an interface, but your next-hop is not a member of the same network as your machine, which breaks some fairly basic rules of IP routing and I'm not convinced that many devices would accept this packet. What you are basically sending is -

dmac - 00:00:00:02:01
smac - your local MAC
dip - 5.5.5.1
sip - 1.1.1.1

And you are sending this to a device with an address of 5.5.5.1 and using the same kludge to get the response back?
The problem is that 5.5.5.1 is not a local interface so the machine ultimately doesn't know if this packet is associated with eth0 or eth0.1.

As I say that's a pretty nasty kludge and I'm not sure I could predict how it would behave. Is there any reason why you have to use this bizarre approach?
 
Old 04-11-2012, 02:55 PM   #7
pbalakan
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
hi pete,
yes, there is a reason for this approach. I know its a nasty config, but we need it, as all the devices are incorporated in the board (like the processor which runs linux and the next hop, which is again a fwding engine.). I cant use a generic routing based solution as it will have conflict with user level configs. And the next hop just routes the traffic to the destination which owns 5.5.5.1 as its local ip. So, its basically a 3 hop network included end devices.

with routing concept, it should ideally send the packet (with dip 5.5.5.1) to the next hop (10.1.1.1) (without any arp transaction, as it is statically programmed) which is the way it is configured. And the next hop should accept it as it destined to its mac and fwds the packet to the destination. And it used to work, when Iam not having the virtual interface (eth2.10). Just curious, why it doesnt work when i create that virtual interface with vlan 10.

-thanks
Prabhu.
 
Old 04-11-2012, 03:02 PM   #8
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 880

Rep: Reputation: 184Reputation: 184
It may be as simple as that the tagged interface is the first one it finds and it has no information to tell it that that MAC does not belong to that interface.
 
Old 04-11-2012, 03:05 PM   #9
pbalakan
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
ok. so, is there any way i can have the linux to send the packet via untagged interface (eth2)?
is there any config which i can use it here?
 
  


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
VLan help on Cisco 870 to Linux vlan spide21 Linux - Networking 4 07-30-2009 08:20 AM
PGP keys: concept question joe293 Linux - Security 2 09-24-2008 11:38 AM
ld.so concept question PatrickNew Linux - General 2 10-30-2007 01:32 PM
Gecko/Firefox concept question PatrickNew Linux - Software 1 01-21-2007 06:11 PM
Question: the concept of suid and sgid feetyouwell Linux - Software 4 02-03-2004 04:12 PM

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

All times are GMT -5. The time now is 11:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration