Deutsch English Français Italiano |
<sl8j0j$uol$2@shakotay.alphanet.ch> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.net!news.imp.ch!news.alphanet.ch!alphanet.ch!.POSTED.localhost!not-for-mail From: Marc SCHAEFER <schaefer@alphanet.ch> Newsgroups: fr.comp.reseaux.ip Subject: Re: =?ISO-8859-1?Q?D=E9couvrir?= l'adresse IP d'une autre machine Supersedes: <sl8iu5$uol$1@shakotay.alphanet.ch> Date: Tue, 26 Oct 2021 09:50:11 -0000 (UTC) Organization: Posted through ALPHANET (https://news.alphanet.ch/) Message-ID: <sl8j0j$uol$2@shakotay.alphanet.ch> References: <slrnsl465s.163kj.lulu042@valentino.Rock-n-Roll.org> <6152cdf7$0$3688$426a74cc@news.free.fr> <slrnsn0m25.fsn3.lulu042@valentino.Rock-n-Roll.org> <skps16$2df5$1@cabale.usenet-fr.net> <slrnsn4smg.35l.dyrmak@quelite.terre> <sktsa9$h4n$1@shakotay.alphanet.ch> <slrnsnf8tr.3j6.dyrmak@quelite.terre> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 26 Oct 2021 09:50:11 -0000 (UTC) Injection-Info: shakotay.alphanet.ch; posting-host="localhost:127.0.0.1"; logging-data="31509"; mail-complaints-to="usenet@alphanet.ch" User-Agent: tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (Linux/4.19.0-18-amd64 (x86_64)) Cancel-Key: sha256:bHDbGlS5gCGqkLSCclMOuB1No2v/En6l/BzTFospqlo= Cancel-Lock: sha256:QEIHG+pRNTXm6iW8HHl/7mF1MqwTJe4GQWbaMhUdHD4= Bytes: 3448 Lines: 43 dyrmak <dyrmak@quelite.terre.invalid> wrote: > sur une interface je dirais plutôt d'accord, mais il me semble > qu'elles sont obligées de respecter le plan d'adressage de la Box, > si la Box ne reconnaît pas l'adresse elle va tenter > de la router par defaut ? En supposant que la box est un routeur couche 3, mais, avant cela, un switch couche 2, le sous-réseau disjoint de celui géré par la box en DHCP sera commuté en couche 2, la fonction routeur ne sera alors pas impliqué pour un échange entre deux machines reliées par un switch. Il faudrait déjà que la box ait un firewall couche 2 (style ebtables) pour empêcher ce cas de figure. Bien sûr qu'avec ces adresses-là, on ne pourra pas sortir du sous-réseau, mais normalement la pile IP émettrice devrait choisir l'adresse IP de l'interface qui a une route par défaut. Exemple ici: root@reliand:~# ip addr show 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 9c:8e:99:3c:55:23 brd ff:ff:ff:ff:ff:ff inet 192.168.1.30/24 brd 192.168.1.255 scope global dynamic eth0 valid_lft 10616sec preferred_lft 10616sec root@reliand:~# ip addr add 192.168.250.42/24 dev eth0 # on peut toujours sortir avec la route par défaut et l'adresse IP # de cette interface root@reliand:~# ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=116 time=17.3 ms ^C root@reliand-term1:~# ping 192.168.250.43 root@reliand-term2:~# tcpdump -i eth0 -n 'icmp||arp' tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes 11:47:42.043626 ARP, Request who-has 192.168.250.43 tell 192.168.250.42, length 28 S'il y avait quelqu'un avec l'IP 192.168.250.43, il aurait répondu au ARP couche 2, puis ma machine aurait pu encapsuler une trame couche 2 Ethernet contenant un IP ICMP ECHO REPLY qui aurait été acheminée par le switch.