Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

linux ?router?

Thread Tools
 
Search this Thread
 
Old Feb 25, 2004 | 10:49 AM
  #1  
icantthinkofone's Avatar
icantthinkofone
Thread Starter
Scooby Regular
 
Joined: Dec 2003
Posts: 97
Likes: 0
Default linux ?router?

Ok, bit rusty on this stuff...

Have adsl with multiple static ip's. linux box with a (finally) working usb modem / ppp connection up and working.

Also have a hub.

Want to connect my remaining computers through the linux box / hub. No NAT'ing etc, just assign IP's and make them see / be seen by the outside world.

Any hints?

Cheers,
Mark.
Reply
Old Feb 25, 2004 | 01:05 PM
  #2  
HHxx's Avatar
HHxx
Scooby Regular
 
Joined: Nov 2001
Posts: 2,576
Likes: 0
Default

Static mapping of the addresses can be done, but I think the problem will be your usb modem. That is not normally designed for multiple ip addresses.

H
Reply
Old Feb 25, 2004 | 02:46 PM
  #3  
icantthinkofone's Avatar
icantthinkofone
Thread Starter
Scooby Regular
 
Joined: Dec 2003
Posts: 97
Likes: 0
Default

erm, surely I can set the linux box up as a router / gateway of some kind?

So, something like.. route add default gateway <ppp0> on linux, and route add default gateway <linuxbox ethcard> on the others...

So long as ISP chucks packets at it, the modem has nothing to do with the ip addresses - it's going to come down to linux's n/w config? (I think??)

edit: suppose I should note that there's an ethercard in the laptop attached to the hub (and thence the rest of the machines), and a usb/ppp interface that connects to the outside world.

What I'm wanting to do is (kindof) ICS in m$ speak..

Last edited by icantthinkofone; Feb 25, 2004 at 02:47 PM.
Reply
Old Feb 25, 2004 | 04:57 PM
  #4  
HHxx's Avatar
HHxx
Scooby Regular
 
Joined: Nov 2001
Posts: 2,576
Likes: 0
Default

What modem do you have and what isp?

If I have time tonight I'll try and check it out.

What kernel do you use?

H
ps. Im still learning linux myself
Reply
Old Feb 25, 2004 | 05:16 PM
  #5  
icantthinkofone's Avatar
icantthinkofone
Thread Starter
Scooby Regular
 
Joined: Dec 2003
Posts: 97
Likes: 0
Default

Originally Posted by HHxx
What modem do you have and what isp?

If I have time tonight I'll try and check it out.

What kernel do you use?

H
ps. Im still learning linux myself

Modem's an alcatel frog jobbie - speedtouch usb. Kernel 2.4.22, Fedora core (yarrow). Pretty sure it should work, I just can't work out exactly how to set it up - as I understand it, ppp0's just another n/w interface.
Reply
Old Feb 25, 2004 | 10:23 PM
  #6  
HHxx's Avatar
HHxx
Scooby Regular
 
Joined: Nov 2001
Posts: 2,576
Likes: 0
Default

Friends going to post some info tomorrow. Had a chat with him and it appar. is do-able. I've never owned a usb modem so never tried it out..

H
Reply
Old Feb 25, 2004 | 10:35 PM
  #7  
Andrewza's Avatar
Andrewza
Scooby Regular
 
Joined: Jan 2002
Posts: 667
Likes: 0
Default

As far as I can see the modem itself isn't relevant, since it's just performing wire level work, not protocol, all the IP interfaces are real or virtual on the linux box.

The real question is what IPs have you been given? Have you just been given a subnet? If so the remote end will try to send to them directly over the ADSL. Have you been given an external router IP? In which case the remote end will probably try to route to the subnet by sending the traffic to that IP? There's other variation in between, you need to speak to your ISP really.

In theory you have ppp0 with external IP 1.1.1.2(/24 and a default gateway )of 1.1.1.1 and eth0 with IP 2.2.2.1(/24) and other machines on your network 2.2.2.2, 2.2.2.3 with default GW 2.2.2.1. Then the remote end sends traffic for 2.2.2.0/24 to 1.1.1.2. All you need to enable is routing between interfaces and the linux box will do it.

The other case is a series of IPs and an ADSL router in bridge mode (something the box ADSL products to) and they just bridge a series of IP's to your local network, no routing. This is what a lot of ISPs might do because they don't have to create proper subnets and waste more IPs on network and broadcast addresses.
Reply
Old Feb 26, 2004 | 10:56 PM
  #8  
icantthinkofone's Avatar
icantthinkofone
Thread Starter
Scooby Regular
 
Joined: Dec 2003
Posts: 97
Likes: 0
Default

Ok, got it all up and running - yes, have proper subnet (won't post too many numbers), but have all the netmasks etc, 1 ip is designated for the router (this has to be the interface the modem connects with), other IP's are up to me to do as I will.

HHxx, thanks for your efforts.
Andrewza, thought this was the case finally worked it out:

The steps were:

get usb/ppp/speedtch working, hotplugging and starting at boot. ppp0 has ip X.X.X.1 (router ip)

ifconfig eth0 to have x.x.x.2

route add default gateway x.x.x.1

set up dhcp (one of the other machines is my work lappy, somewhat hobbled, needed dhcp to get it on 'cos I couldn't change the settings).

Ensure that other machines have route add default gateway x.x.x.1 (dhcp took care of this, along with DNS etc.)

then the magic bit I was missing...

On the linux host gateway/server/router/webserver machine

route add host x.x.x.3 dev eth0
...
route add host x.x.x.8 dev eth0

Now the incoming packets get routed too....

Oh, and need to enable ip forwarding - /etc/sysctl somewhere IIRC.

Next fun job.. can I get the PS2 to play with all that lot

Last edited by icantthinkofone; Feb 26, 2004 at 10:59 PM.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
alcazar
Computer & Technology Related
7
Sep 17, 2015 10:08 PM
DJ Dunk
Computer & Technology Related
9
Jun 3, 2002 08:47 PM
dsmith
Computer & Technology Related
4
Jan 31, 2002 09:50 AM
DazV
Computer & Technology Related
1
Jan 30, 2002 11:49 PM
dsmith
Non Scooby Related
11
Dec 5, 2001 03:03 PM




All times are GMT +1. The time now is 07:30 PM.