ip aliasing and ip forwarding

ip aliasing and ip forwarding

Post by Randy Letnes » Wed, 09 Jul 1997 04:00:00



I have successfully configured a second ip address as an alias to my one
ethernet card.  The address is on a different network, and I want to be
able to use my linux box as a gateway to two networks.  
Here is what I have:

Linux Computer
-------------------
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
          RX packets:33 errors:0 dropped:0 overruns:0
          TX packets:33 errors:0 dropped:0 overruns:0

eth0      Link encap:10Mbps Ethernet  HWaddr 00:A0:C9:69:04:A8
          inet addr:141.0.0.61  Bcast:141.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:22078 errors:0 dropped:0 overruns:0
          TX packets:8613 errors:0 dropped:0 overruns:0
          Interrupt:11 Base address:0x6000

eth0:0    Link encap:10Mbps Ethernet  HWaddr 00:A0:C9:69:04:A8
          inet addr:141.0.2.25  Bcast:141.0.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0
          TX packets:0 errors:0 dropped:0 overruns:0

heres route -n

Kernel routing table
Destination     Gateway         Genmask         Flags MSS    Window Use
Iface
141.0.0.0       *                     255.255.255.0   U     1500   0    
145 eth0
141.0.1.0       141.0.0.27       255.255.255.0   UG   1500   0        0
eth0
141.0.2.0       *                     255.255.255.0   U     1500   0      
1 eth0:0
127.0.0.0       *                     255.0.0.0          U     3584   0    
   3 lo
default           141.0.0.66       *                      UG  1500   0    
123 eth0

I have a route on another machine (141.0.0.66) which forwards all packets
destined to a 141.0.2.0 address to the Linux Computer.

Everthing looks fine, and I can ping machines on the 141.0.2.0 network from
the Linux computer, but I cannot ping to the 141.0.2.0 network from the
router(141.0.0.66), or from any computer on the 141.0.0.0 network.  I have
Ip forwarding enabled, but am I missing something?

Here is what a traceroute shows from a Win 95 machine on the 141.0.0.0
network.  It's gateway is set at 141.0.0.66, which is a router, which
should forward packets to the Linux computer.  The Linux machine should
then forward to the machine on the 141.0.2.0 network.

C:\WINDOWS>tracert 141.0.2.3

Tracing route to 141.0.2.3 over a maximum of 30 hops

  1     1 ms   <10 ms   <10 ms  linux [141.0.0.61]
  2     *        *        *     Request timed out.
  3     *        *        *     Request timed out.
  4     *        *        *     Request timed out.
  5     *        *        *     Request timed out.

It looks like the router is correctly forwarding the traffice to the Linux
computer, but after that, nada.

Any suggestions? Is this even possible to do through an ip alias? Thanks,

-Randy

 
 
 

ip aliasing and ip forwarding

Post by Brian McCaule » Wed, 16 Jul 1997 04:00:00



> I have successfully configured a second ip address as an alias to my one
> ethernet card.  The address is on a different network, and I want to be
> able to use my linux box as a gateway to two networks.  
> Here is what I have:

> eth0      Link encap:10Mbps Ethernet  HWaddr 00:A0:C9:69:04:A8
>           inet addr:141.0.0.61  Bcast:141.0.0.255  Mask:255.255.255.0

> eth0:0    Link encap:10Mbps Ethernet  HWaddr 00:A0:C9:69:04:A8
>           inet addr:141.0.2.25  Bcast:141.0.2.255  Mask:255.255.255.0

> heres route -n
> [snip - good looking table ]

> I have a route on another machine (141.0.0.66) which forwards all packets
> destined to a 141.0.2.0 address to the Linux Computer.

> Everthing looks fine, and I can ping machines on the 141.0.2.0 network from
> the Linux computer, but I cannot ping to the 141.0.2.0 network from the
> router(141.0.0.66), or from any computer on the 141.0.0.0 network.  I have
> Ip forwarding enabled, but am I missing something?

How are you expecting machines on the 141.0.2/24 network know (or learn)
to send packets for the 141.0.0/24 network via 141.0.2.25 ?

Note: Once you get this working the Linux box need only forward one
packet for each conversation.  It should send an ICMP redirect.

--

 .  _\\__[oo       from       | Phones: +44 121 471 3789 (home)

.  l___\\    /~~) /~~[  /   [ | PGP-fp: D7 03 2A 4B D8 3A 05 37...
 # ll  l\\  ~~~~ ~   ~ ~    ~ | http://wcl-l.bham.ac.uk/~bam/


 
 
 

1. IP forwarding is only good for port forwarding of only one IP ?

I have two IP from my provider ( or two web address) and only one isdn line.
With linux and only one IP, I can masquerade all my local network to use
only that one IP.
Perfect up to now.

Then I want to forward the other IP to a NT server inside my local network.
(like 2 company on the same network).

ipfwadm 2.30 with linux 2.0.36 can not do that, because nobody know how to
do it (I read a lot of HowTo).
or may be it's not possible with ipfwadm. All people think that nobody want
that.

is-it true ?

2. Socket - Com. error

3. Configuring net (IP-tunnel, IP-Alias, Proxy-ARP, NAT, IP-Masq?)

4. root/ Locked Directory: Is there a way out of this please- kfm shwing this on status line

5. Redirecting external aliased IP to internal private IP

6. Cisco <-> Linux connection

7. Help: IP Alias and port forwarding

8. Still need Help with Modem Dialer

9. IP MASQ and IP Aliasing

10. ip masq/ip alias question

11. PLS-Major Problem in LAN (natd, IP alias, Port and IP redirections)

12. Question about IP alias and port forwarding

13. Slow IP thru-put with many IP aliases?!