Lab 10 CCN
Lab 10 CCN
Lab 10 CCN
Taxila
Computer Communication Networks LAB
Marks obtained:
Remarks:
Instructors Signature: ...
Computer Communication Networks Lab
Page 1
Page 2
2. The different thing is the red link which is serial link (used for WAN). By default,
it is not available so we have to add the modules to the router. Double click on
any router. Turn it off by using power button on the router figure in Physical tab.
On left side modules bar is present. Drag two WIC-2T to smaller blank space and
one NM-8A/S to larger blank space. Now, turn on the router using power switch.
Do the same on second router. Then use Serial DTE or Serial DCE link from
Connections. The router interface that is chosen first becomes that of that type
while the second one becomes the other e.g if you choose DTE and click first
router, it becomes DTE while the second one becomes DCE and vice versa. Just
Page 3
remember that by default all serial interfaces are DTE so we have to provide
clocking on the DCE one!
Router
Lab_A
Lab_A
Lab_A
Lab_B
Lab_B
Lab_B
Lab_C
Lab_C
Lab_C
Network Address
192.168.10.0
192.168.20.0
192.168.50.0
192.168.30.0
192.168.20.0
192.168.40.0
192.168.60.0
192.168.40.0
192.168.70.0
Interface
fa0/0
s1/0
s1/1
fa0/0
s1/0
s1/1
fa0/0
s1/0
s1/1
Address
192.168.10.1
192.168.20.1
192.168.50.1
192.168.30.1
192.168.20.2
192.168.40.1
192.168.60.1
192.168.40.2
192.168.70.1
Page 4
Lab_A(config-if)#exit
Lab_A(config)#banner motd #
This is the Lab_A router
#
Lab_A(config)#^z
Lab_A#copy running-config startup-config
Destination filename [startup-config]? [Enter]
Lab_A#
Before you jump in and configure a serial interface, there are a couple of things you need to
know. First, the interface will usually be attached to a CSU/DSU type of device that provides
clocking for the line to the router. But if you have a back-to-back configuration (for example,
one thats used in a lab environment), one endthe data communication equipment (DCE) end
of the cablemust provide clocking. By default, Cisco routers are all data terminal equipment
(DTE) devices, so you must tell an interface to provide clocking if you need it to act like a DCE
device.
To check the DCE interface, just bring your mouse over serial link, the interface with whose
name you see a
(clock symbol) is the DCE one. You configure a DCE serial interface with the
clock rate command:
Lab_B(config)#interface serial 1/0
Lab_B(config-if)#clock rate ?
<300-4000000> Choose clockrate from list above
Router(config-if)#clock rate 64000
Notice that the clock rate command is in bits per second.
Configure the PCs and Switches too. Make sure all devices are communicating with each other
(use ping to verify).
Now you must have noticed that routers can communicate with devices directly connected to
them. PC0-PC2 and Switch0 can communicate with Lab_A router & in between themselves but
cant with Lab_B router and Switch1 & PC2-PC5 and vice versa.
Page 5
Enabling OSPF
Configuring OSPF areas
Page 6
will operate on, and will also be included in its OSPF LSA advertisements. OSPF will use this
command to find any interface on the router configured in the 10.0.0.0 network, and it will place
any interface it finds into area 0. You can also label an area using an IP address format.
A quick review of wildcards, a 0 octet in the wildcard mask indicates that the corresponding
octet in the network must match exactly. On the other hand, a 255 indicates that you dont care
what the corresponding octet is in the network number. A network and wildcard mask
combination of 1.1.1.1 0.0.0.0 would match 1.1.1.1 only, and nothing else. This is really useful if
you want to activate OSPF on a specific interface in a very clear and simple way. If you insist on
matching a range of networks, the network and wildcard mask combination of 1.1.0.0
0.0.255.255 would match anything in the range 1.1.0.01.1.255.255. Because of this, its simpler
and safer to stick to using wildcard masks of 0.0.0.0 and identify each OSPF interface
individually.
The final argument is the area number. It indicates the area to which the interfaces identified in
the network and wildcard mask portion belong. Remember that OSPF routers will only become
neighbors if their interfaces share a network thats configured to belong to the same area number.
The format of the area number is either a decimal value from the range 14,294,967,295 or a
value represented in standard dotted-decimal notation. For example, area 0.0.0.0 is a legitimate
area, and is identical to area 0.
Lets configure our network with OSPF using just area 0. The simplest and easiest way to
configure OSPF is to use the wildcard mask of 0.0.0.0. We can configure each router differently
with OSPF and still come up with the exact same result.
Lab_A
So heres the Lab_A routers configuration:
Lab_A#config t
Enter configuration commands, one per line. End with CNTL/Z.
Lab_A(config)#router ospf 1
Lab_A(config-router)#network 192.168.10.1 0.0.0.0 area 0
Lab_A(config-router)#network 192.168.20.1 0.0.0.0 area 0
Lab_A(config-router)#network 192.168.50.1 0.0.0.0 area 0
Lab_A(config-router)#^Z
Lab_A#
So why did we use OSPF 1? It really doesnt matterthe number is irrelevant!
The two network commands are pretty straightforward. We typed in the IP address of each
interface and used the wildcard mask of 0.0.0.0, which means that the IP address must match
each octet exactly. Now, lets go on to Lab_B. Were going to use a different configuration.
Lab_B
The Lab_B router is directly connected to networks 20, 30 and 40. Instead of typing in each
interface, we can use one network command and still make it work:
Lab_B#config t
Enter configuration commands, one per line. End with CNTL/Z.
Page 7
Page 8
Page 9
Page 10
Pri State
0 FULL/ -
Page 11
Page 12
Page 13
address wont appear in the OSPF table, so you cant ping it. So basically, what youre faced
with here is a choice that equals a trade-off between the ease of debugging the network and
conservation of address spacewhat to do? A really tight strategy is to use a private IP address
scheme as we did here in configuration.
4.2.2 Verifying Loopbacks and RIDs
To verify your loopback addresses, use show running-configits the easiest way to do it:
Lab_C#show running-config
!
hostname Lab_C
!
interface Loopback0
ip address 172.16.30.1 255.255.255.255
And to verify the new RIDs of each router, you can use the show ip ospf interface command, the
show ip ospf database, or just the show ip ospf command. All three are shown below:
Lab_C#show ip ospf database
OSPF Router with ID (172.16.30.1) (Process ID 100)
Router Link States (Area 0)
Link ID
ADV Router
Age
Seq#
Checksum Link count
172.16.30.1 172.16.30.1 206
0x80000003 0x004d72 3
172.16.10.1 172.16.10.1 208
0x80000003 0x004cf6 3
172.16.20.1 172.16.20.1 203
0x80000005 0x009f44 5
The show ip ospf database shows the RID in the first line of output. The show ip ospf interface
also displays this information, but you have to dig for it a little more:
Lab_C#show ip ospf interface
FastEthernet0/0 is up, line protocol is up
Internet Address 172.16.60.1/24, Area 0
Process ID 100, Router ID 172.16.30.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 172.16.30.1, Interface address 172.16.60.1
No backup designated router on this network
[output cut]
The show ip ospf command shows the RID in the first line of output:
Lab_C#show ip ospf
Routing Process "ospf 100" with ID 172.16.30.1
[output cut]
An important thing to keep in mind is that for some models the new RIDs didnt show up after
setting the loopback interface on each router until routers are rebooted.
Page 14
Page 15