From: Andrew Lunn <andrew@lunn•ch>
To: Steve Williams <steve.williams@getcruise•com>
Cc: netdev@vger•kernel.org
Subject: Re: [PATCH net-next] sandlan: Add the sandlan virtual network interface
Date: Thu, 17 Nov 2022 01:33:18 +0100 [thread overview]
Message-ID: <Y3WBTvhiCLd7+R5Y@lunn.ch> (raw)
In-Reply-To: <20221116222429.7466-1-steve.williams@getcruise.com>
On Wed, Nov 16, 2022 at 02:24:29PM -0800, Steve Williams wrote:
> From: Stephen Williams <steve.williams@getcruise•com>
>
> This is a virtual driver that is useful for testing network protocols
> or other complex networking without real ethernet hardware. Arbitrarily
> complex networks can be created and simulated by creating virtual network
> devices and assigning them to named broadcast domains, and all the usual
> ethernet-aware tools can operate on that network.
>
> This is different from e.g. the tun/tap device driver in that it is not
> point-to-point.
My experience simulating networks using GNS3 and CORE is that you
combine tun/tap with a bridge. That reflects the reality of most of
todays networks, in that they no longer do CSMA-CD, they have point to
point links to a switch, the switch does address learning, filtering,
IGMP snooping, etc, and your total net bandwidth is much higher than
your line rate.
I did however recently learn that some T1 automotive network are
CSMA-CD, a good old fashioned shared bus.
So have you reimplemented basic bridge functionality? I've not looked
at the code yet to answer the question myself.
> +EXAMPLE
> +=======
> +
> +In this example, we create two NICs in a shared domain, and also create
> +a 3rd in the sae domain that wireshark can use to snoop on the network
> +traffic.
> +
> +First, make sure the interfaces exist::
> +
> + echo +sandlan0 > /sys/class/net/sandlan_interfaces
> + echo +sandlan1 > /sys/class/net/sandlan_interfaces
> + echo +sandlan2 > /sys/class/net/sandlan_interfaces
A sysfs interface is unlikely to be accepted. You should be using
netlink.
ip link add sandlan0 type sandlan
etc.
> +While we're at it, demonstrate sandlan domains. Create a domain and
> +put all the interfaces in that domain. Note that this is a
> +connectivity domain, and not the same as netns namespaces::
> +
> + echo +side > /sys/class/net/sandlan_domains
> + echo side > /sys/class/net/sandlan0/sandlan/domain
> + echo side > /sys/class/net/sandlan1/sandlan/domain
> + echo side > /sys/class/net/sandlan2/sandlan/domain
ip link set sandlan0 domain side
Andrew
next prev parent reply other threads:[~2022-11-17 0:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 22:24 [PATCH net-next] sandlan: Add the sandlan virtual network interface Steve Williams
2022-11-17 0:33 ` Andrew Lunn [this message]
2022-11-17 5:35 ` kernel test robot
2022-11-18 4:00 ` Jakub Kicinski
2022-11-22 2:59 ` [EXT] " Steve Williams
2022-11-22 4:02 ` Jakub Kicinski
2022-11-22 20:09 ` Andrew Lunn
2022-11-29 17:54 ` Steve Williams
2023-02-21 10:19 ` Ferenc Fejes
2022-11-21 14:04 ` kernel test robot
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=Y3WBTvhiCLd7+R5Y@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=netdev@vger$(echo .)kernel.org \
--cc=steve.williams@getcruise$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox