LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-05-2005, 11:40 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
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?
 
Old 09-06-2005, 01:55 AM   #2
angrybeaver
Member
 
Registered: Aug 2004
Location: .au
Distribution: debian, BSD
Posts: 104

Rep: Reputation: 17
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?
 
Old 09-06-2005, 08:22 AM   #3
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
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.
 
Old 09-06-2005, 10:43 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
  


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
lm10.0 gateway is set but when I reboot I have to set the gateway rharvey32 Mandriva 8 02-13-2006 01:35 PM
how to connect a gateway linux with vlan ? ctis78 Linux - Networking 2 03-25-2005 07:28 AM
Odd problem: Gateway unreachable after certain amount of time (Win XP Gateway) SocialEngineer Linux - Networking 2 08-13-2004 12:54 AM
gateway alaios Linux - Networking 2 06-09-2004 08:49 AM
Gateway jonnyjonjon Linux - Networking 2 01-29-2003 08:32 AM

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

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