Ultime liste de discussion du Labo 604

Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Ultime liste de discussion du Labo 604

installation et gestion de réseaux sous linux

-29%
Le deal à ne pas rater :
PC portable – MEDION 15,6″ FHD Intel i7 – 16 Go / 512Go (CDAV : ...
499.99 € 699.99 €
Voir le deal

    [VirtualBox] networking - bridge sur l'interface physique

    mvh
    mvh


    Masculin Nombre de messages : 567
    Date d'inscription : 24/12/2006

    [VirtualBox] networking - bridge sur l'interface physique Empty [VirtualBox] networking - bridge sur l'interface physique

    Message  mvh Mer 22 Oct - 19:06

    ... à partir de la doc de VirtualBox et brut de décoffrage !!!
    Code:
    #! /bin/sh

    #virtualbox/2.0.2/UserManual
    #http://www.virtualbox.org/wiki/Downloads

    ### Param locaux
    MASQ="255.255.255.0"
    ETH0="172.16.0.140"
    GW="172.16.0.4"
    USERVB="root"
    ###################

    modprobe bridge
    modprobe tun

    #Create a new bridge with this command:
    brctl addbr br0

    #Remove the IP address configuration from the existing network device (e.g.
    #eth0) with:
    ifconfig eth0 0.0.0.0

    #Add your network adapter to the bridge:
    brctl addif br0 eth0

    #run ifconfig br0 x.x.x.x netmask x.x.x.x and use the
    #values that you noted down previously.
    ifconfig br0 $ETH0 netmask $MASQ
    route add default gw $GW

    #To create a permanent host interface called vbox0 (all host interfaces created in
    #this way must be called vbox followed by a number) and add it to the network
    #bridge created above, use the following command (see chapter 6.8.1.5, Host
    #Interface Networking utilities for Linux, page 85 for more details):
    #VBoxAddIF vbox0 <user> br0
    #Replace <user> with the name of the user who is supposed to be able to use the
    #new interface.
    VBoxAddIF vbox0 $USERVB br0

    #To create a temporary TAP interface which will disappear when the host system is
    #restarted, use the VBoxTunctl command. The following example creates the interface
    #vbox0 for the user <user>:
    #VBoxTunctl -t vbox0 -u <user>
    ##VBoxTunctl -t vbox0 -u $USERVB

    #If you have installed the bridge utilities (see the preceding sections), you can add
    #this temporary interface to an Ethernet bridge using the command
    ##brctl addif br0 vbox0

    #ifconfig

    NOTE :
    (fonctionne ... mais warning à corriger)
    à tester

    Code:
    root@inspiron:~# mc
    root@inspiron:~/WORK.CRS# ./bridge
    VirtualBox host networking interface creation utility, version 2.0.2
    (C) 2005-2007 Sun Microsystems, Inc.
    All rights reserved.

    Creating the permanent host networking interface "vbox0" for user vénérable grand maitre.
    root@inspiron:~/WORK.CRS#

      La date/heure actuelle est Mar 7 Mai - 1:57

      Ne ratez plus aucun deal !
      Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
      IgnorerAutoriser