Advertisements

Tag Archives: route

Linux – route add error: SIOCADDRT: No such process

I was being shown this message but I knew the operating system was refusing to add the route

root@linux:~ # route add -net 172.22.1.0 gw 172.22.18.1 netmask 255.255.255.0 dev eth1
SIOCADDRT: No such process

I added the route to /etc/sysconfig/network/routes and then restarted the network service

192.168.1.1 192.168.233.2 255.255.255.255 eth1
148.91.0.0 172.22.18.1 255.255.0.0 eth1
207.169.17.0 172.22.18.1 255.255.255.0 eth1
172.22.0.0 172.22.18.1 255.255.255.0 eth1
172.22.14.0 172.22.18.1 255.255.255.0 eth1
172.22.1.0 172.22.18.1 255.255.255.0 eth1
default 172.22.240.1 – –

Advertisements

Configuring HP-UX routes

Add or delete a route to a specific host:

root@hp-ux:/ # route add host 192.168.1.1 192.168.0.1 1

root@hp-ux:/ # route delete host 192.168.1.1 192.168.0.1

Add or delete a route to a network

root@hp-ux:/ # route add net 192.168.1.0 netmask 255.255.255.0 192.168.1.1 1

root@hp-ux:/ # route delete net 192.168.1.0 netmask 255.255.255.0 192.168.1.1

Add or delete a default route

root@hp-ux:/ # route add default 192.168.0.1 1

root@hp-ux:/ # route delete default 192.168.0.1

Flush all gateway entries from the routing table

root@hp-ux:/ # route -f

Saving the IP Routing Configuration

root@hp-ux:/ # vi /etc/rc.config.d/netconf
ROUTE_DESTINATION[0]=”net 129.1.0.0″
ROUTE_MASK[0]=”255.255.0.0″
ROUTE_GATEWAY[0]=”128.1.0.1″
ROUTE_COUNT[0]=”1″
ROUTE_ARGS[0]=””
ROUTE_SOURCE[0]=””
ROUTE_DESTINATION[1]=”default”
ROUTE_MASK[1]=””
ROUTE_GATEWAY[1]=”128.1.0.1″
ROUTE_COUNT[1]=”1″
ROUTE_ARGS[1]=””
ROUTE_SOURCE[1]=””

HP-UX – route add and route delete

To add a route in HP-UX, use the following command

root@hp-ux:/ # route add net 10.32.12.128 netmask 255.255.255.128 10.32.32.1 1
add net 10.32.12.128: gateway 10.32.32.1

And to delete a route in HP-UX, use the following command

root@hp-ux:/ # route delete net 10.32.12.128 netmask 255.255.255.128 10.32.32.1 1
delete net 10.32.12.128: gateway 10.32.32.1

To permanently add the route, add the configuration to the file /etc/rc.config.d/netconf

ROUTE_DESTINATION[7]=”10.32.12.128″
ROUTE_MASK[7]=”255.255.255.128″
ROUTE_GATEWAY[7]=”10.32.32.1″
ROUTE_COUNT[7]=”1″
ROUTE_ARGS[7]=””

%d bloggers like this: