LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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-02-2005, 12:36 AM   #1
robf2301
LQ Newbie
 
Registered: Mar 2005
Location: Pretoria, South Africa
Posts: 4

Rep: Reputation: 0
route add


I have a route add for a windows workstation:
route add 11.128.97.252 mask 255.255.255.255 10.128.97.2 -p

I cannot get this working on Linux.

Can anybody help convert this to a Linux form please?

Cheers
Rob
 
Old 03-02-2005, 01:29 AM   #2
nonzero
Member
 
Registered: Feb 2005
Distribution: Debian FC4 LFS Slackware
Posts: 174

Rep: Reputation: 31
From man route

route add -net 127.0.0.0
adds the normal loopback entry, using netmask 255.0.0.0 (class
A net, determined from the destination address) and associated
with the "lo" device (assuming this device was prviously set up
correctly with ifconfig(8)).

route add -net 192.56.76.0 netmask 255.255.255.0 dev eth0
adds a route to the network 192.56.76.x via "eth0". The Class C
netmask modifier is not really necessary here because 192.* is
a Class C IP address. The word "dev" can be omitted here.

route add default gw mango-gw
adds a default route (which will be used if no other route
matches). All packets using this route will be gatewayed
through "mango-gw". The device which will actually be used for
that route depends on how we can reach "mango-gw" - the static
route to "mango-gw" will have to be set up before.

route add ipx4 sl0
Adds the route to the "ipx4" host via the SLIP interface
(assuming that "ipx4" is the SLIP host).

route add -net 192.57.66.0 netmask 255.255.255.0 gw ipx4
This command adds the net "192.57.66.x" to be gatewayed through
the former route to the SLIP interface.

route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
This is an obscure one documented so people know how to do it.
This sets all of the class D (multicast) IP routes to go via
"eth0". This is the correct normal configuration line with a
multicasting kernel.

route add -net 10.0.0.0 netmask 255.0.0.0 reject
This installs a rejecting route for the private network
"10.x.x.x."

'man' try it you'll like it!!

nz

Who greatly resisted the 'RTFM' response.
 
Old 03-02-2005, 07:18 AM   #3
robf2301
LQ Newbie
 
Registered: Mar 2005
Location: Pretoria, South Africa
Posts: 4

Original Poster
Rep: Reputation: 0
I did look at 'man'. I came up with this:
route add -host 11.128.97.252 gw 10.128.96.2

and that doesn't work!

Cheers
Rob
 
Old 03-02-2005, 08:51 PM   #4
nonzero
Member
 
Registered: Feb 2005
Distribution: Debian FC4 LFS Slackware
Posts: 174

Rep: Reputation: 31
The output of my kernel routing table using route and netstat -ree.

[nonzero@blacky /]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
default dslrouter 0.0.0.0 UG 0 0 0 eth1

[nonzero@blacky / ]# netstat -ree
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface MSS Window irtt
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0 0 0 0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 0 0 0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1 0 0 0
default dslrouter 0.0.0.0 UG 0 0 0 eth1 0 0 0

Now we need a little more info on your setup. Is your network using static or dynamic IP's? Do you have a Windows based firewall setup on this network and how is it configured? Does your windows network allow TCP/IP connections or is it strictly NETBIOS i.e. 'Windows Network'?

nz

EDIT: Also why are you using route add -host instead of route add -net?

Last edited by nonzero; 03-02-2005 at 08:53 PM.
 
Old 03-08-2005, 11:18 PM   #5
robf2301
LQ Newbie
 
Registered: Mar 2005
Location: Pretoria, South Africa
Posts: 4

Original Poster
Rep: Reputation: 0
Mostly dynamic IPs. Servers will normally have a static IP though.

Windows based firewall, yes. Just checking to see if my IP isn't perhaps blocked.

All TCP/IP.

I'm using -host because this is just one machine on the 11.* network and our administrators are very particular about who accesses it and how.

Cheers
Rob
 
Old 03-09-2005, 01:10 AM   #6
vusa
LQ Newbie
 
Registered: Nov 2003
Location: Bulawayo
Distribution: Slackware
Posts: 5

Rep: Reputation: 0
Unhappy

Was it a mistake that you put 10.128.97.2 in your first post and 10.128.96.2 in the other for your gateway? How's your network setup, because you say it's the only machine on the 11.* network, how does it network then with the others? There has to b another machine on the same subnet with it to act as it's "gateway" to the rest of the network. Or I'm getting lost...?
 
Old 03-11-2005, 04:06 AM   #7
robf2301
LQ Newbie
 
Registered: Mar 2005
Location: Pretoria, South Africa
Posts: 4

Original Poster
Rep: Reputation: 0
Yep, sorry. It is ...96.2.

Some very expensive routing hardware is used and in some rare cases 2 network cards in the same machine.
 
  


Reply



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
How do I add a route??? moonmoth Linux - Networking 3 09-04-2005 06:25 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
route add powah Linux - Newbie 4 09-01-2005 02:24 PM
ip route add ducati620 Linux - Networking 0 06-06-2004 06:11 AM
Help with Route Add command? graystarr Linux - Networking 4 01-13-2004 04:12 PM

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

All times are GMT -5. The time now is 08:04 AM.

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