It does not care anymore. The instructions on the website are working. It's
me that I totally forgot to add the IP on the VIF statement of the
debian.cfg file. As soon as I added it and I changed $main_ip with $ip on
the vip-route-local,the network started working like a charm.
To work the vif-route script should be modified like this :
netdev=mlan0
main_ip=$(dom0_ip)
case "${command}" in add|online)
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/mlan0/forwarding
echo 1 >/proc/sys/net/ipv4/conf/mlan0/proxy_arp /usr/sbin/arp -i mlan0 -Ds
Thanks anyway.
On Sun, Nov 19, 2023 at 10:56 PM Mario Marietto <[email protected]>
wrote:
> Errata corrige :
>
> nano debian.cfg :
>
> kernel = '/Dati/xen/kernels/zImage-6.1.61-stb-xen-cbe+'
> memory = '768'
> name = 'Debian-bookworm'
> vcpus = '1'
> disk = [ '/Dati/xen/debian.img,,xvda,w' ]
> vif = [ 'type=vif,mac=00:16:3e:12:34:56,script=vif-route-*local*' ]
> extra = 'console=hvc0 root=/dev/xvda rw init=/sbin/init
> xen-fbfront.video=24,1024,768'
>
> On Sun, Nov 19, 2023 at 10:54 PM Mario Marietto <[email protected]>
> wrote:
>
>> Hello.
>>
>> I'm trying to configure Debian 12 / DomU on my (Arm32) Chromebook because
>> I want to use the Internet and I want its IP address to be seen from
>> "outside" of my LAN.
>>
>> This is the tutorial that I'm following :
>>
>>
>>
>> https://github.com/mobile-virt/u-boot-chromebook-xe303c12/tree/chromebook/xen#starting-a-domu-guest
>>
>> Given these config files :
>>
>>
>> A) on the host os (Devuan 5)
>>
>> Linux devuan-bunsen 6.1.61-stb-xen-cbe+ #1 SMP PREEMPT Sat Nov 4
>> 13:46:17 EDT 2023 armv7l
>>
>> root@devuan-bunsen:~# ifconfig
>>
>> 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 2729 bytes 8279984 (7.8 MiB)
>> RX errors 0 dropped 0 overruns 0 frame 0
>> TX packets 2729 bytes 8279984 (7.8 MiB)
>> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
>>
>> mlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
>> inet 192.168.1.7 netmask 255.255.255.0 broadcast 192.168.1.255
>> inet6 fe80::8839:239b:9b37:cf84 prefixlen 64 scopeid 0x20<link>
>> RX packets 19694 bytes 2193230 (2.0 MiB)
>> RX errors 0 dropped 0 overruns 0 frame 0
>> TX packets 18757 bytes 10464406 (9.9 MiB)
>> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
>>
>> vif4.0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
>> inet 192.168.1.7 netmask 255.255.255.255 broadcast 192.168.1.255
>> ether fe:ff:ff:ff:ff:ff txqueuelen 1000 (Ethernet)
>> RX packets 359 bytes 94924 (92.6 KiB)
>> RX errors 0 dropped 0 overruns 0 frame 0
>> TX packets 42 bytes 1764 (1.7 KiB)
>> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
>>
>> nano debian.cfg :
>>
>> kernel = '/Dati/xen/kernels/zImage-6.1.61-stb-xen-cbe+'
>> memory = '768'
>> name = 'Debian-bookworm'
>> vcpus = '1'
>> disk = [ '/Dati/xen/debian.img,,xvda,w' ]
>> vif = [ 'type=vif,mac=00:16:3e:12:34:56,script=vif-route' ]
>> extra = 'console=hvc0 root=/dev/xvda rw init=/sbin/init
>> xen-fbfront.video=24,1024,768'
>>
>>
>> nano /etc/xen/scripts/vif-route-local :
>>
>> #!/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=$(mlan0)
>> 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/mlan0/forwarding
>> echo 1 >/proc/sys/net/ipv4/conf/mlan0/proxy_arp
>> /usr/sbin/arp -i mlan0 -Ds $main_ip mlan0 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
>>
>>
>> B) on the guest os (Debian 12)
>>
>>
>> /etc/network/interfaces :
>>
>> source /etc/network/interfaces.d/*
>> iface enX0 inet static
>> address 192.168.1.10/24
>> gateway 192.168.1.7
>>
>> /etc/resolv.conf :
>>
>> options edns0 trust-ad
>> search homenet.telecomitalia.it
>> nameserver 8.8.8.8
>>
>>
>> this is what happens within the guest os (Debian 12) :
>>
>>
>> root@bookworm:~# ifup enX0
>>
>> root@bookworm:~# ip a
>>
>> 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
>> inet6 ::1/128 scope host noprefixroute
>> valid_lft forever preferred_lft forever
>>
>> 2: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen
>> 1000
>> link/sit 0.0.0.0 brd 0.0.0.0
>>
>> 3: enX0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc
>> pfifo_fast state UP group default
>> qlen 1000
>> link/ether 00:16:3e:12:34:56 brd ff:ff:ff:ff:ff:ff
>> inet 192.168.1.10/24 brd 192.168.1.255 scope global enX0
>> valid_lft forever preferred_lft forever
>> inet6 fe80::216:3eff:fe12:3456/64 scope link
>> valid_lft forever preferred_lft forever
>>
>> root@bookworm:~# ping google.it
>> ping: google.it: Temporary failure in name resolution
>>
>>
>> Where can be the error ? thanks.
>>
>> --
>> Mario.
>>
>
>
> --
> Mario.
>
--
Mario.