[opensuse] route question
I have what should be a simple question about the 'route' command: I'm at a client and am plugged into their network with eth0. I have a broadband card I'm using (ppp0) so I can get out to the Internet (which I can't on their network). The laptop I'm on dual-boots WinXP and openSUSE10.3 With WinXP, I simply: route delete 0.0.0.0 mask 0.0.0.0 ###.###..###.### <-Client IP route add ###.0.0.0 mask 255.0.0.0 ###.###.###.1 What is the equivalent syntax with Linux to achieve the same with the 'route' command. I'm just getting client traffic to go through the client GW but all other traffic to go through my broadband card (ppp0). Thanks! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Doctor Who wrote:
I have what should be a simple question about the 'route' command:
I'm at a client and am plugged into their network with eth0. I have a broadband card I'm using (ppp0) so I can get out to the Internet (which I can't on their network). The laptop I'm on dual-boots WinXP and openSUSE10.3
With WinXP, I simply:
route delete 0.0.0.0 mask 0.0.0.0 ###.###..###.### <-Client IP route add ###.0.0.0 mask 255.0.0.0 ###.###.###.1
Well if you are doing what I think you are doing, try this: "route del 0.0.0.0" (could also use "route del default") "route add -net ###.0.0.0 netmask 255.0.0.0 gw ###.###.###.1 <dev>" <dev> should be replaced with the network interface the traffic should be sent over (ppp0 or eth0, etc.). This is the equivalent of the commands above. Although I am not 100% sure it will do what you want.
What is the equivalent syntax with Linux to achieve the same with the 'route' command. I'm just getting client traffic to go through the client GW but all other traffic to go through my broadband card (ppp0).
Thanks!
-- kr -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2/6/08, K.R. Foley
Doctor Who wrote:
I have what should be a simple question about the 'route' command:
I'm at a client and am plugged into their network with eth0. I have a broadband card I'm using (ppp0) so I can get out to the Internet (which I can't on their network). The laptop I'm on dual-boots WinXP and openSUSE10.3
With WinXP, I simply:
route delete 0.0.0.0 mask 0.0.0.0 ###.###..###.### <-Client IP route add ###.0.0.0 mask 255.0.0.0 ###.###.###.1
Well if you are doing what I think you are doing, try this:
"route del 0.0.0.0" (could also use "route del default") "route add -net ###.0.0.0 netmask 255.0.0.0 gw ###.###.###.1 <dev>"
<dev> should be replaced with the network interface the traffic should be sent over (ppp0 or eth0, etc.).
This is the equivalent of the commands above. Although I am not 100% sure it will do what you want.
Thanks. What happens is that when I plug into their network using eth0 I get their gateway as the default. I want to have my broadband card (ppp0) provide the default gateway for all traffic with the exception being the traffic destined for the client's network. In Windows, when I'm connected to their network using eth0 *and* have ppp0 up, 'route print' shows two (2) default gateways. When I delete their default gateway, the one provided by ppp0 remains. In Linux, with the same setup, i only see one (1) default gateway, which is the client's network. I want to delete that and add a default gateway that uses my wireless broadband card (Sprint). Thanks. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Doctor Who wrote:
On 2/6/08, K.R. Foley
wrote: Doctor Who wrote:
I have what should be a simple question about the 'route' command:
I'm at a client and am plugged into their network with eth0. I have a broadband card I'm using (ppp0) so I can get out to the Internet (which I can't on their network). The laptop I'm on dual-boots WinXP and openSUSE10.3
With WinXP, I simply:
route delete 0.0.0.0 mask 0.0.0.0 ###.###..###.### <-Client IP route add ###.0.0.0 mask 255.0.0.0 ###.###.###.1 Well if you are doing what I think you are doing, try this:
"route del 0.0.0.0" (could also use "route del default") "route add -net ###.0.0.0 netmask 255.0.0.0 gw ###.###.###.1 <dev>"
<dev> should be replaced with the network interface the traffic should be sent over (ppp0 or eth0, etc.).
This is the equivalent of the commands above. Although I am not 100% sure it will do what you want.
Thanks. What happens is that when I plug into their network using eth0 I get their gateway as the default. I want to have my broadband card (ppp0) provide the default gateway for all traffic with the exception being the traffic destined for the client's network.
In Windows, when I'm connected to their network using eth0 *and* have ppp0 up, 'route print' shows two (2) default gateways. When I delete their default gateway, the one provided by ppp0 remains.
In Linux, with the same setup, i only see one (1) default gateway, which is the client's network. I want to delete that and add a default gateway that uses my wireless broadband card (Sprint).
Thanks.
Then what I think you want is: route del default route add -net 0.0.0.0 netmask 0.0.0.0 gw ###.###.###.1 <dev> where ###.###.###.1 is the ip address of the default gateway (likely a router) and dev is ppp0 -- kr -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2/6/08, K.R. Foley
Doctor Who wrote:
On 2/6/08, K.R. Foley
wrote: Doctor Who wrote:
I have what should be a simple question about the 'route' command:
I'm at a client and am plugged into their network with eth0. I have a broadband card I'm using (ppp0) so I can get out to the Internet (which I can't on their network). The laptop I'm on dual-boots WinXP and openSUSE10.3
With WinXP, I simply:
route delete 0.0.0.0 mask 0.0.0.0 ###.###..###.### <-Client IP route add ###.0.0.0 mask 255.0.0.0 ###.###.###.1 Well if you are doing what I think you are doing, try this:
"route del 0.0.0.0" (could also use "route del default") "route add -net ###.0.0.0 netmask 255.0.0.0 gw ###.###.###.1 <dev>"
<dev> should be replaced with the network interface the traffic should be sent over (ppp0 or eth0, etc.).
This is the equivalent of the commands above. Although I am not 100% sure it will do what you want.
Thanks. What happens is that when I plug into their network using eth0 I get their gateway as the default. I want to have my broadband card (ppp0) provide the default gateway for all traffic with the exception being the traffic destined for the client's network.
In Windows, when I'm connected to their network using eth0 *and* have ppp0 up, 'route print' shows two (2) default gateways. When I delete their default gateway, the one provided by ppp0 remains.
In Linux, with the same setup, i only see one (1) default gateway, which is the client's network. I want to delete that and add a default gateway that uses my wireless broadband card (Sprint).
Thanks.
Then what I think you want is:
route del default route add -net 0.0.0.0 netmask 0.0.0.0 gw ###.###.###.1 <dev>
where ###.###.###.1 is the ip address of the default gateway (likely a router) and dev is ppp0
Does the 'route add -net 0.0.0.0 netmask 0.0.0.0 gw ###.###.###.1 <dev>' designate this as the 'default' route or must that be specified somehow? Thanks. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Doctor Who wrote:
On 2/6/08, K.R. Foley
wrote: Doctor Who wrote:
On 2/6/08, K.R. Foley
wrote: Doctor Who wrote:
I have what should be a simple question about the 'route' command:
I'm at a client and am plugged into their network with eth0. I have a broadband card I'm using (ppp0) so I can get out to the Internet (which I can't on their network). The laptop I'm on dual-boots WinXP and openSUSE10.3
With WinXP, I simply:
route delete 0.0.0.0 mask 0.0.0.0 ###.###..###.### <-Client IP route add ###.0.0.0 mask 255.0.0.0 ###.###.###.1 Well if you are doing what I think you are doing, try this:
"route del 0.0.0.0" (could also use "route del default") "route add -net ###.0.0.0 netmask 255.0.0.0 gw ###.###.###.1 <dev>"
<dev> should be replaced with the network interface the traffic should be sent over (ppp0 or eth0, etc.).
This is the equivalent of the commands above. Although I am not 100% sure it will do what you want.
Thanks. What happens is that when I plug into their network using eth0 I get their gateway as the default. I want to have my broadband card (ppp0) provide the default gateway for all traffic with the exception being the traffic destined for the client's network.
In Windows, when I'm connected to their network using eth0 *and* have ppp0 up, 'route print' shows two (2) default gateways. When I delete their default gateway, the one provided by ppp0 remains.
In Linux, with the same setup, i only see one (1) default gateway, which is the client's network. I want to delete that and add a default gateway that uses my wireless broadband card (Sprint).
Thanks.
Then what I think you want is:
route del default route add -net 0.0.0.0 netmask 0.0.0.0 gw ###.###.###.1 <dev>
where ###.###.###.1 is the ip address of the default gateway (likely a router) and dev is ppp0
Does the 'route add -net 0.0.0.0 netmask 0.0.0.0 gw ###.###.###.1 <dev>' designate this as the 'default' route or must that be specified somehow?
Thanks. Yes it does.
-- kr -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2/7/08, K.R. Foley
Doctor Who wrote:
On 2/6/08, K.R. Foley
wrote: Doctor Who wrote:
On 2/6/08, K.R. Foley
wrote: Doctor Who wrote:
I have what should be a simple question about the 'route' command:
I'm at a client and am plugged into their network with eth0. I have a broadband card I'm using (ppp0) so I can get out to the Internet (which I can't on their network). The laptop I'm on dual-boots WinXP and openSUSE10.3
With WinXP, I simply:
route delete 0.0.0.0 mask 0.0.0.0 ###.###..###.### <-Client IP route add ###.0.0.0 mask 255.0.0.0 ###.###.###.1 Well if you are doing what I think you are doing, try this:
"route del 0.0.0.0" (could also use "route del default") "route add -net ###.0.0.0 netmask 255.0.0.0 gw ###.###.###.1 <dev>"
<dev> should be replaced with the network interface the traffic should be sent over (ppp0 or eth0, etc.).
This is the equivalent of the commands above. Although I am not 100% sure it will do what you want.
Thanks. What happens is that when I plug into their network using eth0 I get their gateway as the default. I want to have my broadband card (ppp0) provide the default gateway for all traffic with the exception being the traffic destined for the client's network.
In Windows, when I'm connected to their network using eth0 *and* have ppp0 up, 'route print' shows two (2) default gateways. When I delete their default gateway, the one provided by ppp0 remains.
In Linux, with the same setup, i only see one (1) default gateway, which is the client's network. I want to delete that and add a default gateway that uses my wireless broadband card (Sprint).
Thanks.
Then what I think you want is:
route del default route add -net 0.0.0.0 netmask 0.0.0.0 gw ###.###.###.1 <dev>
where ###.###.###.1 is the ip address of the default gateway (likely a router) and dev is ppp0
Does the 'route add -net 0.0.0.0 netmask 0.0.0.0 gw ###.###.###.1 <dev>' designate this as the 'default' route or must that be specified somehow?
Thanks. Yes it does.
OK, so the issue I now have is that I have Sprint's nameservers in resolv.conf and I can get web access via FQDN or IP. I can *only* access machines on the client's network via IP, I cannot resolve host names. If I add one of their nameservers manually to /etc/resolv.conf and put it as the first entry, the opposite happens - I can resolve all of their machine names but can no longer do so for any traffic not on their network (cnn.com, yahoo.com, etc.) Is there some way to be able to resolve traffic both on and off their network?? I'm sooooo close. Thanks. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2/7/08, Doctor Who
On 2/7/08, K.R. Foley
wrote: Doctor Who wrote:
On 2/6/08, K.R. Foley
wrote: Doctor Who wrote:
On 2/6/08, K.R. Foley
wrote: Doctor Who wrote: > I have what should be a simple question about the 'route' command: > > I'm at a client and am plugged into their network with eth0. I have a > broadband card I'm using (ppp0) so I can get out to the Internet > (which I can't on their network). The laptop I'm on dual-boots WinXP > and openSUSE10.3 > > With WinXP, I simply: > > route delete 0.0.0.0 mask 0.0.0.0 ###.###..###.### <-Client IP > route add ###.0.0.0 mask 255.0.0.0 ###.###.###.1 Well if you are doing what I think you are doing, try this:
"route del 0.0.0.0" (could also use "route del default") "route add -net ###.0.0.0 netmask 255.0.0.0 gw ###.###.###.1 <dev>"
<dev> should be replaced with the network interface the traffic should be sent over (ppp0 or eth0, etc.).
This is the equivalent of the commands above. Although I am not 100% sure it will do what you want.
Thanks. What happens is that when I plug into their network using eth0 I get their gateway as the default. I want to have my broadband card (ppp0) provide the default gateway for all traffic with the exception being the traffic destined for the client's network.
In Windows, when I'm connected to their network using eth0 *and* have ppp0 up, 'route print' shows two (2) default gateways. When I delete their default gateway, the one provided by ppp0 remains.
In Linux, with the same setup, i only see one (1) default gateway, which is the client's network. I want to delete that and add a default gateway that uses my wireless broadband card (Sprint).
Thanks.
Then what I think you want is:
route del default route add -net 0.0.0.0 netmask 0.0.0.0 gw ###.###.###.1 <dev>
where ###.###.###.1 is the ip address of the default gateway (likely a router) and dev is ppp0
Does the 'route add -net 0.0.0.0 netmask 0.0.0.0 gw ###.###.###.1 <dev>' designate this as the 'default' route or must that be specified somehow?
Thanks. Yes it does.
OK, so the issue I now have is that I have Sprint's nameservers in resolv.conf and I can get web access via FQDN or IP. I can *only* access machines on the client's network via IP, I cannot resolve host names.
If I add one of their nameservers manually to /etc/resolv.conf and put it as the first entry, the opposite happens - I can resolve all of their machine names but can no longer do so for any traffic not on their network (cnn.com, yahoo.com, etc.)
Is there some way to be able to resolve traffic both on and off their network?? I'm sooooo close.
Thanks.
Just to be clear...if I add the clients nameserver to /etc/resolve.conf (the one generated by the pppd service) and make it the first nameserver, I can resolve machines on their network by name but I cannot resolve Internet addresses (google.com, excite.com, etc). If I put their nameserver last, I can resolve Internet addresses but not their machines. What's up??!! This is driving me crazy. Thanks. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Doctor Who pecked at the keyboard and wrote:
On 2/7/08, Doctor Who
wrote: <snip> Just to be clear...if I add the clients nameserver to /etc/resolve.conf (the one generated by the pppd service) and make it the first nameserver, I can resolve machines on their network by name but I cannot resolve Internet addresses (google.com, excite.com, etc). If I put their nameserver last, I can resolve Internet addresses but not their machines.
What's up??!! This is driving me crazy.
Thanks.
Do you have a search directive in your /etc/resolv.conf file for their domain or are you trying to resolve IP addresses using the FQDN? -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2/7/08, Ken Schneider
Doctor Who pecked at the keyboard and wrote:
On 2/7/08, Doctor Who
wrote: <snip> Just to be clear...if I add the clients nameserver to /etc/resolve.conf (the one generated by the pppd service) and make it the first nameserver, I can resolve machines on their network by name but I cannot resolve Internet addresses (google.com, excite.com, etc). If I put their nameserver last, I can resolve Internet addresses but not their machines.
What's up??!! This is driving me crazy.
Thanks.
Do you have a search directive in your /etc/resolv.conf file for their domain or are you trying to resolve IP addresses using the FQDN?
FQDN in this case. I have access to both networks at this point. I only have DNS provided by Sprint for Inet in my resolv.conf. I can resolve Inet domains by name but not those on the client's network. The client network I can access by IP but not by name. Adding the client's DNS server to my resolv.conf as the *first* entry let's me resolve the client's machines by name but then I can no longer resolve Internet addresses by name. It doesn't continue to check other DNS entries in resolv.conf to try to resolve something like www.suse.com. Commenting out the client network DNS entry or moving it to the last of 3 entries again lets me resolve Internet addresses but no longer let's me address client network machines by name. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 07 February 2008 11:26:03 Doctor Who wrote:
On 2/7/08, Ken Schneider
wrote: <snip> Do you have a search directive in your /etc/resolv.conf file for their domain or are you trying to resolve IP addresses using the FQDN?
FQDN in this case. I have access to both networks at this point. I only have DNS provided by Sprint for Inet in my resolv.conf. I can resolve Inet domains by name but not those on the client's network. The client network I can access by IP but not by name.
Adding the client's DNS server to my resolv.conf as the *first* entry let's me resolve the client's machines by name but then I can no longer resolve Internet addresses by name. It doesn't continue to check other DNS entries in resolv.conf to try to resolve something like www.suse.com. Commenting out the client network DNS entry or moving it to the last of 3 entries again lets me resolve Internet addresses but no longer let's me address client network machines by name.
The reason for the behavior you describe is that the resolver is actually only calling the first name server in the list, which returns a "No such domain" (NXDOMAIN) for the FQDNs it does not know about. The list of name servers is only used if there is no reply from the first nameserver queried. From "man resolv.conf": "The algorithm used is to try a name server, and if the query times out, try the next, until out of name servers, then repeat trying all the name servers until a maximum number of retries are made." Unfortunately, I think this means a negative response from any name server causes the search to terminate. I don't know of any set of resolv.conf parameters that would do what you want. You might consider trying "option rotate", however. This seems like your client's name server is misconfigured. Apparently it is only returning names for its local hosts, and not forwarding queries to any upstream name servers. It might be possible to put a caching name server on your laptop, and then have it forward queries to your client's server or your ISP's. See http://www.bind9.net/BIND-FAQ. The example they give isn't quite your situation, but might give you a clue. -- Jim
Jim Cunning pecked at the keyboard and wrote:
The reason for the behavior you describe is that the resolver is actually only calling the first name server in the list, which returns a "No such domain" (NXDOMAIN) for the FQDNs it does not know about. The list of name servers is only used if there is no reply from the first nameserver queried. From "man resolv.conf":
"The algorithm used is to try a name server, and if the query times out, try the next, until out of name servers, then repeat trying all the name servers until a maximum number of retries are made."
Unfortunately, I think this means a negative response from any name server causes the search to terminate. I don't know of any set of resolv.conf parameters that would do what you want. You might consider trying "option rotate", however.
This seems like your client's name server is misconfigured. Apparently it is only returning names for its local hosts, and not forwarding queries to any upstream name servers. It might be possible to put a caching name server on your laptop, and then have it forward queries to your client's server or your ISP's. See http://www.bind9.net/BIND-FAQ. The example they give isn't quite your situation, but might give you a clue.
Worse case enter their servers in your local /etc/hosts file. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 07 February 2008 13:19:37 Ken Schneider wrote:
Jim Cunning pecked at the keyboard and wrote: [...]
This seems like your client's name server is misconfigured. Apparently it is only returning names for its local hosts, and not forwarding queries to any upstream name servers. It might be possible to put a caching name server on your laptop, and then have it forward queries to your client's server or your ISP's. See http://www.bind9.net/BIND-FAQ. The example they give isn't quite your situation, but might give you a clue.
Worse case enter their servers in your local /etc/hosts file. ^^^^^^^ Hosts, not just servers--but it won't do any good to put a name server in your /etc/hosts file. You can get to it by name, but it won't resolve host names any differently than by using its IP address. -- Jim
Doctor Who wrote:
Just to be clear...if I add the clients nameserver to /etc/resolve.conf (the one generated by the pppd service) and make it the first nameserver, I can resolve machines on their network by name but I cannot resolve Internet addresses (google.com, excite.com, etc). If I put their nameserver last, I can resolve Internet addresses but not their machines.
A local name server should easily be able to answer recursive queries, but it seems the clients name server is not doing so - in short it seems broken. Joe -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Doctor Who pecked at the keyboard and wrote:
On 2/6/08, K.R. Foley
wrote: Doctor Who wrote:
I have what should be a simple question about the 'route' command:
I'm at a client and am plugged into their network with eth0. I have a broadband card I'm using (ppp0) so I can get out to the Internet (which I can't on their network). The laptop I'm on dual-boots WinXP and openSUSE10.3
With WinXP, I simply:
route delete 0.0.0.0 mask 0.0.0.0 ###.###..###.### <-Client IP route add ###.0.0.0 mask 255.0.0.0 ###.###.###.1 Well if you are doing what I think you are doing, try this:
"route del 0.0.0.0" (could also use "route del default") "route add -net ###.0.0.0 netmask 255.0.0.0 gw ###.###.###.1 <dev>"
<dev> should be replaced with the network interface the traffic should be sent over (ppp0 or eth0, etc.).
This is the equivalent of the commands above. Although I am not 100% sure it will do what you want.
Thanks. What happens is that when I plug into their network using eth0 I get their gateway as the default. I want to have my broadband card (ppp0) provide the default gateway for all traffic with the exception being the traffic destined for the client's network.
In Windows, when I'm connected to their network using eth0 *and* have ppp0 up, 'route print' shows two (2) default gateways. When I delete their default gateway, the one provided by ppp0 remains.
In Linux, with the same setup, i only see one (1) default gateway, which is the client's network. I want to delete that and add a default gateway that uses my wireless broadband card (Sprint).
Thanks.
Another MS screwup on networking. You can only have _one_ functioning *default* gateway. A *default* gateway is one that is used for _all_ traffic that cannot be resolved locally. Therefore you need two gateways defined, one for the internal LAN and one for _all_ other traffic commonly referred to as the *default* gateway. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Doctor Who
-
Jim Cunning
-
K.R. Foley
-
Ken Schneider
-
Sloan