LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   networking a router and dsl modem problem (https://www.linuxquestions.org/questions/linux-networking-3/networking-a-router-and-dsl-modem-problem-222127/)

TreeHugger 08-25-2004 04:16 AM

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

PenguinPwrdBox 08-25-2004 08:26 AM

Try this:
Code:

dhcp ethX (where X is your if #)
ifconfig -a

You should now have an IP.

TreeHugger 08-25-2004 09:23 AM

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?

PenguinPwrdBox 08-25-2004 09:28 AM

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....

TreeHugger 08-26-2004 11:17 AM

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

PenguinPwrdBox 08-26-2004 11:21 AM

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.

TreeHugger 08-26-2004 02:02 PM

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.

TreeHugger 08-26-2004 05:23 PM

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


All times are GMT -5. The time now is 07:28 PM.