{"id":328,"date":"2002-04-29T22:54:00","date_gmt":"2002-04-30T05:54:00","guid":{"rendered":"http:\/\/www.dreness.com\/blog\/?p=328"},"modified":"2002-04-29T22:54:00","modified_gmt":"2002-04-30T05:54:00","slug":"only-for-the-bored-curious","status":"publish","type":"post","link":"https:\/\/dreness.com\/blog\/archives\/328","title":{"rendered":"only for the bored \/ curious"},"content":{"rendered":"<p>here&#8217;s the day 1 notes. I was going to make omnigraffle diagrams of the diagrams I drew by hand, but that would just be too time consuming; instead I&#8217;ll just scan them in when I return.<\/p>\n<p><!--more the day 1 notes!--><\/p>\n<pre>\r\nDay 1 - 4\/29\r\n\r\nChapter 1\r\n\r\nBasic Concepts\r\n1) Routers create broadcast domains, switches do not. Broadcast packets will be sent to all\r\nports on a switch (without VLANs), but routers will never forward broadcast packets between\r\nnetworks.\r\n\r\n2) Routers make dissimiliar networks talk to each other. Default gateway for a host is\r\nalways a router\r\n\r\nCisco's three layer model for networks:\r\nAccess Layer = End users, workstations, switches, etc\r\nDistribution Layer = Filtering, routing, WAN access; creates broadcast domains\r\nCore Layer = where major services or servers exist\r\n\r\nOSI Reference Model:\r\n - a way to understand how an internetwork operates\r\n - guidline for creation or implemenation of standards, devices and networking schemes\r\n - breaks down a complex system into simpler elements\r\n - allows for specialized design and development of modular components\r\n\r\nApplication Layer:\r\n - User interaction\r\n - Applications exist here (Word, FTP client, etc)\r\n\r\nPresentation Layer:\r\n - converts data into a specific format\r\n - ensures that data can be read from the application layer of one system to the application layer of another system\r\n - jpeg, gif, .doc, encryption\r\n\r\nSession Layer:\r\n - Establish, manage, terminate communications\r\n - system calls, process management\r\n - eg database server & client\r\n\r\nTransport Layer:\r\n - Responsible for end to end transport\r\n - connection oriented (TCP) or connectionless (UDP)\r\n - Port assignments\r\n - After adding TCP header, unit is known as a SEGMENT\r\n - Applications determine which transport protocol is used\r\n\r\nTCP = reliability, data will be acknowledged\r\nUDP = unreliable, no acknowledgement\r\n\r\nTransport layer adds TCP or UDP headers\r\n\r\nWithin that header there are logical ports; source port and destination port. The\r\ndestination port is used to differentiate between applications. Even if source IP, dest IP,\r\nsource MAC and dest MAC are the same, the communications between different applications on\r\nthe two hosts is identified by the TCP or UDP port number.\r\n\r\nSource port is random; destination port is well known (and less than 1024)\r\n\r\nNames for data units are associated with specific layers:\r\nTransport\t-->\tSegment\r\nNetwork\t\t-->\tPacket\r\nData Link\t-->\tFrame\r\nPhysical\t-->\tBits\r\n\r\nPDU = protocol data unit.\r\n\r\nPDUs are added as info travels down the stack and removed as it travels up the stack. PDUs\r\nare refered to as headers or trailers. Encapsulation is the process of adding PDUs, de-\r\nencapsulation removes PDUs.\r\n\r\nCollision Domains \/ Broadcast Domains:\r\n\r\nCollision Domains:\r\n - Signaling\r\n - Ethernet must have rules \/ standards to communication\r\n - Allows access to one user at a time\r\n - Corrects collisions\r\n\r\nDefinitions:\r\n\r\nCollision domain: devices attached to the same physical media such that if two devices\r\naccess the media at the same time, a collision occurs (eg hub).\r\n\r\nBroadcast domain: a group of devices in a network that receive each others broadcasts\r\n\r\nOn a switch, each port is its own collision domain.\r\n\r\nCSMA \/ CD = carrier sense multiple access \/ collision detect:\r\n - Each host listens on teh line for traffic\r\n - If in use, back off using algorithm\r\n - If not in use, send traffic\r\n - If traffic is not heard on teh line, assume collision and resend; back off algorithm\r\n - If traffic is heard, assume success.\r\n\r\nIf two sets of hosts within a collision domain try to use the media at the same time, a\r\ncollision occurs. Using CSMA, hosts sense the network to know when to talk.\r\n\r\nBack off algorithm - wait to send; round robin style.\r\n\r\nProblems with CSMA \/ CD: more hosts = more collisions\r\nSolution = create more collision domains (replace hubs with switches)\r\n\r\nHalf duplex = send OR receive; uses CSMA \/ CD\r\nFull duples = send AND receive; does not use CSMA \/ CD\r\n\r\nData Link Layer\r\n2 sublayers:\r\n - MAC = 802.3; physical addressing\r\n\r\n - Logical Link Control - LLC 802.2\r\n - Identify different protocols with SAP \/ SNAP and then encapsulate them in order\r\n\r\nMAC: 48 bits in a MAC address = hardware address or NIC address\r\n\r\nLLC: uses either SAP or SNAP to differentiate between protocols; eg IP, IPX, AppleTalk.\r\n\r\nSAP = service access point\r\nSNAP = subnetwork access protocol\r\n\r\nFrames:\r\nPreamble is a combination of 1s and 0s that signify the start of a frame\r\n\r\nPreamble\tDest MAC\tSource MAC\tType\t\tData\t\tCRC\r\n64 bits\t\t48 bits\t\t48 bits\t\t16 bits\t\tMTU 1500\t32 bits\r\n\r\nData portion of a SAP frame:\r\n\r\nDest SAP\tSrc SAP\t\tCNTL\t\tDATA\r\n\r\nDSAP \/ SSAP = 1 byte\r\nPointer to upper layer protocols\r\n06 hex = IP\r\nEO hex = IPX\r\n\r\nIn SAP, your DSAP and SSAP tells dest and source protocol\r\n\r\nData portion of a SNAP frame:\r\n\r\nDSAP\t\tSSAP\t\tCNTL\t\tOUI\t\tType\t\tData\r\nAA\t\tAA\t\t03\t\tID\r\n\r\nDSAP and SSAP fields have a fixed value of AA in SNAP frames. CNTL is always 03. OUI is a\r\nvendor code. Type field contains an EtherType which determines protocol.\r\n\r\nBridges and Switches\r\n - Operate at layer 2, the data link layer\r\n\r\n - Switching is *hardware* based frame forwarding\r\n - ASIC = application specific integrated circuits; used to create high performance chips\r\n - Fast; scales up to gigabit speeds\r\n\r\n - Bridge = 2 or 4 ports\r\n - Software based; slower\r\n\r\nBridges can be used to increase the number of collision domains, which decreases the number\r\nof collisions.\r\n\r\nBridging \/ Switching Process:\r\n - Receives frame\r\n - Checks forwarding table for the dest MAC address\r\n - Proceeds with one of three functions:\r\n\t- Filter data = when source and dest are on same physical port\r\n\t- Floods data = sends to all ports; when dest port is unknown\r\n\t- Copies the frame to another segment = from one physical port to another\r\n\r\nNetwork Layer:\r\n - Defines how to transport traffic to devices not locally attached; not in same broadcast\r\ndomain\r\n - 2 pieces of information required:\r\n\tlogical address of destination\r\n\tpath to reach destination\r\n\r\nIP address = 32 bits; exists in network layer\r\n\r\nRouters have information from all lower layers (due to encapsulation)\r\n\r\nIP addresses are assigned to interfaces of routers.\r\n\r\nSubnet mask determins which portion of IP is the network portion and which is the host\r\nportion.\r\n\r\nRouter interfaces must be on different networks\r\n\r\nOnce you configure IP addresses on router interfaces, the routing table will look like this\r\n(see diagram)\r\n\r\nDefine static routes = manual routing entries\r\nEnable Routing protocols = routers talk to each other and exchange routing tables\r\n\r\nRouter functions:\r\n - Does not forward layer 2 broadcasts \/ multicasts\r\n - Determines optimal path to destination\r\n - strips layer 2, forwards on layer 3 addresses - ARP\r\n - can filter traffic; access lists\r\n\r\nmulticast = specific group of hosts\r\nbroadcast = everybody\r\nunicast = just one host\r\n\r\nARP = Address Resolution Protocol; when you have IP and need MAC. (see diagram) MAC addresses are replaced to allow for return communication without flooding.\r\n\r\n - Can perform both bridging and routing\r\n - Can provide connectivity between VLANs in switched environment\r\n - Can provide quality services based on traffic type\r\n\r\nUses bridging to pass non routable protocols.\r\n\r\nIf VLANs want to talk to each other, they need a router.\r\n\r\nChapter 2\r\n\r\nUTP Implementation\r\n\r\n3 kinds of UTP:\r\n - straight through; used to connect PC to router, hub, or switch; dissimiliar OSI layers\r\n - crossover; switch to switch, hub to hub, etc; used to connect devices on same layer\r\n - rollover; used for console ports; DB9 connector (com1 on a pc)\r\n\tconsole port = in band (local)\r\n\tAUX = out band management (modem dialup)\r\n\r\nWAN Connections\r\n\r\n(diagram)\r\n\r\nCSU \/ DSU; analog to digital and back; makes signaling at both ends compatible\r\n\r\nSupported by Cisco Equipment:\r\nEIA \/ TIA - 232\r\nEIA \/ TIA - 449\r\nV.35\r\nX.21\r\nEIA - 530\r\n\r\nNeeded on serial links:\r\nDCE = modem = gives clock rate to router = data communications equipment\r\nDTE = accepts clock rate = data terminal equipment\r\n\r\nWhen connecting routers to each other, one end must be made to be a DCE (DTE by default)\r\n\r\nSerial Interfaces on a router:\r\n - Abbreviated differently on different routers\r\n - s0 = fixed\r\n - s0\/0 = modular\r\n\r\nRouter commands:\r\n\r\nerase start = deletes startup config from NVRAM\r\nreload = reboot router; return to factory defaults\r\n\r\nNVRAM\t\tRAM\r\nstartup config\trunning config\r\n\r\nprompts:\r\n> = user mode\r\n# = privledged mode\r\n\r\nshow ip interface brief = brief listing of interfaces & their status\r\n\r\nInterfaces are administratively down on Cisco routers by default\r\n\r\nChapter 3\r\n\r\nRouter Startup Processs:\r\n1) Power On Self Test (POST); finds \/ checks hardware\r\n2) Run startup routines; locate \/ load IOS (Internet Operating System)\r\n3) Locate \/ load software config file\r\n\r\nConfig locations:\r\n - console terminal or AUX\r\n - CDROM\r\n - TFTP connected via ethernet (can hold configurations and IOS backups)\r\n\r\nConsole Help:\r\n? = list of commands\r\ns? = list commands that start with s\r\nshow ? = commands used with show\r\n\r\nAbbreviating commands:\r\nshow interfaces = sh int\r\n\r\nError Messages of 3 different types:\r\n - Ambiguous command - more than one possible meaning (for an abbreviation)\r\n - incomcplete command\r\n - invalid input detected at ^ marker\r\n\r\nshow history = history of commands entered\r\ncontrol P = previous command in history buffer\r\ncontrol N = next command in history buffer\r\ncontrol a = beginning of line\r\ncontrol e = end of line\r\ncontrol f = forward one character\r\ncontrol b = back one char\r\ncontrol u = clear line\r\ncontrol r = refresh command buffer\r\nshow version = system information; IOS version, hardware info\r\nshow running-config = running configuration\r\nshow int serial0 = detailed info on interface\r\nshow ip = for switches, not routers\r\nconfigure terminal = glocal configuration mode\r\n(show commands do not work in global config mode)\r\nenable = enter privledged mode\r\ndisable = exit priv mode\r\n\r\nSetting IP on a switch:\r\nip address x.x.x.x 255.0.0.0 - enables SNMP management\r\nsetup - from exec mode to enter guided setup\r\ncontrol-c exits setup process\r\n\r\nAt the end of setup, there are three options:\r\n0) go to exec without using or saving config that was just set up\r\n1) restart setup\r\n2) accept \/ save config, go to exec mode\r\n\r\nRouters only:\r\nno terminal editing = disbles terminal editing (control) commands\r\nterminal editing = enables editing commands\r\n\r\nLines greater than 69 characters show a $ at beginning of line\r\n\r\nshow startup-config = show startup config\r\ncopy run start = saves running config to startup config in NVRAM\r\n\r\nfrom global config:\r\nint s0 = interface config for serial0 - prompt changes to: Router(config-if)\r\n\r\nsub-interfaces; multiple subinterfaces can be on a single physical interface\r\nint s0.1 = from global config; configures sub-interface 1 on s0\r\n\r\nfrom priv mode:\r\nshow line\r\n - cty = console\r\n - vty = virtual telnet sessions\r\n - aux = aux\r\n\r\nBy default, Cisco routers have 5 VTY lines\r\n\r\nfrom global config:\r\nline console 0 = line config mode\r\nrouter rip = configure router to use RIP\r\n\r\ncontrol-Z returns to priv mode (use from global config or interface config)\r\n\r\nsetting the hostname:\r\nhostname <host name>\r\n\r\npasswords:\r\nSetting a console password:\r\nconfig terminal\r\nline console 0\r\npassword <pass>\r\nlogin\r\n\r\nSetting a VTY password:\r\nconfigure terminal\r\nline VTY 0 4\r\npassword <pass>\r\n\r\nSetting an enable (priv mode) password:\r\nenable password <pass>\r\n\r\nSetting an encrypted enable password:\r\nenable secret <pass> - does not show with 'show running-config'\r\n\r\nTo disable passwords, use the no form:\r\nno enable password <pass>\r\n\r\nTo disable console timeouts:\r\nconfig t\r\nline console 0\r\nexec-timeout 0 0\r\n\r\nBy default, logging is sent to console\r\nlogging syncronyous = disable logging output to console while entering a command\r\n\r\nshow ip route = shows routing table\r\n\r\n(diagram of pod 5)\r\n\r\nConfiguring Interfaces (from interface config mode):\r\naddress on port\r\ndata encapsulation\r\nmedia type\r\ndefine bandwidth\r\nset direct memory access buffering parameters\r\n\r\nip address <ip> <subnet mask> = assign an IP to an interface\r\nno shut = removes \"administratively down\" status\r\n\r\nshow controllers s0 = determine if serial 0 is dce or dte\r\nDCE ends must set clocking from interface config mode\r\nclock rate xxxxx\r\n\r\nEntering bandwidth: \r\n - Used by routing protocols to determine metric\r\n - By default, T1 speed\r\n\r\nDisabling Interfaces (serial0 for example):\r\nconfig t\r\nint s0\r\nshut\r\n\r\nChapter 4\r\n\r\nCDP = Cisco Discovery Protocol\r\nEnabled by default\r\nMedia and protocol independant\r\nUsed to aid in managing Cisco devices\r\nSummary of neighbor info\r\nshows only info within a collision domain (directly attached)\r\nshow cdp neighbors\r\nshow cdp ?\r\nshow cdp neighbors detail\r\n\r\nDisabling CDP globally:\r\nconfig t\r\nno cdp run\r\n\r\nDisabling CDP on an interface:\r\nconfig t\r\nint s0\r\nno cdp enable\r\n\r\nTelnetting:\r\ntelnet <ip addy>\r\n - cannot telnet out of catlyst 1900\r\ncontrol-shift-6, x = suspent telnet session\r\nshow sessions = shows active sessions\r\nshow users = shows connected users\r\nclear line <line #> = kick user\r\nresume <session #> = resume telnet session (can also just press enter if only one session)\r\n\r\nping <ip>\r\ntraceroute <ip>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>here&#8217;s the day 1 notes. I was going to make omnigraffle diagrams of the diagrams I drew by hand, but that would just be too time consuming; instead I&#8217;ll just scan them in when I return.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"class_list":["post-328","post","type-post","status-publish","format-standard","hentry","category-lj"],"_links":{"self":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts\/328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/comments?post=328"}],"version-history":[{"count":0,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts\/328\/revisions"}],"wp:attachment":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/media?parent=328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/categories?post=328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/tags?post=328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}