0% found this document useful (0 votes)
50 views

Useful Commands

The document provides an overview of useful commands for configuring routers and computers. It lists important commands for entering configuration mode on a router, displaying router information and configurations, enabling IP routing and subnetting, and establishing static routes. It also provides explanations of key commands for configuring interfaces, the OSPF routing protocol, and restarting network interfaces on a computer.

Uploaded by

Vatui Claudiu
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Useful Commands

The document provides an overview of useful commands for configuring routers and computers. It lists important commands for entering configuration mode on a router, displaying router information and configurations, enabling IP routing and subnetting, and establishing static routes. It also provides explanations of key commands for configuring interfaces, the OSPF routing protocol, and restarting network interfaces on a computer.

Uploaded by

Vatui Claudiu
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

USEFUL COMMANDS

ROUTER CONFIGURATION
========================

The commands used for router configuration are ordered in a tree structure. This is easy to
forget. DON’T DO THAT!

IMPORTANT NOTES:
While at the configuration console you must remember that:
• Pressing the tab key (<TAB>) will give you command recognition.
• Pressing ? will give you a list of available commands in a certain mode.
• All the information commands must be given in “user” mode.
• To configure the router, you must enter the configuration mode: configure terminal
(conf t).
• In the configuration mode the router accepts commands that may alter its present
state, i.e., the router can be configured manually from the console terminal.
• All commands, which change the router’s state, have an exact opposite starting with
no negating, changing or undoing a configuration command. See the example below.

Example of a router configuration command and its cancellation:

Router:$ ip address 10.18.34.41 255.255.255.0


Router:$ no ip address 10.18.34.41 255.255.255.0

Ö Useful router configuration commands – in no particular order Ö

COMMAND EXPLANATION

enable Turns on privileged commands.

show configuration Displays running system configuration.

reload Halts and perform a cold restart.

copy running config startup config Stores current configuration (RAM to NVRAM).

show running config Displays the current configuration (RAM).

show ip route Displays the contents of the routing table.

show ip cache Displays the routes in the fast switching cache.

show interfaces Displays statistics for all the interfaces configured.


Displays information about the Ethernet interface
show in e0
0 (e0).
Displays the status and global parameters about
show ip in e0
Ethernet interface 0 (e0).
Configures the router manually from the console
configure terminal
terminal.
ip routing Enables IP routing (absolutely necessary!).
Allows subnet with 0 in the subnet part (impor-
ip subnet zero
tant).
ip classless Don’t care about A, B and C networks.

1
USEFUL COMMANDS
Disables name to address translation in the
no ip domain lookup
router.
no service udp small services Disables all UDP services.

no service tcp small services Disables all TCP services.

no service config Disables configuration from the network.

service password encryption Enables the password encryption function.

ip route Establishes static routes.


Configures an interface type and enters the inter-
interface
face configuration mode.
Assigns an IP address and a subnet mask to an
ip address
interface.
ip unnumbered Defines an unnumbered interface.

shutdown Disables an interface.

no shutdown Restarts an administratively disabled interface.


Configures the clock rate for hardware connec-
clockrate
tions on serial interfaces.
bandwidth Sets the bandwidth value for an interface.

no ip proxy arp Disables proxy ARP.

media type Specifies the physical connection.


Exits any configuration mode, or closes an active
exit
terminal session.
<Ctrl + Z> Enters user mode.
Displays OSPF info about interface Ethernet 0
show ip ospf in e0
(e0).
Displays information about the OSPF-database
show ip ospf database
(OSPF’s routing table).
Displays all the routes in the forwarding table con-
show ip route ospf
figured for OSPF.
Displays all the routes in the forwarding table
show ip route connected
which are directly connected.
show ip ospf interface in Displays OSPF-information about the in interface
Displays the state of all the OSPF neighbors on a
show ip ospf neighbor
particular network segment.
Enables an OSPF routing process on the router
router ospf pid
with identification pid (Use router ospf 100).
passive interface in Disables OSPF on the in interface

ip ospf cost value Assign a new value for the metric of an interface.

network in-add netmask area area Enables OSPF for a network.

2
USEFUL COMMANDS

COMPUTER CONFIGURATION
===========================

COMMAND EXPLANATION
reboot Nicest way to reboot the computer (Do not use).

man command Displays help for command.

/etc/init.d/net.int restart Restarts interface net.int with the new configura-


tion (can also use: stop, start)
ifconfig –a Finds out which interfaces are enabled on the sys-
tem.
ifconfig Manages an interface on the host (see man page).

route Manipulates the routing table on the host (see man


page).

You might also like