Bonjour,
Pour compléter le test en cours, la configuration décrite ici se compose de 2 nanopir1 à priori de même version de matériel (?, sauf que la seule certitude est un achat en une seule fois le même jour !).
Ces 2 équipements (
nanopir1-210 et
nanopir1-220) sont en Debian 10.9 à l'état de l'art, mais avec un noyau Debian pas tout à fait dans la même version comme le montre les logs suivants :
Code: Select all
ansible@nanopir1-210:~$ uname -a
Linux nanopir1-210 5.10.0-5-armmp-lpae #1 SMP Debian 5.10.24-1 (2021-03-19) armv7l GNU/Linux
ansible@nanopir1-210:~$ cat /etc/debian_version
10.9
ansible@nanopir1-210:~$
ansible@nanopir1-210:~$ dpkg -l |grep linux-image
ii linux-image-5.10.0-5-armmp-lpae 5.10.24-1 armhf Linux 5.10 for ARMv7 multiplatform compatible SoCs supporting LPAE
ii linux-image-armmp-lpae 5.10.24-1 armhf Linux for ARMv7 multiplatform compatible SoCs supporting LPAE (meta-package)
... et
Code: Select all
ansible@nanopir1-220:~$ uname -a
Linux nanopir1-220 5.10.0-0.bpo.4-armmp-lpae #1 SMP Debian 5.10.19-1~bpo10+1 (2021-03-13) armv7l GNU/Linux
ansible@nanopir1-220:~$ cat /etc/debian_version
10.9
ansible@nanopir1-220:~$ dpkg -l |grep linux-image
ii linux-image-5.10.0-0.bpo.4-armmp-lpae 5.10.19-1~bpo10+1 armhf Linux 5.10 for ARMv7 multiplatform compatible SoCs supporting LPAE
ii linux-image-armmp-lpae 5.10.19-1~bpo10+1 armhf Linux for ARMv7 multiplatform compatible SoCs supporting LPAE (meta-package)
ansible@nanopir1-220:~$
Les 2 équipements sont joignables par l'interface noté
LAN sur la sérigraphie. C'est important car visiblement, il s'agit ici d'un chip Ethernet totalement en service sur la série des noyaux Linux 4.x, ce qui n'est pas le cas du composant Ethernet de l'interface noté
WAN sur la sérigraphie.
Donc, afin de tester au mieux cette interface, j'ai connecté les 2 ports
WAN de chaque nanopir1 à travers un câble RJ45.
Enfin, chaque interface
WAN est identifiée au niveau du noyau sous le nom
et-wan avec une route statique comme suit :
Code: Select all
ansible@nanopir1-210:~$ ip route ls
192.168.22.0/24 dev et-serv proto kernel scope link src 192.168.22.49
192.168.25.0/24 dev et-admi proto kernel scope link src 192.168.25.49
192.168.253.0/24 dev et-wan proto kernel scope link src 192.168.253.1
ansible@nanopir1-210:~$
..et
Code: Select all
ansible@nanopir1-220:~$ ip route ls
192.168.22.0/24 dev et-serv proto kernel scope link src 192.168.22.65
192.168.25.0/24 dev et-admi proto kernel scope link src 192.168.25.65
192.168.253.0/24 dev et-wan proto kernel scope link src 192.168.253.2
ansible@nanopir1-220:~$
Pour terminer le scénario, quel que part sur le réseau, un serveur syslog-ng est en écoute de tous les flux de tous les équipements. Les logs peuvent être triés simplement par rapport à l'adresse source basé sur le nom DNS (on prendra donc ici les mots clés
nanopir1-210 et
nanopir1-220.
Sachant qu'un doute existe sur la gestion de l'interface (mode up/down), on ajoute un filtre permettant de ne regarder que les messages du noyau..
Le comportement attendu de ce test est que sur un débranchement puis rebranchement d'un coté quelconque du câble RJ45 connectant les 2 nanopir1, on s’attende donc à avoir un événement dans le noyau de déconnexion/reconnexion du link sur les équipements.
Ce qui donne un filtre du genre ....
Code: Select all
ansible@vm-syslog-295:~$ tail -f /var/log/syslog-ng/current_logs/BY_HOST.nanopir1-210-service.log /var/log/syslog-ng/current_logs/BY_HOST.nanopir1-220-service.log |grep kern
soit donc pour la déconnexion du câble RJ45 les logs suivants ....
Code: Select all
2021-04-09T13:45:06+02:00 s_dev_kernel_kmsg@nanopir1-210 kernel: 6,20027,159054662462,-;dwmac-sun8i 1c30000.ethernet et-wan: Link is Down
2021-04-09T13:45:06+02:00 s_dev_kernel_kmsg@nanopir1-220 kernel: 6,876,237197409970,-;dwmac-sun8i 1c30000.ethernet et-wan: Link is Down
.. et pour la reconnexion ....
Code: Select all
2021-04-09T13:45:15+02:00 s_dev_kernel_kmsg@nanopir1-220 kernel: 6,877,237206626414,-;dwmac-sun8i 1c30000.ethernet et-wan: Link is Up - 1Gbps/Full - flow control rx/tx
2021-04-09T13:45:16+02:00 s_dev_kernel_kmsg@nanopir1-210 kernel: 6,20028,159064902908,-;dwmac-sun8i 1c30000.ethernet et-wan: Link is Up - 1Gbps/Full - flow control rx/tx
..donc tout est parfait ....mais ..
Code: Select all
ansible@nanopir1-210:~$ sudo ping 192.168.253.2
PING 192.168.253.2 (192.168.253.2) 56(84) bytes of data.
From 192.168.253.1 icmp_seq=1 Destination Host Unreachable
From 192.168.253.1 icmp_seq=2 Destination Host Unreachable
ce qui est confirmé par ....
Code: Select all
ansible@nanopir1-210:~$ sudo arp -a |grep et-wan
? (192.168.253.2) at <incomplete> on et-wan
ansible@nanopir1-210:~$
..et ..
Code: Select all
ansible@nanopir1-210:~$ sudo sysctl -a |grep et-wan |grep -v ipv6
[net.ipv4.conf.et-wan.accept_local = 0
net.ipv4.conf.et-wan.accept_redirects = 1
net.ipv4.conf.et-wan.accept_source_route = 0
net.ipv4.conf.et-wan.arp_accept = 0
net.ipv4.conf.et-wan.arp_announce = 0
net.ipv4.conf.et-wan.arp_filter = 0
net.ipv4.conf.et-wan.arp_ignore = 0
net.ipv4.conf.et-wan.arp_notify = 0
net.ipv4.conf.et-wan.bc_forwarding = 0
net.ipv4.conf.et-wan.bootp_relay = 0
net.ipv4.conf.et-wan.disable_policy = 0
net.ipv4.conf.et-wan.disable_xfrm = 0
net.ipv4.conf.et-wan.drop_gratuitous_arp = 0
net.ipv4.conf.et-wan.drop_unicast_in_l2_multicast = 0
net.ipv4.conf.et-wan.force_igmp_version = 0
net.ipv4.conf.et-wan.forwarding = 1
net.ipv4.conf.et-wan.igmpv2_unsolicited_report_interval = 10000
net.ipv4.conf.et-wan.igmpv3_unsolicited_report_interval = 1000
net.ipv4.conf.et-wan.ignore_routes_with_linkdown = 0
net.ipv4.conf.et-wan.log_martians = 0
net.ipv4.conf.et-wan.mc_forwarding = 0
net.ipv4.conf.et-wan.medium_id = 0
net.ipv4.conf.et-wan.promote_secondaries = 0
net.ipv4.conf.et-wan.proxy_arp = 0
net.ipv4.conf.et-wan.proxy_arp_pvlan = 0
net.ipv4.conf.et-wan.route_localnet = 0
net.ipv4.conf.et-wan.rp_filter = 1
net.ipv4.conf.et-wan.secure_redirects = 1
net.ipv4.conf.et-wan.send_redirects = 1
net.ipv4.conf.et-wan.shared_media = 1
net.ipv4.conf.et-wan.src_valid_mark = 0
net.ipv4.conf.et-wan.tag = 0
net.ipv4.conf.et-wan/9.accept_local = 0
net.ipv4.conf.et-wan/9.accept_redirects = 1
net.ipv4.conf.et-wan/9.accept_source_route = 0
net.ipv4.conf.et-wan/9.arp_accept = 0
net.ipv4.conf.et-wan/9.arp_announce = 0
net.ipv4.conf.et-wan/9.arp_filter = 0
net.ipv4.conf.et-wan/9.arp_ignore = 0
net.ipv4.conf.et-wan/9.arp_notify = 0
net.ipv4.conf.et-wan/9.bc_forwarding = 0
net.ipv4.conf.et-wan/9.bootp_relay = 0
net.ipv4.conf.et-wan/9.disable_policy = 0
net.ipv4.conf.et-wan/9.disable_xfrm = 0
net.ipv4.conf.et-wan/9.drop_gratuitous_arp = 0
net.ipv4.conf.et-wan/9.drop_unicast_in_l2_multicast = 0
net.ipv4.conf.et-wan/9.force_igmp_version = 0
net.ipv4.conf.et-wan/9.forwarding = 1
net.ipv4.conf.et-wan/9.igmpv2_unsolicited_report_interval = 10000
net.ipv4.conf.et-wan/9.igmpv3_unsolicited_report_interval = 1000
net.ipv4.conf.et-wan/9.ignore_routes_with_linkdown = 0
net.ipv4.conf.et-wan/9.log_martians = 0
net.ipv4.conf.et-wan/9.mc_forwarding = 0
net.ipv4.conf.et-wan/9.medium_id = 0
net.ipv4.conf.et-wan/9.promote_secondaries = 0
net.ipv4.conf.et-wan/9.proxy_arp = 0
net.ipv4.conf.et-wan/9.proxy_arp_pvlan = 0
net.ipv4.conf.et-wan/9.route_localnet = 0
net.ipv4.conf.et-wan/9.rp_filter = 1
net.ipv4.conf.et-wan/9.secure_redirects = 1
net.ipv4.conf.et-wan/9.send_redirects = 1
net.ipv4.conf.et-wan/9.shared_media = 1
net.ipv4.conf.et-wan/9.src_valid_mark = 0
net.ipv4.conf.et-wan/9.tag = 0
net.ipv4.neigh.et-wan.anycast_delay = 100
net.ipv4.neigh.et-wan.app_solicit = 0
net.ipv4.neigh.et-wan.base_reachable_time_ms = 30000
net.ipv4.neigh.et-wan.delay_first_probe_time = 5
net.ipv4.neigh.et-wan.gc_stale_time = 60
net.ipv4.neigh.et-wan.locktime = 100
net.ipv4.neigh.et-wan.mcast_resolicit = 0
net.ipv4.neigh.et-wan.mcast_solicit = 3
net.ipv4.neigh.et-wan.proxy_delay = 80
net.ipv4.neigh.et-wan.proxy_qlen = 64
net.ipv4.neigh.et-wan.retrans_time_ms = 1000
net.ipv4.neigh.et-wan.ucast_solicit = 3
net.ipv4.neigh.et-wan.unres_qlen = 91
net.ipv4.neigh.et-wan.unres_qlen_bytes = 180224
net.ipv4.neigh.et-wan/9.anycast_delay = 100
net.ipv4.neigh.et-wan/9.app_solicit = 0
net.ipv4.neigh.et-wan/9.base_reachable_time_ms = 30000
net.ipv4.neigh.et-wan/9.delay_first_probe_time = 5
net.ipv4.neigh.et-wan/9.gc_stale_time = 60
net.ipv4.neigh.et-wan/9.locktime = 100
net.ipv4.neigh.et-wan/9.mcast_resolicit = 0
net.ipv4.neigh.et-wan/9.mcast_solicit = 3
net.ipv4.neigh.et-wan/9.proxy_delay = 80
net.ipv4.neigh.et-wan/9.proxy_qlen = 64
net.ipv4.neigh.et-wan/9.ucast_solicit = 3
net.ipv4.neigh.et-wan/9.unres_qlen = 91
net.ipv4.neigh.et-wan/9.unres_qlen_bytes = 180224
ansible@nanopir1-210:~$
Il manque donc qllq chose ...
