Pages

Total Pageviews

Saturday, September 21, 2019

Introduction to Network - Course 6



5.2.17 Lab – Viewing the Switch MAC Address Table
Topology
Addressing Table
Device
Interface
IP Address
Subnet Mask
Default Gateway
S1
VLAN 1
192.168.1.11
255.255.255.0
N/A
S2
VLAN 1
192.168.1.12
255.255.255.0
N/A
PC-A
NIC
192.168.1.3
255.255.255.0
N/A
PC-B
NIC
192.168.1.2
255.255.255.0
N/A
Objectives
Part 1: Build and Configure the Network
Part 2: Examine the Switch MAC Address Table
Background / Scenario
The purpose of a Layer 2 LAN switch is to deliver Ethernet frames to host devices on the local network. The switch records host MAC addresses that are visible on the network, and maps those MAC addresses to its own Ethernet switch ports. This process is called building the MAC address table. When a switch receives a frame from a PC, it examines the frame’s source and destination MAC addresses. The source MAC address is recorded and mapped to the switch port from which it arrived. Then the destination MAC address is looked up in the MAC address table. If the destination MAC address is a known address, then the frame is forwarded out of the corresponding switch port associated with that MAC address. If the MAC address is unknown, then the frame is broadcasted out of all switch ports, except the one from which it came. It is important to observe and understand the function of a switch and how it delivers data on the network. The way a switch operates has implications for network administrators whose job it is to ensure secure and consistent network communication.
Switches are used to interconnect and deliver information to computers on local area networks. Switches deliver Ethernet frames to host devices identified by network interface card MAC addresses.
In Part 1, you will build a multi-switch topology with a trunk linking the two switches. In Part 2, you will ping various devices and observe how the two switches build their MAC address tables.
Note: The switches used are Cisco Catalyst 2960s with Cisco IOS Release 15.0(2) (lanbasek9 image). Other switches and Cisco IOS versions can be used. Depending on the model and Cisco IOS version, the commands available and output produced might vary from what is shown in the labs.
Note: Make sure that the switches have been erased and have no startup configurations. If you are unsure contact your instructor.
Required Resources
·         2 Switches (Cisco 2960 with Cisco IOS Release 15.0(2) lanbasek9 image or comparable)
·         2 PCs (Windows 7 or 8 with terminal emulation program, such as Tera Term)
·         Console cables to configure the Cisco IOS devices via the console ports
·         Ethernet cables as shown in the topology
Note: The Fast Ethernet interfaces on Cisco 2960 switches are autosensing and an Ethernet straight-through cable may be used between switches S1 and S2. If using another model Cisco switch, it may be necessary to use an Ethernet crossover cable.
Part 1:     Build and Configure the Network
Step 1:     Cable the network according to the topology.
Step 2:     Configure PC hosts.
Step 3:     Initialize and reload switches as necessary.
Step 4:     Configure basic settings for each switch.
a.     Configure device name as shown in the topology.
b.     Configure IP address as listed in Addressing Table.
c.     Assign cisco as the console and vty passwords.
d.     Assign class as the privileged EXEC password.
Part 2:     Examine the Switch MAC Address Table
A switch learns MAC addresses and builds the MAC address table, as network devices initiate communication on the network.
Step 1:     Record network device MAC addresses.
a.     Open a command prompt on PC-A and PC-B and type ipconfig /all. What are the Ethernet adapter physical addresses?
PC-A MAC Address:      192.168.1.3
PC-B MAC Address:      192.168.1.2
b.     Console into switch S1 and S2 and type the show interface F0/1 command on each switch. On the second line of command output, what is the hardware addresses (or burned-in address [bia])?
S1 Fast Ethernet 0/1 MAC Address:    0023.abf6.2981
S2 Fast Ethernet 0/1 MAC Address:    0013.c4ea.d183
Step 2:     Display the switch MAC address table.
Console into switch S2 and view the MAC address table, both before and after running network communication tests with ping.
a.     Establish a console connection to S2 and enter privileged EXEC mode.
b.     In privileged EXEC mode, type the show mac address-table command and press Enter.
S2# show mac address-table
Even though there has been no network communication initiated across the network (i.e., no use of ping), it is possible that the switch has learned MAC addresses from its connection to the PC and the other switch.
Are there any MAC addresses recorded in the MAC address table?
    Yes
What MAC addresses are recorded in the table? To which switch ports are they mapped and to which devices do they belong? Ignore MAC addresses that are mapped to the CPU.

If you had not previously recorded MAC addresses of network devices in Step 1, how could you tell which devices the MAC addresses belong to, using only the output from the show mac address-table command? Does it work in all scenarios?
You will be able to tell because if you follow the topology there will be one device attached to each port so you can follow the Ethernet cable from the port back to the device.
Step 3:     Clear the S2 MAC address table and display the MAC address table again.
a.     In privileged EXEC mode, type the clear mac address-table dynamic command and press Enter.
S2# clear mac address-table dynamic

b.     Quickly type the show mac address-table command again. Does the MAC address table have any addresses in it for VLAN 1? Are there other MAC addresses listed?
   It has one VLAN 1 MAC address but it is missing the other. The PC-B is also not shown on the MAC address table either.
Wait 10 seconds, type the show mac address-table command, and press Enter. Are there new addresses in the MAC address table?     Yes
Step 4:     From PC-B, ping the devices on the network and observe the switch MAC address table.
a.     From PC-B, open a command prompt and type arp -a. Not including multicast or broadcast addresses, how many device IP-to-MAC address pairs have been learned by ARP?
   None were learned by ARP
b.     From the PC-B command prompt, ping PC-A, S1, and S2. Did all devices have successful replies? If not, check your cabling and IP configurations.
    Yes
c.     From a console connection to S2, enter the show mac address-table command. Has the switch added additional MAC addresses to the MAC address table? If so, which addresses and devices?
    Yes it added Fa0/1 with a mac address of e840.f2c2.d019
From PC-B, open a command prompt and retype arp -a. Does the PC-B ARP cache have additional entries for all network devices that were sent pings?
     Yes

Reflection
On Ethernet networks, data is delivered to devices by their MAC addresses. For this to happen, switches and PCs dynamically build ARP caches and MAC address tables. With only a few computers on the network this process seems fairly easy. What might be some of the challenges on larger networks?
            

                Some of the challenges on larger networks would be there are many devices that you will need to look through. And finding a specific devices might take some time when looking through a network with hundreds of devices.




http://erdoganakbiyik.blogspot.com/
https://www.youtube.com/channel/UCDsUnmBfVdEPkcC8FlzPKcg


Tuesday, September 10, 2019

Project #5 at Java Programming

import java.util.*;
// This program was made by Erdogan Akbiyik

/* Project 5 Polynomial Program - This program was created in purpose to find the solution of the mathematical operations.
*/

import java.lang.Math;

// In this program, we will use the result of the given function values.
// We write the methods according to the given values.

class Polynomial {
   private double[] coeff;
   private int degree;
   public Polynomial() {
      degree = 0;
      coeff = new double[degree+1];
      coeff[0] = 0;
   }
   public Polynomial(String coeff) {
      setCoeff(coeff);
   }
   public double[] getCoeff() {
      return coeff;
   }
   public int getDegree() {
      return degree;
   }
   public void setCoeff(String coeff) {
      String[] arr = coeff.split(" ");
      this.degree = arr.length-1;
      this.coeff = new double[degree+1];
      for(int i=0;i<arr.length;i++)
      {
         double d = Double.parseDouble(arr[i]);
         this.coeff[i] = d;
      }
   }
   public Polynomial add(Polynomial p)
   {
      Polynomial r = new Polynomial();
      r.degree = (this.degree < p.degree) ? p.degree : this.degree;
      r.coeff = new double[r.degree+1];
      for(int i = 0; i<r.coeff.length;i++) {
         if(i<this.coeff.length && i<p.coeff.length)
         {
            r.coeff[i] = this.coeff[i] + p.coeff[i];
         }
         else if(i<this.coeff.length)
         {
            r.coeff[i] = this.coeff[i];
         }
         else if(i<p.coeff.length)
         {
            r.coeff[i] = p.coeff[i];
         }
      }
      return r;   // returning the value if its in the current r of Polynomial
   }
   public String toString()
   {
      String r = "f(x) = " + this.coeff[0];
      for(int i=1;i<this.coeff.length;i++)
      {
         if(this.coeff[i]>=0) r+= "+";
         r += this.coeff[i] + "x^"+i;
      }
      return r;
   }
   public double evaluate(double x)
   {
      double r = 0;
      for(int i=0;i<this.coeff.length;i++)
      {
         r+= Math.pow(x,i)*this.coeff[i];
      }
      return r;   // returning the value if its in the current r of evaluate
   }
   public Polynomial derivative()
   {
      Polynomial r = new Polynomial();
      r.degree = this.degree-1;
      r.coeff = new double[r.degree+1];
      for(int i=0;i<r.coeff.length;i++)
      {
         r.coeff[i] = this.coeff[i+1]*(i+1);
      }
      return r;   // returning the value if its in the current r of Polynomial derivative
   }
   public double findRoot(double x)
   {
      Polynomial deriv = this.derivative();
      double h = this.evaluate(x) / deriv.evaluate(x);
      while (Math.abs(h) >= 0.00001)
      {
         h = this.evaluate(x) / deriv.evaluate(x); 
         x = x - h;
      }
      return x;    // returning the value if its in the current x of Root
   
   // Thanks for using my program!!!
   
   }
 }


//Test Driver for polynomial project
//As you build your class comment out parts of the switch
//so that you can check each case

//Build the constructors and the toString methods first
//Build stub methods for others not working yet

import java.util.Scanner;

class PolynomialDriver {
   public static void main(String args []) {
      Scanner input = new Scanner(System.in);
      System.out.println("##Constructor Tests##");
      //Test default constructor
      Polynomial testValue1 = new Polynomial();
      //Test toString method
      System.out.println("Your test polynomial is " + testValue1); //should be f(x) = 0.0
      //Test constructor
      Polynomial testValue2 = new Polynomial("0 1 -3 0 1 2 0 0");
      System.out.println("Your 2nd test polynomial is " + testValue2);
      System.out.println("It's degree is : " + testValue2.getDegree());  // should be 5
      System.out.println();
      //Loop to repeat menu until quit is chosen
      int choice = 0;
      while (choice != 7) {
         choice = menu();
         switch(choice) {
            case 1:
               System.out.println("Display Polynomials");
               System.out.println("#1  :  " + testValue1);
               System.out.println("#2  :  " + testValue2);
               System.out.println();
               break;
            case 2: //input values with single spaces between values
               System.out.println("Input New Polynomials");
               String coeff;
               System.out.print("Enter values for first Polynomial :");
               coeff = input.nextLine();
               testValue1.setCoeff(coeff);
               System.out.println();
               System.out.print("Enter values for second Polynomial :");
               coeff = input.nextLine();
               testValue2.setCoeff(coeff);
               System.out.println();
               break;
            case 3: //call add method
               System.out.println("Add Polynomials");
               System.out.println("The Sum of \t" + testValue1);
               System.out.println("    and    \t" + testValue2);
               System.out.println("    is :   \t" + testValue1.add(testValue2));
               System.out.println();
               break;
            case 4:
               System.out.println("Evaluate Polynomial #1");
               System.out.println("Enter a value for x to evaluate f(x) for Polynomial #1");
               double value;
               value = input.nextDouble();
               input.nextLine(); //empty the buffer
               System.out.println("When x = " + value + " for " + testValue1);
               System.out.println("f(x) = " + testValue1.evaluate(value));
               System.out.println();
               break;
            case 5:
               System.out.println("Derivative of Polynomial #1");
               System.out.println("The derivative of " + testValue1);
               System.out.println("is  : " + testValue1.derivative());
               System.out.println();
               break;
            case 6:
               System.out.println("Find Root of Polynomial #1");
               System.out.println("Enter a value to be the initial guess for a root as");
               System.out.println("needed to perform the Newton-Raphson method : ");
               value = input.nextDouble();
               input.nextLine(); //empty the buffer
               System.out.println("Root of  " + testValue1);
               System.out.println("found at x = " + testValue1.findRoot(value));
               System.out.println();             
               break;
            case 7:
               System.out.println("I hope that you enjoyed this program!");
          }
      }// end while
 
   }
 
   //Method to call menu
   //Exceptions not set up here.  Only integers will work
   public static int menu() {
      int choice = 0;
      Scanner input = new Scanner(System.in);
      while(choice < 1 || choice > 7) {
         System.out.println("Please choose from the following: ");
         System.out.println("\t#1 Display two polynomials stored");
         System.out.println("\t#2 Input two new polynomials");
         System.out.println("\t#3 Add polynomials");
         System.out.println("\t#4 Evaluate polynomial #1 with a specific value");
         System.out.println("\t#5 Show Derivative of polynomial #1");
         System.out.println("\t#6 Find root of polynomial #1 with initial guess");
         System.out.println("\t#7 End program");
         System.out.print("Choice : ");
         choice = input.nextInt();
         System.out.println();
      }
      return choice;
   }
} //end class


http://erdoganakbiyik.blogspot.com/
https://www.youtube.com/channel/UCDsUnmBfVdEPkcC8FlzPKcg

Introduction to Network - Course 5


4.1.2.4 Lab - Identifying Network Devices and Cabling

Lab A - Identifying Network Devices and Cabling
Objectives
Part 1: Identify Network Devices
Part 2: Identify Network Media
Background / Scenario
As a member of the networking support staff, you must be able to identify different networking equipment. You must also understand the function of equipment in the appropriate part of the network. In this lab, you will have access to network devices and media. You will identify the type and characteristics of the network equipment and media.
Part 1:     Identify Network Devices
Your instructor will provide various network devices for identification. Each will be tagged with an ID number.
Fill in the table below with the device tag ID number, manufacturer, device model, type (hub, switch, and router), functionality (wireless, router, switch, or combination), and other physical characteristics, such as number of interface types. The first line is filled out as a reference.
ID
Manufacturer
Model
Type
Functionality
Physical Characteristics
1
Cisco
1941
Router
Router
2 GigabitEthernet Ports
2 EHWIC slots
2 CompactFlash slots
1 ISM slot
2 Console ports: USB, RJ-45
2


Cisco


Catalyst 4500 Series
Switch
Switch
48 Port Quantity
Ethernet Port Type
Supervisor Engine Module Type
10/100/1000 Port Speed
3


Arlo


Pro 2 Security Camera System
Camera
Camera
100% Wire-Free, Rechargeable Battery Operated, Magnetic Mounts
HD 1080p Video, 130-Degree Angle Lens
Night Vision, 2-Way Audio
IP65 Weatherproof Outdoor Ready
Motion and Sound Detection Optional 24/7 Continuous Video Recording
4



Cisco



1921
Router
Router
·         2 RJ45 10/100/1000 LAN/WAN Ports
·         2 EHWIC Slots
·         SEC Feature Set
·         1 Doublewide EWIC Slot (takes the place of both standard EHWIC slots when used)
·         1 USB
·         1 USB Console (mini-B)
·         I Serial Port
·         I Auxilary Port

5






6




·          
Part 2:     Identify Network Media
Your instructor will provide various network media for identification. You will name the network media, identify the media type (copper, fiber optic, or wireless), and provide a short media description including what device types it connects. Use the table below to record your findings. The first line in the table has been filled out as a reference.

ID
Network Media
Type
Description and to What It Connects
1
UTP
Copper
Connect wired NIC and Ethernet ports on network devices
Cat 5 straight-through wired. Connects PCs and routers to switches and wiring panels.
2


UTP Straight Through

Copper
Connect wired NIC and Ethernet ports on network devices
Cat 5 straight-through wired. Connects PCs and routers to switches and wiring panels.
3

UTP Crossover


Copper
Connect like devices  on a network. Cat 5 cross over, connects switches to switches
4


Fiber Optic

Copper
Connect different part of building to provide high speed internet connections
5





6





Reflection
After you have identified the network equipment, where would you find more information about the equipment?
______ More information on the network equipment can be found on their websites._________________________________________________________________________________