Coder Social home page Coder Social logo

bgp's Introduction

BGP Protocol Configuration Between Two Routers

Overview

The goal of this task is to implement and configure BGP protocol between two routers and create a peering session. I have used two Cisco 2691 routers in GNS3 network simulator environment.

image

Steps

  1. First step is adding two routers to the environment. And then we connect the routers with fastethernet cable.

  2. Next we enter the first router (AS1) console and configure it. To do so we use the following command in console:

configure terminal
  1. Using below command we define interface fastethernet0/0.
interface fa0/0
  1. As mentioned, router interfaces are shutdown by default. To activate fa0/0 interface we use the following command:
no shutdown 
  1. With below command we assign IP address 192.168.20.1 with subnet mask 255.255.255.0 to the interface:
ip add 192.168.20.1 255.255.255.0
  1. Now we exit fa0/0 interface config using exit command. And define the next interface.

  2. Using below command we enter virtual interface config named loopback10.

interface loopback 10
  1. As said router interfaces are shutdown by default. To activate loopback10 interface we use:
no shutdown
  1. We assign IP address 1.1.1.1 with subnet mask 255.255.255.0 to loopback10 interface using:
ip add 1.1.1.1 255.255.255.0
  1. Again we exit from loopback10 interface config using exit and go back to router config.

  2. Using below command we enter BGP protocol config for the first router (AS1) which specifies this router will participate in BGP session:

router bgp 1 
  1. With this command we specify the neighbor router which is in the BGP session. Here the neighbor is router 2 (AS2). And we specify its address:
neighbor 192.168.20.2 remote-as 2
  1. Using below command we give routing process information about network 1.1.1.0 Subnet mask 255.255.255.0. So it will announce this network as a local network in BGP session. Other participating routers should be aware of this network existence:
network 1.1.1.0 mask 255.255.255.0
  1. Now we exit BGP config using exit. And save config changes using wr command.

image

  1. Now we enter second router (AS2) Terminal and configure it with below commands:
configure terminal
interface fa0/0
no shut 
ip add 192.168.20.2 255.255.255.0
exit
interface loopback 10 
no shut
ip add 2.2.2.2 255.255.255.0
exit
router bgp 2
neighbor 192.168.20.1 remote-as 1  
network 2.2.2.0 mask 255.255.255.0
exit
wr

image

  1. Now we verify config and check BGP session establishment between routers AS1 and AS2 using:
show ip route
show ip bgp

image

bgp's People

Contributors

yazdanbhd 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.