Wednesday, December 16, 2009

Configuring Router Interfaces

In this post I'll cover the configuration of an ethernet interface on the router, and I'll demonstrate commands to interrogate and help troubleshoot the interfaces.

Lab Setup

In this lab I'll have two router and I'll configure them to talk to each other



To start with you might want to clarify exactly which interfaces your router might have. This can be done visually (by looking at the device) or by using some of the excellent show commands.

The show version command will print to the screen exactly which interfaces are installed.

R0>en
Ro#show version




The show interfaces command gives details on the configuration of the interface, setting such as duplex and speed, and it will also show traffic statistics.

R0#show interfaces



If you have many interfaces in your router you can just focus on a single interface using the interface number (remember, slot/port):

R0#show interfaces fastethernet 0/0


From the output I can see that the interface isn't configured. I'll configure that port and then take another look. I'll go into configuration mode select the interface, give it an IP address and subnet mask then tell it not to be in the shutdown state. Remember, by default all ports are in a shutdown state. Another import thing to remember is if you restore your config from a backup the ports will need to be taken out of the shutdown state manually.

R0>enable
R0#
configure terminal
R0(config)#
interface fastethernet 0/0
R0(config-if)#ip address 192.168.1.1 255.255.255.252
R0(config-if)#no shut

R0(config-if)#exit




I saw the line come up when I was setting the port up, so now i'll ping my other router.



Wel the ping came back fine and after another look at the interface I can see it has the right IP address and the counters are updating nicely.


Another great command for looking at the interface is:

R0#show ip interface fastethernet 0/0



This shows me absolutely everything that is set or can be set on the interface.

And finally one last command for looking at the interface status in a nice condensed format is:

R0#show ip interface brief

Here I see all interfaces, what there IP addresses are and whether they are up or not.



So this has been a quick post on setting up an interface with an IP address and using some handy show commands to check the interface.

+++

Share |

"make something then You never be lost"

wibiya widget