Created
December 4, 2018 19:21
-
-
Save YuriFontella/16a59e25c70ff29cf1173d345ad98b68 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@arch-docker ~]# ifconfig eth0 | |
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 | |
inet 192.168.253.51 netmask 255.255.255.0 broadcast 192.168.253.255 | |
inet6 fe80::20c:29ff:fe9d:efba prefixlen 64 scopeid 0x20<link> | |
ether 00:0c:29:9d:ef:ba txqueuelen 1000 (Ethernet) | |
RX packets 6936 bytes 610237 (595.9 KiB) | |
RX errors 0 dropped 0 overruns 0 frame 0 | |
TX packets 3872 bytes 483731 (472.3 KiB) | |
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | |
[root@arch-docker ~]# route -n | |
Kernel IP routing table | |
Destination Gateway Genmask Flags Metric Ref Use Iface | |
0.0.0.0 192.168.253.1 0.0.0.0 UG 0 0 0 eth0 | |
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0 | |
192.168.253.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 | |
[root@arch-docker ~]# docker network create --subnet=192.168.253.0/24 --gateway=192.168.253.1 metro-network | |
d2972a08903a8d678effeeb61626e961c96c02da77b07395bab863ea97f7628d | |
[root@arch-docker ~]# docker run --net=metro-network --ip=192.168.253.52 -itd --name=librenms librenms | |
b9feb27bcbfca92b29804256a413f3152f07e20b9f626de26b5c2bfbd6232f7c | |
[root@arch-docker ~]# docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
b9feb27bcbfc librenms "/bin/bash" 7 seconds ago Up 5 seconds 80/tcp librenms | |
[root@arch-docker ~]# docker attach b9 | |
root@b9feb27bcbfc:/# ip addr | |
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 | |
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 | |
inet 127.0.0.1/8 scope host lo | |
valid_lft forever preferred_lft forever | |
30: eth0@if31: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default | |
link/ether 02:42:c0:a8:fd:34 brd ff:ff:ff:ff:ff:ff link-netnsid 0 | |
inet 192.168.253.52/24 brd 192.168.253.255 scope global eth0 | |
valid_lft forever preferred_lft forever | |
root@b9feb27bcbfc:/# read escape sequence | |
[root@arch-docker ~]# ping 192.168.253.52 | |
PING 192.168.253.52 (192.168.253.52) 56(84) bytes of data. | |
From 192.168.253.51 icmp_seq=1 Destination Host Unreachable | |
From 192.168.253.51 icmp_seq=2 Destination Host Unreachable | |
From 192.168.253.51 icmp_seq=3 Destination Host Unreachable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment