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?
|