( makgab | 2021. 05. 08., szo – 09:06 )

Sajnos nem.

De hiába adok IP-t, a konténerben még csak nem is rendeli hozzá. :o

lxc.net.0.ipv4.address = 10.0.3.100/24
lxc.net.0.ipv4.gateway = 10.0.3.1

ip addr:

2: eth0@if8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:16:3e:5a:0e:a2 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::216:3eff:fe5a:ea2/64 scope link 
       valid_lft forever preferred_lft forever

# nem is megy a hálózat természetesen
~$ ping 8.8.8.8
ping: connect: A hálózat elérhetetlen

 

lxc-net:

 

lxc-net.service - LXC network bridge setup
     Loaded: loaded (/usr/lib/systemd/system/lxc-net.service; enabled; vendor preset: disabled)
     Active: active (exited) since Sat 2021-05-08 08:43:32 CEST; 20min ago
       Docs: man:lxc
   Main PID: 5899 (code=exited, status=0/SUCCESS)
      Tasks: 1 (limit: 6999)
     Memory: 2.0M
     CGroup: /system.slice/lxc-net.service
             └─6043 dnsmasq --conf-file=/etc/lxc/dnsmasq.conf -u dnsmasq --strict-order --bind-interfaces --pid-file=/run/lxc/dnsmasq.pid --listen-address 10.0.3.1 --dhcp-range 10.0.3.2,10.0.3.254 --dhcp-lease-max=253 --dhcp-no-override >

máj 08 08:43:32 fedora-nb systemd[1]: Starting LXC network bridge setup...
máj 08 08:43:32 fedora-nb dnsmasq[6043]: started, version 2.85 cachesize 150
máj 08 08:43:32 fedora-nb dnsmasq[6043]: compile time options: IPv6 GNU-getopt DBus no-UBus no-i18n IDN2 DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth cryptohash DNSSEC loop-detect inotify dumpfile
máj 08 08:43:32 fedora-nb dnsmasq-dhcp[6043]: DHCP, IP range 10.0.3.2 -- 10.0.3.254, lease time 1h
máj 08 08:43:32 fedora-nb dnsmasq-dhcp[6043]: DHCP, sockets bound exclusively to interface lxcbr0
máj 08 08:43:32 fedora-nb dnsmasq[6043]: reading /etc/resolv.conf
máj 08 08:43:32 fedora-nb dnsmasq[6043]: using nameserver 127.0.0.53#53
máj 08 08:43:32 fedora-nb dnsmasq[6043]: read /etc/hosts - 9 addresses
máj 08 08:43:32 fedora-nb systemd[1]: Finished LXC network bridge setup.