netdev
[Top] [All Lists]

Re: External Loopback with crossed route entries

To: Rick Richardson <rick@xxxxxxxxxxxxxxx>
Subject: Re: External Loopback with crossed route entries
From: Andrew Morton <andrewm@xxxxxxxxxx>
Date: Wed, 14 Feb 2001 01:02:25 +0000
Cc: Andrew Morton <andrewm@xxxxxxxxxx>, netdev@xxxxxxxxxxx
References: <20010213131528.A1746@xxxxxxxxxxxxxxx> <3A89C2F5.853775B8@xxxxxxxxxx> <20010213175713.B1249@xxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
Rick Richardson wrote:

> 
> +----------------------+
> |                      |
> |  +------------------+| eth0
> |  | eth0 192.168.1.1 |----------+
> |  +------------------+|         |
> |                      |         | crossover cable
> |  +------------------+| eth1    |
> |  | eth1 192.168.2.1 |----------+
> |  +------------------+|
> |                      |
> |  PC with two I/F's   |
> +----------------------+
> 
> A "ping 192.168.2.1" should go out the top port (eth0), over the
> crossover cable, and back in to the lower port (eth1).
> 

Interesting.

# There's probably a simpler way of doing this
#
# Open the links
ip link set eth0 up
ip link set eth1 up

# Give them an IP
ip addr add 192.168.1.1 dev eth0
ip addr add 192.168.1.2 dev eth1

# kill the local routes
ip route del 192.168.1.1 dev eth0 table local
ip route del 192.168.1.2 dev eth1 table local

# Provide the crossed routes
ip route add 192.168.1.2 dev eth0
ip route add 192.168.1.1 dev eth1

# OK, now packets cross over the loopback.  Now what?


This will send packets across the loopback, but when
they arrive back, they of course loop-unto-TTL-expiry.
What do you want to do with the incoming packets?

<Prev in Thread] Current Thread [Next in Thread>