Edsheebran
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # RACLETTE Gateway : gw.rennes.supelec.fr Bureau du prof : 507 ### Point credentials Je mets mes credentials ici parce que vive la sécurité : `face0xff` / `carottecarotte` ## Séance 1 ### Activité 6 État de OpenStack tel qu'il est au début du TP. * Hyperviseur : QEMU * Nombre de VMs actuellement en cours de fonctionnement : 0 * Comment savoir si l'hyperviseur fait tourner des VMs non-gérées par OS ? `openstack hypervisor stats show --fit-width` permet de connaitre toutes les VMs qui tournent sur l'hyperviseur `openstack server list` donne les VMs effectivements gérées par OS, donc une soustraction donne la réponse * Il y a 1 réseau géré par OpenStack : *provider* (`openstack network list`) * Le réseau `provider` n'accepte pas les *jumbo frames* (MTU 1500) * Il est lié au projet `7792de1c18764b348b84a3039cf5bd80` dont le nom est `admin` * Le seul utilisateur qui y est rattaché est `admin` (`openstack role assignment list --project admin --names`) * Il y a 0 routeur géré par OpenStack. Réseaux et sous-réseaux. * Plage IP du réseau `provider` : `172.17.0.0/16` (subnet : `provsub`) * Les autres sont sur le même masque réseau, mais sur des plages différentes (on a [`172.17.20.201`,`172.17.20.250`]) * Entre deux serveurs physiques, la gateway et le DNS sont les mêmes, mais la plage d'allocation est différente * La passerelle par défaut est `172.17.0.1`. Elle correspond à l'interface logique `br-ex` * Le DHCP est désactivé pour ne pas avoir de DHCP en compétition avec celui de l'école. * On peut héberger une quarantaine de VMs ### Activité 7 * Projets : `admin`, `services` * Utilisateurs : `admin`, `neutron`, `glance`, `cinder`, `ceilometer`, `placement`, `swift`, `nova`, `heat_admin`, `gnochi`, `heat-cfn`, `aodh`, `heat` * Rôles : `_member_`,`admin`,`heat_stack_owner`, ` heat_stack_user `, `member`,`reader`, `ResellerAdmin`, `SwiftOperator` ### Activité 9 On a créé le routeur :b:ouclette * Creation du routeur `openstack router create --project RACLETTE bouclette` * Association de l'interface externe et de l'ip fixe du routeur sur celle-ci `openstack router set --fixed-ip subnet=provsub,ip-address=172.17.20.250 --external-gateway provider bouclette` * On crée une ip flotante qui pourra être allouée `openstack floating ip create --project RACLETTE --floating-ip-address 172.17.20.231 provider --fit-width` ### Activité 10 | Personne | Pseudal | Nom de la clé | | -------- | -------- | --------- | | Damien | edsheebran | theKeyToEdsheebran | | Valentino | face0xff | clepierre | | Anthony | escargoty | escargokey | Nik la clé de escargoty parce que eugneugneu les clés ed25519 marchent pas ### Activité 11 Le réseau s'appelle `reseauclette`. La commande pour le créer est : `openstack network create reseauclette` Le sous-réseau s'appelle `souclette`. La commande pour le créer est : `openstack subnet create --network reseauclette --subnet-range 10.69.0.0/16 --allocation-pool start=10.69.69.0,end=10.69.69.255 --gateway 10.69.0.1 --dhcp --dns-nameserver 8.8.8.8 souclette` ### Activité 12 On crée une première VM sur Cirros, nommée `caquelette` (car elle sert le fromage comme un caquelon) : `openstack server create --image cirros --flavor m1.tiny caquelette` L'IP qui lui a été adressée est `10.69.69.240`. On ne peut pas la pinger, même depuis le serveur physique. #### 1.6.2 difficile A la création du subnet il y a aussi un namespace associé qui est apparu sur le serveur physqiue (eugneugneu ça sert au noyau linux, liste avec `ip netns`), c'est openstack qui s'en occupe. On peut dire eugneugneu execute une commande dans le netspace avec `sudo ip netns exec lacommande`. `sudo ip netns exec $(ip netns | head -n2 | tail -n1 | cut -d' ' -f1) ping 8.8.8.8` fonctionne, mais avec un ping 10.69.69.240 ou 10.69.0.1 toujours pas. Ici cela ne larche à cause de problèmes de sécurité. ### Activité 15 Parce qu'on connait pas, on a pas d'ip publique ! On peut pas se connecter depuis l'extérieur ! ### Activité 16 ``` [face0xff@rocket ~(keystone_face0xff)]$ openstack port list +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+ | ID | Name | MAC Address | Fixed IP Addresses | Status | +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+ | 20d39afb-0a7e-4502-a7da-4867fd247279 | | fa:16:3e:9e:dd:36 | ip_address='172.17.20.231', subnet_id='bf0b7a07-089f-4bed-b35f-c3f41b67cccd' | N/A | | 595f4636-91ef-4a9b-887a-9dc0213afd7e | | fa:16:3e:9a:fe:56 | ip_address='10.69.69.0', subnet_id='21e959fd-1cce-4147-9400-5720bc31ac71' | ACTIVE | | 607651cc-1950-4812-9c86-d003d2bd39ae | | fa:16:3e:08:23:c1 | ip_address='10.69.69.240', subnet_id='21e959fd-1cce-4147-9400-5720bc31ac71' | ACTIVE | | ab21f4d6-56fa-41fe-a5eb-2e95394f9c91 | | fa:16:3e:e2:03:85 | ip_address='172.17.20.230', subnet_id='bf0b7a07-089f-4bed-b35f-c3f41b67cccd' | N/A | | d33202ad-4189-4ac8-bd4b-621c70da2cf8 | | fa:16:3e:5c:65:2e | ip_address='10.69.0.1', subnet_id='21e959fd-1cce-4147-9400-5720bc31ac71' | ACTIVE | +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+ ``` On y trouve nos ip flotantes, notre serveur lié au sous réseau, l'interface entre le router et le sous réseau, et le sous réseau. L'ID du port de notre VM caquelette est `607651cc-1950-4812-9c86-d003d2bd39ae` Nos IP flottantes disponibles sont 172.17.20.230 et 172.17.20.230. Nous allons choisir 172.17.20.230, d'UUID `ab21f4d6-56fa-41fe-a5eb-2e95394f9c91` On set : `openstack floating ip set --port 607651cc-1950-4812-9c86-d003d2bd39ae 172.17.20.230` ### 1.7.1 On chope les interfaces des VM avec `virsh dumpxml` instance 1 : le nom nous indique que c'est la VM (sur le tag 2 de open v switch) ```xml <interface type='bridge'> <mac address='fa:16:3e:08:23:c1'/> <source bridge='qbr607651cc-19'/> <target dev='tap607651cc-19'/> <model type='virtio'/> <mtu size='1450'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> ``` instance 2 ```xml <interface type='bridge'> <mac address='fa:16:3e:ac:67:5e'/> <source bridge='qbrad7adcec-39'/> <target dev='tapad7adcec-39'/> <model type='virtio'/> <mtu size='1500'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> ``` instance 3 ```xml <interface type='bridge'> <mac address='fa:16:3e:f7:24:72'/> <source bridge='qbr7b3d6960-2e'/> <target dev='tap7b3d6960-2e'/> <model type='virtio'/> <mtu size='1500'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> ``` On trouve les interfaces du routeur avec `sudo ip netns exec qrouter-29c0bd9d-c6c5-4f5e-a49a-07f14245cadb ip a` : on a 2 interfaces * qg-4810c99b-46 sur provider (tag 3 avec ovs) * qr-d33202ad-41 sur reseauclette (tag 2 avec ovs) On a trouvé le dhcp sur tap595f4636-91 Partie utile de `ovs-vsctl show` : ``` Bridge br-int Controller "tcp:127.0.0.1:6633" is_connected: true fail_mode: secure Port "tapd33202ad-41" tag: 2 Interface "tapd33202ad-41" Port "qvo607651cc-19" tag: 2 Interface "qvo607651cc-19" Port br-int Interface br-int type: internal Port "tap4810c99b-46" tag: 3 Interface "tap4810c99b-46" Port patch-tun Interface patch-tun type: patch options: {peer=patch-int} Port int-br-ex Interface int-br-ex type: patch options: {peer=phy-br-ex} ``` Openstack crée un linux bridge sur chacun des ports afin d'y gérer les règles de sécurité pour chaque port. ### 1.7.2 Avec `sudo ip netns exec qrouter-29c0bd9d-c6c5-4f5e-a49a-07f14245cadb iptables -L -t nat` on obtient les règles : * DNAT all -- anywhere rocket to:10.69.69.240 * SNAT all -- anywhere anywhere to:172.17.20.250 * SNAT all -- anywhere anywhere mark match ! 0x2/0xffff ctstate DNAT to:172.17.20.250 * REDIRECT tcp -- anywhere 169.254.169.254 tcp dpt:http redir ports 9697 Avec `sudo ip netns exec qrouter-29c0bd9d-c6c5-4f5e-a49a-07f14245cadb iptables -L -t mangle` : * MARK tcp -- anywhere 169.254.169.254 tcp dpt:http MARK xset 0x1/0xffff * agent-floatingip est putain de vide Points importants : * On utilise des marks netfilter * Avec celles-ci on choisit ou non de faire du DNAT * Il y a une adresse ip spécifique pour s'occuper des ips flottantes * On sépare les deux cas ips fixes et ip flottantes ### 1.7.3 * Le MTU du réseau `provider` est 1500. * Le MTU du réseau `reseauclette` est 1450. * Nous nous sommes fait arnarquer de 50 octets. * Cela correspond à la présence du VXLAN sur `reseauclette`. * Certains ports de `br-int` comportent une méta-donnée `tag`. * Le prof a mal configuré OVS (ou pas) * vxlan -> inter-machine, pt de vue d'une machine il y a des vlans, on les interconnecte https://docs.openstack.org/newton/networking-guide/deploy-ovs-selfservice.html ## IPV6 On crée le réseau `motocyclette` avec le sous réseau ipv4 `sabelette` (10.42.0.0/24 de gateway 10.42.0.1) ipv6 : bicyclette fc00:dead:cafe:babe::/64 Unique local address : de tout de façon on ne peut discuter qu'en local et on va pas acheter de l'ipv6 ### Activité 18

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully