Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
interfaces don't have default gateways, routing tables do, which are abstracted from physical interfaces. How are you expecting two default gateways to work? What information is supposed to be used to determine whether one is used over the other?
I couldnt get your query right. All i am looing for is "whether we can have two logical interfaces configured using single physical interface for (ex)
eth0 --> physical interface ( no ip segment on this )
need to have two sub-interface under it
eth0:0 --- > segment X
where vlan 10 to be used in this interface
eth0:1 --- > segment Y
vlan 20 to be used in this interface
and have static route added say default route added pointing to nexthop(gateway) X and specific route added pointing to nexthop(gateway) Y ".
Also provide configuration template or reference link if possible.
Like Chris was trying to clarify, "default routes" and "static routes" are different things. You can only have one "default route" - a route of last resort. You can have multiple routes off a network.
Simply by creating the logical interfaces, the system will create routes to the connected subnets. You would need to add "static routes" if one of those stub subnets had other subnets that needed to be reached.
For instance, given:
Internet <> nic0:0 - host - nic0:1 <> private_subnet1 <> private_subnet2
'host' would have a "default route" (thru nic0:0) to 'Internet' and a "static route" (thru nic0:1) to 'private_subnet2'.
you're talking about having aliased interfaces there, e.g. eth0:1 but using vlans on them. aliased interfaces are NOT vlans, they are just additional addresses on the same subnet, very very very different thing. You need to understand the difference and decide what you actually want.