[Ninux-Wireless] rete mesh con gentoo e fonere, problemi con ipv6
Luca Postregna
luca.postregna a gmail.com
Mer 9 Maggio 2012 20:14:42 CEST
seguendo il consiglio di gioacchino, ora sul server ho la br0 connessa al
router domestico, mentre lato mesh ho semplicemente la bat0. ancora nessun
successo, queste alcune informazioni appena raccolte dal server (alla fine
un ping6 alla fonera connessa in ethernet)
redo:~
> ip -6 a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 fe80::250:fcff:fec0:d980/64 scope link
valid_lft forever preferred_lft forever
3: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 fe80::206:93ff:fe30:317/64 scope link
valid_lft forever preferred_lft forever
5: bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
inet6 2001:470:7023:2:0:f8d1:114b:2e50/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::fcd2:91ff:fed9:a5eb/64 scope link
valid_lft forever preferred_lft forever
6: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
inet6 2001:470:7023:1:0:f8d1:114b:2e50/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::206:93ff:fe30:317/64 scope link
valid_lft forever preferred_lft forever
7: tun: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qlen 500
inet6 2001:5c0:1400:a::701/128 scope global
valid_lft forever preferred_lft forever
9: vethT6Y51M: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 fe80::2406:aff:fee2:9f53/64 scope link
valid_lft forever preferred_lft forever
redo:~
> ip -6 r s
2001:470:7023:1::/64 dev br0 proto kernel metric 256
2001:470:7023:2::/64 dev bat0 proto kernel metric 256
2001:5c0:1400:a::701 dev tun proto kernel metric 256 mtu 1280 rtt 4ms
rttvar 6ms cwnd 10
2000::/3 dev tun metric 1
fe80::/64 dev eth1 proto kernel metric 256
fe80::/64 dev bat0 proto kernel metric 256
fe80::/64 dev eth0 proto kernel metric 256
fe80::/64 dev br0 proto kernel metric 256
fe80::/64 dev tun proto kernel metric 256
fe80::/64 dev vethT6Y51M proto kernel metric 256
ff00::/8 dev eth1 metric 256
ff00::/8 dev bat0 metric 256
ff00::/8 dev eth0 metric 256
ff00::/8 dev br0 metric 256
ff00::/8 dev tun metric 256
ff00::/8 dev vethT6Y51M metric 256
default dev tun metric 1
redo:~
> batctl o
[B.A.T.M.A.N. adv 2012.1.0, MainIF/MAC: eth1/00:50:fc:c0:d9:80 (bat0)]
Originator last-seen (#/255) Nexthop [outgoingIF]:
Potential nexthops ...
06:18:84:d0:80:bd 0.569s (245) 00:18:84:d0:55:9c [ eth1]:
00:18:84:d0:55:9c (245)
00:18:84:d0:55:9c 0.479s (255) 00:18:84:d0:55:9c [ eth1]:
00:18:84:d0:55:9c (255)
06:18:84:d0:55:9d 0.789s (255) 00:18:84:d0:55:9c [ eth1]:
00:18:84:d0:55:9c (255)
redo:~
> batctl if
eth1: active
redo:~
> ping6 -c 3 2001:470:7023:2:0:18:84d0:559c -I bat0
PING 2001:470:7023:2:0:18:84d0:559c(2001:470:7023:2:0:18:84d0:559c) 56 data
bytes
>From 2001:470:7023:2:0:f8d1:114b:2e50 icmp_seq=1 Destination unreachable:
Address unreachable
>From 2001:470:7023:2:0:f8d1:114b:2e50 icmp_seq=2 Destination unreachable:
Address unreachable
>From 2001:470:7023:2:0:f8d1:114b:2e50 icmp_seq=3 Destination unreachable:
Address unreachable
--- 2001:470:7023:2:0:18:84d0:559c ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 1999ms
dalla mia nubbiaggine penso che ci siano dei problemi di routing, ma se
fossero non capisco quali.
2012/5/9 Gioacchino Mazzurco <gmazzurco89 a gmail.com>
> Non sono mai riuscito a far funzionare il bridging con bat0 su SO
> diversi da openwrt
>
> On 05/09/12 19:04, Luca Postregna wrote:
> > Salve,
> > sto cercando di configurare una piccola rete mesh, chissà forse in
> > futuro entrerà a far parte di ninux, ma per ora ancora non funziona.
> >
> > Al momento ho a disposizione un server/gateway gentoo ed una coppia di
> > fonera2.0g con openwrt. Per il routing utilizzo batman-adv 2012.1
> > (installato su tutti i nodi)e per ora vorrei basare il network dei nodi
> > e tutta la rete solo su ipv6 (se in futuro avrò la necessità
> > probabilmente fornirò ipv4 ai client via vpn con tinc). A tutti i nodi
> > gli ipv6 nella 2001:470:7023:2::/64 sono assegnati staticamente.
> >
> > Questo è un disegno esplicitativo http://ompldr.org/vZG9rYQ della
> > seguente configurazione,
> >
> > *1*. il server con due interfaccie di rete (br1 come wan e br2 per la
> > mesh, i bridge mi servono per eventuali macchine virtuali). Sul server
> > la br2 è creata a partire dalla bat0. Sul server gentoo nel runlevel di
> > default ho net.br1, net.br2 e radvd (questo mi serve per assegnare gli
> > ipv6 ai client della mesh, oltre che ai client della rete domestica).
> >
> > Di seguito le configurazioni di /etc/conf.d/net:
> >
> > > cat /etc/conf.d/net
> > config_eth0="null"
> >
> > rc_need_br1="net.eth0"
> >
> > brctl_br1="setfd 0"
> > bridge_br1="eth0"
> > config_br1="192.168.1.20/24 <http://192.168.1.20/24>
> > 2001:470:7023:1::f8d1:114b:2e50/64"
> > routes_br1="default via 192.168.1.1"
> > dns_servers_br1="192.168.1.1 8.8.8.8"
> >
> > brctl_br2="setfd 0"
> > bridge_br2="bat0"
> > config_br2="192.168.2.20/24 <http://192.168.2.20/24>"
> > config_br2="192.168.2.20/24 <http://192.168.2.20/24>
> > 2001:470:7023:2::f8d1:114b:2e50/64"
> >
> > preup (){
> > if test $IFACE == "br2"; then
> > modprobe batman-adv
> > ifconfig eth1 up
> > batctl if add eth1
> > fi
> > return 0
> > }
> >
> >
> > e di radvd.conf:
> >
> > > cat /etc/radvd.conf
> > interface br1
> > {
> > AdvLinkMTU 1452;
> > AdvSendAdvert on;
> > AdvManagedFlag off;
> > AdvOtherConfigFlag off;
> > prefix 2001:470:7023:1::/64
> > {
> > AdvOnLink on;
> > AdvAutonomous on;
> > AdvRouterAddr off;
> > };
> > };
> >
> > interface br2
> > {
> > AdvLinkMTU 1452;
> > AdvSendAdvert on;
> > AdvManagedFlag off;
> > AdvOtherConfigFlag off;
> > prefix 2001:470:7023:2::/64
> > {
> > AdvOnLink on;
> > AdvAutonomous on;
> > AdvRouterAddr off;
> > };
> > };
> >
> > quindi lo stato della rete ipv6 sul server:
> >
> > > ip -6 a s
> > 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436
> > inet6 ::1/128 scope host
> > valid_lft forever preferred_lft forever
> > 2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
> > inet6 fe80::250:fcff:fec0:d980/64 scope link
> > valid_lft forever preferred_lft forever
> > 3: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qlen 1000
> > inet6 fe80::206:93ff:fe30:317/64 scope link
> > valid_lft forever preferred_lft forever
> > 5: br1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
> > inet6 2001:470:7023:1:0:f8d1:114b:2e50/64 scope global
> > valid_lft forever preferred_lft forever
> > inet6 fe80::206:93ff:fe30:317/64 scope link
> > valid_lft forever preferred_lft forever
> > 6: bat0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500
> > inet6 fe80::885b:46ff:fe22:2874/64 scope link
> > valid_lft forever preferred_lft forever
> > 7: br2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
> > inet6 2001:470:7023:2:0:f8d1:114b:2e50/64 scope global
> > valid_lft forever preferred_lft forever
> > inet6 fe80::885b:46ff:fe22:2874/64 scope link
> > valid_lft forever preferred_lft forever
> > 8: tun: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qlen 500
> > inet6 2001:5c0:1400:a::51/128 scope global
> > valid_lft forever preferred_lft forever
> >
> >
> >
> > > ip -6 r s
> > 2001:470:7023:1::/64 dev br1 proto kernel metric 256
> > 2001:470:7023:2::/64 dev br2 proto kernel metric 256
> > 2001:5c0:1400:a::51 dev tun proto kernel metric 256 mtu 1280
> > 2000::/3 dev tun metric 1
> > fe80::/64 dev eth0 proto kernel metric 256
> > fe80::/64 dev br1 proto kernel metric 256
> > fe80::/64 dev eth1 proto kernel metric 256
> > fe80::/64 dev bat0 proto kernel metric 256
> > fe80::/64 dev br2 proto kernel metric 256
> > fe80::/64 dev tun proto kernel metric 256
> > ff00::/8 dev eth0 metric 256
> > ff00::/8 dev br1 metric 256
> > ff00::/8 dev eth1 metric 256
> > ff00::/8 dev bat0 metric 256
> > ff00::/8 dev br2 metric 256
> > ff00::/8 dev tun metric 256
> > default dev tun metric 1
> >
> >
> > *2*. entrambe le fonera hanno la stessa configurazione: due interfaccie
> > wifi ap0 ed adhoc0. adhoc0 e eth0.2 sono in pasto a batman-adv e mi
> > fanno la bat0. ap0, eth0.1, e bat0 mi fanno al br-lan. I file di
> > configurazione delle due fonera sono identici. Di seguito i dati presi
> > dalla fonA connessa in ethernet al server gentoo:
> >
> > root a drei:~# cat /etc/config/network
> > config 'interface' 'loopback'
> > option 'ifname' 'lo'
> > option 'proto' 'static'
> > option 'ipaddr' '127.0.0.1'
> > option 'netmask' '255.0.0.0'
> >
> > config 'interface' 'lan'
> > option 'type' 'bridge'
> > option 'proto' 'none'
> > option 'accept_ra' '1'
> > option 'ifname' 'eth0.1'
> >
> > config 'interface' 'mesh0'
> > option 'ifname' 'adhoc0'
> > option 'mtu' '1528'
> > option 'proto' 'none'
> >
> > config 'interface' 'mesh1'
> > option 'ifname' 'eth0.2'
> > option 'proto' 'none'
> >
> >
> > root a drei:~# cat /etc/config/wireless
> > config wifi-device wifi0
> > option type atheros
> > option channel 11
> >
> > config wifi-iface
> > option device wifi0
> > option ifname ap0
> > option mode ap
> > option network lan
> > option ssid kozlicAP
> >
> > config wifi-iface
> > option device wifi0
> > option ifname adhoc0
> > option mode adhoc
> > option network mesh0
> > option ssid kozlicMESH
> >
> >
> > root a drei:~# cat /etc/config/batman-adv
> > config 'mesh' 'bat0'
> > option 'interfaces' 'mesh0 mesh1'
> > option 'aggregated_ogms'
> > option 'ap_isolation'
> > option 'bonding'
> > option 'fragmentation'
> > option 'gw_bandwidth'
> > option 'gw_mode' 'client'
> > option 'gw_sel_class'
> > option 'log_level'
> > option 'orig_interval'
> > option 'vis_mode'
> >
> >
> > root a drei:~# cat /etc/rc.local
> > #!/bin/sh
> >
> > IPV6PREFIX="2001:470:7023:2"
> > LAN="br-lan"
> >
> > IPV6=$IPV6PREFIX::$(cat /sys/class/net/eth0/address |awk -F: '{print
> > $1$2":"$3$4":"$5$6}')
> > echo $IPV6
> >
> > ip addr add $IPV6/64 dev $LAN
> > ip addr add 192.168.254.1/24 <http://192.168.254.1/24> dev $LAN
> >
> > batman-adv reload
> >
> > exit 0
> >
> >
> >
> > root a drei:~# ip -6 a s
> > 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436
> > inet6 ::1/128 scope host
> > valid_lft forever preferred_lft forever
> > 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
> > inet6 fe80::218:84ff:fed0:559c/64 scope link
> > valid_lft forever preferred_lft forever
> > 4: eth0.1 a eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
> > inet6 fe80::218:84ff:fed0:559c/64 scope link
> > valid_lft forever preferred_lft forever
> > 5: eth0.2 a eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
> > inet6 fe80::218:84ff:fed0:559c/64 scope link
> > valid_lft forever preferred_lft forever
> > 6: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
> > inet6 2001:470:7023:2:0:18:84d0:559c/64 scope global
> > valid_lft forever preferred_lft forever
> > inet6 fe80::218:84ff:fed0:559c/64 scope link
> > valid_lft forever preferred_lft forever
> > 8: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
> > inet6 fe80::218:84ff:fed0:559d/64 scope link
> > valid_lft forever preferred_lft forever
> > 9: adhoc0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1528
> > inet6 fe80::418:84ff:fed0:559d/64 scope link
> > valid_lft forever preferred_lft forever
> >
> >
> > root a drei:~# ip -6 r s
> > 2001:470:7023:2::/64 dev br-lan proto kernel metric 256 mtu 1500
> > advmss 1440 hoplimit 0
> > fe80::/64 dev eth0 proto kernel metric 256 mtu 1500 advmss 1440
> > hoplimit 0
> > fe80::/64 dev eth0.1 proto kernel metric 256 mtu 1500 advmss 1440
> > hoplimit 0
> > fe80::/64 dev br-lan proto kernel metric 256 mtu 1500 advmss 1440
> > hoplimit 0
> > fe80::/64 dev eth0.2 proto kernel metric 256 mtu 1500 advmss 1440
> > hoplimit 0
> > fe80::/64 dev ap0 proto kernel metric 256 mtu 1500 advmss 1440
> > hoplimit 0
> > fe80::/64 dev adhoc0 proto kernel metric 256 mtu 1528 advmss 1468
> > hoplimit 0
> >
> >
> > Questa è la situazione di batman sul server:
> >
> > > batctl o
> > [B.A.T.M.A.N. adv 2012.1.0, MainIF/MAC: eth1/00:50:fc:c0:d9:80
> (bat0)]
> > Originator last-seen (#/255) Nexthop [outgoingIF]:
> > Potential nexthops ...
> > 06:18:84:d0:80:bd 0.393s (232) 00:18:84:d0:55:9c [ eth1]:
> > 00:18:84:d0:55:9c (232)
> > 00:18:84:d0:55:9c 0.373s (253) 00:18:84:d0:55:9c [ eth1]:
> > 00:18:84:d0:55:9c (253)
> > 06:18:84:d0:55:9d 0.342s (255) 00:18:84:d0:55:9c [ eth1]:
> > 00:18:84:d0:55:9c (255)
> >
> > Questo è batman sulla fonera connessa in ethernet al server:
> >
> > root a drei:~# batctl o
> > [B.A.T.M.A.N. adv 2012.1.0, MainIF/MAC: adhoc0/06:18:84:d0:55:9d
> (bat0)]
> > Originator last-seen (#/255) Nexthop [outgoingIF]:
> > Potential nexthops ...
> > 00:50:fc:c0:d9:80 0.260s (255) 00:50:fc:c0:d9:80 [ eth0.2]:
> > 00:50:fc:c0:d9:80 (255)
> > 06:18:84:d0:80:bd 0.280s (233) 06:18:84:d0:80:bd [ adhoc0]:
> > 06:18:84:d0:80:bd (233)
> >
> > Qual'è il problema? I nodi nella 2001:470:7023:2::/64 non si pingano!
> >
> > Ogni aiuto è apprezzato.
> >
> > Saluti,
> > LP
> >
> >
> >
> >
> >
> > --
> >
> > http://luca.postregna.name
> > Luca Postregna
> >
> >
> >
> > _______________________________________________
> > Wireless mailing list
> > Wireless a ml.ninux.org
> > http://ml.ninux.org/mailman/listinfo/wireless
>
--
http://luca.postregna.name
Luca Postregna
-------------- parte successiva --------------
Un allegato HTML è stato rimosso...
URL: <http://ml.ninux.org/pipermail/wireless/attachments/20120509/6b9a9110/attachment-0001.html>
Maggiori informazioni sulla lista
Wireless