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 08-25-2004, 04:16 AM   #1
TreeHugger
Member
 
Registered: Jul 2003
Location: London
Distribution: Debian, Redhat
Posts: 98

Rep: Reputation: 15
networking a router and dsl modem problem


Hi All,

I read a bunch of threads on dsl and modems, but I didn't find any solution to my problem, so here goes and sorry if it has been answered already - I just cant find it.

I'm running redhat 7 on a machine that I want to be my network router. I'm going to put iptables on it for a firewall. But before that, I need to get the dsl connection going and it's not happening.

I can't ping my modem. Seems my network cards (eth0 for the internal network and eth1 for the modem) are not configured properly.

I have to set up eth1 to accept a DHCP ip address from the modem, which itself will make the connection to the ISP via PPPoA. But I need to browse the modem itself to set its config via its embedded html.

I can't work out if I messed up the DHCP or the basic eth1 config. A friend at work tells me I have to give the network card the same subnet ip address as the modem, i.e. 192.162.x.x since the modem is already set to 192.162.0.1 (if I remember correctly - I'm at work now and I did this last night at home).

When I run /etc/rc.d/init.d/network start, it currently hangs on init of eth1

But ifconfig shows that eth1 comes up, although without an IP.

My 'route -n' results show nothing relating to the modem or eth1.

Anyone? Thanks
 
Old 08-25-2004, 08:26 AM   #2
PenguinPwrdBox
Member
 
Registered: Oct 2003
Location: /illinois/chicago
Distribution: Slackware/Gentoo/FC/RHEL
Posts: 568

Rep: Reputation: 30
Try this:
Code:
dhcp ethX (where X is your if #)
ifconfig -a
You should now have an IP.
 
Old 08-25-2004, 09:23 AM   #3
TreeHugger
Member
 
Registered: Jul 2003
Location: London
Distribution: Debian, Redhat
Posts: 98

Original Poster
Rep: Reputation: 15
I'm not at home at the moment to test this, but is that going to work when I can't even ping the modem?
 
Old 08-25-2004, 09:28 AM   #4
PenguinPwrdBox
Member
 
Registered: Oct 2003
Location: /illinois/chicago
Distribution: Slackware/Gentoo/FC/RHEL
Posts: 568

Rep: Reputation: 30
You need to aquire an IP address (from the modem, not statically assigned).
Once you have an IP, you should be able to ping the modem.
This command will attempt to aquire an IP addy from the modems DHCP daemon.
Once you have the nameserver (also on the modem) as well as a gateway, and an IP, you should have connectivity.
The popular misconception, is that all of these devices run Class C private IP space. This is not always the case.
If you are using some models of SpeedStream modems, as well as some 2Wire products, they use 10.x.x.x space.
Statically assigning IP's to hack your way in might work, but it can be time consuming.
Also, if you would prefer, instead of using the PPP daemon on your box to auth into the DSL network, you can instead program the modem to authenticate for you.
If you don't know how to do this, consult your ISP for help.
DO NOT tell them that you are running Linux - you are asking to be hung up on if you do (My ISP is Comcast, and it's actually against their ToS......lol)
Good luck - we'll be here when you get home if you have further issues....
 
Old 08-26-2004, 11:17 AM   #5
TreeHugger
Member
 
Registered: Jul 2003
Location: London
Distribution: Debian, Redhat
Posts: 98

Original Poster
Rep: Reputation: 15
Already made that mistake! Phoned BT on their premium rate line (50p every minute) and got on the line to some support techie who started literally ranting at me about how my modem would lead to massive use of bandwidth which would cause some huge bills, or some such stuff which I sounded like bull****! I just wanted to know if the line was clear or had a fault on it.

I actually realised afterwards that I had my modem hooked up to the wrong NIC on my box ... whoops!

Anyway, thanks for the help, I have the modem up and running on the one box. I managed to get the whole dhcp, gateway and nameserver to be done automatically by the modem.

Now what I'm suffering from is the other machines on the internal network. When I try to ping an address on the internet from my other boxes, it says something along the lines of 'network not available'. The other boxes are responding ok. Does this mean my iptables config on the router pc is up the creek, or is it the config on the box where I'm pinging from? (gateway or DNS or something?)

Cheers
 
Old 08-26-2004, 11:21 AM   #6
PenguinPwrdBox
Member
 
Registered: Oct 2003
Location: /illinois/chicago
Distribution: Slackware/Gentoo/FC/RHEL
Posts: 568

Rep: Reputation: 30
The config on the boxes you are pinging from, most likely.
do this:
Code:
route --h
Learn the syntax (I'm at work, can't check now - hehe) and issue route commands. Set your nameservers in /etc/resolv.conf to be identical to those on the DSL box.
Then, add static route statements into the other boxes that point out the only interface.
When you run route again, you should find a default route.
Now, at the very least, you can ping the DSL box. If you cant ping beyond that, your iptables are probably screwball.
If that's the case, try this first:
Code:
cat echo1 > /proc/sys/net/ipv4/ip_forward
This will enable IP forwarding, which *should* allow your machine to forward from one int to another. Ensure that you are masquarading your IP's for NAT.

Last edited by PenguinPwrdBox; 08-26-2004 at 11:23 AM.
 
Old 08-26-2004, 02:02 PM   #7
TreeHugger
Member
 
Registered: Jul 2003
Location: London
Distribution: Debian, Redhat
Posts: 98

Original Poster
Rep: Reputation: 15
OK, thanks. I'll try that. I think I can handle route. I remember there was also something fishy about the old network address that popped up at some point. I used to have it (in Germany) on 10.0.0.0 but now here in London I decided it would be easier to configure the modem by using 192.168.1.0, so I changed the network cards's static ips.
 
Old 08-26-2004, 05:23 PM   #8
TreeHugger
Member
 
Registered: Jul 2003
Location: London
Distribution: Debian, Redhat
Posts: 98

Original Poster
Rep: Reputation: 15
Yo! It worked. For some reason redhat 9 includes network config files not just in /etc/sysconfig/networking/devices but also in /etc/sysconfig/networking/profiles/default. It was using the latter config files, while my router with the modem just uses the normal former. Confused I was.

Then 'route' took care of the rest.

Ta mucho again
 
  


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
DSL Modem/Router silkmaze Linux - Newbie 1 10-24-2005 06:09 PM
Fritz box dsl problem (router/modem) tripmix Linux - Hardware 0 07-25-2005 05:51 AM
No internet with router and dsl modem Shinoby Suse/Novell 2 10-29-2004 11:18 AM
Networking Linux to windows behind dsl router pfunk Linux - Networking 5 09-22-2004 04:48 PM
DSL modem and router blhack Linux - Networking 1 01-12-2004 07:53 PM


All times are GMT -5. The time now is 09:32 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration