Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add a static route? 2

Status
Not open for further replies.

LloydSev

ISP
Jan 23, 2003
1,457
US
As the subject says.. how do I add a static route on a Linux machine?

Computer/Network Technician
CCNA
 
The easiest way, I think, would be to use linuxconf to configure your ethernet interface. It gives you a nice gui (or text menu) to use.
Mark
 
And this would allow me to add a static route to a second network on my LAN aside from my default gateway?

Computer/Network Technician
CCNA
 
Also, I don't have the luxury of a GUI on the box. Should have pointed that out. If I did, i could do it myself without asking.

Computer/Network Technician
CCNA
 
static route?

route add -net xx.xx.xx.0 netmask 255.x.x.x gw yy.yy.yy.yy

xx.xx.xx.0: target network
255.x.x.x: the netmask
yy.yy.yy.yy: the gateway

Cheers,
 
Thanx. Got it in this morning and worked wonderful.

Computer/Network Technician
CCNA
 
Make sure that if you need the static route you add it to a script that gets called on reboot, or else the route will not be persistent between boots. Maybe rc.local.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top