Objective: We will configure Routers 1, 2, and 4 with IP addresses and ping between
them to test connectivity.
Configuring IP Addresses:
1. First you want to connect to router one and assign a hostname of Router1
Router>enableRouter#conf tRouter(config)#hostname Router1Router1(config)#
2. What mode must you be in to set the IP address on an interface?
Router1(config)#interface ethernet 0Router1(config-if)#
3. What command will set the IP address on the Ethernet 0 interface to 10.1.1.1
255.255.255.0?
Router1(config-if)#ip address 10.1.1.1 255.255.255.0
4. Now you need to enable the interface. What command did you use?
Router1(config-if)#no shutdown
5. Now set the IP address on the S0 interface of Router1 to 172.16.10.1 255.255.255.0
Router1(config)#Interface Serial 0Router1(config-if)#ip address 172.16.10.1 255.255.255.0Router1(config-if)#no shut
6. Next click on the button Router2 at the top of your screen.
7. Assign a hostname of Router2.
Router>enableRouter#conf tRouter(config)#hostname Router2Router2(config)#
8. Set the IP address for the Ethernet 0 interface to 10.1.1.2 255.255.255.0
Router2(config)#interface Ethernet 0Router2(config-if)#ip address 10.1.1.2 255.255.255.0
9. Enable the interface.
Router2(config-if)#no shutdown
10. Now click on the button Router4 at the top of your screen.
11. Assign an Hostname of Router4 and an IP address of 172.16.10.2 255.255.255.0 on
the serial 0 interface.
Router>enableRouter#conf tRouter(config)#hostname Router4Router4(config)#interface serial 0Router4(config-if)#ip address 172.16.10.2 255.255.255.0
12. Make sure you enable the interface.
Router4(config-if)#no shutdown
13. Connect back to Router1
14. Try and ping Router2's Ethernet interface
Router1#ping 10.1.1.2
15. Try and ping Router4's Serial 0 interface.
Router1#ping 172.16.10.2
16. What command will let you verify that your interfaces line state and protocol state are
up?
Router1#show ip interface brief
17. View your running configuration and verify that the IP addresses appear.
Router1#show running-config
18. View detailed IP information about each interface.
Router1#show ip interface
Basic IP Configuration and Verification Summary
IP addressing is very easy to configure on a Cisco router. Although the calculation of IP
addresses, subnet masks and host can be rather difficult.
The syntax to place an IP address on the interface is:
ip address ip-address mask
Given the routers below, we wish to configure IP addresses on Router1 and Router2.
Remember the /24 means 255.255.255.0. For your convenience here is a handy table:
Let's start configuring Router 1
Router>Router>enRouter#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int e0Router(config-if)#ip address 10.1.1.1 255.255.255.0Router(config-if)#no shutRouter(config-if)#int s0Router(config-if)#ip address 172.16.10.1 255.255.255.0Router(config-if)#no shutRouter(config-if)#end
%SYS-5-CONFIG_I: Configured from console by consoleRouter#We can view the IP addresses on the interface:Router#sh ip interface briefInterface IP-Address OK? Method Status ProtocolBRI0 unassigned YES manual administratively down downEthernet0 10.1.1.1 YES manual administratively down downSerial0 172.16.10.1 YES manual administratively down downRouter#We have assigned an IP address to each interface but the interface is still administrativelydown because we have not executed a no shutdown command on each interface.Now you should go to each of the interfaces and type no shutdown, this should turn theinterfaces to up.Connect to Router 2. We would also like to add IP addresses to the Ethernet 0 interface.Router>Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#int e0Router(config-if)#ip address 10.1.1.2 255.255.255.0Router(config-if)#no shut%SYS-5-CONFIG_I: Configured from console by consoleRouter(config)#exitRouter#exitNow that we have an IP address on both sides of this Ethernet connection, we can nowjump into ping.
PING
PING, the Packet Inter Net Groper, allows a user to test basic connectivity. The syntaxis:ping ip-addressThe router will send out five echo requests to the destination IP address, if itreceives a reply, it will note it with an '!', if no reply is received it will note it with a '.'.A successful ping:Router#ping 10.1.1.1
Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 32/37/44 ms
Router#A failed ping:Router#ping 2.2.2.2
Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:.....Success rate is 0 percent (0/5)
Router#Ping is one of the most commonly used test tools. PING uses the Internet ControlMessage Protocol (ICMP) to communicate with other routers.When pinging devices for the first time, ping may fail on the first try. This is because therouter has not completed its ARP resolution.You can also view your IP addresses using the command show running-config or show ipinterface.