IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Réseau Discussion :

Configuration pont ethernet wifi ad-hoc


Sujet :

Réseau

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2009
    Messages
    21
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2009
    Messages : 21
    Points : 14
    Points
    14
    Par défaut Configuration pont ethernet wifi ad-hoc
    Bonjour a tous,

    Je voudrais créer un pont Ethernet <> Wifi pour recevoir le flux tele de ma livebox sur pc.

    J'ai testé pas mal de choses mais je ne suis pas très experimenté en linux et je n'y arrive pas.

    Voici ce qui fonctionne: Television activée sur Port jaune RJ45
    Livebox|RJ45 port jaune ================== RJ45|Pc portable
    __Ip???___________________________192.168.0.xxx/255.255.255.0 pas de passerelle

    -----------------------------------------------------------------------------------------------------------

    Livebox|RJ45 port jaune ================ Eth0|Pc Linux |Eth1====================|Pc portable
    __Ip ?????________________________Bridge Br0 192.168.0.20/24____________________192.168.0.22/24
    Chose etonnante, je n'ai pas a mettre de passerelle dans la configuration pour obtenir le flux video!
    Je sais pas du tout comment agit la livebox lorsque le port jaune est configuré en Télé mais en tout cas il n'y a pas de dhcp sur ce port, toutes les ip doivent etres fixes.

    Maintenant voici ce que je voudrais faire.

    Livebox|RJ45 port jaune ================ Eth0|Pc Linux|Wlan0 Ad-hoc ))))))))))))))))Wifi ad-hoc |Pc portable
    J'ai essayé de créer un Bridge entre eth0 et Wlan0 mais ca ne fonctionne pas!
    Pour tester j'ai branché eth0 sur le port Internet de la livebox => le portable recois une ipmais ne peut rien pinguer ???

    J'ai donc chercher a faire fonctionner internet sur le portable en passant par le pc linux.. pour cela j'ai du activer le port forward et iptables.
    Ca fonctionne sans bridge et avec des ip de reseau différent du reseau de la livebox.

    Je me suis donc dit:"plus qu'à faire les memes manip en branchant sur le port jaune"... Helas non... je n'arrive pas a obtenir le flux video.

    Est ce que j'ai zappé quelquechose? je sais pas
    Est ce qu'il ya des infos qui circulent au travers d'un bridge mais qui ne passent pas entre mes interfaces ? J'ai fait cette commande pour que ca passe!
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    echo 1 > /proc/sys/net/ipv4/ip_forward
    iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 192.168.0.21
    Qu'est ce qui empeche mon portable de capter le flux video?

    Quelqu'un peut m'aider ? Svp je désespère!

  2. #2
    Membre actif Avatar de Balbuzard
    Profil pro
    Inscrit en
    Août 2008
    Messages
    381
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Août 2008
    Messages : 381
    Points : 263
    Points
    263
    Par défaut
    Salut,
    Pourrai-tu nous dire quelle est ta distribution Linux? Le contenu de ton fichier /etc/network/interfaces?
    ZORRO
    Plus Vengeur que Masqué

  3. #3
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2009
    Messages
    21
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2009
    Messages : 21
    Points : 14
    Points
    14
    Par défaut
    Salut balbuzard, merci de t'etre penché sur mon probleme

    Je suis sous Ubuntu tout juste sortie du four.

    mon /etc/network/interfaces est quaziment vide, en fait tout ce que j'ai testé c'est en tappant les commandes.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    auto lo
    iface lo inet loopback
    mais pour faire avancer le schmilblik je pense avoir compris quelque chose au sujet du port Jaune de la live box.

    Quand il est en mode télé. Il n'y a plus de dhcp sur ce port.
    et la livebox continue d'apprendre les mac et les ip des postes qui sont connectés sur ce port.

    Et cet apprentissage des postes connectés ne passe pas la translation d'ip que j'avais testé avec iptables.
    Donc ip tables c'est bon pour le routage de l'internet, mais pas bon pour regarder la télé.

    Il faudrai que j'arrive a faire un bridge Ethernet <> wifi.

    En utilisant bridge-utils deux interfaces reseau "eth0 braché sur le port Internet eth1 sur le portable" je fait les commandes suivantes:

    brctl addbr br0
    brctl addif br0 eth0
    brctl addif br0 eth1
    ifconfig br0 up
    dhclient br0
    ifconfig donne ca:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
     
    br0       Link encap:Ethernet  HWaddr 00:0e:a6:0c:2d:56      
              inet adr:192.168.1.24  Bcast:192.168.1.255  Masque:255.255.255.0
              adr inet6: fe80::20e:a6ff:fe0c:2d56/64 Scope:Lien
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Packets reçus:39 erreurs:0 :0 overruns:0 frame:0
              TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 lg file transmission:0
              Octets reçus:4019 (4.0 KB) Octets transmis:3857 (3.8 KB)
     
    eth0      Link encap:Ethernet  HWaddr 00:0e:a6:0c:2d:56
              inet adr:192.168.1.24  Bcast:192.168.1.255  Masque:255.255.255.0
              adr inet6: fe80::20e:a6ff:fe0c:2d56/64 Scope:Lien
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Packets reçus:1205 erreurs:0 :0 overruns:0 frame:0
              TX packets:1400 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 lg file transmission:1000
              Octets reçus:999685 (999.6 KB) Octets transmis:285662 (285.6 KB)
              Interruption:22 Adresse de base:0xe000
     
    eth1      Link encap:Ethernet  HWaddr 00:0e:a6:0c:2d:9a
              adr inet6: fe80::20e:a6ff:fe0c:2d9a/64 Scope:Lien
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Packets reçus:61 erreurs:0 :0 overruns:0 frame:0
              TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 lg file transmission:1000
              Octets reçus:9387 (9.3 KB) Octets transmis:9400 (9.4 KB)
              Interruption:17
     
    lo        Link encap:Boucle locale
              inet adr:127.0.0.1  Masque:255.0.0.0
              adr inet6: ::1/128 Scope:Hôte
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              Packets reçus:56 erreurs:0 :0 overruns:0 frame:0
              TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 lg file transmission:0
              Octets reçus:2800 (2.8 KB) Octets transmis:2800 (2.8 KB)
     
    wlan0     Link encap:Ethernet  HWaddr 00:17:3f:62:cc:6c
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              Packets reçus:0 erreurs:0 :0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 lg file transmission:1000
              Octets reçus:0 (0.0 B) Octets transmis:0 (0.0 B)
     
    wmaster0  Link encap:UNSPEC  HWaddr 00-17-3F-62-CC-6C-00-00-00-00-00-00-00-00-00-00
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Packets reçus:0 erreurs:0 :0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 lg file transmission:1000
              Octets reçus:0 (0.0 B) Octets transmis:0 (0.0 B)
    Le portable recois automatiquement la configuration ip depuis la livebox, et tout fonctionne! Internet OK ping de l'ip du pc linux OK.

    Et si je branche eth0 sur le port Jaune de la livebox,que je donne au pont une ip 192.168.0.xxx et au pc portable une autre ip 192.168.0.xxx j'arrive a obtenir la télé sur le portable!

    Mais je voudrai un bridge Ethernet <> wifi comme cet appareil! (http://www.ldlc.com/fiche/PB00019288.html que je pense de plus en plus a acheter )

    Je passe donc mon Wlan0 en ad-hoc:
    Ifconfig wlan0 down
    iwconfig wlan0 mode ad-hoc
    iwconfig wlan0 essid television
    ifconfig wlan0 up

    Puis je refait un bridge:
    brctl addbr br0
    brctl addif br0 eth0
    brctl addif br0 wlan0
    ifconfig br0 up
    dhclient br0

    ifconfig donne ca:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    br0       Link encap:Ethernet  HWaddr 00:0e:a6:0c:2d:56      
              inet adr:192.168.1.24  Bcast:192.168.1.255  Masque:255.255.255.0
              adr inet6: fe80::20e:a6ff:fe0c:2d56/64 Scope:Lien               
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1              
              Packets reçus:22 erreurs:0 :0 overruns:0 frame:0                
              TX packets:20 errors:0 dropped:0 overruns:0 carrier:0           
              collisions:0 lg file transmission:0                             
              Octets reçus:2796 (2.7 KB) Octets transmis:4199 (4.1 KB)        
     
    eth0      Link encap:Ethernet  HWaddr 00:0e:a6:0c:2d:56  
              inet adr:192.168.1.24  Bcast:192.168.1.255  Masque:255.255.255.0
              adr inet6: fe80::20e:a6ff:fe0c:2d56/64 Scope:Lien               
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1              
              Packets reçus:1238 erreurs:0 :0 overruns:0 frame:0              
              TX packets:1509 errors:0 dropped:0 overruns:0 carrier:0         
              collisions:0 lg file transmission:1000
              Octets reçus:1003381 (1.0 MB) Octets transmis:302882 (302.8 KB)
              Interruption:22 Adresse de base:0xe000
     
    eth1      Link encap:Ethernet  HWaddr 00:0e:a6:0c:2d:9a
              adr inet6: fe80::20e:a6ff:fe0c:2d9a/64 Scope:Lien
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              Packets reçus:129 erreurs:0 :0 overruns:0 frame:0
              TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 lg file transmission:1000
              Octets reçus:18631 (18.6 KB) Octets transmis:11716 (11.7 KB)
              Interruption:17
     
    lo        Link encap:Boucle locale
              inet adr:127.0.0.1  Masque:255.0.0.0
              adr inet6: ::1/128 Scope:Hôte
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              Packets reçus:66 erreurs:0 :0 overruns:0 frame:0
              TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 lg file transmission:0
              Octets reçus:3300 (3.3 KB) Octets transmis:3300 (3.3 KB)
     
    wlan0     Link encap:Ethernet  HWaddr 00:17:3f:62:cc:6c
              adr inet6: fe80::217:3fff:fe62:cc6c/64 Scope:Lien
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              Packets reçus:18 erreurs:0 :0 overruns:0 frame:0
              TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 lg file transmission:1000
              Octets reçus:2332 (2.3 KB) Octets transmis:4743 (4.7 KB)
     
    wmaster0  Link encap:UNSPEC  HWaddr 00-17-3F-62-CC-6C-63-36-00-00-00-00-00-00-00-00
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Packets reçus:0 erreurs:0 :0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 lg file transmission:1000
              Octets reçus:0 (0.0 B) Octets transmis:0 (0.0 B)
    Mais dans cette configuration:
    Le pc portable recois une ip par la livebox, (a travers le bridge) mais ne peut rien pinguer!
    Ile ne ping pas le pc linux. Et le pc linux ne ping pas la livebox!
    C'est pourtant les memes manip qu'au dessus sauf que c'est une liaison ad-hoc a la place d'une liaison ethernet!
    Le plus etonnant est que le pc portable recois une ip... Il ya donc des infos qui sont passées au travers du pont ethernet <> wifi...

    Je ne sais pas quoi faire...

    Merci de ton aide!

  4. #4
    Membre actif Avatar de Balbuzard
    Profil pro
    Inscrit en
    Août 2008
    Messages
    381
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Août 2008
    Messages : 381
    Points : 263
    Points
    263
    Par défaut
    Ton probleme a l'air bien complexe, je ne sais pas si ma maigre experience en ce sujet pourra te servir grandement, mais bon allons-y,
    Sous Ubuntu, un programme sense simplifier la vie lors des configurations reseaux, le Network Manager configure tes fichiers de config de reseau a ta place et ne te laisse pas faire ce que tu veux, ou alors juste en ligne de commande (quand tu redemarres, c'est la config par defaut qui revient). Donc il laisse un fichier /etc/network/interfaces contenant que des informations sur localhost.
    Je me demande si en desactivant ce programme, tu ne pourrais pas etre plus libre de tes manoeuvres. Configure ton reseau a partir de ce fichier et lancer /etc/init.d/networking restart apres. Tu peux desactiver le Network Manager en lui enlevant les droits d'execution, tu pourras ainsi le reactiver si jamais tu preferes l'avoir, ou que le probleme ne vient pas de la.
    Le pc portable recois une ip par la livebox, (a travers le bridge) mais ne peut rien pinguer!
    Ile ne ping pas le pc linux. Et le pc linux ne ping pas la livebox!
    C'est pourtant les memes manip qu'au dessus sauf que c'est une liaison ad-hoc a la place d'une liaison ethernet!
    Le plus etonnant est que le pc portable recois une ip... Il ya donc des infos qui sont passées au travers du pont ethernet <> wifi...
    Est-ce que dans ton pc portable il existe un fichier /etc/resolv.conf? Dans un reseau normal, il dont contenir les memes informations que la passerelle. Sinon, ca pourrait expliquer pourquoi tu n'arrives pas a pinguer la livebox. Mais je ne sais aps trop ce qu'il doit en etre dans ton cas :-S
    J'espere avoir pu t'aider
    ZORRO
    Plus Vengeur que Masqué

  5. #5
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2009
    Messages
    21
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2009
    Messages : 21
    Points : 14
    Points
    14
    Par défaut
    Merci, pour ta reponse.

    en fait je n'ai pas trop envie de mettre la configuration en dur tant que je sais que ca ne fonctionne pas.

    Le pont fonctionne parfaitement pour relier deux segment ethernet. Mais pas pour relier un segment ethernet 802.3 a une liason ad-hoc wifi donc 802.11.

    Je me demande tout simplement sil'outil utilisé pour faire le bridge (bridge-utils) est en mesure faire ce que je désire.

    Le pc portable est sous windows.

  6. #6
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2009
    Messages
    21
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2009
    Messages : 21
    Points : 14
    Points
    14
    Par défaut
    Bon bein je crois avoir trouvé ma réponse!

    Tiré de la FAQ bridge-utils : http://www.linuxfoundation.org/en/Net:Bridge

    No traffic gets trough (except ARP and STP)

    Your kernel might have ethernet filtering (ebtables, bridge-nf, arptables) enabled, and traffic gets filtered. The easiest way to disable this is to go to /proc/sys/net/bridge. Check if the bridge-nf-* entries in there are set to 1; in that case, set them to zero and try again.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     # cd /proc/sys/net/bridge
     # ls
     bridge-nf-call-arptables  bridge-nf-call-iptables
     bridge-nf-call-ip6tables  bridge-nf-filter-vlan-tagged
     # for f in bridge-nf-*; do echo 0 > $f; done
    Ca j'ai testé mais ca ne change rien au problème


    It doesn't work with my Wireless card!


    This is a known problem, and it is not caused by the bridge code. Many wireless cards don't allow spoofing of the source address. It is a firmware restriction with some chipsets. You might find some information in the bridge mailing list archives to help. Has anyone found a way to get around Wavelan not allowing anything but its own MAC address? (answer by Michael Renzmann (mrenzmann at compulan.de))

    Well, for 99% of computer users there will never be a way to get rid of this. For this function a special firmware is needed. This firmware can be loaded into the RAM of any WaveLAN card, so it could do its job with bridging. But there is no documentation on the interface available to the public. The only way to achieve this is to have a full version of the hcf library which controls every function of the card and also allows accessing the card's RAM. To get this full version Lucent wants to know that it will be a financial win for them, also you have to sign an NDA. So be sure that you won't most probably get access to this peace of software until Lucent does not change its mind in this (which I doubt never will happen).

    If you urgently need to have a wireless LAN card which is able to bridge, you should use one of those having the prism chipset onboard (manufactured by Harris Intersil). There are drivers for those cards available at www.linux-wlan.com (which is the website from Absoval), and I found a mail that says that there is the necessary firmware and an upload tool available for Linux to the public. If you need additional features of an access point you should also talk to Absoval.

    I still don't understand!!

    Doing full bridging of wireless (802.11) requires supporting WDS . The current implementation doesn't do it.

    It is possible to do limited wireless to Ethernet functionality with some wireless drivers. This requires the device to be able to support a different sender address and source address. That is what WDS provides.

    There are ways to make it work, but it is not always straightforward and you probably won't get it right without a pretty solid understanding of 802.11, it's modes, and the frame header format.

  7. #7
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2009
    Messages
    21
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2009
    Messages : 21
    Points : 14
    Points
    14
    Par défaut
    J'ai retrouvé la note de "Michael Renzmann " dans les archives de mailing lists.

    Hi!

    I have some problems with an bridge between wlan0 and eth0 device...

    It works and I can from both sides ping the router with the bridge device but
    I cant ping the devices from other net so I cant ping wlan devs from eth net
    and other way around

    the wlan card is an atmel usbw11 from linksys and eth is a intel e100
    10/100mbit nic

    I have configured the bridge according to the how to and dont see any errors
    in kern.log or somewhere else....

    What is wrong?

    PS: sorry for my english but I hope you can understand what I mean

    [Bridge] bridge wlan-eth
    Michael Renzmann mrenzmann at web.de
    Wed Mar 17 09:34:11 PST 2004
    Hi.

    Christoph Kaminski wrote:
    > It works and I can from both sides ping the router with the bridge device but
    > I cant ping the devices from other net so I cant ping wlan devs from eth net
    > and other way around
    >
    > the wlan card is an atmel usbw11 from linksys and eth is a intel e100
    > 10/100mbit nic

    You'll have two problems:
    1. The e100 is said to have a problem with bridging, depending on the
    driver you use.

    2. You need to have your wlan device working in a special mode, which is
    not available to the atmel-chipsets afaik. This mode is known under many
    names, such as "Host-AP", "Master-Mode", "AP-Mode" and others. Without
    this mode, you won't be able to bridge between wlan and lan. The only
    way to work around this problem then would be to use proxy arp - afair
    there is a daemon available that cares about the wlan-lan situation in
    context to proxy arp. You should find it when searching freshmeat.net
    with "proxy arp" or thelike.

    Bye, Mike
    Il semble donc que parprouted soit l'outil le plus adapté pour créer un pont Ethernet <> Wifi avec une carte wifi qui ne supporte que le mode ad-hoc.

    Je teste ca dès que possible!

  8. #8
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2009
    Messages
    21
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2009
    Messages : 21
    Points : 14
    Points
    14
    Par défaut
    Parprouted n'as pas resolut mon probleme. du coup j'ai acheté un bridge ethernet wifi.

Discussions similaires

  1. Connexion réseau Ethernet-Wifi
    Par bartounet dans le forum Hardware
    Réponses: 1
    Dernier message: 12/11/2007, 13h01
  2. [UBUNTU] Comment configurer ma connection Wifi ?
    Par dr_octopus74 dans le forum Ubuntu
    Réponses: 5
    Dernier message: 12/02/2007, 20h25
  3. Réponses: 12
    Dernier message: 09/01/2007, 20h28
  4. Réponses: 22
    Dernier message: 27/02/2006, 09h55
  5. configurer un périphérique Wifi...
    Par kor6k dans le forum MFC
    Réponses: 6
    Dernier message: 04/07/2005, 15h15

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo