Friday, May 14, 2021

Aruba CX OSPF Config Example

 Building OSPF in Aruba CX switches. 

VIDEO LINK---> https://youtu.be/N9dIGVzdjIU

Version 10.05.0020

DistMain-Switch

vlan 1
vlan 2
vlan 6

vlan 830
    name OSPF-Dist-HS
vlan 831
    name OSPF-Dist-MS

//  vlan 1,2,6 are the local vlans
interface vlan 1
    ip address 10.129.31.254/22
interface vlan 2
    ip address 10.129.47.254/22
interface vlan 6
    ip address 10.129.3.254/22

//  vlan 830,831 are the OSPF networks that will distribute the routes.
interface vlan 830
    description OSPF-Dist-HS
    ip address 10.130.253.1/27
    ip ospf 1 area 0.0.0.0
interface vlan 831
    description OSPF-Dist-MS
    ip address 10.131.253.1/27
    ip ospf 1 area 0.0.0.0

// ospf config..... we are redistributing ALL connected routes on this switch.... If you want to only redistribute certain routes you would need to do a route-map.. see bottom of page for that example.
route ospf 1
    rotuer-id 1.1.1.1
    redistribute connected
    area 0.0.0.0

interface 1/1/2
    no shutdown
    no routing
    vlan trunk native 1
    vlan trunk allowed 830

interface 1/1/3
    no shutdown
    no routing
    vlan trunk native 1
    vlan trunk allowed 831


HS-Main-Switch

vlan 2
vlan 830

interface vlan 2
    ip address 10.130.47.254/22
interface vlan 830
    ip address 10.130.253.2/27
    ip ospf 1 area 0.0.0.0

router ospf 1
    router-id 1.1.1.2
    redistribute connected
    area 0.0.0.0

interface 1/1/2
    no shutdown
    no routing
    vlan trunk native 1
    vlan trunk allowed 830


MS-Main-Switch

vlan 6
vlan 831
interface vlan 6
    ip address 10.131.3.254/22
interface vlan 831
    ip address 10.131.253.2/27
    ip ospf 1 area 0.0.0.0

router ospf 1
    router-id 1.1.1.3
    redistribute connected
    area 0.0.0.0

At this point you should be able to see your ospf peers come up.

"show ip ospf neighbors"



"show ip route ospf"



Route-Map

//  If you would like to only advertise certain routes through OSPF then route-map will be the command to use. 

route-map Allow-Vlan permit seq 10
match interface vlan1
exit
route-map Allow-Vlan permit seq 20
match interface vlan2
exit


Router ospf 1
router ospf redistribute route-map Allow-Vlan


//  This will only allow vlan 1 and 2 to be advertised into OSPF for redistribution.... if you add more vlan's and want to advertise them you will need to add them to the route-map.



Aruba CX BGP Setup Example

 Very simple setup of BGP and advertising networks.

Version 10.05.0020

Switch 1

1.  Create your Vlan interfaces

vlan 100
    name BGP-1

interface vlan 100
    ip address 20.20.20.254/24

2.  Set up interface

interface 1/1/5
    no shutdown
    no routing
    vlan trunk native 1
    vlan trunk allowed 100

3.  Set up BPG

router bgp 1234
    bgp router-id 20.20.20.254
    neighbor 20.20.20.253 remote-as 12345
    address-family ipv4 unicast
        neighbor 20.20.20.253 activate
        exit
    exit

//  The route-id we are using as the "interface vlan id"... this does not have to be like this... you could set this up as 1.1.1.1 if you would like.  Keep in mind though that if you change it the BGP setup will have to rebuilt itself.
//  The "neighbor" will be the other side of our BGP peer
//  neighbor "20.20.20.253 activate"  will actually enable the routes to transverse between BGP peers

_________________________________________________

Switch 2

1.  Create your Vlan interfaces

vlan 100
    name BGP-1
vlan 200
    name test-vlan

interface vlan 100
    ip address 20.20.20.253/24
interface vlan 200
    ip address 30.0.0.254/24

2.  Set up interface

interface 1/1/5
    no shutdown
    no routing
    vlan trunk native 1
    vlan trunk allowed 100
interface 1/1/7
    no shutdown
    no routing
    vlan trunk native 1
    vlan trunk allowed 200

3.  Set up BPG

router bgp 12345
    bgp router-id 20.20.20.253
    neighbor 20.20.20.254 remote-as 1234
    address-family ipv4 unicast
        neighbor 20.20.20.254 activate
        network 30.0.0.0/24
        exit
    exit

//  Notice that we have added "network 30.0.0.0/24" to our BGP setup... this is the network that we are advertising out through BGP.  If we go back to Switch 1 we can run "show ip route bgp" and we will see that this network is being advertised through BGP and we are able to ping it.



















show bgp ipv4 unicast neighbors
















show bgp ipv4 unicast summary