LinuxQuestions.org
Help answer threads with 0 replies.
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 10-12-2008, 10:01 AM   #1
itz2000
Member
 
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732

Rep: Reputation: 30
configuring routing table :)


hello,
I just configured my l2tp-vpn client and I'm having a little problem which somehow it my routing tables doesn't work and it's still uses the old connection (not I'm connected through a vpn and through a router).


Code:
root at  /home/cookie/Desktop/cable# cable-start
Using interface ppp0
Connect: ppp0 <--> /dev/pts/3
PAP authentication succeeded
not replacing existing default route via 192.168.1.1
local  IP address 84.5.2.1
remote IP address 212.4.1.21root at  /home/cookie/Desktop/cable# route -vn
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
212.4.1.21   0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
212.199.170.170 192.168.1.1     255.255.255.255 UGH   0      0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1
and now I want that everything will go through PPP0 to 192.168.1.1

so it will be like this : destination (default gw : 0.0.0.0), gateway 192.168.1.1 mask 0.0.0.0 USE PPP0

but I do not succeed somehow :

Code:
root at  /home/cookie/Desktop/cable# route del default
now I only need to do the last step. can you help me with that?

Code:
route add -net 0.0.0.0 192.168.1.1 netmask 0.0.0.0 dev ppp0
this didn't work for me...
and this one doesn't go out through 192.168.1.1 so it's not good for me...
Code:
route add -net 0.0.0.0 netmask 0.0.0.0 dev ppp0
please help thanks!
 
Old 10-12-2008, 02:51 PM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Code:
 route add default gw 192.168.1.1
 
Old 10-12-2008, 03:34 PM   #3
itz2000
Member
 
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732

Original Poster
Rep: Reputation: 30
but I want anything to go through PPP0 to 192.168.1.1!!! not via ETH1 which is the default choice


Code:
root at  /home/cookie/Desktop/cable# route add default gw 192.168.1.1 dev ppp0
SIOCADDRT: No such process
 
Old 10-12-2008, 06:23 PM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Have you tried deleting the existing default route before running cable-start?

Beyond that, you might try using the ip command instead of the route command. ip is more powerful but I am not yet anywhere close to fluent with it.
 
Old 10-12-2008, 08:07 PM   #5
itz2000
Member
 
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732

Original Poster
Rep: Reputation: 30
yes I did try to delete existing routes, it just re add the same rule (route add default gw 192.168.1.1 - in eth1).
I got so confused with the ip command's manual...



any suggestions?
 
Old 10-12-2008, 08:27 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 9 (stretch)
Posts: 3,361

Rep: Reputation: 127Reputation: 127
Never mind what I had posted. Isn't the whole point of connecting to a vpn is to disconnect you from everything except your virtual private network? My experience is that once you are vpn connected, you are only on the private network; the internet is gone. This is to protect your private network. Of course, it can be subverted with an ethernet card and a second connection to your router.

Last edited by Quakeboy02; 10-12-2008 at 08:34 PM.
 
Old 10-12-2008, 08:38 PM   #7
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 9 (stretch)
Posts: 3,361

Rep: Reputation: 127Reputation: 127
Have you discussed this with your work or whomever is running the vpn? Do they have a gateway address you should be using? The command is of the form:
Code:
route add default gw 192.168.1.1  ppp0
 
Old 10-12-2008, 08:52 PM   #8
itz2000
Member
 
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732

Original Poster
Rep: Reputation: 30
Code:
root at  /home/cookie/Desktop/cable# route del default gw 192.168.1.1
root at  /home/cookie/Desktop/cable# route add default gw 192.168.1.1  ppp0
SIOCADDRT: No such process
root at  /home/cookie/Desktop/cable# route add default gw 192.168.1.1 ppp0
SIOCADDRT: No such process

the VPN is actually the ISP and I want my network to use the vpn instead of the default gw since it's faster internet (lower ping, same bandwith of-course)..
 
Old 10-12-2008, 08:54 PM   #9
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 9 (stretch)
Posts: 3,361

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by itz2000 View Post
the VPN is actually the ISP and I want my network to use the vpn instead of the default gw since it's faster internet (lower ping, same bandwith of-course)..
Do they have an instruction sheet for how to configure a Windows machine? If so, what does that say to do.
 
Old 10-12-2008, 08:58 PM   #10
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 9 (stretch)
Posts: 3,361

Rep: Reputation: 127Reputation: 127
Well, so far I've found this:
Quote:
8.4. Default route not set

If pppd refuses to set up a default route, it is because (quite correctly) it refuses to remove/replace an existing default route.

The usual reason that this error occurs is that some distributions set up a default route via your Ethernet card as opposed to setting up a specific network route.

See the Linux NAG and the Net2/3 HOWTOs for information on correctly setting up your Ethernet card and associated routes.

An alternative to this is that your LAN uses a gateway/router already and your routing table has been set up to point the default route at this.

Fixing up this last situation can require a fair bit of IP networking knowledge and is beyond the scope of this HOWTO. It is suggested you obtain some expert advice (via the news groups of from someone locally you can ask).
I'll dig around some more.
 
Old 10-12-2008, 08:58 PM   #11
itz2000
Member
 
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732

Original Poster
Rep: Reputation: 30
in windows after you dial, the routing goes automatically via the newest route.

right or wrong way, some people will argue about that...

but here that's not happening
 
Old 10-12-2008, 09:01 PM   #12
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 9 (stretch)
Posts: 3,361

Rep: Reputation: 127Reputation: 127
Ah, I think I've found it. It looks like you must delete your default route before making your ppp connection.

Added:
As a practical matter, you will probably need a direct route to the IP you're logging ppp onto, not a default route.

Last edited by Quakeboy02; 10-12-2008 at 09:02 PM.
 
Old 10-12-2008, 09:08 PM   #13
itz2000
Member
 
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732

Original Poster
Rep: Reputation: 30
Code:
root at  /home/cookie/Desktop/cable# cat /etc/ppp/pppoe.conf | grep -i default
# Make the PPPoE connection your default route.  Set to
# DEFAULTROUTE=no if you don't want this.
DEFAULTROUTE=yes

root at  /home/cookie/Desktop/cable# route -vn
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
212.199.170.170 192.168.1.1     255.255.255.255 UGH   0      0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1
root at  /home/cookie/Desktop/cable# route del default gw 192.168.1.1
root at  /home/cookie/Desktop/cable# route -vn
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
212.199.170.170 192.168.1.1     255.255.255.255 UGH   0      0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
root at  /home/cookie/Desktop/cable# cable-start
Using interface ppp0
Connect: ppp0 <--> /dev/pts/3
root at  /home/cookie/Desktop/cable# PAP authentication succeeded
not replacing existing default route via 192.168.1.1
local  IP address 84.95.24.55
remote IP address 212.199.17.21

root at  /home/cookie/Desktop/cable# route -vn
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
212.199.17.21   0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
212.199.170.170 192.168.1.1     255.255.255.255 UGH   0      0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1
So it didn't work... :S

Last edited by itz2000; 10-12-2008 at 09:08 PM. Reason: forgot to add last line
 
Old 10-12-2008, 09:12 PM   #14
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 9 (stretch)
Posts: 3,361

Rep: Reputation: 127Reputation: 127
I'm out of ideas. You might try more along the lines of what I was doing:

google linux ppp default route
 
Old 10-12-2008, 09:15 PM   #15
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 9 (stretch)
Posts: 3,361

Rep: Reputation: 127Reputation: 127
Well, one more thing, I guess. Disable dhcp, as that's probably what's sticking the default back. Delete the route from 192.168.1.1 to 212.199.170.170 and replace it with a static route from 192.168.1.x to 212.199.170.170; where x is your actual ip. Then try to connect.
 
  


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
Configuring routing table with 2 network cards chanakya Linux - Newbie 3 06-03-2008 07:04 AM
routing table selie Linux - Networking 2 05-04-2007 09:12 AM
routing table arvind kumar Linux - Networking 2 06-08-2005 11:59 PM
Help with a Routing Table maginotjr Linux - Networking 4 06-06-2005 09:49 AM
routing table upr8830 Linux - Networking 6 06-18-2003 03:04 AM

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

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