Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
7bb0dbb0
Commit
7bb0dbb0
authored
May 17, 2024
by
Hejing Li
Committed by
Jonas Kaufmann
Aug 20, 2024
Browse files
simle ping configuration example using new orchestration
parent
af5f0e7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
experiments/pyexps/simple_ping_sysconf.py
experiments/pyexps/simple_ping_sysconf.py
+39
-0
No files found.
experiments/pyexps/simple_ping_sysconf.py
0 → 100644
View file @
7bb0dbb0
import
simbricks.splitsim.specification
as
spec
"""
Simple Ping Example:
Host 0 pings Host1
HOST0 -- NIC0 ------ SWITCH ------ NIC1 -- HOST1
"""
system
=
spec
.
System
()
# create a host instance and a NIC instance then install the NIC on the host
host0
=
spec
.
Host
(
system
)
nic0
=
spec
.
i40eNIC
(
system
)
host0
.
nic_driver
=
'i40e'
host0
.
ip
=
'10.0.0.1'
pcichannel0
=
spec
.
PCI
(
system
)
pcichannel0
.
install
(
host0
,
nic0
)
host1
=
spec
.
Host
(
system
)
nic1
=
spec
.
i40eNIC
(
system
)
host1
.
nic_driver
=
'i40e'
host1
.
ip
=
'10.0.0.2'
pcichannel1
=
spec
.
PCI
(
system
)
pcichannel1
.
install
(
host1
,
nic1
)
port0
=
spec
.
NetDev
()
port1
=
spec
.
NetDev
()
switch
=
spec
.
Switch
(
system
)
switch
.
install_netdev
(
port0
)
switch
.
install_netdev
(
port1
)
ethchannel0
=
spec
.
Eth
(
system
)
ethchannel0
.
install
(
nic0
,
port0
)
ethchannel1
=
spec
.
Eth
(
system
)
ethchannel1
.
install
(
nic1
,
port1
)
# configure the software to run on the host
host0
.
app
=
spec
.
PingClient
(
'10.0.0.2'
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment