LinuxQuestions.org
Visit Jeremy's Blog.
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-20-2006, 09:07 AM   #1
AnRkey
Member
 
Registered: Dec 2004
Location: UK
Distribution: Ubuntu, Fedora and not for long, M$ SuSE
Posts: 59

Rep: Reputation: 15
Extra gateway


Hi all!

I have an IPCop box here that I want to make our school's proxy server for students. The box is working fine barring one problem. We have a VLAN settup here and I need to set a gateway address in on the green interface. The IP Address for our internal router is 172.16.10.254 and the students are on 172.16.12.0 so can anyone tell me how to use the Route command to do this?

Changing the default gateway allows me to reach the IPCOP box from the other VLANS but then I don't have internet access on the box.

So all I wanna do is ad an internal gateway address but not as the default one.

Any help would be cool!

Thanks
AnRkey
 
Old 03-21-2006, 01:01 PM   #2
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
The router to "The Internet" stays the default gateway and you add a manual route (this isn't another default gateway) to a specific network through the router.
Code:
route add -net 172.16.12.0 netmask 255.255.255.0 gw 172.16.10.254
Sounds about right, but check the man page for specifics on the syntax.

see also http://man.linuxquestions.org/?query=route
 
Old 03-21-2006, 03:30 PM   #3
AnRkey
Member
 
Registered: Dec 2004
Location: UK
Distribution: Ubuntu, Fedora and not for long, M$ SuSE
Posts: 59

Original Poster
Rep: Reputation: 15
That worked

Thanks that worked! I have also scheduled it to run at the boot time by adding it to /etc/rc.d/rc.netaddress.up

Here is what I added to the end of the file.

route add -net 172.16.0.0 gw 172.16.10.254 netmask 255.255.0.0

This allows all my VLAN's to be reached through our internal router! This also helped me on another site to add a second incoming line to my RED interface.

Ciao
 
Old 03-25-2006, 08:34 PM   #4
AnRkey
Member
 
Registered: Dec 2004
Location: UK
Distribution: Ubuntu, Fedora and not for long, M$ SuSE
Posts: 59

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by AnRkey
Thanks that worked! I have also scheduled it to run at the boot time by adding it to /etc/rc.d/rc.netaddress.up

Here is what I added to the end of the file.

route add -net 172.16.0.0 gw 172.16.10.254 netmask 255.255.0.0

This allows all my VLAN's to be reached through our internal router! This also helped me on another site to add a second incoming line to my RED interface.

Ciao
Nope, sorry I ended up replacing my default gateway on the red interface and had to reboot the box. The gateway for the VLAN problem is sorted though.

I have two lines on this other box and I have both routers on the outside farwarding ports to the RED interface.

10.0.0.1(LINE 1) and 10.0.0.3(LINE 2) are both forwarding all sorts of ports to 10.0.0.2(RED interface)

10.0.0.1 is my default gateway and I want 10.0.0.3 to be added as an extra gateway.

Any idea's
 
  


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
Extra lines pforget Slackware 8 11-25-2005 11:18 AM
What is a gateway? can I have more than one gateway on a vlan? abefroman Linux - Networking 3 09-06-2005 11:43 AM
Odd problem: Gateway unreachable after certain amount of time (Win XP Gateway) SocialEngineer Linux - Networking 2 08-13-2004 01:54 AM
cd-extra with linux mane.x Linux - General 3 04-15-2004 03:25 PM
CD Extra thesynergy Linux - General 2 02-01-2002 02:25 PM

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

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