Routing Commands

This document describes the CLI commands used to configure the following IP related features: Address Resolution Protocol (ARP), Ethernet, loopback interfaces, bridge interfaces, VLAN interfaces, and static routes.


Table Of Contents

arp
interface bridge
interface ethernet
interface loopback
interface vlan
ip address
ip default-gateway
ip mtu
ip proxy-arp
ip route
show arp
show interface
show ip route
shutdown

arp


Set a static ARP entry.

arp <IP address> <MAC address>
no arp <IP address>

Use the no form of the command to clear the static ARP entry.

Example:

rcp(config)#arp 192.168.1.77 00:11:22:33:44:55
rcp(config)#show arp
IP address       HW type     Flags       HW address            Mask     Device
192.168.1.77     0x1         0x6         00:11:22:33:44:55     *        eth0
192.168.1.254    0x1         0x2         00:40:a1:b6:df:08     *        eth0
rcp(config)#

interface bridge


Configure a bridge interface. The interface has to be created with brctl before RCP software is started. RCP creates by default two bridge interfaces, br0 and br1.

interface bridge <interface name>
no interface bridge <interface name>

Use the command to enter interface mode. To exit interface mode use exit command. Use the no form of the command to clear all the configuration for the specific interface.

Example:

rcp(config)#interface bridge br0
rcp(config-if br0)#
  exit                        Exit the current mode
  ip                          IP configuration
  no                          Negate a command or set its defaults
  show                        Show running system information
  shutdown                    Shutdown the interface
rcp(config-if br0)#exit
rcp(config)#

interface ethernet


Configure an Ethernet interface.

interface ethernet <interface name>
no interface ethernet <interface name>

Use the command to enter interface mode. To exit interface mode use exit command. Use the no form of the command to clear all the configuration for the specific interface.

Example:

rcp(config)#interface ethernet eth0
rcp(config-if eth0)#
  exit                        Exit the current mode
  ip                          IP configuration
  no                          Negate a command or set its defaults
  show                        Show running system information
  shutdown                    Shutdown the interface
rcp(config-if eth0)#exit
rcp(config)#

interface loopback


Configure the loopback interface.

interface loopback <interface name>
interface loopback <number>
no interface loopback <number>

Use the command to enter loopback interface mode. To exit loopback interface mode use exit command. Use the no form of the command to clear all the configuration for the interface.

Example:

rcp(config)#interface loopback 1
rcp(config-if lo:1)#?
  exit                        Exit the current mode
  ip                          IP configuration
  no                          Negate a command or set its defaults
  show                        Show running system information
rcp(config-if lo:1)#ip address 10.10.20.1/24 
rcp(config-if lo:1)#show interface
Interface        Type         IP                      Status (admin/link)
lo               loopback     127.0.0.1/8             UP/UP
eth0             ethernet     192.168.1.22/24         UP/UP
br0              bridge       10.0.0.1/24             UP/UP
br1              bridge       0.0.0.0/0               DOWN/DOWN
lo:1             loopback     10.10.20.1/24           UP/UP
rcp(config-if lo:1)#exit
rcp(config)#

interface vlan


Configure the VLAN interface.

interface vlan <interface name> id <vlan id> \
           <parent interface>
interface vlan <interface name>
no interface vlan <interface name>

Use the command to create or enter VLAN interface mode. To exit VLAN interface mode use exit command. Use the no form of the command to delete the interface.

Example:

rcp(config)#interface vlan vlan10 id 10 eth0
rcp(config-if vlan10)#
  exit                        Exit the current mode
  ip                          Internet Protocol
  no                          Negate a command or set its defaults
  show                        Show running system information
  shutdown                    Shutdown the interface
rcp(config-if vlan10)#ip address 10.25.66.1/24
rcp(config-if vlan10)#no shutdown
rcp(config-if vlan10)#show interface 
Interface        Type         IP                      Status (admin/link)
lo               loopback     127.0.0.1/8             UP/UP
eth0             ethernet     192.168.1.22/24         UP/UP
br0              bridge       0.0.0.0/0               DOWN/DOWN
br1              bridge       0.0.0.0/0               DOWN/DOWN
vlan10           VLAN         10.25.66.1/24           UP/UP
rcp(config-if vlan10)#
rcp(config-if vlan10)#exit
rcp(config)#

ip address


Set the interface primary IP address.

ip address <CIDR address>
no ip address

Example:

rcp(config-if eth1)#ip address 10.20.0.1/24 

ip default-gateway


Set the default gateway address.

ip default-gateway <address>
no ip default-gateway <address>

Example:

rcp(config)#ip default-gateway 192.168.1.254
rcp(config)#show ip route
Codes: C - connected, S - static, R - RIP, B - blackhole, O - OSPF
IA - OSPF inter area, E1 - OSPF external type 1, E2 - OSPF external type 2

S    0.0.0.0/0[1/0] via 192.168.1.254, eth0
C    192.168.1.0/24 is directly connected, eth0

ip mtu


Set the maximum transmission unit.

ip mtu <MTU>
no ip mtu

The no form of the command restores the default of 1500.

Example:

rcp(config)#interface ethernet eth0
rcp(config-if eth0)#ip mtu 1440

ip proxy-arp


Enable proxy arp functionality on the interface.

ip proxy-arp
no ip proxy-arp

Example:

rcp(config)#interface ethernet eth0 
rcp(config-if eth0)#ip proxy-arp 

ip route


Configure a static route. Blackhole routes are configured using blackhole keyword.

ip route <CIDR address> <next hop> [distance]
no ip route <CIDR address> <next hop>
[no] ip route <CIDR address> blackhole

Optionally, a administrative distance value can be set. A static route can be overwritten by a dynamically learned route with a lower administrative distance. Use the no form of this command to remove static routes.

Example:

rcp(config)#ip route 10.20.0.0/24 192.168.1.77
rcp(config)#show ip route
Codes: C - connected, S - static, R - RIP, B - blackhole, O - OSPF
IA - OSPF inter area, E1 - OSPF external type 1, E2 - OSPF external type 2

S    0.0.0.0/0[1/0] via 192.168.1.254, eth0
S    10.20.0.0/24[1/0] via 192.168.1.77, eth0
C    192.168.1.0/24 is directly connected, eth0
rcp(config)#

show arp


Display the ARP table.

show arp

Example:

rcp#show arp 
IP address       HW type     Flags       HW address            Mask     Device
192.168.1.254    0x1         0x2         00:40:a1:b6:df:08     *        eth0
10.1.0.12        0x1         0x2         4a:49:43:49:82:bd     *        br1
10.0.0.10        0x1         0x2         4a:49:43:49:79:bd     *        br0
10.0.0.11        0x1         0x2         4a:49:43:11:79:bd     *        br0
10.0.0.12        0x1         0x2         4a:49:33:99:79:bd     *        br0
10.1.0.10        0x1         0x2         4a:49:43:49:80:bd     *        br1
rcp#

show interface


Display interface statistics.

show interface [detail]

Example:

rcp#show interface 
Interface        Type         IP                      Status (admin/link)
lo               loopback     127.0.0.1/8             UP/UP
eth0             ethernet     192.168.1.22/24         UP/UP
br0              bridge       10.0.0.1/16             UP/UP
br1              bridge       10.1.0.1/16             UP/UP
rcp#
rcp#show interface detail 
Interface lo admin UP, link UP
	IP address 127.0.0.1, mask 255.0.0.0
	MTU 16436
	TX: 4976 packets, 424068 bytes, 0 errors, 0 dropped
	RX: 4976 packets, 424068 bytes, 0 errors, 0 dropped

Interface eth0 admin UP, link UP
	MAC address 00:15:58:1c:c4:bf
	IP address 192.168.1.22, mask 255.255.255.0
	MTU 1500
	TX: 30750 packets, 2567662 bytes, 0 errors, 0 dropped
	RX: 52612 packets, 59576320 bytes, 0 errors, 0 dropped

Interface br0 admin UP, link UP
	MAC address ca:38:28:3b:17:dc
	IP address 10.0.0.1, mask 255.255.0.0
	MTU 1500
	TX: 1515 packets, 154524 bytes, 0 errors, 0 dropped
	RX: 1470 packets, 204123 bytes, 0 errors, 0 dropped

Interface br1 admin UP, link UP
	MAC address 26:7c:ef:3b:37:2b
	IP address 10.1.0.1, mask 255.255.0.0
	MTU 1500
	TX: 762 packets, 96184 bytes, 0 errors, 0 dropped
	RX: 801 packets, 157996 bytes, 0 errors, 0 dropped

rcp#

show ip route


Display the route table.

show ip route [blackhole | connected | rip | static | summary]

Example:

rcp#show ip route
Codes: C - connected, S - static, R - RIP, B - blackhole, O - OSPF
IA - OSPF inter area, E1 - OSPF external type 1, E2 - OSPF external type 2

S    0.0.0.0/0[0/0] via 192.168.1.254, eth0
C    10.0.0.0/24 is directly connected, br0
O    10.0.3.0/24[110/4] via 10.0.0.10, br0
                        via 10.0.0.11, br0
O    10.0.11.0/24[110/2] via 10.0.0.10, br0
O    10.0.12.0/24[110/2] via 10.0.0.11, br0
O    10.0.21.0/24[110/3] via 10.0.0.10, br0
O    10.0.22.0/24[110/3] via 10.0.0.11, br0
O E2 10.0.40.0/24[110/20] via 10.0.0.10, br0
O E1 10.0.41.0/24[110/23] via 10.0.0.11, br0
C    10.1.0.0/24 is directly connected, br1
C    10.2.0.0/24 is directly connected, br2
C    192.168.1.0/24 is directly connected, eth0
rcp#

shutdown


Disable the interface.

shutdown
no shutdown

The no form of the command enables the interface.

Example:

rcp(config)#interface ethernet eth0
rcp(config-if eth0)#shutdown