Click to See Complete Forum and Search --> : 'route add' on MDK8.2 gateway-box (@home)
RobSmul
05-31-2003, 10:43 AM
Hi all,
I cannot get the route add command executed on my gateway-machine. I've @home cable internet, and me and my friend are in the same area and therefore unable to establish a direct connection. On their support site, @home states:
DOS-command:
route add ip-friend ip-gateway
My friend is going to execute this, but I need to do a similar command on my Linux gateway-pc (gateway in my own network-domain). I did the following:
route add -net ip-friend netmask 255.255.254.0 gw ip-internet(@home)-gateway
route: netmask doesn't match route address
is the response. But I'm sure the netmask is allright. So maybe I need to address the proper adapter (eth0) in my command, since I use two network-adapters on this machine...
Can someone please help me???? Am I doing something wrong with my command?
Thanx in advance!
Grtz.
RobSmul
05-31-2003, 10:50 AM
Update:
Adding 'dev eth0' to the line addresses my correct network adapter.
Still getting the same response though:
"route: netmask doesn't match route address"
RobSmul
06-01-2003, 07:35 AM
*bump*
Please help
jumpedintothefire
06-03-2003, 12:03 PM
On their support site, @home states:
DOS-command:
route add ip-friend ip-gateway
Think they mean ip address for a single host....
ie:
route add -host ip-friend gw ip-internet(@home)-gateway dev ethX
Note the -host and not -net and no netmask....
Hope this works for you....
NecroLin
06-03-2003, 12:15 PM
Here is an example:
route add -net 192.168.x.x netmask 255.255.255.0 eth0
route add default gw 192.168.x.x
(Change the numbers & x's to whatever you want)
RobSmul
06-03-2003, 04:25 PM
Thank you very much for the reply...
But, when I do:
route add -net 217.xxx.xx.xxx netmask 255.255.254.0 eth0
I get this response:
route: netmask doesn't match route address
I don't know how this can occur, because when I do:
ifconfig
I get:
eth0 Link encap:Ethernet HWaddr 00:00:0E:xx:xx:2C
inet addr:217.xxx.xx.xxx Bcast:217.xxx.xx.255 Mask:255.255.254.0
So the mask is exactly the same...
Any thoughts on this?
jumpedintothefire
06-03-2003, 09:42 PM
Got link to those instructions?? Is your provider using dhcp or pppoe?? Where in the dos example does it use a netmask?? Netmasks are used with the -net option of route. From what your telling me, from the dos example, what they want you to do is create a host route though the gateway to the other machine.... There is no netmask with a host route ( correction, it is implied to be 255.255.255.255 or /32 ) Use -host with no netmask inplace of the -net/netmask combo. Can you ping the other machine without mucking round with the routing?? What does the routing table look like?? The IP part of what your typing is the other machine's ip?? What kind of "direct connection" are you after??
RobSmul
06-04-2003, 04:24 AM
I'll try to explain it again.
Me and my friend have the same internet-provider (@home) and live relatively close to each other. Therefore we are in the same domain from the provider's point of view.
Because of that we cannot establish a direct connection in any way (ping, ftp, http, msn-file transfer etc...).
When I go to the provider's knowledge base, this is a known problem. Their solution is:
make a .bat file and put in there:
route add [IP-address of your friend] [IP-address of your gateway]
Unfortunately, they don't support Linux. So my problem is, that I have to do something similar on my Linux-box.
When I searched for 'route add'-commands they always added the netmask. When I don't use the netmask command, Linux will use a different one? or not? (I thought I saw something like that in the 'man route')
Can you help me?
Again, any input is appreciated a lot, I really need this.
Thanks!
RobSmul
06-04-2003, 06:13 AM
Nevermind,
Got it working now :)
Kinda long story, here I found the appropriate information:
www.troublesathome.nl
In the FAQ - Troubleshooting section
Thanx for the help though!