Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Internet/Networking Problem: Connects, Gets NS's, Pings fail
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Danuvius
Guru
Guru


Joined: 18 Sep 2004
Posts: 375
Location: Toronto

PostPosted: Sat Sep 18, 2004 7:36 pm    Post subject: Internet/Networking Problem: Connects, Gets NS's, Pings fail Reply with quote

I have an internal USR 56k PCI (not winmodem) modem that works just fine on ttyS4 (ttyS14 under SuSE). Under my new gentoo installation I can connect to the internet, have my resolv.conf update with the appropriate nameserver addresses, but still cannot browse/download/ping any addresses. There is an attempt to resolve names, but the attempt ultimately fails. This is not surprising considering that pinging my nameservers also fails. (for the record, yes, it definitely does connect successfully as the internet connection remains active indefinitely [evidenced by the lovely tones on my line if I choose to pick up my phone])

The last time I installed gentoo, I had copied over /etc/ppp and /etc/chatscripts from a prior debian installation. With debian, it was also quite a pain to configure though, and unfortunately I don't remember what I had done. Of course, a yet bigger problem is the fact that I neglected to backup those two directories prior to wiping my drive clean.

It is my theory that the problem is solvable through some small (and I am sure embarrasingly obvious) wizardry in the ip-up scripts or some other such initialization/connection related file.

So let me throw out here some config info--any help you can provide will be immensely appreciated:

1a. My network card is an on-the-motherboard VIA-Rhine. (My motherboard is A-BIT KV7) It gets loaded / recognised by hotplug at boot time. The computer is not part of a network. It will eventually be--but that's another story.

1b. I connect using pon (pppconfig)--but have tried also with wvdial and experienced the same problem.

1c. The nameserver information seems to get updated in the file /etc/ppp/resolv.conf whereas I know most programs expect resolv.conf to be /etc/resolv.conf--for that reason /etc/resolv.conf is a symlink pointing to /etc/ppp/resolv.conf

2. The networking was configured verbatim as per the gentoo installation guide.

Code:

# echo tux > /etc/hostname
# echo homenetwork > /etc/dnsdomainname
# rc-update add domainname default
# nano -w /etc/conf.d/net


/etc/conf.d/net:
Code:

iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"
gateway="eth0/192.168.0.1"


Code:

# rc-update add net.eth0 default
# nano -w /etc/hosts


/etc/hosts:
Code:

127.0.0.1     tux.homenetwork tux localhost


NOTE: There is no NIS domain defined. The guide stated "If you have a NIS domain (if you don't know what that is, then you don't have one), you need to define that one too" As I do not know what an NIS domain is, I am assuming I do not have one and hence need not define one. Am I woefully wrong?

3a. "# ifconfig" yields the following results when offline:

Code:

eth0      Link encap:Ethernet  HWaddr 00:50:8D:59:8A:B7 
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::250:8dff:fe59:8ab7/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:110 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:4788 (4.6 Kb)
          Interrupt:23 Base address:0x5000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:44 errors:0 dropped:0 overruns:0 frame:0
          TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4204 (4.1 Kb)  TX bytes:4204 (4.1 Kb)


3b. "# route" yields the following when offline:

Code:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
loopback        tux.homenetwork 255.0.0.0       UG    0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    1      0        0 eth0


Is my problem that there are 2 gateways defined? Alas, I am not even sure if the above snippet confirms that (sure seems like it); nor do I know how to fix this, if indeed this is a/the problem.

4a. "# ifconfig" yields the following when *connected*:

Code:

eth0      Link encap:Ethernet  HWaddr 00:50:8D:59:8A:B7 
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::250:8dff:fe59:8ab7/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:3654 (3.5 Kb)
          Interrupt:23 Base address:0x5000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:35 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3322 (3.2 Kb)  TX bytes:3322 (3.2 Kb)

ppp0      Link encap:Point-to-Point Protocol 
          inet addr:199.243.46.155  P-t-P:199.243.46.242  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:304 (304.0 b)  TX bytes:103 (103.0 b)


4b. "# route" yields the following when *connected*:

Code:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
199.243.46.242  *               255.255.255.255 UH    0      0        0 ppp0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
loopback        tux.homenetwork 255.0.0.0       UG    0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    1      0        0 eth0


Once again, any help is appreciated. If I failed to include something relevant here, do tell me and I shall post it as well.

Thank you in advance!
Back to top
View user's profile Send private message
OPelerin
Guru
Guru


Joined: 17 Jul 2004
Posts: 354
Location: Belgium

PostPosted: Sat Sep 18, 2004 7:50 pm    Post subject: changing metric? Reply with quote

Why not give higher metric to ethernet defautl gateway? Then all your packets will always goes to ppp interface
_________________
Olivier PELERIN
Back to top
View user's profile Send private message
Danuvius
Guru
Guru


Joined: 18 Sep 2004
Posts: 375
Location: Toronto

PostPosted: Sat Sep 18, 2004 8:05 pm    Post subject: Re: changing metric? Reply with quote

OPelerin wrote:
Why not give higher metric to ethernet defautl gateway? Then all your packets will always goes to ppp interface


Ah! That immediately seems to make sense.

Having just looked at the manpage for "route", I am not very certain how I would go about doing that though. My understanding/comfort level around networking is low at best. And the examples in the manpage seem to concern themselves only with adding new entries.

Could you help me out with a command line suggestion?

Also, how would I go about turning this into a "system fix". That is, how/where/what need I change in settings so that the desired metric settings become the default once gentoo has booted up.

Sorry if I am being dense. Thanks!
Back to top
View user's profile Send private message
Danuvius
Guru
Guru


Joined: 18 Sep 2004
Posts: 375
Location: Toronto

PostPosted: Sat Sep 18, 2004 9:12 pm    Post subject: Re: changing metric? Reply with quote

OPelerin wrote:
Why not give higher metric to ethernet defautl gateway? Then all your packets will always goes to ppp interface


I just finished trying to implement your suggestion, OPelerin.

I realised that you cannot modify entries using route, so I removed the default entry and added it back in exactly as it was except with the metric set to 0. (0 is highest priority--is it not?)

Essentially, once done I had the following output from route:

Code:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
199.243.46.242  *               255.255.255.255 UH    0      0        0 ppp0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
loopback        tux.homenetwork 255.0.0.0       UG    0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0


Unfortunately, after yet again successfully connecting, nothing changed. Pings still fail for everything.

Is it normal for me to have 2 gateways defined? It looks to me like from the above that both tux.homenetwork and 192.168.0.1 are defined as gateways. Is this what is causing the problem? Could the loopback entry still get all the packets before default?

Should I be trying to *lower the metric* on loopback? If so, I'd welcome some suggestions as I did not manage to figure out thus far how to do so. Can't seem to delete loopback to begin with... so I'm stuck.

Should I only have one gateway? Where/what do I need to change to remove the extraneous entry (and which one is the extraneous one)?

I've been struggling with this for well over a week now and am just finding myself more and more confused.
Back to top
View user's profile Send private message
Danuvius
Guru
Guru


Joined: 18 Sep 2004
Posts: 375
Location: Toronto

PostPosted: Sat Sep 18, 2004 10:26 pm    Post subject: Potential (band-aid?) Solution Found Reply with quote

I have come upon a potential solution.

I have put the following into my /etc/ppp/ip-up file:

Code:

# $1 = interface-name
# $2 = remote-IP-address
/sbin/route add -net 0.0.0.0 gw $5 dev $1
exit 0


This creates an *additional* default entry in my ip table once a connection has been made, and domains and addresses now resolve properly.

I believe, in /etc/ppp/ip-down I will need the following (have not tested yet) to complement ip-up:

Code:

# $1 = interface-name
# $2 = remote-IP-address
/sbin/route del -net 0.0.0.0 gw $5 dev $1


While I can guess as to why this works, I am almost certain that this is not the right/elegant solution to the problem. While online, I have two "default" entries and two entries for the device "ppp0".

I am not yet marking this thread solved just in case my ill-understood solution turns out to be a welcome gate for remote attacker.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum