Network
Default Network
코드 블럭 |
---|
|
# brctl show
root@pnetlab:~# ps auxf | grep -v '\[' | awk '{ print substr($0, 1, 9) substr($0, 65) }'
USER COMMAND
root /sbin/init
root /lib/systemd/systemd-journald
root /sbin/lvmetad -f
rootSTP
bridge name bridge id /lib/systemd/systemd-udevd
systemd+ /lib/systemd/systemd-timesyncd
systemd+ /lib/systemd/systemd-networkd
systemd+ /lib/systemd/systemd-resolved
root enabled interfaces
docker0 8000.0242730dda4d /usr/sbin/irqbalance --foreground
rootno
pnet0 /usr/lib/accountsservice/accounts-daemon
message+ /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root 8000.566f4bf80108 no /lib/systemd/systemd-logind
rooteth0
pnet1 8000.000000000000 no
pnet2 php /opt/unetlab/scripts/cpulimit_daemon.php > /opt/unetlab/data/Logs/cpulimit.log 2>&1
root 8000.000000000000 no
pnet3 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
daemon /usr/sbin/atd -f
root 8000.000000000000 no
pnet4 8000.000000000000 no
pnet5 /usr/bin/lxcfs /var/lib/lxcfs/
root8000.000000000000 no
pnet6 /usr/lib/policykit-1/polkitd --no-debug
root8000.000000000000 no
pnet7 ovsdb-server /etc/openvswitch/conf.db
8000.000000000000 no
pnet8 8000.000000000000 -vconsole:emer
no
pnet9 8000.000000000000 -vsyslog:err
no
pnet_nat 8000.000000000000 no |
Network example Labs on running
코드 블럭 |
---|
|
# brctl show
-vfile:info
--remote=punix:/var/run/openvswitch/db.sock
--private-key=db:Open_vSwitch,SSL,private_key
STP
bridge name bridge id enabled --certificate=db:Open_vSwitch,SSL,certificate
interfaces
docker0 8000.0242730dda4d no
pnet0 --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert
8000.566f4bf80108 no eth0
pnet1 --no-chdir
8000.000000000000 no
...
pnet_nat --log-file=/var/log/openvswitch/ovsdb-server.log
8000.000000000000 no
vnet1_1 8000.5e89b0f3aaca no --pidfile=/var/run/openvswitch/ovsdb-server.pid vunl11_35
--detach
root ovs-vswitchd unix:/var/run/openvswitch/db.sock
-vconsole:emer
vunl12_35
vnet1_10 8000.be1960846bc5 no -vsyslog:err
vunl11_50
-vfile:info
--mlockall
vunl13_50
vnet1_11 8000.9e3475a9c50e no --no-chdirvunl12_34
--log-file=/var/log/openvswitch/ovs-vswitchd.log
--pidfile=/var/run/openvswitch/ovs-vswitchd.pid
vunl14_34
vnet1_12 8000.226a4f0e634b no --detach
rootvunl12_50
/usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
root /bin/bash /opt/unetlab/html/store/app/Console/Commands/harddisk_alert
root \_ sleep 90
root /usr/local/sbin/guacd -p /var/run/guacd.pid
root /usr/bin/containerd
rootvunl14_50
vnet1_13 /usr/sbin/qemu-ga --daemonize -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0
root /usr/bin/ovs-testcontroller
8000.125d89294c8e no vunl10_16
--detach
--pidfile=/var/run/openvswitch/ovs-testcontroller.pid pssl:
vunl11_0
--private-key=/etc/openvswitch-testcontroller/privkey.pem
--certificate=/etc/openvswitch-testcontroller/cert.pem
vunl1_16
--ca-cert=/etc/openvswitch-testcontroller/cacert.pem
root /sbin/agetty -o -p -- \u --noclear tty1 linux
tomcat8 /usr/lib/jvm/default-java/bin/java
vunl2_16
-Djava.util.logging.config.file=/var/lib/tomcat8/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.awt.headless=true
vunl3_16
-XX:+UseConcMarkSweepGC
-Djdk.tls.ephemeralDHKeySize=2048
vunl4_16
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources
-Dorg.apache.catalina.security.SecurityListener.UMASK=0027
-Dignore.endorsed.dirs=
-classpath /usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jarvunl5_16
-Dcatalina.base=/var/lib/tomcat8
-Dcatalina.home=/usr/share/tomcat8
vunl6_16
... |
Process
Default Processes
코드 블럭 |
---|
|
# ps auxf | grep -v '\[' | awk '{ print substr($0, 1, 9) substr($0, 65) }'
USER COMMAND
root /sbin/init
root /lib/systemd/systemd-journald
root /sbin/lvmetad -f
root /lib/systemd/systemd-udevd
systemd+ /lib/systemd/systemd-timesyncd
systemd+ /lib/systemd/systemd-networkd
systemd+ /lib/systemd/systemd-resolved
root /usr/sbin/irqbalance --foreground
root /usr/lib/accountsservice/accounts-daemon
message+ /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root /lib/systemd/systemd-logind
root php /opt/unetlab/scripts/cpulimit_daemon.php > /opt/unetlab/data/Logs/cpulimit.log 2>&1
root /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
daemon /usr/sbin/atd -f
root /usr/bin/lxcfs /var/lib/lxcfs/
root /usr/lib/policykit-1/polkitd --no-debug
root ovsdb-server /etc/openvswitch/conf.db
-vconsole:emer
-vsyslog:err
-vfile:info
--remote=punix:/var/run/openvswitch/db.sock
--private-key=db:Open_vSwitch,SSL,private_key
--certificate=db:Open_vSwitch,SSL,certificate
--bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert
--no-chdir
--log-file=/var/log/openvswitch/ovsdb-server.log
--pidfile=/var/run/openvswitch/ovsdb-server.pid
--detach
root ovs-vswitchd unix:/var/run/openvswitch/db.sock
-vconsole:emer
-vsyslog:err
-vfile:info
--mlockall
--no-chdir
--log-file=/var/log/openvswitch/ovs-vswitchd.log
--pidfile=/var/run/openvswitch/ovs-vswitchd.pid
--detach
root /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
root /bin/bash /opt/unetlab/html/store/app/Console/Commands/harddisk_alert
root \_ sleep 90
root /usr/local/sbin/guacd -p /var/run/guacd.pid
root /usr/bin/containerd
root /usr/sbin/qemu-ga --daemonize -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0
root /usr/bin/ovs-testcontroller
--detach
--pidfile=/var/run/openvswitch/ovs-testcontroller.pid pssl:
--private-key=/etc/openvswitch-testcontroller/privkey.pem
--certificate=/etc/openvswitch-testcontroller/cert.pem
--ca-cert=/etc/openvswitch-testcontroller/cacert.pem
root /sbin/agetty -o -p -- \u --noclear tty1 linux
tomcat8 /usr/lib/jvm/default-java/bin/java
-Djava.util.logging.config.file=/var/lib/tomcat8/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.awt.headless=true
-XX:+UseConcMarkSweepGC
-Djdk.tls.ephemeralDHKeySize=2048
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources
-Dorg.apache.catalina.security.SecurityListener.UMASK=0027
-Dignore.endorsed.dirs=
-classpath /usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jar
-Dcatalina.base=/var/lib/tomcat8
-Dcatalina.home=/usr/share/tomcat8
-Djava.io.tmpdir=/tmp/tomcat8-tomcat8-tmp org.apache.catalina.startup.Bootstrap start
uml-net /usr/bin/uml_switch -unix /var/run/uml-utilities/uml_switch.ctl
root /usr/sbin/apache2 -k start
www-data \_ /usr/sbin/apache2 -k start
www-data \_ /usr/sbin/apache2 -k start
root /bin/bash /opt/unetlab/html/store/app/Console/Commands/harddisk_limit
root \_ sleep 60
root /bin/bash /opt/unetlab/html/store/app/Console/Commands/process_limit
root \_ sleep 30
root /lib/systemd/systemd --user
root \_ (sd-pam)
syslog /usr/sbin/rsyslogd -n
root /usr/sbin/cron -f
root \_ /usr/sbin/CRON -f
root \_ /bin/sh -c /usr/bin/php /opt/unetlab/html/store/artisan keepalive 2>&1
root \_ /usr/bin/php /opt/unetlab/html/store/artisan keepalive
mysql /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid |
Dynamips
코드 블럭 |
---|
|
# ps auxf | grep -v '\[' | awk '{ print substr($0, 1, 9) substr($0, 65) }'
USER COMMAND
unl1 /opt/unetlab/wrappers/iol_wrapper -D 1 -S 1 -P 30001 -t R1
-F /opt/unetlab/tmp/1/1/i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3.bin
-d 0 -e 1 -s 0 -Djava.io.tmpdir=/tmp/tomcat8-tomcat8-tmp org.apache.catalina.startup.Bootstrap start
uml-net /usr/bin/uml_switch -unix /var/run/uml-utilities/uml_switch.ctl
root-- -n 1024 -q -m 512 -c startup-config
unl1 \_ /opt/unetlab/wrappers/iol_wrapper ...
unl1 /usr/sbin/apache2 -k start
www-data \_ /usr/sbin/apache2sh -k start
www-data \_ /usr/sbin/apache2 -k start
rootc LD_LIBRARY_PATH=/opt/unetlab/addons/iol/lib
/bin/bash /opt/unetlab/html/store/app/Console/Commands/harddisk_limit
root \_ sleep 60
root /bin/bash /opt/unetlab/html/store/app/Console/Commands/process_limit
root...GNS3.bin
\_ sleep 30
root /lib/systemd/systemd --user
root -e 1 -s \_0 (sd-pam)
unl1 /opt/unetlab/wrappers/iol_wrapper
-n 1024 -q -m 512 -c startup-config 1
unl1 \_ /opt/...GNS3.bin ... |
30001 은 Telnet 포트임. 웹 UI 에서 노드를 클릭하면, EVE-NG Client Pack이 로컬에서 다음 명령을 실행해 접속함
코드 블럭 |
---|
|
telnet pnet.kreonet.net 30001 |
VPC
Virtual PC Simulator
코드 블럭 |
---|
|
# ps auxf | grep -v '\[' | awk '{ print substr($0, 1, 9) substr($0, 65) }'
USER-D 1 -S 1 -P 30001 -t R1
-F /opt/unetlab/tmp/1/1/i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3.bin
COMMAND
root /opt/vpcsu/bin/vpcs -m 15 -dN 0VPC -ei 1 -sp 030015 -e - -n 1024 -qd vunl15_0
root \_ /opt/vpcsu/bin/vpcs -m 15 1024-N -cVPC startup-config
unl1i 1 -p 30015 -e -d \_vunl15_0 |
30015 는 Telnet 포트임
코드 블럭 |
---|
|
# /opt/unetlabvpcsu/wrappersbin/vpcs -v
Welcome to Virtual PC Simulator, version 1.0 (0.8c)
Dedicated to Daling.
Build time: Dec 31 2016 01:22:17
Copyright (c) 2007-2015, Paul Meng (mirnshi@gmail.com)
All rights reserved. |
Docker
코드 블럭 |
---|
|
# docker ps -a
CONTAINER ID IMAGEiol_wrapper ...
unl1 \_ sh -c LD_LIBRARY_PATH=/opt/unetlab/addons/iol/lib
/opt/unetlab/tmp/1/1/i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3.bin
COMMAND -e 1 -s 0 -n 1024 -q -m 1024 -c startup-config 1
unl1CREATED STATUS \_ /opt/unetlab/tmp/1/1/i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3.bin ...
unl2 PORTS /opt/unetlab/wrappers/iol_wrapper
NAMES
e671d651bc36 pnetlab/linux-desktop:latest -D 2 -S 2 -P 30002 -t R2
-F /opt/unetlab/tmp/1/2/i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3.bin
"/start.sh bash" 23 minutes ago Up 23 minutes 80/tcp, 3389/tcp docker16
root@pnetlab:~# ps auxf | grep -v '\[' | awk '{ print substr($0, 1, 9) substr($0, 65) }'
USER -dCOMMAND
root 0 -e 1 -s 0 -- -n 1024 -q -m 1024 -c startup-config
unl2 /usr/bin/containerd-shim-runc-v2 -namespace moby -id e671d651bc36 -address /run/containerd/containerd.sock
root \_ /opt/unetlab/wrappers/iol_wrapper ...
unl2bash
root | \_ sh -c LD_LIBRARY_PATH=/opt/unetlab/addons/iol/lib
xrdp
root | \_ xrdp-sesman
root \_ /bin/bash
root sudo /opt/unetlab/tmp/1/2/i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3.bin
wrappers/docker_wrapper -P 30016 -t Docker -p 16 -c /bin/bash
root \_ ...
root -e 1 -s 0 -n 1024 -q -m 1024 -c startup-config 2
unl2\_ ...
root \_ sh -c ssh root@localhost \_-i /optroot/unetlab/tmp/1/2/i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3.bin ...
unl3.ssh/id_rsa_dy -o StrictHostKeyChecking=no
/opt/unetlab/wrappers/iol_wrapper
-tt 'export -D 3 -S 3 -P 30003 -t R3
TERM=ansi&&docker -H=tcp://127.0.0.1:4243 exec -ti docker16 /bin/bash'
root \_ ... |
docker_wrapper 는 웹 UI 에서 노드를 클릭하면 생성됨. docker의 interactive bash shell 을 telnet 30016 로 포워딩 함
QEMU
코드 블럭 |
---|
# ps auxf | grep -F /opt/unetlab/tmp/1/3/i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3.bin
-d 0 -e 1 -s 0 -- -n 1024 -q -m 1024 -c startup-config
unl3v '\[' | awk '{ print substr($0, 1, 15) substr($0, 65) }'
USER PID COMMAND
root 12974 /opt/qemu-2.12.0/bin/qemu-system-x86_64
\_ /opt/unetlab/wrappers/iol_wrapper ...
unl3 \_ sh-device -c LD_LIBRARY_PATH=/opt/unetlab/addons/iol/lib
virtio-net-pci,netdev=net0,mac=50:4c:ef:00:11:00
/opt/unetlab/tmp/1/3/i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3.bin-netdev tap,id=net0,ifname=vunl17_0,script=no
-e 1 -svnc :24117
0 -n 1024 -q -m 1024 -c startup-config 3
unl3 \_ -chardev socket,id=monitor,path=/opt/unetlab/tmp/1/3/i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3.bin ...
unl4 17/monitor.sock,server,nowait
/opt/unetlab/wrappers/iol_wrapper
-D 4 -S 4 -P 30004 -t R4
monitor chardev:monitor
-F /opt/unetlab/tmp/1/4/i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3.bin -smp 2
-d 0 -e 1 -s 0 -- -n 1024 -q -m 10244096
-c startup-config
unl4 \_ /opt/unetlab/wrappers/iol_wrapper ...
unl4 \_ sh -c LD_LIBRARY_PATH=/opt/unetlab/addons/iol/lib
name Linux
/opt/unetlab/tmp/1/4/i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3.bin-uuid 5b2e66a0-df69-43d0-b36f-c6a1362d289d
-e 1 -s 0 -n 1024 -q -m 1024 -c startup-config 4
unl4drive file=virtioa.qcow2,if=virtio,bus=0,unit=0,cache=none
\_ /opt/unetlab/tmp/1/4/i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3.bin ...
root-machine type=pc,accel=kvm
/opt/vpcsu/bin/vpcs -m 5 -N VPC -i 1 -p 30005 -e -d vunl5_0
root -vga virtio
\_ /opt/vpcsu/bin/vpcs -m 5 -N VPC -i 1 -p 30005 -e -d vunl5_0
root /opt/vpcsu/bin/vpcs -m 6 -N VPC1 -iusbdevice tablet
1 -p 30006 -e -d vunl6_0
root \_ /opt/vpcsu/bin/vpcs -m 6 -N VPC1 -i 1 -p 30006 -e -d vunl6_0
root /opt/vpcsu/bin/vpcs -m 7 -N VPC2 -i 1 -p 30007 -e -d vunl7_0
root \_ /opt/vpcsu/bin/vpcs -m 7 -N VPC2 -i 1 -p 30007 -e -d vunl7_0
syslog /usr/sbin/rsyslogd -n
root /usr/sbin/cron -f
root \_ /usr/sbin/CRON -f
root boot order=cd
# netstat -anp | grep 12974
tcp 0 0 0.0.0.0:30017 0.0.0.0:* LISTEN 12974/qemu-system-x |
30017는 VNC 포트임. QEMU 에뮬레이터에서 vnc 옵션이 :24117 인데, 이는 30017포트(5900+24117)로 해당 VM의 디스플레이를 VNC로 제공하겠다는 뜻임.
코드 블럭 |
---|
# man qemu-system-x86_64
-vnc display
host:d
TCP connections will only be allowed from host on display d.
\_ /bin/sh -c /usr/bin/php /opt/unetlab/html/store/artisan keepalive 2>&1
root By convention the TCP port is 5900+ d. Optionally, host can be omitted
\_ /usr/bin/php /opt/unetlab/html/store/artisan keepalive
mysql /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pidin which case the server will accept connections from any host. |