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 25 February 2004, 10:49 AM
  #1  
icantthinkofone
Scooby Regular
Thread Starter
 
icantthinkofone's Avatar
 
Join Date: Dec 2003
Posts: 97
Likes: 0
Received 0 Likes on 0 Posts
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.
Old 25 February 2004, 01:05 PM
  #2  
HHxx
Scooby Regular
 
HHxx's Avatar
 
Join Date: Nov 2001
Posts: 2,576
Likes: 0
Received 0 Likes on 0 Posts
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
Old 25 February 2004, 02:46 PM
  #3  
icantthinkofone
Scooby Regular
Thread Starter
 
icantthinkofone's Avatar
 
Join Date: Dec 2003
Posts: 97
Likes: 0
Received 0 Likes on 0 Posts
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; 25 February 2004 at 02:47 PM.
Old 25 February 2004, 04:57 PM
  #4  
HHxx
Scooby Regular
 
HHxx's Avatar
 
Join Date: Nov 2001
Posts: 2,576
Likes: 0
Received 0 Likes on 0 Posts
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
Old 25 February 2004, 05:16 PM
  #5  
icantthinkofone
Scooby Regular
Thread Starter
 
icantthinkofone's Avatar
 
Join Date: Dec 2003
Posts: 97
Likes: 0
Received 0 Likes on 0 Posts
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.
Old 25 February 2004, 10:23 PM
  #6  
HHxx
Scooby Regular
 
HHxx's Avatar
 
Join Date: Nov 2001
Posts: 2,576
Likes: 0
Received 0 Likes on 0 Posts
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
Old 25 February 2004, 10:35 PM
  #7  
Andrewza
Scooby Regular
 
Andrewza's Avatar
 
Join Date: Jan 2002
Posts: 667
Likes: 0
Received 0 Likes on 0 Posts
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.
Old 26 February 2004, 10:56 PM
  #8  
icantthinkofone
Scooby Regular
Thread Starter
 
icantthinkofone's Avatar
 
Join Date: Dec 2003
Posts: 97
Likes: 0
Received 0 Likes on 0 Posts
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; 26 February 2004 at 10:59 PM.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
alcazar
Computer & Technology Related
7
17 September 2015 10:08 PM
DJ Dunk
Computer & Technology Related
9
03 June 2002 08:47 PM
dsmith
Computer & Technology Related
4
31 January 2002 09:50 AM
DazV
Computer & Technology Related
1
30 January 2002 11:49 PM
dsmith
Non Scooby Related
11
05 December 2001 03:03 PM



Quick Reply: linux ?router?



All times are GMT +1. The time now is 07:03 AM.