Skip to content

Instantly share code, notes, and snippets.

@hax4dazy
Last active April 13, 2023 08:20
Show Gist options
  • Save hax4dazy/c79625b55c08b2638c492d1118fbb1d3 to your computer and use it in GitHub Desktop.
Save hax4dazy/c79625b55c08b2638c492d1118fbb1d3 to your computer and use it in GitHub Desktop.
Cisco class notes

Cisco class notes


Creating VLAN

  1. Enable
  2. config terminal this can be abriviated to config t
  3. vlan xx This can be any number, its easier to start from 10
  4. OPTIONAL: name class Gives the VLAN a name, you don't have to do this but is handy when viewing VLAN information

After you've done this you can use do show vlan to view all VLAN information and see what VLAN's you've made.


Adding port to VLAN

  1. interface fastethernet 0/1 Go to the interface. This can be any, use the show ip interface brief command to see all network ports
  2. switchport mode access You need to again do this otherwise the switch will complain.
  3. switchport access vlan xx Set the port to access the VLAN.

Creating / setting up VTP

  1. vtp mode client Options for this command are server, client and transparent
  2. vtp domain domainname Sets the domain name to something so that the servers can communicate with eachother
  3. OPTIONAL: vtp password 12345 Sets the password
  4. interface fastethernet 0/2 Go to the port where the other switch is connected
  5. switchport mode trunk Set the mode to trunk WARNING: If your switch setup looks like this set the middle switch to transparent. This means that the middle switch won't recive any more updates from the server swtich

Create a VLAN on the server switch and then check the VLAN on the other servers to see if they have the VLAN Check VTP server with do show vtp status


Configure DHCP with VLAN

(this might not actually work)

  1. Make your neccecery VLAN's
  2. Add the port to the VLAN
  3. Go to the VLAN by using vlan xx
  4. int vlan xx Goes to the VLAN's interface
  5. ip address 192.168.1.1 255.255.255.0 This sets the VLAN's IP address and subnet mask. Customise these for your needs
  6. no shutdown I've got no clue what this does :shrek:
  7. Setup the DHCP server with a static address
  8. Create DHCP profile on the server for every VLAN you have (example)
  9. int fa 0/x Go to an interface that you want DHCP to reach
  10. switchport trunk encapsulation dot1q Set whatever this is
  11. switchport mode trunk Set the mode to trunk
  12. Go to the network swtich and attach yourself to the network port of the device that needs DHCP and run switchport mode access (this is only if your network looks like this)
  13. switchport access vlan xx attach the port to the vlan (again, optional. Only if your network looks like the one shown in the screenshot)
  14. (back on multilayer) ip helper-address 192.168.1.2 Basically just helps the PC's find the DHCP server
  15. ip routing

Useful random information

VTP = Virtual Trucking Protocal Syncs VLAN's between master server and clients

  • Server = Can create VLAN's. Sends updates and advertisments.
  • Client = Cannot create VLAN's. Forwards updates and advertisments.
  • Transparrent = Can create local VLAN's. Does forward packets.

OSI model "explained"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment