Updated Computer Network
Updated Computer Network
dragging and dropping routers, switches and various other types of network
devices. A physical connection between devices is represented by a "cable"
item. Packet Tracer supports an array of simulated Application Layer
protocols, as well as basic routing with RIP, OSPF, EIGRP, BGP, to the
extents required by the current CCNA curriculum. As of version 5.3, Packet
Tracer also supports the Border Gateway Protocol.
In addition to simulating certain aspects of computer networks, Packet
Tracer can also be used for collaboration. As of Packet Tracer 5.0, Packet
Tracer supports a multi-user system that enables multiple users to connect
multiple topologies together over a computer network. Packet Tracer also
allows instructors to create activities that students have to complete. Packet
Tracer is often used in educational settings as a learning aid. Cisco Systems
claims that Packet Tracer is useful for network experimentation.
Packet Tracer allows students to design complex and large networks, which is
often not feasible with physical hardware, due to costs. Packet Tracer is
commonly used by CCNA Academy students, since it is available to them for
free. However, due to functional limitations, it is intended by CISCO to be
used only as a learning aid, not a replacement for Cisco routers and switches.
The application itself only has a small number of features found within the
actual hardware running a current Cisco IOS version. Thus, Packet Tracer is
unsuitable for modelling production networks. It has a limited command set,
1.ipconfig
This command details how IP is setup on the machine you are logged into.
1. TRACERT
This command shows you all the routers that your TCP/IP message
goes through in order to make a connection to another IP address.
e.g. tracert192.168.0.18
2. Ping command
The ping command is a Command Prompt command used to test the ability of the source
computer to reach a specified destination computer. The ping command is usually used
as a simple way to verify that a computer can communicate over the network with
another computer or network device.
The ping command operates by sending Internet Control Message Protocol (ICMP) Echo
Request messages to the destination computer and waiting for a response. How many
of those responses are returned, and how long it takes for them to return, are the two
major pieces of information that the ping command provides.
Example:
Ping www.google.com
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-if)#no shutdown
CustomerSwitch(config-if)#exit
b. Click the Check Results button at the bottom of this instruction window to check your work
CustomerSwitch(confi
g)#end
CustomerSwitch#ping
209.165.201.10
181/189/197 ms 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?
Java
// Java code to implement the approach
Import java.util.Arrays;
Class Program {
// Initialize result
int n = b.length();
if (a.charAt(i) == b.charAt(i))
result += “0”;
else
result += "1";
}
return result;
{
// Number of bits to be XORed at a time. int
pick = divisor.length();
if (tmp.charAt(0) == '1')
// Replace the dividend by the result
+ dividend.charAt(pick);
else
// If leftmost bit is '0'.
.replace("\0", "0"),
tmp)
+ dividend.charAt(pick);
// Increment pick to move further
pick += 1;
if (tmp.charAt(0) == '1')
else
.replace("\0", "0"),
tmp);
return tmp;
}
// Function used at the sender side to encode
.replace("\0", "0"));
String remainder = Mod2Div(appended_data, key);
if (currxor.length() != key.length()) {
currxor += data.charAt(curr++);
else {
}
if (currxor.length() == key.length()) {
if (currxor.contains("1"))
else {
// Driver code
System.out.println("\nSender side...");
EncodeData(data, key);
System.out.println("Receiver side...");
.replace("\0", "0"),key),key);
OUTPUT
{
// Stores the stuffed array
int i, j, k;
i = 0;
j = 0;
while (i < N) {
1) {
// next 5 bits
k++) {
j++;
j++;
brr[j] = 0;
i = k;
}
// Otherwise insert arr[i] into
brr[j] = arr[i];
} i++; j++;
}
// Print Answer for (i
= 0; i < j; i++)
System.out.printf("%d", brr[i]);
}
// Driver Code
int N = 6;
int arr[] = { 1, 1, 1, 1, 1, 1 };
bitStuffing(N, arr);
for i in range(m):
return i
k=1
m = len(data)
res = ''
# If position is power of 2 then insert '0'
if(i == 2**j):
j += 1
are
return res[::-1]
n = len(arr)
# 0 to r - 1
for i in range(r):
val = 0
return arr
n = len(arr)
res = 0
for i in range(nr):
val = 0
return int(str(res), 2)
transmitted ‘
data = '1011001'
Bits Required ‘
m = len(data)
r = calcRedundantBits(m)
# Determine the positions of Redundant Bits
arr = posRedundantBits(data, r)
arr = calcParityBits(arr, r)
# Data to be transferred
arr)
by changing
# a bit value.
if(correction==0):
else:
OUTPUT
import java.net.*;
import java.io.*;
import java.util.*;
import java.net.InetAddress;
public class JavaProgram
(localhost.getHostAddress()).trim());
// Find public IP address String
systemipaddress = "";
try
systemipaddress = sc.readLine().trim();
catch (Exception e)
Output:
System IP Address : 10.0.8.204
Public IP Address : 35.168.48.97
import java.net.*;
import java.*;
class GFG {
throws UnknownHostException
catch (MalformedURLException e) {
Output:
Public IP Address of:
www.google.com/216.58.196.164
Aryan Singh CSE VI A 2001330100073
Aryan Singh CSE VI A 2001330100073