PROPHET/OS

NAME

ip: it sets the network

SYNOPSIS

ip address set <address>/<prefix>

DESCRIPTION

It sets the network. What the network carries stands in net; this command changes it and shows nothing.

ip address set <address>/<prefix>    set the address by hand
ip ethernet up|down                  switch the card on or off
ip route add <net>/<prefix> via <gw>
ip route del <net>/<prefix> [card]

Setting the address by hand leaves the gateway where it is: the two are separate settings, and a machine that keeps its gateway when its address changes is the usual case, not the exception.

In the routing table the longest mask wins. A route to 0.0.0.0/0 is therefore the last one asked, and that is what makes it the default route.

ip route del without a card name deletes the route on every card. The card number is not optional out of politeness: 0 is a card, not "all of them".

The card configuration the machine starts with lives in /system/config/net/cards/net0; what ip sets holds until the next start.

the network), filter, ping, resolve, dig.

EXAMPLE

$ ip
[WARN] ip        ip sets, `net` shows
ip address set <address>/<prefix>
  sets the network; `net` shows what it carries
ip ethernet up|down
  switches the card on or off
ip route add <net>/<prefix> via <gw> | del <net>/<prefix> [card]
  enters a route or takes one out

SEE ALSO

net` (which shows all of this), dhcpcv` (which sets it from