Documente Academic
Documente Profesional
Documente Cultură
Topology Diagram
IP address table:
Learning Objectives
1. Perform basic configuration tasks on a router
2. Configure and activate Serial and Ethernet interface
3. Test connectivity
Configure Banner
R1>enable
Password:
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#banner motd #
Warning! This is my banner :)#
R1>enable
Password:
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#line vty 0 4
R1(config-line)#password gns3
R1(config-line)#login
Use Show running-configure to show result
R1#erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Router R1
Router R2
Configure ip address for interface serial 2/0, serial 2/1 and f0/0
R2>enable
Password:
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface serial 2/0
R2(config-if)#ip address 172.16.2.2 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
R2(config-if)#exit
Interfaces configuration
Router R3
PC1
PC2
PC3
R1#debug ip routing
IP routing debugging is on
or
Router R1
R1>
R1>enable
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip route 172.16.1.0 255.255.255.0 serial 2/0
*Jan 23 10:22:33.231: RT: SET_LAST_RDB for 172.16.1.0/24 NEW rdb: is directly
connected
*Jan 23 10:22:33.231: RT: add 172.16.1.0/24 via 0.0.0.0, static metric [1/0]*Jan 23
10:22:33.235: RT: NET-RED 172.16.1.0/24
R1(config)#ip route 192.168.1.0 255.255.255.0
R1(config)#ip route 192.168.1.0 255.255.255.0 serial 2/0
*Jan 23 10:23:00.371: RT: SET_LAST_RDB for 192.168.1.0/24 NEW rdb: is directly
connected
*Jan 23 10:23:00.371: RT: add 192.168.1.0/24 via 0.0.0.0, static metric [1/0]*Jan 23
10:23:00.375: RT: NET-RED 192.168.1.0/24
R1(config)#ip route 192.168.2.0 255.255.255.0 serial 2/0
*Jan 23 10:23:20.967: RT: SET_LAST_RDB for 192.168.2.0/24 NEW rdb: is directly
connected
*Jan 23 10:23:20.971: RT: add 192.168.2.0/24 via 0.0.0.0, static metric [1/0]*Jan 23
10:23:20.971: RT: NET-RED 192.168.2.0/24
Note: Yellow mark is debug ip routing information. You only can receive this information after
enable debug mode use "debug ip routing" command
Router R2
Reachability towards 172.16.3.0/24,192.168.2.0/24 . The next-hop router R1 outbound interface is s2/0 and
R3 outbound interface is s2/1.
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#ip route 172.16.3.0 255.255.255.0 serial 2/0
R2(config)#ip route 192.168.2.0 255.255.255.0 serial 2/1
Router R3
Reach-ability towards 172.16.3.0/24, 172.16.1.0/24, 172.16.2.0/24 . The next-hop router R3 outbound interface is
s2/0.
R3#
R3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#ip route 172.16.3.0 255.255.255.0 serial 2/0
R3(config)#ip route 172.16.2.0 255.255.255.0 serial 2/0
R3(config)#ip route 172.16.1.0 255.255.255.0 serial 2/0
Note: You can not just be changed, we must remove old route configuration before add new route
information. Otherwise, both old and new route will keep in configuration file.
To remove ip route, use command "no ip route"
Example: R3(config)#no ip route 172.16.1.0 255.255.255.0 serial 2/0
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 3 subnets
S
172.16.1.0 is directly connected, Serial2/0
C
172.16.2.0 is directly connected, Serial2/0
C
172.16.3.0 is directly connected, FastEthernet0/0
S 192.168.1.0/24 is directly connected, Serial2/0
S 192.168.2.0/24 is directly connected, Serial2/0
Check connectivity