Skip to content


FreeBSD – Freebox – Vlan

Depuis peu de temps, je me suis rendu compte que le fait d’allumer mon micro-onde  perturbait ma freebox HD qui était jusque la connectée en wifi.

J’ai donc voulu utiliser le cable rj45 pour relier ma freebox à ma freebox HD, mais pourquoi ne pas utiliser ma soekris sous freebsd ?

Voici ce que je souhaite obtenir:

Freebox -> Soekris -> switch -> Freebox HD

Je vais pour cela utiliser deux interfaces reseaux de ma soekris: vr2 et vr3

vr2 : Freebox -> Soekris(vr2)

vr3 :  Soekris(vr3) -> switch

Pour diffuser la vidéo, la freebox utilise entre elle et la freebox HD un vlan, le vlan 100.

Nous allons donc créer un vlan sur ces deux interfaces et les bridger.

# ifconfig vlan0 create

# ifconfig vlan1 create

# ifconfig vlan0 vlan 100 vlandev vr2

# ifconfig vlan1 vlan 100 vlandev vr3

# ifconfig bridge0 create

#  ifconfig bridge0 addm  vlan0 addm vlan1 up

# ifconfig vlan0 up

# ifconfig vlan1 up

# ifconfig bridge0 up

Vous devriez obtenir ceci:

vlan0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:00:24:cc:5a:ea
        inet6 fe80::200:24ff:fecc:5ae8%vlan0 prefixlen 64 scopeid 0x8
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
        vlan: 100 parent interface: vr2
vlan1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:00:24:cc:5a:eb
        inet6 fe80::200:24ff:fecc:5ae8%vlan1 prefixlen 64 scopeid 0x9
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
        vlan: 100 parent interface: vr3
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 92:ac:41:41:56:f8
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: vlan1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 9 priority 128 path cost 200000
        member: vlan0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 8 priority 128 path cost 200000

Pour le prochain reboot, ajoutez cela au rc.conf:

cloned_interfaces="bridge0 vlan0 vlan1"
ifconfig_vlan0="vlan 100 vlandev vr2"
ifconfig_vlan1="vlan 100 vlandev vr3"
ifconfig_bridge0="addm vlan0 addm vlan1"

 

 

Il ne vous reste plus qu’a vous assurer que votre pf favori ne vient pas offenser ce bridge ni ces vlans et a allumer votre freebox HD.

J’en ai profité pour monitorer ce traffic et le résultat est assez surprenant:

Prochaine étape, tagger l’interface du switch pour y faire passer également mon LAN pour ne plus avoir deux cables rj45 qui traversent la piece..

Posted in Freebox, FreeBSD, Tutoriaux, Vlan.


No Responses (yet)

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.