Coder Social home page Coder Social logo

mnadir786 / network-dotnet-manage-network-peering Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/network-dotnet-manage-network-peering

0.0 1.0 0.0 27.47 MB

Manage network peering between two virtual networks

Home Page: https://docs.microsoft.com/en-us/dotnet/azure

License: MIT License

PowerShell 7.81% Shell 0.38% JavaScript 8.65% C# 78.69% CSS 0.22% ASP 0.04% HTML 4.22%

network-dotnet-manage-network-peering's Introduction

page_type languages products extensions
sample
csharp
azure
services
virtual-network
platforms
dotnet

Manage network peering between two virtual networks (C#)

Azure Network sample for enabling and updating network peering between two virtual networks Summary ...

  • This sample creates two virtual networks in the same subscription and then peers them, modifying various options on the peering. Details ...
  1. Create two virtual networks, network "A" and network "B"...
  • network A with two subnets
  • network B with one subnet
  • the networks' address spaces must not overlap
  • the networks must be in the same region
  1. Peer the networks...
  • the peering will initially have default settings:
    • each network's IP address spaces will be accessible from the other network
    • no traffic forwarding will be enabled between the networks
    • no gateway transit between one network and the other will be enabled
  1. Update the peering...
  • disable IP address space between the networks
  • enable traffic forwarding from network A to network B
  1. Delete the peering
  • the removal of the peering takes place on both networks, as long as they are in the same subscription Notes:
  • Once a peering is created, it cannot be pointed at another remote network later.
  • The address spaces of the peered networks cannot be changed as long as the networks are peered.
  • Gateway transit scenarios as well as peering networks in different subscriptions are possible but beyond the scope of this sample.
  • Network peering in reality results in pairs of peering objects: one pointing from one network to the other, and the other peering object pointing the other way. For simplicity though, the SDK provides a unified way to manage the peering as a whole, in a single command flow, without the need to duplicate commands for both sides of the peering, while enforcing the required restrictions between the two peerings automatically, as this sample shows. But it is also possible to modify each peering separately, which becomes required when working with networks in different subscriptions.

Running this Sample

To run this sample:

Set the environment variable AZURE_AUTH_LOCATION with the full path for an auth file. See how to create an auth file.

git clone https://github.com/Azure-Samples/network-dotnet-manage-network-peering.git
cd network-dotnet-manage-network-peering
dotnet build
bin\Debug\net452\ManageNetworkPeeringInSameSubscription.exe

More information

Azure Management Libraries for C# Azure .Net Developer Center If you don't have a Microsoft Azure subscription you can get a FREE trial account here

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

network-dotnet-manage-network-peering's People

Contributors

anuchandy avatar lenala avatar supernova-eng avatar yaohaizh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.