Computer networks
Computer networks
LlAB
Table of Contents
Evaluation Scheme
List of Experiment
LlAB
Institute Vision & Mission
Vision:
Mission: The mission of the Engineering Programme of the Institute is to nurture students’
leadership traits in the field of their domains,
1. To educate students from various dimensions & facete of engineering
knowledge to compete with the professional world,
2. To look forward to foreseeing the future needs of the engineering technology
and prepare students to take the challenges of respective domains in the
most be fitting manner.
3. To develop a robust natural knowledge in the field of engineering and
Technical education.
4. To Create a transformative system capable of accurately predicting market
trends by using engineering and technology.
LlAB
Department of Computer Science
Mission:
1. To develop professionals with analytical and technical competency for
productive career in industry, academia and as entrepreneurs.
2. To build theoretical and applied skills of faculty and student in computer
science and engineering through need based training, research and
development on industrially and socially relevant issues.
3. Continuously improve and provide state-of-the-art laboratories to keep up with
the new developments in the area of computer science and engineering.
4. Create nurturing environment through competitive events, industry
interactions, global collaborations and creating concern for lifelong learning.
LlAB
LlAB
LlAB
University Evaluation Scheme
SEMESTER-VI
End
Sl. Subject Periods Evaluation Scheme
Subject Semester Total Credit
No.
Codes L T P CT TA Total PS TE PE
Deptt-
4 Departmental Elective-III 3 0 0 20 10 30 70 100 3
Elective-III
5 OpenElective-I 3 0 0 20 10 30 70 100 3
Constitution of India/
9 BNC601/ Essence of Indian 2 0 0 20 10 30 70
BNC602 Traditional Knowledge
Total 17 3 6 800 21
MinorDegree/Honors
DegreeMT-1/HT-1
LlAB
University Syllabus:
1. Implementation of Stop and Wait Protocol and Sliding Window Protocol.
2. Study of Socket Programming and Client–Server model
3. Write a code simulating ARP/RARP protocols.
4. Write a code simulating PING and TRACEROUTE commands
5. Create a socket for HTTP for web page upload and download.
6. Write a program to implement RPC(Remote Procedure Call)
7. Implementation of Subnetting.
8. Applications using TCP Sockets like
a. Echo client and echo server b. Chat c. File Transfer
9. Applications using TCP and UDP Sockets like d. DNS e. SNMP f. File Transfer
10. Study of Network simulator (NS). and Simulation of Congestion Control Algorithms using NS
11. Perform a case study about the different routing algorithms to select the network path
with its optimum and economical during data transfer. i. Link State routing ii. Flooding
iii. Distance vector
12. To learn handling and configuration of networking hardware like RJ-45connector,CAT-
6 cable, crimping tool, etc.
13. Configuration of router,hub,switch etc.(using real devices or simulators)
14. Running and using services/commands like ping, trace route, ns look up, arp, telnet, ftp, etc.
15. Network packet analysis using tools like Wire shark, tcp dump, etc.
16. Network simulation using tools like Cisco Packet Tracer, Net Sim, OMNeT++, NS2, NS3, etc.
Socket programming using UDP and TCP (e.g., simple DNS, data & time client/server, echo client/
server, iterative & concurrent servers)
Note: The Instructor may add/delete/modify/tune experiments, wherever he/she feels in a justified
manner
LlAB
Experiment-1
Aim: Study of different types of Network cables and practically implement the cross-wired cable
and straight through cable using clamping tool.
1. Start by stripping off about 2 inches of the plastic jacket off the end of the cable. Be very careful
at this point, as to not nick or cut into the wires, which are inside. Doing so could alter the
characteristics of your cable, or even worse render is useless. Check the wires, one more time for
nicks or cuts. If there are any, just whack the whole end off, and start over.
2. Spread the wires apart, but be sure to hold onto the base of the jacket with your other hand.
You do not want the wires to become untwisted down inside the jacket. Category 5 cable must
only have 1/2 of an inch of 'untwisted' wire at the end; otherwise it will be 'out of spec'. At this
point, you obviously have ALOT more than 1/2 of an inch of un-twisted wire.
3. You have 2 end jacks, which must be installed on your cable. If you are using a pre-made cable,
with one of the ends whacked off, you only have one end to install - the crossed over end. Below
are two diagrams, which show how you need to arrange the cables for each type of cable end.
Decide at this point which end you are making and examine the associated picture below.
Topology Diagram
Objectives
Perform an initial configuration of a Cisco Catalyst 2960 switch.
Background / Preparation
In this activity, you will configure these settings on the customer Cisco Catalyst 2960 switch:
Host name
Console password
vty password
Privileged EXEC mode password
Privileged EXEC mode secret
IP address on VLAN1 interface
Default gateway
Note: Not all commands are graded by Packet Tracer.
Switch>enable
Switch#configure terminal
Switch(config)#hostname CustomerSwitch
b. From line configuration mode, set the password to cisco and require the password to be entered
at login.
CustomerSwitch(config-line)#password cisco
CustomerSwitch(config-line)#login
CustomerSwitch(config-line)#exit
CustomerSwitch(config)#line vty 0 15
b. From line configuration mode, set the password to cisco and require the password to be entered
at login.
CustomerSwitch(config-line)#password cisco
CustomerSwitch(config-line)#login
CustomerSwitch(config-line)#exit
CustomerSwitch(config)#interface vlan 1
CustomerSwitch(config-if)#ip address 192.168.1.5 255.255.255.0
CustomerSwitch(config-if)#no shutdown
CustomerSwitch(config-if)#exit
CustomerSwitch(config)#end
CustomerSwitch#ping 209.165.201.10
CustomerSwitch#
Reflection
a. What is the significance of assigning the IP address to the VLAN1 interface instead of any of the
Fast Ethernet interfaces?
b. What command is necessary to enforce password authentication on the console and vty lines?
c. How many gigabit ports are available on the Cisco Catalyst 2960 switch that you used in the
activity?
Experiment-3
Objectives
Distinguish the difference between successful and unsuccessful ping attempts.
Distinguish the difference between successful and unsuccessful traceroute attempts.
Background / Preparation
In this activity, you will test end-to-end connectivity using ping and traceroute. At the end of this activity, you will
be able to distinguish the difference between successful and unsuccessful ping and traceroute attempts.
Note: Before beginning this activity, make sure that the network is converged. To converge the network
quickly, switch between Simulation mode and Realtime mode until all the link lights turn green.
Step 1: Test connectivity using ping from a host computer and a router.
Click N-Host, click the Desktop tab, and then click Command Prompt. From the Command Prompt window, ping
the Cisco server at www.cisco.com.
Packet Tracer PC Command Line 1.0
PC>ping www.cisco.com
PC>
From the output, you can see that N-Host was able to obtain an IP address for the Cisco server. The IP address was
obtained using (DNS). Also notice that the first ping failed. This failure is most likely due to lack of ARP
convergence between the source and destination. If you repeat the ping, you will notice that all pings succeed.
From the Command Prompt window on N-Host, ping E-Host at 192.168.4.10. The pings fail. If you do not want to
wait for all four unsuccessful ping attempts, press Ctrl+C to abort the command, as shown below.
PC>ping 192.168.4.10
Control-C
^C
PC>
Click the N-Branch router, and then click the CLI tab. Press Enter to get the router prompt. From the router prompt,
ping the Cisco server at www.cisco.com.
N-Branch>ping www.cisco.com
Translating "www.cisco.com"...domain server (64.100.1.242)
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 64.100.1.185, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 210/211/213 ms
N-Branch>
As you can see, the ping output on a router is different from a PC host. Notice that the N-Branch router resolved the
domain name to the same IP address that N-Host used to send its pings. Also notice that the first ping fails, which is
indicated by a period (.), and that the next four pings succeed, as shown with an exclamation point (!).
From the CLI tab on N-Branch, ping E-Host at 192.168.4.10. Again, the pings fail. To not wait for all the
failures, press Ctrl+C.
N-Branch>ping 192.168.4.10
N-Branch>
Step 2: Test connectivity using traceroute from a host computer and a router.
a. Click N-Host, click the Desktop tab, and then click Command Prompt. From the Command
Prompt window, trace the route to the Cisco server at www.cisco.com.
PC>tracert www.cisco.com
1 92 ms 77 ms 86 ms 192.168.1.1
2 91 ms 164 ms 84 ms 64.100.1.101
3 135 ms 168 ms 151 ms 64.100.1.6
4 185 ms 261 ms 161 ms 64.100.1.34
5 257 ms 280 ms 224 ms 64.100.1.62
6 310 ms 375 ms 298 ms 64.100.1.185
Trace complete.
PC>
The above output shows that you can successfully trace a route all the way to the Cisco server at 64.100.1.185.
Each hop in the path is a router responding three times to trace messages from N-Host. The trace continues until the
destination for the trace (64.100.1.185) responds three times.
From the Command Prompt window on N-Host, trace a route to E-Host at 192.168.4.10. The trace fails, but notice
that the tracert command traces up to 30 hops. If you do not want to wait for all 30 attempts to time out, press
Ctrl+C.
PC>tracert 192.168.4.10
1103 ms 45 ms 91 ms 192.168.1.1
256 ms 110 ms 125 ms 64.100.1.101
3174 ms 195 ms 134 ms 64.100.1.6
4246 ms 183 ms 179 ms 64.100.1.34
5217 ms 285 ms 226 ms 64.100.1.62
6246 ms 276 ms 245 ms 64.100.1.154
7 * * * Request timed out.
8 * * * Request timed out.
9 * * * Request timed out.
10
Control-C
^C
PC>
The tracert command can be helpful in finding the potential source of a problem. The last device to
respond was 64.100.1.154, so you would start troubleshooting by determining which device is
configured with the IP address 64.100.1.154. The source of the problem might not be that device,
but the trace has given you a starting point, whereas a ping simply tells you that the destination is
either reachable or unreachable.
Click the N-Branch router, and then click the CLI tab. Press Enter to get the router prompt. From the router prompt,
trace the route to the Cisco server at www.cisco.com.
N-Branch>traceroute www.cisco.com
Translating "www.cisco.com"...domain server (64.100.1.242)
Type escape sequence to abort.
Tracing the route to 64.100.1.185
As you can see, traceroute output on a router is very similar to the output on a PC host. The
only difference is that on a PC host, the IP address is listed after the three millisecond outputs.
From the CLI tab on N-Branch, trace the route to E-Host at 192.168.4.10. The trace fails at the same IP address as
it failed when tracing from N-Host. Again, you can use Ctrl+C to abort the command.
N-Branch>traceroute 192.168.4.10
Type escape sequence to abort.
Tracing the route to 192.168.4.10
Topology
Objectives
Part 1: Capture and Analyze Local ICMP Data in Wireshark
Part 2: Capture and Analyze Remote ICMP Data in Wireshark
Background / Scenario
Wireshark is a software protocol analyzer, or "packet sniffer" application, used for network troubleshooting, analysis,
software and protocol development, and education. As data streams travel back and forth over the network, the sniffer
"captures" each protocol data unit (PDU) and can decode and analyze its content according to the appropriate RFC or other
specifications.
Wireshark is a useful tool for anyone working with networks and can be used with most labs in the CCNA courses for data
analysis and troubleshooting. In this lab, you will use Wireshark to capture ICMP data packet IP addresses and Ethernet
frame MAC addresses.
Required Resources
1 PC (Windows with internet access)
Additional PCs on a local-area network (LAN) will be used to reply to ping requests.
Instructions
a. In a command prompt window, enter ipconfig /all, to the IP address of your PC interface, its description, and its
MAC (physical) address.
C:\Users\Student> ipconfig /all
Windows IP Configuration
-
[Title]
Note: If the PC of your team member does not reply to your pings, this may be because the PC firewall of the team
member is blocking these requests. Please see Error! Reference source not found. for information on how to allow
ICMP traffic through the firewall using Windows.
d. Stop capturing data by clicking the Stop Capture icon.
-
[Title]
a. Click the first ICMP request PDU frames in the top section of Wireshark. Notice that the Source column has your PC
IP address, and the Destination column contains the IP address of the teammate PC that you pinged.
b. With this PDU frame still selected in the top section, navigate to the middle section. Click the plus sign to the left of
the Ethernet II row to view the destination and source MAC addresses.
Questions:
1) www.yahoo.com
2) www.cisco.com
3) www.google.com
Note: When you ping the URLs listed, notice that the Domain Name Server (DNS) translates the URL to an IP address.
Note the IP address received for each URL.
d. You can stop capturing data by clicking the Stop Capture icon.
Step 2: Examining and analyzing the data from the remote hosts.
Review the captured data in Wireshark and examine the IP and MAC addresses of the three locations that you pinged. List
the destination IP and MAC addresses for all three locations in the space provided.
Questions:
-
[Title]
Reflection Question
Why does Wireshark show the actual MAC address of the local hosts, but not the actual MAC address for the remote
hosts?
MAC addresses for remote hosts are not known on the local network, so the MAC address of the default-gateway
is used. After the packet reaches the default-gateway router, the Layer 2 information is stripped from the packet
and a new Layer 2 header is attached with the destination MAC address of the next hop router.
Part 1: Create a new inbound rule allowing ICMP traffic through the firewall.
a. Navigate to the Control Panel and click the System and Security option in the Category view.
b. In the System and Security window, click Windows Defender Firewall or Windows Firewall.
c. In the left pane of the Windows Defender Firewall or Windows Firewall window, click advanced settings.
d. On the Advanced Security window, click the Inbound Rules option on the left sidebar and then click New Rule…
on the right sidebar.
e. This launches the New Inbound Rule wizard. On the Rule Type screen, click the Custom radio button and click
next.
f. In the left pane, click the Protocol and Ports option and using the Protocol Type drop-down menu, select ICMPv4,
and then click next.
g. Verify that Any IP address for both the local and remote IP addresses are selected. Click Next to continue.
h. Select allow the connection. Click Next to continue.
i. By default, this rule applies to all the profiles. Click Next to continue.
-
[Title]
j. Name the rule with Allow ICMP Requests. Click Finish to continue. This new rule should allow your team members
to receive ping replies from your PC.
Background / Scenario
This lab requires you to determine the availability and status of the network interface cards (NICs) on the PC that you use.
Windows provides a number of ways to view and work with your NICs.
In this lab, you will access the NIC information of your PC and change the status of these cards.
Required Resources
1 PC (Windows with two NICs, wired and wireless, and a wireless connection)
Note: At the start of this lab, the wired Ethernet NIC in the PC was cabled to one of the integrated switch ports on a
wireless router and the Local Area Connection (wired) was enabled. The wireless NIC was disabled initially. If the wired
and wireless NICs are both enabled the PC will receive two different IP addresses and the wireless NIC will take
precedence.
Instructions
-
[Title]
Note: Virtual Private Network (VPN) adapters and other types of network connections may also be displayed in this
window.
What is the Service Set Identifier (SSID) for the wireless router of your connection?
Type your answers here.
Answers will vary.
What is the speed of your wireless connection?
Type your answers here.
Answers will vary.
e. Click Details to display the Network Connection Details window.
Questions:
Notice that the information displayed here is the same information that was displayed in the Network Connection
Details window in Step e.
g. Close the command window and the Network Connection Details window. This should return you back to the Wi-Fi
Status window. Click Wireless Properties.
Close a Windows Command Prompt.
-
[Title]
Windows IP Configuration
-
[Title]
Reflection Question
Why would you activate more than one NIC on a PC?
Type your answers here.
Answers may vary. Multiple NICs can be used if more than one path is needed for the PC. One example of this
would be if the PC is being used as a Proxy Server.
-
[Title]
Objectives
Part 1: Examine the Header Fields in an Ethernet II Frame
Part 2: Use Wireshark to Capture and Analyze Ethernet Frames
Background / Scenario
When upper layer protocols communicate with each other, data flows down the Open Systems Interconnection (OSI) layers
and is encapsulated into a Layer 2 frame. The frame composition is dependent on the media access type. For example, if
the upper layer protocols are TCP and IP and the media access is Ethernet, then the Layer 2 frame encapsulation will be
Ethernet II. This is typical for a LAN environment.
When learning about Layer 2 concepts, it is helpful to analyze frame header information. In the first part of this lab, you
will review the fields contained in an Ethernet II frame. In Part 2, you will use Wireshark to capture and analyze Ethernet
II frame header fields for local and remote traffic.
Required Resources
1 PC (Windows with internet access and with Wireshark installed)
Instructions
-
[Title]
-
[Title]
Preamble Not shown in capture This field contains synchronizing bits, processed by the NIC
hardware.
Destination Address Broadcast (ff:ff:ff:ff:ff:ff)
Layer 2 addresses for the frame. Each address is 48 bits long, or
6 octets, expressed as 12 hexadecimal digits, 0-9,A-F.
A common format is 12:34:56:78:9A:BC.
The first six hex numbers indicate the manufacturer of the
Source Address Netgear_99:c5:72
network interface card (NIC), the last six hex numbers are the
(30:46:9a:99:c5:72)
serial number of the NIC.
The destination address may be a broadcast, which contains all
ones, or a unicast. The source address is always unicast.
Frame Type 0x0806 For Ethernet II frames, this field contains a hexadecimal value
that is used to indicate the type of upper-layer protocol in the
data field. There are numerous upper-layer protocols supported
by Ethernet II. Two common frame types are these:
Value Description
0x0800 IPv4 Protocol
0x0806 Address Resolution Protocol (ARP)
Data ARP Contains the encapsulated upper-level protocol. The data field is
between 46 – 1,500 bytes.
-
[Title]
FCS Not shown in capture Frame Check Sequence, used by the NIC to identify errors during
transmission. The value is computed by the sending device,
encompassing frame addresses, type, and data field. It is verified
by the receiver.
-
[Title]
Step 4: From the command prompt window, ping the default gateway of your PC.
Open a Windows command prompt.
From the command window, ping the default gateway using the IP address that you recorded in Step 1.
Close Windows command prompt.
-
[Title]
In the first echo (ping) request frame, what are the source and destination MAC addresses?
Source:
Type your answers here.
This should be the MAC address of the PC.
Destination:
Type your answers here.
This should be the MAC address of the Default Gateway.
What are the source and destination IP addresses contained in the data field of the frame?
Source:
Type your answers here.
This is still the IP address of the PC.
Destination:
Type your answers here.
This is the address of the server at www.cisco.com.
Compare these addresses to the addresses you received in Step 6. The only address that changed is the destination IP
address. Why has the destination IP address changed, while the destination MAC address remained the same?
Type your answers here.
Layer 2 frames never leave the LAN. When a ping is issued to a remote host, the source will use the default
gateway MAC address for the frame destination. The default gateway receives the packet, strips the Layer 2
-
[Title]
frame information from the packet and then creates a new frame header with the MAC address of the next
hop. This process continues from router to router until the packet reaches its destination IP address.
Reflection Question
Wireshark does not display the preamble field of a frame header. What does the preamble contain?
Type your answers here.
The preamble field contains seven octets of alternating 1010 sequences, and one octet that signals the beginning of
the frame, 10101011.
-
Experirment-5
Aim: Configure Initial Router Settings
Topology Diagram
Use this syntax checker to practice configuring the initial settings on a router.
The following tasks should be completed when configuring initial settings on a router.
Router(config-line)# exit
Router(config)# service password-encryption
Router(config)# end
Router# copy running-config startup-config
At this point, your routers have their basic configurations. The next step is to configure their
interfaces. This is because routers are not reachable by end devices until the interfaces are
configured. There are many different types of interfaces available on Cisco routers. For
example, the Cisco ISR 4321 router is equipped with two Gigabit Ethernet interfaces:
The task to configure a router interface is very similar to a management SVI on a switch.
Specifically, it includes issuing the following commands:
the description command would be helpful to enter the third-party connection and contact
information. no shutdown command activates the interface and is similar to powering on the
interface.
R1> enable
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)#
state to down
state to up
R1(config)#
R1(config)#
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)#
state to down
state to up
R1(config)#
Note: Notice the informational messages informing us that G0/0/0 and G0/0/1 are enabled.
There are several commands that can be used to verify interface configuration. The most
useful of these is the show ip interface brief and show ipv6 interface brief commands, as
shown in the example.
GigabitEthernet0/0/0 [up/up]
FE80::201:C9FF:FE89:4501
2001:DB8:ACAD:10::1
GigabitEthernet0/0/1 [up/up]
FE80::201:C9FF:FE89:4502
2001:DB8:FEED:224::1
unassigned
R1#
The table summarizes the more popular show commands used to verify interface
configuration.
Table caption
Commands Description
show ip route Displays the contents of the IP routing tables stored in RAM.
show ipv6 route
Table caption
Commands Description
show ip interfaces Displays the IPv4 statistics for all interfaces on a router.
show ipv6 Displays the IPv6 statistics for all interfaces on a router.
interface
R1# show ip interface brief Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0/0 192.168.10.1 YES manual up up GigabitEthernet0/0/1 209.165.200.225
YES manual up up Vlan1 unassigned YES unset administratively down down R1#
Experirment-6
Aim: Subnet an IPv4 Network: Variable Length Subnetting
Topology Diagram
Part 1: Design an IPv4 Network Subnetting Scheme Part 2: Configure the Devices
Background / Scenario
In this activity, you will subnet the Customer network into multiple subnets. The subnet scheme should be
based on the number of host computers required in each subnet, as well as other network considerations, like
future network host expansion.
After you have created a subnetting scheme and completed the table by filling in the missing host and
interface IP addresses, you will configure the host PCs, switches and router interfaces.
After the network devices and host PCs have been configured, you will use the ping command to test for
network connectivity.
Instructions
Step 1: Create a subnetting scheme that meets the required number of subnets and required
number of host addresses.
In this scenario, you are a network technician assigned to install a new network for a customer. You must
create multiple subnets out of the 192.168.0.0/24 network address space to meet the following requirements:
a. The first subnet is the LAN-A network. You need a minimum of 50 host IPaddresses.
b. The second subnet is the LAN-B network. You need a minimum of 40 host IPaddresses.
c. You also need at least two additional unused subnets for future networkexpansion.
Note: Variable length subnet masks will not be used. All of the device subnet masks should be the same
length.
d. Answer the following questions to help create a subnetting scheme that meets the statednetwork
requirements:
How many host addresses are needed in the largest required subnet?50
The network that you are tasked to subnet is 192.168.0.0/24. What is the /24 subnet mask in binary?
e. The subnet mask is made up of two portions, the network portion, and the host portion. Thisis
represented in the binary by the ones and the zeros in the subnetmask.
Given each of the possible subnet masks depicted in the following binary format, how many subnets and
how many hosts are created in each example?
Hint: Remember that the number of host bits (to the power of 2) defines the number of hosts per subnet
(minus 2), and the number of subnet bits (to the power of two) defines the number of subnets. The subnet
bits (shown in bold) are the bits that have been borrowed beyond the original network mask of /24. The
/24 is the prefix notation and corresponds to a dotted decimal mask of 255.255.255.0.
1) (/25) 11111111.11111111.11111111.10000000
Dotted decimal subnet mask equivalent:
2) (/26) 11111111.11111111.11111111.11000000
3) (/27) 11111111.11111111.11111111.11100000
Dotted decimal subnet mask equivalent:
4) (/28) 11111111.11111111.11111111.11110000
Dotted decimal subnet mask equivalent:
5) (/29) 11111111.11111111.11111111.11111000
Dotted decimal subnet mask equivalent:
6) (/30) 11111111.11111111.11111111.11111100
Dotted decimal subnet mask equivalent:
Considering your answers above, which subnet masks meet the required number of minimum host
addresses?/26
Considering your answers above, which subnet masks meets the minimum number of
subnets required?
Considering your answers above, which subnet mask meets both the required minimum
number of hosts and the minimum number of subnets required?
When you have determined which subnet mask meets all of the stated network
requirements, deriveeach of the subnets. List the subnets from first to last in the table.
Remember that the first subnet is 192.168.0.0 with the chosen subnetmask.
192.168.0.64/192.168.0.127/64
192.168.0.128/192.168.0.191/64
192.168.0.192/192.168.0.255/64
b. Determine if PC-B can communicate with its default gateway. Do you get areply?
c. Determine if PC-A can communicate with PC-B. Do you get areply?
Experirment-7&8
Aim: 7 VLAN Creation
Aim: 8 TRUNK Creation
• The first inter-VLAN routing solution relied on using a router with multiple
Ethernet interfaces. Each router interface was connected to a switch port in
different VLANs. The router interfaces served as the default gateways to
the local hosts on the VLAN subnet.
• Legacy inter-VLAN routing using physical interfaces works, but it has a
significant limitation. It is not reasonably scalable because routers have a
limited number of physical interfaces. Requiring one physical router
interface per VLAN quickly exhausts the physical interface capacity of a
router.
VLAN Configuration
VLAN details are stored in the vlan.dat file. You create VLANs in the global configuration
mode.
:-
VLAN Creation Example
• If the Student PC is going to be in VLAN 20, we will create the VLAN first and then
name it.
• If you do not name it, the Cisco IOS will give it a default name of vlan and the four
digit number of the VLAN. E.g. vlan0020 for VLAN 20.
Once the VLAN is created, we can then assign it to the correct interfaces.
• We will want to create and name both Voice and Data VLANs.
• In addition to assigning the data VLAN, we will also assign the Voice VLAN and turn
on QoS for the voice traffic to the interface.
• The newer catalyst switch will automatically create the VLAN, if it does not already
exist, when it is assigned to an interface.
Note: QoS is beyond the scope of this course. Here we do show the use of the
mlsqos trust [cos | device cisco-phone | dscp | ip-precedence] command.
Verify VLAN Information
Delete VLANs
Configure and verify VLAN trunks. Trunks are layer 2 and carry traffic for all VLANs.
Reset the trunk to an access mode with the switchport mode access command:
• Is set to an access interface administratively
• Is set as an access interface operationally (functioning)
Introduction to DTP
The default DTP configuration is dependent on the Cisco IOS version and platform.
• Use the show dtp interface command to determine the current DTP mode.
• Best practice recommends that the interfaces be set to access or trunk and to turnoff
DTP
Experirment-9
Router-on-a-Stick Scenario:-
• In the figure, the R1 GigabitEthernet 0/0/1 interface is connected to the S1
FastEthernet 0/5 port. The S1 FastEthernet 0/1 port is connected to the S2 FastEthernet
0/1 port. These are trunk links that are required to forward traffic within and between
VLANs.
• To route between VLANs, the R1 GigabitEthernet 0/0/1 interface is logically divided
into three subinterfaces, as shown in the table. The table also shows the three VLANs
that will be configured on the switches.
• Assume that R1, S1, and S2 have initial basic configurations. Currently, PC1 and PC2
cannot ping each other because they are on separate networks. Only S1 and S2
can ping each other, but they but are unreachable by PC1 or PC2 because they are also
on different networks.
• To enable devices to ping each other, the switches must be configured with VLANs
and trunking, and the router must be configured for inter-VLAN routing.
Repeat the process for each VLAN to be routed. Each router subinterface
must be assigned an IP address on a unique subnet for routing to occur.
When all subinterfaces have been created, enable the physical interface
using the no shutdown interface configuration command. If the physical
interface is disabled, all subinterfaces are disabled.
Next, use ping to verify connectivity with PC2 and S1, as shown in the
figure. The ping output successfully confirms inter-VLAN routing is
operating.
Verify Connectivity Between PC1 and PC2 ( Cont…)
• show ip route
• show ip interface brief
• show interfaces
• show interfaces trunk