Adding a static route


Raj
 

Hello all,

I am trying to setup a simple router, by assigning IP to two
interfaces, LAN and WAN, and then adding a default route out via WAN
interface. I am able to do this via debug command line, and now
testing using netconf API.

These are the two commands I am using to set default route (not sure
if its the correct usage)

ip route add 0.0.0.0/0 via abc.abc.abc.abc TenGigabitEthernet82/0/1
ip route add ::/0 via 2001:xx:xxx:10d::1 TenGigabitEthernet82/0/1

Checking the postman collection, I found an example which is used to
set static routes:
POST to restconf/config/hc2vpp-ietf-routing:routing/ with:
{
"routing": {
"control-plane-protocols": {
"control-plane-protocol": [
{
"type": "static",
"name": "test-routing-protocol-1",
"description":"Test routing protocol",
"vpp-protocol-attributes": {
"primary-vrf": "1"
},
"static-routes":{
"ipv4":{
"route":[
{
"description":"Test static route single hop ipv4",
"destination-prefix":"192.168.2.3/32",
"next-hop": {
"next-hop-address" : "192.168.2.8",
"outgoing-interface": "local0"
},
"vpp-ipv4-route":{
"classify-table":"1"
}
}
]
}
}
}
]
}
}
}

In this example what is the meaning of "primary-vrf": "1" and
"classify-table":"1"?

In the system I have only "ipv4-VRF:0" and "ipv6-VRF:0" setup.

Thanks and Regards,

Raj

Join {hc2vpp@lists.fd.io to automatically receive all group messages.