View previous topic :: View next topic |
Author |
Message |
username63n n00b
Joined: 22 May 2018 Posts: 15
|
Posted: Mon Jan 21, 2019 1:29 am Post subject: [SOLVED] Network does not work after boot |
|
|
My setup is following:
Xen hypervisor with gentoo Dom0 and Windows hvm guest.
I tried to set up network bridge to share connection to windows host. However after reboot the situation is that both br0 and eth0 has the same ip address and network does not work. (cannot even ping inside my lan). However if /etc/init.d/net.br0 is manually run after the boot, everything is fine. First there was a problem when my primary/only network adapter kept changing its device name between reboots. Sometimes it was enp6s0 and sometimes enp7s0. I fixed this by setting
in xen.cfg (booting via efiboot without a separate bootloader).
There is links in default runlevel to net.eth0 and net.br0 but i tried also removing the former. That has no effect on anything. Here is my /etc/conf.d/net file
Code: |
# Use dhcpcd and ifconfig as default tools
modules="dhcpcd ifconfig"
# Do not configure eth0 yet
config_eth0="null"
# Eth0 does not provide net service.
rc_net_eth0_provide="!net"
# Create bridge br0
bridge_br0="eth0"
# Use dhcp (defined in module section)
config_br0="dhcp"
mac_br0="1c:87:2c:5e:9d:a6"
# setup bridge asap
bridge_forward_delay_br0=0
bridge_hello_time_br0=1000
bridge_stp_state_br0=0
# Add dependency
rc_net_br0_need="net.eth0"
|
I also tried without the options in section and without specifying the MAC address and without Quote: | rc_net_eth0_provide="!net" |
I tried different combinations of those options and i tried deleting eth0 from default runlevel. With some combinations the interfaces br0 and eth0 has different ip addresses after reboot (still did not even ping in local network).
However the situation should be that eth0 does not have ip at all and br0 does.
I used these references when configuring my network:
The first one tells to remove net.eth0 from boot runlevel. I dont have that but assume it is equivalent with sysinit runlevel. There is no any net.<if> links in that runlevel. It also tells to remove links in init.d/ which I dont understand because the bridge does not start without it. It also says that bridge-utils is deprecated and should not be used, but it is needed by xen-tools so I cant get rid of it. The first two of the references applies for bridging two networks rather than creating virtual one but I assume the same principles applies here as seen in the last reference.
ifconfig output when my bridge is working correctly (after manual start of net.br0) and windows hvm running:
Code: | br0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500
inet 192.168.1.114 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::ebd2:c288:b4f8:6051 prefixlen 64 scopeid 0x20<link>
ether 1c:87:2c:5e:9d:a6 txqueuelen 1000 (Ethernet)
RX packets 103442 bytes 85551392 (81.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 59348 bytes 3609579 (3.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::1e87:2cff:fe5e:9da6 prefixlen 64 scopeid 0x20<link>
ether 1c:87:2c:5e:9d:a6 txqueuelen 1000 (Ethernet)
RX packets 62398 bytes 81394931 (77.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 35729 bytes 3759610 (3.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 66 bytes 4756 (4.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 66 bytes 4756 (4.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vif1.0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether fe:ff:ff:ff:ff:ff txqueuelen 32 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vif1.0-emu: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.249.59 netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::712e:8b91:bee6:499 prefixlen 64 scopeid 0x20<link>
ether fe:ff:ff:ff:ff:ff txqueuelen 1000 (Ethernet)
RX packets 68824 bytes 7139681 (6.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 121115 bytes 84853912 (80.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
TL;DR:
I need to start net.br0 manually after reboot or the network does not work at all.
Any suggestions what could be wrong? Any help? Please ask if there is some further information needed. Thank you!
Last edited by username63n on Mon Jan 21, 2019 4:14 pm; edited 1 time in total |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Mon Jan 21, 2019 10:06 am Post subject: |
|
|
Hi,
did you add the bridge and your eth0 to your default runlevel?
Code: |
rc-update add net.br0 default
rc-update add net.eth0 default
|
greets, Stefan _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
username63n n00b
Joined: 22 May 2018 Posts: 15
|
Posted: Mon Jan 21, 2019 11:17 am Post subject: |
|
|
bbgermany wrote: | Hi,
did you add the bridge and your eth0 to your default runlevel?
Code: |
rc-update add net.br0 default
rc-update add net.eth0 default
|
greets, Stefan |
Yes i did.
Quote: |
There is links in default runlevel to net.eth0 and net.br0 but i tried also removing the former.
|
And indeed /etc/init.d/net.{eth0, br0} status reports "status: started" right after boot. |
|
Back to top |
|
|
username63n n00b
Joined: 22 May 2018 Posts: 15
|
Posted: Mon Jan 21, 2019 4:16 pm Post subject: |
|
|
So I disabled dhcpcd from default runlevel and now it boots fine. I assume there was some kind of conflict in the way that bridge was first set up and then dhcpcd fetches ip addresses for all interfaces (including eth0) regardless of the chonfig_eth0="null" in /etc/conf.d/net |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|