[Bug 188990] [xen] dhclient(8) does not accept DHCP Offer on FreeBSD 10 as Xen DomU Guest
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 15 Jan 2024 11:27:16 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188990 --- Comment #33 from mario felicioni <marietto2008@gmail.com> --- This is the script that I use when I boot the debian vm under xen : name="debian" kernel = '/mnt/zroot2/zroot2/OS/Chromebook/linux-xen/domU-linux/zImage-6.1.59-stb-xen-cbe+' memory=512 vcpus=1 autoballon="on" disk = [ 'debian.img,raw,xvda,w' ] vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncdisplay=1' ] vif = [ 'type=vif,mac=00:16:3e:xx:xx:xx,script=vif-route-local,ip=192.168.1.14' ] extra = 'console=hvc0 root=/dev/xvda rw init=/sbin/init xen-fbfront.video=24,1024,768' This is the script that's invoked when I launch the vm : #!/bin/bash #============================================================================ # ${XEN_SCRIPT_DIR}/vif-route # # Script for configuring a vif in routed mode. # # Usage: # vif-route (add|remove|online|offline) # # Environment vars: # dev vif interface name (required). # XENBUS_PATH path to this device's details in the XenStore (required). # # Read from the store: # ip list of IP networks for the vif, space-separated (default given in # this script). #============================================================================ dir=$(dirname "$0") . "${dir}/vif-common.sh" netdev=enx8cae4cd6c871 main_ip=$(dom0_ip) case "${command}" in add|online) echo $dev echo $ip echo $main_ip ifconfig ${dev} ${main_ip} netmask 255.255.255.255 up echo 1 >/proc/sys/net/ipv4/conf/${dev}/proxy_arp echo 1 >/proc/sys/net/ipv4/conf/${dev}/forwarding echo 1 >/proc/sys/net/ipv4/conf/enx8cae4cd6c871/forwarding echo 1 >/proc/sys/net/ipv4/conf/enx8cae4cd6c871/proxy_arp /usr/sbin/arp -i enx8cae4cd6c871 -Ds $ip enx8cae4cd6c871 pub echo "/usr/sbin/arp -i enx8cae4cd6c871 -Ds $ip enx8cae4cd6c871 pub" ipcmd='add' cmdprefix='' ;; remove|offline) do_without_error ifdown ${dev} ipcmd='del' cmdprefix='do_without_error' ;; esac case "${type_if}" in tap) metric=1 ;; vif) metric=2 ;; *) fatal "Unrecognised interface type ${type_if}" ;; esac # If we've been given a list of IP addresses, then add routes from dom0 to # the guest using those addresses. for addr in ${ip} ; do ${cmdprefix} ip route ${ipcmd} ${addr} dev ${dev} src ${main_ip} metric ${metric} done handle_iptable call_hooks vif post log debug "Successful vif-route ${command} for ${dev}." if [ "${command}" = "online" ] then success fi this line : echo "/usr/sbin/arp -i enx8cae4cd6c871 -Ds $ip enx8cae4cd6c871 pub" it seems wrong,but I don't understand how to fix it. $ip should be 192.168.1.14 and it takes it from here : vif = [ 'type=vif,mac=00:16:3e:xx:xx:xx,script=vif-route-local,ip=192.168.1.14' ] so basically it assign to the network interface called "enx8cae4cd6c871" (that's on the host os (devuan) IP 192.168.1.14 ; it's a share that this does not happen. There is something wrong. I think 192.168.1.14 should be assigned to the vif network interface ? If it works like this,this does not haopens,because both the interfaces came out with IP 1.3 : enx8cae4cd6c871: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.3 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::e475:9ea5:4deb:e9e6 prefixlen 64 scopeid 0x20<link> ether 8c:ae:4c:d6:c8:71 txqueuelen 1000 (Ethernet) RX packets 349834 bytes 476244626 (454.1 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 81291 bytes 22926191 (21.8 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 4307 bytes 1590600 (1.5 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 4307 bytes 1590600 (1.5 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 mlan0: flags=-28669<UP,BROADCAST,MULTICAST,DYNAMIC> mtu 1500 ether 06:7e:6c:db:b5:f6 txqueuelen 1000 (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 vif9.0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.3 netmask 255.255.255.255 broadcast 192.168.1.255 ether fe:ff:ff:ff:ff:ff txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2 bytes 286 (286.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 -- You are receiving this mail because: You are the assignee for the bug.