LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 03-13-2009, 04:18 AM   #1
bala.linux
LQ Newbie
 
Registered: Feb 2008
Distribution: Ubuntu, Centos
Posts: 10

Rep: Reputation: 0
VLAN routing/default gateway ?


Hello All,

I would like to setup the following scenario : My pc have 1 interface eth0 which is connected to my ISP. Now, I have created 1 virtual interfaces
eth0:0. Ip forward is enabled and it is working fine. Now, I want to route all my traffic to go through eth0:0 and through eth0. How can I do this ?

My current default gateway is provided by ISP. I want to force all my packets to pass through my virtual interface. Please let me know your thoughts.

Thanks and Regards,
Bala
 
Old 03-14-2009, 02:09 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
My thoughts are mainly "why??" firstly you have the phrase "vlan" in the thread title, but you haven't got a vlan interface there in the slightest, just an alias. What are you trying to achieve here?
 
Old 03-15-2009, 06:30 AM   #3
bala.linux
LQ Newbie
 
Registered: Feb 2008
Distribution: Ubuntu, Centos
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
My thoughts are mainly "why??" firstly you have the phrase "vlan" in the thread title, but you haven't got a vlan interface there in the slightest, just an alias. What are you trying to achieve here?
I am trying the policy routing now. No luck so far. I have used vconfig to add the device and used ifconfig to assign a ip of different subnet.

I want to install the chillispot server and to control my own pc. Currently, chillispot works on client/server, in this case I would want my server to act as a client. So, if I could pass my local traffic to a different vlan then I can create a vlan with two virtual interfaces and one acts as a server and other as a client. The physical interface would be managed by the chillispot. Is that possible ? Or do you have any other suggestions ? Basically, looking to provide access to my internet only after passing through the web authentication.

Regards,
Bala

Last edited by bala.linux; 03-15-2009 at 06:33 AM.
 
Old 03-15-2009, 04:24 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
that seems like a massive piece of over engineering. Chillispot is for hotspots and internet cafes, which surely isn't what you're trying to do with a single machine. what is the point of a web portal? Can't you just use some standard squid authentication?
 
Old 03-16-2009, 12:49 AM   #5
bala.linux
LQ Newbie
 
Registered: Feb 2008
Distribution: Ubuntu, Centos
Posts: 10

Original Poster
Rep: Reputation: 0
hmm...no I understand the usage of chillispot. Thats why I want to simulate this environment. But would it not be possible to route the packets to different interfaces ? hmm...leaving he chillispot aside, I am trying to create a virtual ip and trying to send my local packets to it and then forward the same packets to my physical interface.

Local -> Virtual Interface -> Physical Interface
 
Old 03-16-2009, 04:03 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you could use different routing tables and then use iptables marking to bounce between two tables.
 
Old 03-17-2009, 11:17 PM   #7
bala.linux
LQ Newbie
 
Registered: Feb 2008
Distribution: Ubuntu, Centos
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
well you could use different routing tables and then use iptables marking to bounce between two tables.
I was actually trying the same ... Could you please provide some example ?
 
Old 03-18-2009, 03:27 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I've posted a couple recently here, but I can't find my references to them, nor the original docs via google...

All the right doohickeys are used in multilink LB... http://tetro.net/misc/multilink.html but not in the way that you would need to, but hopefully the ideas behind that might be a start. Again though I don't know how possible it is, as it depends on the way the tcp/ip stack routes within linux.
 
Old 03-18-2009, 04:16 AM   #9
bala.linux
LQ Newbie
 
Registered: Feb 2008
Distribution: Ubuntu, Centos
Posts: 10

Original Poster
Rep: Reputation: 0
I am currently using this http://www.debian-administration.org/articles/379 as my reference. I will check yours too. Thanks.
 
  


Reply



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
VPN - Default Gateway / Routing Issues, pptpd stuartornum Linux - Networking 0 03-25-2008 01:15 PM
VLAN and default gateway MarioT Linux - Networking 2 10-23-2007 02:18 AM
VLAN Routing teamchachi Linux - Networking 0 06-14-2005 09:54 AM
how to connect a gateway linux with vlan ? ctis78 Linux - Networking 2 03-25-2005 07:28 AM
Default Gateway Not Listed In Routing Table krazyace78 Linux - Networking 0 10-05-2004 12:09 PM

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

All times are GMT -5. The time now is 05:35 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