Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 2024 11:27:16 +0000
From:      bugzilla-noreply@freebsd.org
To:        xen@FreeBSD.org
Subject:   [Bug 188990] [xen] dhclient(8) does not accept DHCP Offer on FreeBSD 10 as Xen DomU Guest
Message-ID:  <bug-188990-23905-DkCHduvs9X@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-188990-23905@https.bugs.freebsd.org/bugzilla/>
References:  <bug-188990-23905@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D188990

--- Comment #33 from mario felicioni <marietto2008@gmail.com> ---
This is the script that I use when I boot the debian vm under xen :

name=3D"debian"
kernel =3D
'/mnt/zroot2/zroot2/OS/Chromebook/linux-xen/domU-linux/zImage-6.1.59-stb-xe=
n-cbe+'
memory=3D512
vcpus=3D1
autoballon=3D"on"
disk =3D [ 'debian.img,raw,xvda,w' ]
vfb =3D [ 'type=3Dvnc,vnclisten=3D0.0.0.0,vncdisplay=3D1' ]
vif =3D [ 'type=3Dvif,mac=3D00:16:3e:xx:xx:xx,script=3Dvif-route-local,ip=
=3D192.168.1.14'
]
extra =3D 'console=3Dhvc0 root=3D/dev/xvda rw init=3D/sbin/init
xen-fbfront.video=3D24,1024,768'


This is the script that's invoked when I launch the vm :


#!/bin/bash
#=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
# ${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).
#=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D

dir=3D$(dirname "$0")
. "${dir}/vif-common.sh"
netdev=3Denx8cae4cd6c871
main_ip=3D$(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=3D'add'
cmdprefix=3D''
;;
remove|offline)
do_without_error ifdown ${dev}
ipcmd=3D'del'
cmdprefix=3D'do_without_error'
;;
esac

case "${type_if}" in
tap)
metric=3D1
;;
vif)
metric=3D2
;;
*)
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}" =3D "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 =3D [ 'type=3Dvif,mac=3D00:16:3e:xx:xx:xx,script=3Dvif-route-local,ip=
=3D192.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 do=
es
not happen. There is something wrong. I think 192.168.1.14 should be assign=
ed
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=3D4163<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=3D73<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=3D-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=3D4163<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

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-188990-23905-DkCHduvs9X>