Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ARM network protocols command-line interface reference guide.Ver 1.6.pdf
Скачиваний:
29
Добавлен:
23.08.2013
Размер:
1.61 Mб
Скачать

Diagnostic Commands

3.9IP commands

This section lists the IP diagnostic commands:

routes on page 3-35

rtadd on page 3-36

rtdel on page 3-37.

3.9.1routes

The routes command displays the IP route table.

This command is included in the menu list if IP_ROUTING was defined in ipport.h.

Syntax routes

Example

INET> routes

 

 

..IPaddr.......

mask

.........nexthop...iface..type

10.2.2.0255.255.255.0 10.0.0.2 0 LOCAL

0.0.0.0 0.0.0.0 10.0.0.1 0 LOCAL empty slot

empty slot empty slot empty slot empty slot empty slot empty slot empty slot empty slot empty slot empty slot empty slot empty slot empty slot

cached address is: 10.0.0.1 next hop: 10.0.0.1 iface: 0 INET>

ARM DUI 0145B

Copyright © 2000-2001 ARM Limited. All rights reserved.

3-35

Diagnostic Commands

3.9.2rtadd

The rtadd command manually adds an IP route to the routing table.

This command is included in the menu list if IP_ROUTING was defined in ipport.h.

Syntax

rtadd target_ip target_mask next_hop iface_number where:

target_ip

Is the target IP address in dot notation form, for example 10.0.2.0.

target_mask

Is the target network mask in dot notation form, for example

 

255.255.255.0.

next_hop

Is the router IP address in dot notation form, for example

 

10.0.0.20.

iface_number

Is the interface number.

Example

INET> rtadd

usage: target.ip target.mask next.hop iface

where 1st 3 params are in IP dot notation, last is digit 0-2 INET> rtadd 10.0.2.0 255.255.255.0 10.0.0.25 1

INET> _

3-36

Copyright © 2000-2001 ARM Limited. All rights reserved.

ARM DUI 0145B

Diagnostic Commands

3.9.3rtdel

The rtdel command manually deletes an IP route from the routing table.

This command is included in the menu list if IP_ROUTING was defined in ipport.h.

Syntax

rtdel target_ip target_mask iface_number where:

target_ip

Must match the target IP address of the route(s) you want to

 

delete.

target_mask

Must match the netmask of the route(s) you want to delete.

iface_number

Must match the interface number of the route(s) you want to

 

delete, or be -1 (a wildcard).

Example

INET> rtdel 10.0.2.2 255.255.255.0 -1

Deleted 1 route(s)

INET>

ARM DUI 0145B

Copyright © 2000-2001 ARM Limited. All rights reserved.

3-37