Skip to content

Enable user-mode networking through SLIRP #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chiangkd
Copy link
Collaborator

This commit integrates 'minislirp' as submodule and enables support for the new 'user' network device, which uses SLIRP for user-mode networking.

An internal pipe mechanism is introduced to monitor incoming data. The main loop polls the pipe for availabe data, and any incoming data is forwarded to the virtio-net device for processing.

Additionally, this commit introduces special address used by SLIRP for network configuration 1:

  • 10.0.2.0: The SLIRP "on-line" configuration address.
  • 10.0.2.2: An alias for the host running SLIRP.
  • 10.0.2.3: An alias for the DNS address.
  • 10.0.2.15: A recommended address for the PC running SLIRP.

Test procedures

  1. Laumch semu with specified NETDEV=user
cd semu/
make check NETDEV=user
  1. Configure the network interface with an IP address and routing:
ip addr add 10.0.2.15/24 dev eth0
ip link set eth0 up
ip route add default via 10.0.2.2
  1. Test nerwork connectivity by pinging an external address:
# ping -c 3 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
  1. Output
64 bytes from 8.8.8.8: seq=0 ttl=255 time=17.001 ms
64 bytes from 8.8.8.8: seq=1 ttl=255 time=20.001 ms
64 bytes from 8.8.8.8: seq=2 ttl=255 time=17.001 ms

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 17.001/18.001/20.001 ms
  • MacOS CI Flow issue: Currently, the MacOs CI flow is failing. The issue may be releated to a redefined swab function, similar to the one discussed in Port 86Box to Linux 86Box/86Box#136

Copy link

Repository not enabled for automatic review

The Bito agent is set up, but this repository is not enabled for automatic code reviews. To review this pull request, type /review in a comment and save it.

You can enable automatic reviews in the agent setup here or contact your Bito workspace admin at [email protected].

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

Refer to the documentation for additional commands.

Configuration
This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

@jserv
Copy link
Collaborator

jserv commented Apr 21, 2025

  • MacOS CI Flow issue: Currently, the MacOs CI flow is failing. The issue may be related to a redefined swab function, similar to the one discussed in Port 86Box to Linux 86Box/86Box#136

You should create an issue at minislirp.

This commit integrates 'minislirp' as submodule and enables support
for the new 'user' network device, which uses SLIRP for user-mode
networking.

An internal pipe mechanism is introduced to monitor incoming data.
The main loop polls the pipe for availabe data, and any incoming
data is forwarded to the virtio-net device for processing.

Additionally, this commit introduces special address used by SLIRP
for network configuration [1]:
- **10.0.2.0**: The SLIRP "on-line" configuration address.
- **10.0.2.2**: An alias for the host running SLIRP.
- **10.0.2.3**: An alias for the DNS address.
- **10.0.2.15**: A recommended address for the PC running SLIRP.

[1]: https://github.com/kost/slirp/blob/master/docs/slirp.doc
Ping 10.0.2.2 (default route) as hosted runner in Azure do not
allow external pings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants