Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-05-2005, 11:40 PM
|
#1
|
Senior Member
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430
Rep:
|
What is a gateway? can I have more than one gateway on a vlan?
What is a gateway? can I have more than one gateway on a vlan?
If my ip block is
192.168.0.0/24
Can I have a gateway 192.168.0.1 192.168.0.11 192.168.0.253 ?
Can I only have one gateway per vlan?
|
|
|
09-06-2005, 01:55 AM
|
#2
|
Member
Registered: Aug 2004
Location: .au
Distribution: debian, BSD
Posts: 104
Rep:
|
you can have multiple gateways to different networks, but only one default gateway. What do you need multiple gateways for? Also, vLAN's have nothing to do with routing, unless it's within the scope of policy routing.
What are you trying to do?
|
|
|
09-06-2005, 08:22 AM
|
#3
|
Member
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513
Rep:
|
A gateway is a network device on a subnet to which network traffic is sent if the host machine can't figure out what to do with it - this will mean all traffic that doesn't have an entry in the host's routing table.
As angrybeaver quite correctly points out, you can have multiple gateways, but only one default gateway because at the end of the day the host needs to have somewhere specified as a 'catch-all' if it gets to a point where it can't figure out where to send network traffic.
In practice, it's unusual to have more than one gateway specified on a host. The only reason you would possibly do so would be to provide redundancy in case one gateway went offline. It's not possible (as far as I know) to do load-balancing between two gateways - at least not with a standard linux install.
|
|
|
09-06-2005, 10:43 AM
|
#4
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
For our setup we have specific subnet ranges for different classes of machines and each of these "vlans" though that doesn't match the technical definition. Classes would be Linux servers, Unix servers, Windows servers, and Workstations (Unix/Linux/Windows in the last all using DHCP).
For each of these subnets we have a different router which has the IP at the beginning of the range (e.g. for the subnet 10.0.17 we would have the router at 10.0.17.1). We would then use this router's IP as the "gateway" when configuring each of the servers in that "vlan".
The Gateway is just the default route for packets outside the subnet. So if sending packes from a host at 10.0.17.22 to 10.0.19.12 for example it would have to go through 10.0.17.1 to get there. You'd see this when doing traceroute to 10.0.19.12 from 10.0.17.22.
You can add other hosts to the route table with "route add". Therefoe you can have multiple routes on a local host but the gateway in this sense is the default route. Of course in 10.0.19 we have another router that would have iP 10.0.19.1 and it would be used as the gateway for any host in that subnet.
|
|
|
All times are GMT -5. The time now is 06:42 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|