Convert Cisco BGP configuration to XOS


I am tring to replace existing Cisco router to XOS switch. Can anyone help to convert following Cisco configuration to XoS switch?

router bgp 65522
no synchronization
bgp log-neighbor-changes
network 61.57.208.0 mask 255.255.255.0
network 61.57.209.0 mask 255.255.255.0
network 61.57.210.0 mask 255.255.255.0
network 61.57.211.0 mask 255.255.255.0

neighbor 192.72.113.121 remote-as 4780
neighbor 192.72.113.121 send-community
neighbor 192.72.113.121 soft-reconfiguration inbound
neighbor 192.72.113.121 route-map AS4780_IN in
neighbor 192.72.113.121 route-map AS4780_OUT_01 out
neighbor 192.72.113.121 password 7 0902573B18501E3639343625

neighbor 192.72.113.125 remote-as 4780
neighbor 192.72.113.125 send-community
neighbor 192.72.113.125 soft-reconfiguration inbound
neighbor 192.72.113.125 route-map AS4780_IN in
neighbor 192.72.113.125 route-map AS4780_OUT_02 out
neighbor 192.72.113.125 password 7 02481D690A5306057E763B16

neighbor 192.72.113.129 remote-as 4780
neighbor 192.72.113.129 send-community
neighbor 192.72.113.129 soft-reconfiguration inbound
neighbor 192.72.113.129 route-map AS4780_IN in
neighbor 192.72.113.129 route-map AS4780_OUT_03 out
neighbor 192.72.113.129 password 7 05451F3D2019472D2B3D251D

neighbor 192.72.113.133 remote-as 4780
neighbor 192.72.113.133 send-community
neighbor 192.72.113.133 soft-reconfiguration inbound
neighbor 192.72.113.133 route-map AS4780_IN in
neighbor 192.72.113.133 route-map AS4780_OUT_04 out
neighbor 192.72.113.133 password 7 034A4239075A28687C312B0A

maximum-paths 4
no auto-summary
!
ip route 61.57.208.0 255.255.255.0 Null0 254
ip route 61.57.209.0 255.255.255.0 Null0 254
ip route 61.57.210.0 255.255.255.0 Null0 254
ip route 61.57.211.0 255.255.255.0 Null0 254
ip bgp-community new-format
!
ip prefix-list bogons seq 5 permit 0.0.0.0/8 le 32
ip prefix-list bogons seq 10 permit 10.0.0.0/8 le 32
ip prefix-list bogons seq 15 permit 127.0.0.0/8 le 32
ip prefix-list bogons seq 20 permit 169.254.0.0/16 le 32
ip prefix-list bogons seq 25 permit 172.16.0.0/12 le 32
ip prefix-list bogons seq 30 permit 192.0.2.0/24 le 32
ip prefix-list bogons seq 35 permit 192.168.0.0/16 le 32
ip prefix-list bogons seq 40 permit 224.0.0.0/3 le 32
ip prefix-list bogons seq 45 permit 0.0.0.0/0 ge 25
!
ip prefix-list default_route seq 5 permit 0.0.0.0/0
!
ip prefix-list perfer_4780_01 seq 5 permit 61.57.208.0/24
!
ip prefix-list perfer_4780_02 seq 5 permit 61.57.209.0/24
!
ip prefix-list perfer_4780_03 seq 5 permit 61.57.210.0/24
!
ip prefix-list perfer_4780_04 seq 5 permit 61.57.211.0/24
!
route-map AS4780_IN deny 10
match ip address prefix-list bogons
!
route-map AS4780_IN permit 20
match ip address prefix-list default_route
!
route-map AS4780_OUT_04 deny 5
match ip address prefix-list bogons
!
route-map AS4780_OUT_04 permit 10
match ip address prefix-list perfer_4780_01
!
route-map AS4780_OUT_04 permit 20
match ip address prefix-list perfer_4780_02
set community 65522:200
!
route-map AS4780_OUT_04 permit 30
match ip address prefix-list perfer_4780_03
!
route-map AS4780_OUT_04 permit 40
match ip address prefix-list perfer_4780_04
set community 65522:300
!
route-map AS4780_OUT_03 deny 5
match ip address prefix-list bogons
!
route-map AS4780_OUT_03 permit 10
match ip address prefix-list perfer_4780_01
set community 65522:200
!
route-map AS4780_OUT_03 permit 20
match ip address prefix-list perfer_4780_02
!
route-map AS4780_OUT_03 permit 30
match ip address prefix-list perfer_4780_03
set community 65522:300
!
route-map AS4780_OUT_03 permit 40
match ip address prefix-list perfer_4780_04
!
route-map AS4780_OUT_02 deny 5
match ip address prefix-list bogons
!
route-map AS4780_OUT_02 permit 10
match ip address prefix-list perfer_4780_01
!
route-map AS4780_OUT_02 permit 20
match ip address prefix-list perfer_4780_02
set community 65522:300
!
route-map AS4780_OUT_02 permit 30
match ip address prefix-list perfer_4780_03
!
route-map AS4780_OUT_02 permit 40
match ip address prefix-list perfer_4780_04
set community 65522:200
!
route-map AS4780_OUT_01 deny 5
match ip address prefix-list bogons
!
route-map AS4780_OUT_01 permit 10
match ip address prefix-list perfer_4780_01
set community 65522:300
!
route-map AS4780_OUT_01 permit 20
match ip address prefix-list perfer_4780_02
!
route-map AS4780_OUT_01 permit 30
match ip address prefix-list perfer_4780_03
set community 65522:200
!
route-map AS4780_OUT_01 permit 40
match ip address prefix-list perfer_4780_04
!

10 replies

Userlevel 4
Once I get time I will try to convert this config.
Userlevel 4
configure bgp AS-number 65522
configure bgp add network 61.57.208.0/24
configure bgp add network 61.57.209.0/24
configure bgp add network 61.57.210.0/24
configure bgp add network 61.57.211.0/24

create bgp neighbor 192.72.113.121 remote-AS-number 4780
configure bgp neighbor 192.72.113.121 send-community both
configure bgp soft-reconfiguration
configure bgp neighbor 192.72.113.121 route-policy in AS4780_IN
configure bgp neighbor 192.72.113.121 route-policy out AS4780_OUT_01
configure bgp neighbor 192.72.113.121 password encrypted

create bgp neighbor 192.72.113.125 remote-AS-number 4780
configure bgp neighbor 192.72.113.125 send-community both
configure bgp soft-reconfiguration
configure bgp neighbor 192.72.113.125 route-policy in AS4780_IN
configure bgp neighbor 192.72.113.125 route-policy out AS4780_OUT_02
configure bgp neighbor 192.72.113.125 password encrypted

create bgp neighbor 192.72.113.129 remote-AS-number 4780
configure bgp neighbor 192.72.113.129 send-community both
configure bgp soft-reconfiguration
configure bgp neighbor 192.72.113.129 route-policy in AS4780_IN
configure bgp neighbor 192.72.113.129 route-policy out AS4780_OUT_03
configure bgp neighbor 192.72.113.129 password encrypted

create bgp neighbor 192.72.113.133 remote-AS-number 4780
configure bgp neighbor 192.72.113.133 send-community both
configure bgp soft-reconfiguration
configure bgp neighbor 192.72.113.133 route-policy in AS4780_IN
configure bgp neighbor 192.72.113.133 route-policy out AS4780_OUT_04
configure bgp neighbor 192.72.113.133 password encrypted

configure bgp maximum-paths 4

configure iproute add blackhole 61.57.208.0/24
configure iproute add blackhole 61.57.208.0/24
configure iproute add blackhole 61.57.208.0/24
configure iproute add blackhole 61.57.208.0/24

enable bgp community format AS-number:number
enable bgp neighbor all
enbale bgp
----------------------------------------------------------------------------------------------

You can create the policy and specify the prefixes in that policy.
This is how it looks in Extreme Exos

configure bgp AS-number 65522

configure bgp add network 61.57.208.0/24
configure bgp add network 61.57.209.0/24
configure bgp add network 61.57.210.0/24
configure bgp add network 61.57.211.0/24

create bgp neighbor 192.72.113.121 remote-AS-number 4780
configure bgp neighbor 192.72.113.121 send-community
configure bgp neighbor 192.72.113.121 soft-reset in
configure bgp neighbor 192.72.113.121 route-policy in AS4780_IN
configure bgp neighbor 192.72.113.121 route-policy out AS4780_OUT_01
configure bgp neighbor 192.72.113.121 password ABCDEF

create bgp neighbor 192.72.113.125 remote-AS-number 4780
configure bgp neighbor 192.72.113.125 send-community
configure bgp neighbor 192.72.113.125 soft-reset in
configure bgp neighbor 192.72.113.125 route-policy in AS4780_IN
configure bgp neighbor 192.72.113.125 route-policy out AS4780_OUT_02
configure bgp neighbor 192.72.113.125 password ABCDEF

create bgp neighbor 192.72.113.129 remote-AS-number 4780
configure bgp neighbor 192.72.113.129 send-community
configure bgp neighbor 192.72.113.129 soft-reset in
configure bgp neighbor 192.72.113.129 route-policy in AS4780_IN
configure bgp neighbor 192.72.113.129 route-policy out AS4780_OUT_03
configure bgp neighbor 192.72.113.129 password ABCDEF

create bgp neighbor 192.72.113.133 remote-AS-number 4780
configure bgp neighbor 192.72.113.133 send-community
configure bgp neighbor 192.72.113.133 soft-reset in
configure bgp neighbor 192.72.113.133 route-policy in AS4780_IN
configure bgp neighbor 192.72.113.133 route-policy out AS4780_OUT_04
configure bgp neighbor 192.72.113.133 password ABCDEF

configure bgp maximum-paths 4
disable bgp aggregation
enable bgp neighbor all
enable bgp

config iproute add blackhole 61.57.208.0/24
config iproute add blackhole 61.57.209.0/24
config iproute add blackhole 61.57.210.0/24
config iproute add blackhole 61.57.211.0/24
enable bgp community format AS-number : number

edit policy AS4780_IN
entry bogons1 {
if match any {
nlri 0.0.0.0/8;
nlri 10.0.0.0/8;
nlri 127.0.0.0/8;
nlri 169.254.0.0/16;
nlri 172.16.0.0/12;
nlri 192.0.2.0/24;
nlri 192.168.0.0/16;
nlri 224.0.0.0/3;
nlri 0.0.0.0/0;
} then {
deny;
}
}
entry bogons2 {
if {
nlri 0.0.0.0/0 exact;
} then {
deny;
}
}
edit policy AS4780_OUT_04
entry perfer {
if match any {
nlri 0.0.0.0/8;
nlri 10.0.0.0/8;
nlri 127.0.0.0/8;
nlri 169.254.0.0/16;
nlri 172.16.0.0/12;
nlri 192.0.2.0/24;
nlri 192.168.0.0/16;
nlri 224.0.0.0/3;
nlri 0.0.0.0/0;
} then {
deny;
}
}
entry perfer1 {
if match any {
nlri 61.57.208.0/24;
} then {
permit;
}
}
entry perfer2 {
if match any {
nlri 61.57.209.0/24;
} then {
permit;
community set 65522:200;
}
}
entry perfer3 {
if match any {
nlri 61.57.210.0/24;
} then {
permit;
}
}
entry perfer4 {
if match any {
nlri 61.57.211.0/24;
} then {
permit;
community set 65522:300;
}
}
edit policy AS4780_OUT_03
entry perfer {
if match any {
nlri 0.0.0.0/8;
nlri 10.0.0.0/8;
nlri 127.0.0.0/8;
nlri 169.254.0.0/16;
nlri 172.16.0.0/12;
nlri 192.0.2.0/24;
nlri 192.168.0.0/16;
nlri 224.0.0.0/3;
nlri 0.0.0.0/0;
} then {
deny;
}
}
entry perfer1 {
if match any {
nlri 61.57.208.0/24;
} then {
permit;
}
}
entry perfer2 {
if match any {
nlri 61.57.209.0/24;
} then {
permit;
community set 65522:200;
}
}
entry perfer3 {
if match any {
nlri 61.57.210.0/24;
} then {
permit;
}
}
entry perfer4 {
if match any {
nlri 61.57.211.0/24;
} then {
permit;
community set 65522:300;
}
}
edit policy AS4780_OUT_02
entry perfer {
if match any {
nlri 0.0.0.0/8;
nlri 10.0.0.0/8;
nlri 127.0.0.0/8;
nlri 169.254.0.0/16;
nlri 172.16.0.0/12;
nlri 192.0.2.0/24;
nlri 192.168.0.0/16;
nlri 224.0.0.0/3;
nlri 0.0.0.0/0;
} then {
deny;
}
}
entry perfer1 {
if match any {
nlri 61.57.208.0/24;
} then {
permit;
}
}
entry perfer2 {
if match any {
nlri 61.57.209.0/24;
} then {
permit;
community set 65522:200;
}
}
entry perfer3 {
if match any {
nlri 61.57.210.0/24;
} then {
permit;
}
}
entry perfer4 {
if match any {
nlri 61.57.211.0/24;
} then {
permit;
community set 65522:300;
}
}
edit policy AS4780_OUT_01
entry perfer {
if match any {
nlri 0.0.0.0/8;
nlri 10.0.0.0/8;
nlri 127.0.0.0/8;
nlri 169.254.0.0/16;
nlri 172.16.0.0/12;
nlri 192.0.2.0/24;
nlri 192.168.0.0/16;
nlri 224.0.0.0/3;
nlri 0.0.0.0/0;
} then {
deny;
}
}
entry perfer1 {
if match any {
nlri 61.57.208.0/24;
} then {
permit;
}
}
entry perfer2 {
if match any {
nlri 61.57.209.0/24;
} then {
permit;
community set 65522:200;
}
}
entry perfer3 {
if match any {
nlri 61.57.210.0/24;
} then {
permit;
}
}
entry perfer4 {
if match any {
nlri 61.57.211.0/24;
} then {
permit;
community set 65522:300;
}
}
Awesome! Thank you, Gents. I am wondering why we need blakhole route for those subnet. Will it cause any problem?
Cisco = Null route

ip route 61.57.208.0 255.255.255.0 Null0 254
ip route 61.57.209.0 255.255.255.0 Null0 254
ip route 61.57.210.0 255.255.255.0 Null0 254
ip route 61.57.211.0 255.255.255.0 Null0 254

Extreme = Blackhole route

config iproute add blackhole 61.57.208.0/24
config iproute add blackhole 61.57.209.0/24
config iproute add blackhole 61.57.210.0/24
config iproute add blackhole 61.57.211.0/24
Userlevel 4
we only want route in routing table so that BGP will advertise routes to it's neighbours. We can either create the blackhole route or we can create one loopback vlan and point all the static route to that loopback vlan as next-hop and change the metric value of static route as shown below..

create vlan test
config vlan test ipaddress 10.1.1.1
enable ipf

enable loopback-mode vlan test

configure iproute add 61.57.210.0/24 10.1.1.1 222
What if the packet with the destination (61.57.210.0) is passed to the switch? Will it be dropped because it's blackhole route?
Extreme - It will be dropped.
Cisco - It will be sent to bit bucket = dropped.
Is there any command in XOS which is equivalent to the cisco command “clear ip bgp
soft in”

Thanks!
configure bgp neighbor
soft-reset in

If both the local BGP neighbor and the neighbor router support the route refresh capability
(ExtremeWare does not support this feature), a dynamic soft input reset can be performed. The
configure bgp neighbor soft-reset command triggers the generation of a Route-Refresh message to the neighbor. As a response to the Route-Refresh message, the neighbor sends the entire BGP routing table in updates and the switch applies the appropriate routing policy to the updates.

Reply