LinuxQuestions.org
Visit Jeremy's Blog.
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 12-14-2004, 02:27 PM   #1
chopp
Member
 
Registered: Sep 2003
Location: AB. Canada
Distribution: Slackware
Posts: 126

Rep: Reputation: 16
routing help please


I have tried to figure this out myself with alot of reading, but no luck.

What I have is a laptop on a lan connected via adsl on eth0 (pcmcia card) and I also take it to work and connect via ppp on ppp0

The problem I am having is being able to ping anything when connected with ppp0 at work. I have internet connection. When I start the laptop, I shutdown eth0 with: ifconfig eth0 down

Then I can connect fine with ppp. Here is the result's of route -n while connected with ppp:

$>route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
161.184.255.205 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 161.184.255.205 0.0.0.0 UG 0 0 0 ppp0

and the results of ifconfig:

$>ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:143 errors:0 dropped:0 overruns:0 frame:0
TX packets:143 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12536 (12.2 Kb) TX bytes:12536 (12.2 Kb)

ppp0 Link encap:Point-to-Point Protocol
inet addr:161.184.200.91 P-t-P:161.184.255.205 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:46 errors:0 dropped:0 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:2992 (2.9 Kb) TX bytes:2022 (1.9 Kb)

and ping:

$>ping -c 5 www.linuxquestions.org
PING www.linuxquestions.org (64.179.4.149) 56(84) bytes of data.
From edtntnt10.agt.net (161.184.255.206) icmp_seq=1 Dest Unreachable, Bad Code: 9
From edtntnt10.agt.net (161.184.255.206) icmp_seq=2 Dest Unreachable, Bad Code: 9
From edtntnt10.agt.net (161.184.255.206) icmp_seq=3 Dest Unreachable, Bad Code: 9
From edtntnt10.agt.net (161.184.255.206) icmp_seq=4 Dest Unreachable, Bad Code: 9
From edtntnt10.agt.net (161.184.255.206) icmp_seq=5 Dest Unreachable, Bad Code: 9

--- www.linuxquestions.org ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4003ms

Should I be adding my default gateway as my router ip, and eth0, and should anything be added to the tables for the ppp0 connection?

Is this normal to have to shutdown the eth0 before being able to dial out with ppp?

Thank's in advance for any help with this.

chopp
 
Old 12-14-2004, 03:18 PM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
What does the routing table look like with ppp0 started and eth0 still up?
 
Old 12-14-2004, 03:23 PM   #3
chopp
Member
 
Registered: Sep 2003
Location: AB. Canada
Distribution: Slackware
Posts: 126

Original Poster
Rep: Reputation: 16
$>route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
161.184.255.205 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 161.184.255.205 0.0.0.0 UG 0 0 0 ppp0

chopp
 
Old 12-15-2004, 10:16 AM   #4
chopp
Member
 
Registered: Sep 2003
Location: AB. Canada
Distribution: Slackware
Posts: 126

Original Poster
Rep: Reputation: 16
can anyone offer any help on this?

chopp
 
Old 12-15-2004, 05:44 PM   #5
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
Everything with numbers looks ok..

In the ppp0 setup choose the debug option and watch the logfiles for some comments about failures..

It looks like the ip allocation is working, the default gateway is working, the new dns allocations are working, but the next router up the ppp link is saying there isn't a forward path..

It is possible for the adsl scripts to interfere with dns allocations, but the ping resolved ok.. Don't know which dns server it used tho'..
Do dig www.whatever.com after ppp0 is up but before you kill eth0 and see where the dns is being resolved from..

Also try with any iptables rules off. There may be rules being added by the scripts controlling ppp0 and the adsl..
 
Old 12-15-2004, 07:10 PM   #6
chopp
Member
 
Registered: Sep 2003
Location: AB. Canada
Distribution: Slackware
Posts: 126

Original Poster
Rep: Reputation: 16
dig

peter_robb, sorry for my ignorance, but do I need to be running a dns server to get the dig tool?
 
Old 12-15-2004, 09:07 PM   #7
chopp
Member
 
Registered: Sep 2003
Location: AB. Canada
Distribution: Slackware
Posts: 126

Original Poster
Rep: Reputation: 16
allright, I found and installed bind.

Well if I start ppp with eth0 up (nothing plugged into pcmcia) I get an ip showing up with my gdesklet, but I get nowhere with dig, or ping.

#ifconfig eth0 down: still nothing with ping or dig.

#usr/sbin/ppp-off $dig www.google.com (I see my isp's DNS at the bottom)
$ping -c 5 www.google.com: nothing

now this bring's up another question: do I really need to reboot to get an ip again with eth0? I tried #ifconfig eth0 up (no go) and then #cardctl reset 1 (still nothing)
 
Old 12-16-2004, 07:42 AM   #8
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
What I am suggesting is a clean boot, without eth0 starting..

There will be stuff in the startup scripts that I would rather not have started.
Better to start without this stuff than try to find them and stop them later..

What I am expecting to see is the dns server each setup uses is identified in the dig response. And then see if the ppp0 setup uses different dns servers than the eth0 setup.. which it should..

Somewhere in the Skackware startup scripts, the settings for the pcmcia, eth0 and dsl are preventing the ppp connection from operating cleanly.. But first it needs to be proven the setups are different..
It may be something like incompatible MTU settings..

So remove eth0 from the startup scripts and reboot without either eth0 or ppp0 starting.

The, with ppp0 started with the debug option, do the dig thing... and route -n..
check the ppp logfiles, could be /var/log/syslog, messages or daemon..
Then stop ppp0..
start eth0... prob something like '/etc/init.d/~eth0~ start'
and do the dig thing and route -n..

and compare the results with your problem setup.. and the logfiles.
 
Old 12-16-2004, 01:34 PM   #9
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
I think your problem is due to default GW when you move from one network to another.

If you set one gateway that is not up while you are on another network, of course you won't be able to "surf", cause your packets won't be able to "leave".
 
Old 12-16-2004, 02:53 PM   #10
chopp
Member
 
Registered: Sep 2003
Location: AB. Canada
Distribution: Slackware
Posts: 126

Original Poster
Rep: Reputation: 16
Allright, I rebooted with rc.pcmcia not executable.
fired up ppp.

route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
161.184.255.205 0.0.0.0 255.255.255.255 UH 0 0 0
ppp0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0
lo
0.0.0.0 161.184.255.205 0.0.0.0 UG 0 0 0
ppp0

dig www.google.com
;; Query time: 337 msec
;; SERVER: 199.185.220.52#53(199.185.220.52)
;; WHEN: Thu Dec 16 12:42:58 2004
;; MSG SIZE rcvd: 365

my resolv.conf has this:
search telus.net
nameserver 199.185.220.52

/var/log/messages
nothing unusual

/var/log/syslog
nothing wrong with the ppp connection, but this for dig:
process 'dig' is using obsolete setsockopt SO_BSDCOMPAT

I can't check eth0 because I'm at work.

eantoranze, my defaulf gateway is eth0, with the ip of my router.
Should it be set as the dns server in my resolv.conf instead?

thank's alot for your help so far people, I really appreciate it.
 
Old 12-16-2004, 03:04 PM   #11
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
Let's do something interesting.... while at work, without having shutdown eth0 save the ifconfig, route output (and please, when you put them here, use "code" blocks so they are more readable). Something like:

Code:
Just a piece of code, guys.
Another piece of code
000iii000
iii000iii
[code]
Code:

and another with /code.
 
Old 12-16-2004, 03:59 PM   #12
chopp
Member
 
Registered: Sep 2003
Location: AB. Canada
Distribution: Slackware
Posts: 126

Original Poster
Rep: Reputation: 16
ok with eth0 still up:

Code:
 $>ifconfig
eth0      Link encap:Ethernet  HWaddr 00:C0:F0:1C:FF:FF
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:383 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:27346 (26.7 Kb)
          Interrupt:3 Base address:0x300

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:113 errors:0 dropped:0 overruns:0 frame:0
          TX packets:113 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10343 (10.1 Kb)  TX bytes:10343 (10.1 Kb)
and route -n:

Code:
 $>route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0
eth0
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    1      0        0
eth0
you're right, make's it much easier to read.
 
Old 12-16-2004, 05:41 PM   #13
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
now... without shutting down eth0, bring up ppp0 (that's when you get trouble, right?) and put the output of route and ifconfig here, ok?
 
Old 12-16-2004, 07:31 PM   #14
chopp
Member
 
Registered: Sep 2003
Location: AB. Canada
Distribution: Slackware
Posts: 126

Original Poster
Rep: Reputation: 16
with eth0 and ppp0 still up:

Code:
$>route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
161.184.255.205 0.0.0.0         255.255.255.255 UH    0      0        0 
ppp0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 
eth0
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    1      0        0 
eth0


$>ifconfig
eth0      Link encap:Ethernet  HWaddr 00:C0:F0:1C:FF:FF
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:421 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:29913 (29.2 Kb)
          Interrupt:3 Base address:0x300

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:127 errors:0 dropped:0 overruns:0 frame:0
          TX packets:127 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:11648 (11.3 Kb)  TX bytes:11648 (11.3 Kb)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:161.184.200.169  P-t-P:161.184.255.205  
Mask:255.255.255.255          UP POINTOPOINT RUNNING NOARP MULTICAST  
MTU:1500  Metric:1
          RX packets:11 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:112 (112.0 b)  TX bytes:118 (118.0 b)
 
Old 12-17-2004, 04:42 AM   #15
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
Ok, so the default gw didn't change..
That means one of your ppp settings needs changing..
You need to use the 'defaultroute' option in ppp to make it change the gw to the ppp0 gw while eth0 is still running..
If the option is already selected, there's a bug/trick in the Slack scripts to make it work..

Now because your first post showed a good gateway number,
I'd say a second problem comes with shutting down eth0..

ifconfig isn't the correct tool for that..
use the /etc/init.d/ script for the interface... or ifdown eth0 if it exists..
 
  


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
routing jmono Linux - Networking 5 02-07-2006 06:20 AM
Routing gtkmike Linux - Networking 1 11-13-2003 09:21 AM
real routing under nat routing nothingmuch Linux - Networking 4 10-27-2003 03:11 PM
Routing in RH 8.0 Hybrid Blue Linux - Networking 2 10-12-2003 05:41 PM
Routing jimval7 Linux - Networking 3 02-08-2002 04:06 PM

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

All times are GMT -5. The time now is 09:31 PM.

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