2 x ppp and 1 x eth routing question

2 x ppp and 1 x eth routing question

Post by Richard de Vo » Sun, 12 Apr 1998 04:00:00



Hello,

I have a little question....

I have 2 amiga computers i want to connect to my redhat unix box with
pppd over a
serial nullmodem cabel, this works.

But i have problems with getting the routing correct.

I this moment i have the following setup

128.0.0.1  Linux box
128.0.0.2  Amiga 2000, dev ppp0
128.0.0.4  Amiga 4000, dev ppp1
128.0.0.5  Windows 95, dev eth0 (ethernet connected)

I can ping 128.0.0.1 from every computer but i can't ping 128.0.0.4 from
128.0.0.2,
i have compiled my kernet with routing but it still don't work, i have
tried to put every
computer on a nother subnet but still no way,

Have anyone got a idee?

Greetings,

Richard

 
 
 

2 x ppp and 1 x eth routing question

Post by Mark McCo » Sun, 12 Apr 1998 04:00:00



> Hello,

> I have a little question....

> I have 2 amiga computers i want to connect to my redhat unix box with
> pppd over a
> serial nullmodem cabel, this works.

> But i have problems with getting the routing correct.

> I this moment i have the following setup

> 128.0.0.1  Linux box
> 128.0.0.2  Amiga 2000, dev ppp0
> 128.0.0.4  Amiga 4000, dev ppp1
> 128.0.0.5  Windows 95, dev eth0 (ethernet connected)

> I can ping 128.0.0.1 from every computer but i can't ping 128.0.0.4 from
> 128.0.0.2,
> i have compiled my kernet with routing but it still don't work, i have
> tried to put every
> computer on a nother subnet but still no way,

> Have anyone got a idee?

> Greetings,

> Richard

in the options for ppp on each of the lines, do you have the option
'proxyarp'?  This options adds the address for each of the ppp devices
to the list of addresses that the machine responds to (the ARP table).
Then the machine is smart enough to forward packets going those
addresses.  

if 128.0.0.5 wants to send a packet to any machine in the subnet
(128.0.0.x) it just broadcasts looking for that number.  since there are
no machines on the _ethernet_ that answer to this number, then this
fails.  the linux box (with proxyarp on the ppp daemons) adds the .2 and
.4 addresses to its ARP table, and answers/forwards packets to the
appropriate ppp device.
--
Mark McCoy -- Proud to run RedHat Linux since February 1996
at work I am:   mcking  at  cajunbro com
at home I am:   mcking  at  flash    net
at school I am: mmccoy  at  ringer   utsa   edu

 
 
 

2 x ppp and 1 x eth routing question

Post by bill davids » Tue, 14 Apr 1998 04:00:00




| I have a little question....

| I can ping 128.0.0.1 from every computer but i can't ping 128.0.0.4 from
| 128.0.0.2,
| i have compiled my kernet with routing but it still don't work, i have
| tried to put every
| computer on a nother subnet but still no way,
|
| Have anyone got a idee?

You need ip_forwarding in the kernel, and turned on. You can either
do proxyarp for all these machines one at a time, or just configure
your machine as a bridge.
--

 "If I were a diplomat, in the best case I'd go hungry.  In the worst
  case, people would die."
                -- Robert Lipe

 
 
 

2 x ppp and 1 x eth routing question

Post by James H. Smi » Fri, 17 Apr 1998 04:00:00



Quote:>Hello,

>I have a little question....

>I have 2 amiga computers i want to connect to my redhat unix box with
>pppd over a
>serial nullmodem cabel, this works.

>But i have problems with getting the routing correct.

>I this moment i have the following setup

>128.0.0.1  Linux box
>128.0.0.2  Amiga 2000, dev ppp0
>128.0.0.4  Amiga 4000, dev ppp1
>128.0.0.5  Windows 95, dev eth0 (ethernet connected)

>I can ping 128.0.0.1 from every computer but i can't ping 128.0.0.4 from
>128.0.0.2,
>i have compiled my kernet with routing but it still don't work, i have
>tried to put every
>computer on a nother subnet but still no way,

Forget proxy-arp, forget bridging. All just ways to deal with a non-optimal
subnet scheme.

What is happening is all these IP addresses are on the same subnet (using
255.255.255.0 mask i bet). The machine (pick any one) wants to send a packet,
it sees the destination is on the same subnet, so it will arp. Since the
destination is on another wire (unles it's dest is the Linux box), the arp
fails. The only communication is with the central linux box.

Now for a better way. Use subnetting. Keeping the 255.255.255.0 mask...
Linux Box, 128.0.1.1
Linux Box ppp0 128.0.2.1
Linux Box ppp1 128.0.3.1
Amiga 1 ppp interface 128.0.2.2, gateway 128.0.2.1
Amiga 2 ppp interface 128.0.3.2, gateway 128.0.3.1
Win95 128.0.4.2, gateway 128.0.4.1

Run the routing daemon (routed), and it'll work. If you dont want to run
routed, use static routes. You can have routing enabled, but unless you have
routes, it won't work. Check your routes with netstat -rn.

This works on my Slackware box... I do it at home, just with Windows & Linux
boxes.

Cheers,

Jim

 
 
 

2 x ppp and 1 x eth routing question

Post by bill davids » Thu, 23 Apr 1998 04:00:00





| >I have 2 amiga computers i want to connect to my redhat unix box with
| >pppd over a
| >serial nullmodem cabel, this works.
| >
| >But i have problems with getting the routing correct.
| >
| >I this moment i have the following setup
| >
| >128.0.0.1  Linux box
| >128.0.0.2  Amiga 2000, dev ppp0
| >128.0.0.4  Amiga 4000, dev ppp1
| >128.0.0.5  Windows 95, dev eth0 (ethernet connected)
| >
| >I can ping 128.0.0.1 from every computer but i can't ping 128.0.0.4
| >from 128.0.0.2, i have compiled my kernet with routing but it still
| >don't work, i have tried to put every computer on a nother subnet but
| >still no way,
|
| Forget proxy-arp, forget bridging. All just ways to deal with a non-optimal
| subnet scheme.

Or just set your Linux system as a bridge.

| What is happening is all these IP addresses are on the same subnet (using
| 255.255.255.0 mask i bet). The machine (pick any one) wants to send a packet,
| it sees the destination is on the same subnet, so it will arp. Since the
| destination is on another wire (unles it's dest is the Linux box), the arp
| fails. The only communication is with the central linux box.

Because the Linux system is not being a bridge and providing the ARP.

| Now for a better way. Use subnetting. Keeping the 255.255.255.0 mask...
| Linux Box, 128.0.1.1
| Linux Box ppp0 128.0.2.1
| Linux Box ppp1 128.0.3.1
| Amiga 1 ppp interface 128.0.2.2, gateway 128.0.2.1
| Amiga 2 ppp interface 128.0.3.2, gateway 128.0.3.1
| Win95 128.0.4.2, gateway 128.0.4.1

This requires each system to know about routing. While it certainly
works, from a standpoint of configuration, if it were my system I would
use bridging and convince all the machines that they were on the same
wire.

And you omitted having each machine set the Linux machine as the default
route to the world.

As a general rule, routing is desirable when you only want certain
packets to pass between physical rings, and bridging is desirable when
you want to pretend all systems are on the same ring.
--

 "If I were a diplomat, in the best case I'd go hungry.  In the worst
  case, people would die."
                -- Robert Lipe

 
 
 

1. route based on incoming eth out ppp - two eth / two ppp

I have two ethernet connections to an internal lan and two
outbound connections via ppp - two seperate isp's

I need to be able to route traffic based on incoming source.

                   25
 ------->| eth0    | --------->ppp0 ---------> Internet
              |    80        |
              |              |
              |    26        |
 ------->| eth0:1  | --------->ppp1 ---------> Internet
                  8080  

I have two squid and two sendmail daemons running each
bound to it's interface.
Outbound mail needs to be able to go through it's
respective isp's smtp server as a smart host - hence
the traffic shaping.

I have scripted the connection and then added the following
iptables setup. Unfortunately it is not working.

#/bin/bash!
p0=`/sbin/ifconfig |grep P-t-P | awk '{print $2}' \
|sed -e 's/addr\://g;' |grep 209`
p1=`/sbin/ifconfig |grep P-t-P | awk '{print $2}' \
|sed -e 's/addr\://g;' |grep 129`
#
echo $p0
echo $p1
# Setup IPTABLES
                iptables -t mangle -A PREROUTING -i eth0 -j MARK --set-mark 20
                iptables -t mangle -A PREROUTING -i eth1 -j MARK --set-mark 21
                ip route add default via $p0 dev ppp0 table 22
                ip route add default via $p1 dev ppp1 table 23
                ip rule add fwmark 20 table 22
                ip rule add fwmark 21 table 23

Can anyone see where i have made a mistake in this?

Thanks for any and all help,

Cheers,

Chris

2. Mount Linux Partitions in WIN95

3. routing for ppp and eth question

4. bandwidth management

5. Apache weird dying problem

6. routing out two ppp lines via source eth - iptables

7. Rumored Adaptec 1522 Device driver.

8. Routing with ppp and eth

9. Need help:routing table for 1 eth and n ppp interfaces

10. IPX RIP/SAP routing between ppp and eth

11. Create routing table for 1 eth and multiple ppp interface

12. eth + ppp routing problem