All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Pinizzotto <antonio.pinizzotto@iit.cnr.it>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] linux bridging problem: how to emulate 2 separate
Date: Fri, 01 Jul 2005 18:37:44 +0000	[thread overview]
Message-ID: <42C58D78.9010701@iit.cnr.it> (raw)
In-Reply-To: <42C513EC.6030505@iit.cnr.it>

Stephen Hemminger wrote:
> On Fri, 01 Jul 2005 11:59:08 +0200
> Antonio Pinizzotto <antonio.pinizzotto@iit.cnr.it> wrote:
> 
> 
>>Hi all.
>>
>>I would need to use a single physical interface on a Linux box to manage 
>>two different IP addresses (belonging to two separate logical subnets) 
>>with two different MAC address. (I need to emulate te presence of two 
>>separate physical interfaceses for a PC on the same LAN, at layer 2 and 
>>layer 3).
>>
>>Is it possible to use the linux ethernet bridging code and two tap 
>>interfaces for this purpose?
>>
>>
>>Here is a picture of what I need to do.
>>
>>
>>  LAN__________________________________
>>                     |
>>                     | eth0 (no IP)
>>             ________|________
>>            |                 |
>>            |       br0       |
>>            |     (no IP)     |
>>            |_________________|
>>           tap0  |        | tap1
>>192.168.40.1/24 |        | 192.168.30.1/24
>>           MAC_0 |        | MAC_1
>>               __|________|__
>>              |              |
>>              |      PC      |
>>              |              |
>>              |______________|
>>
>>
>>I would need this picture to be equivalent to this one:
>>
>>
>>  LAN__________________________________
>>           eth0  |        | eth1
>>192.168.40.1/24 |        | 192.168.30.1/24
>>           MAC_0 |        | MAC_1
>>               __|________|__
>>              |              |
>>              |      PC      |
>>              |              |
>>              |______________|
>>
>>
>>I tried but it doens't work. I don't know if it's not contemplate or if 
>>I did a wrong configuration.
>>For example, on tap0, using tcpdump, I see all the L2 broadcast frames 
>>going on the LAN; but on the counters of "ifconfig tap0" all of them are 
>>considered dropped. No packet is counted as transmitted or received, 
>>also if I try to ping from or to tap0.
>>The tap interface starts to transmit/receive pachets only if it is 
>>connected to some process like qemu or openvpn.
>>Maybe, it is not possibile for tap interface to be used directly by the 
>>linux os?
>>
> 
> 
> 
> Stop abusing bridging.  People keep trying these wacky multiple
> network things and they won't work. Bridging really can't handle anything
> with multiple interfaces that could possibly create a forwarding loop.
> 
> 
> 


Dear Stephen,
probably my pictures or descriptions were not so clear.
I don't want abuse bridging.

As you can see in the second picture (of the previous e-mail) I just 
would like to replicate the real topology (in which there are not loops 
because each physical interface has its own subnet) using software 
interfaces, taps. Moreover in the second picture no bridging is enabled 
on the PC.
It is just an experiment to understand how the various software pieces 
works togheter.



Below I tried to draw a clearer picture.
The first one is what I would like to get.
The second one is what I have.


LAN______________________________________________
                         |
                         | eth0 (no IP)
    _____________________|________________________
   |                     |          Linux Box (PC)|
   |             ________|________                |
   |            |                 |               |
   |            |       br0       |               |
   |            |     (no IP)     |               |
   |            |_________________|               |
   |           tap0  |        | tap1              |
   | 192.168.40.1/24 |        | 192.168.30.1/24   |
   |           MAC_0 |        | MAC_1             |
   |              ___|________|____               |
   |             |                 |              |
   |             | OS TCP-IP stack |              |
   |             |                 |              |
   |             |_________________|              |
   |                 | | | |                      |
   |                 | | | |                      |
   |                Processes                     |
   |                                              |
   |                                              |
   |______________________________________________|


I would need the first picture to be equivalent to the next one:


  LAN_____________________________________________
               eth0  |        | eth1
     192.168.40.1/24 |        | 192.168.30.1/24
               MAC_0 |        | MAC_1
    _________________|________|___________________
   |                 |        |     Linux Box (PC)|
   |              ___|________|____               |
   |             |                 |              |
   |             | OS TCP-IP stack |              |
   |             |                 |              |
   |             |_________________|              |
   |                 | | | |                      |
   |                 | | | |                      |
   |                Processes                     |
   |                                              |
   |                                              |
   |______________________________________________|



Bye
Antonio






_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

  parent reply	other threads:[~2005-07-01 18:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-01  9:59 [LARTC] linux bridging problem: how to emulate 2 separate Antonio Pinizzotto
2005-07-01 17:12 ` Stephen Hemminger
2005-07-01 18:37 ` Antonio Pinizzotto [this message]
2005-07-01 19:28 ` Stephen Hemminger
2005-07-01 19:52 ` Alexey Toptygin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42C58D78.9010701@iit.cnr.it \
    --to=antonio.pinizzotto@iit.cnr.it \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.