Adding support for all CCNA3 questions

This commit is contained in:
Fabian Stamm 2019-12-09 01:52:50 +01:00
parent a980e25e93
commit b124d55273
3 changed files with 410 additions and 2 deletions

View File

@ -1,6 +1,160 @@
{
"title": "CCNA 3 Finals",
"questions": [
{
"id": "ccna3-q37",
"type": 2,
"title": "Match the description to the EIGRP packet type. (Not all options are used.)",
"images": [],
"fields": {
"f1": "used to propagate routing information to EIGRP neighbors",
"f2": "used to acknowledge the receipt of an EIGTP message that was sent using reliable delivery",
"f3": "used for neighbor discovery and to maintain neighbor adjacencies",
"f4": "send in response to an EIGRP query",
"f5": "used to query routes from neighbors"
},
"values": {
"v1": "hello packets",
"v2": "query packets",
"v3": "reply packets",
"v4": "update packets",
"v5": "acknowledgment packets",
"v6": "database description packets"
},
"correct": {
"f1": "v4",
"f2": "v5",
"f3": "v1",
"f4": "v3",
"f5": "v2"
}
},
{
"id": "ccna3-q38",
"type": 2,
"title": "Match each description to its corresponding LSA type. (Not all options are used.)",
"images": [],
"fields": {
"f1": "generated by the DR on a multiaccess segment and flooded within an area",
"f2": "generated by ABRs and sent between areas",
"f3": "generated by ABRs and sent between areas to advertise the location of an AS",
"f4": "generated by all routers and flooded within an area"
},
"values": {
"v1": "type 1",
"v2": "type 2",
"v3": "type 3",
"v4": "type 4",
"v5": "type 5"
},
"correct": {
"f1": "v2",
"f2": "v3",
"f3": "v4",
"f4": "v1"
}
},
{
"id": "ccna3-q135",
"type": 2,
"title": "Match the order in which the link-state routing process occurs on a router. (Not all options are used.)",
"images": [],
"fields": {
"f1": "step 1",
"f2": "step 2",
"f3": "step 3",
"f4": "step 4",
"f5": "step 5"
},
"values": {
"v1": "Each router is responsible for “saying hello” to its neighbors on directly connected networks.",
"v2": "Each router builds a Link-State Packet (LSP) containing the state of each directly connected link",
"v3": "Each router learns about its own directly connected networks",
"v4": "Each router increments the hop count for the destination network",
"v5": "Each router floods the LSP to all neighbors, who then store all LSPs received in a database",
"v6": "Each router uses the database to construct a complete map of the topology and computes the best"
},
"correct": {
"f1": "v3",
"f2": "v1",
"f3": "v2",
"f4": "v5",
"f5": "v6"
}
},
{
"id": "ccna3-q136",
"type": 2,
"title": " Match the description to the term. (Not all options are used.)",
"images": [],
"fields": {
"f1": "This is the algorithm used by OSPF",
"f2": "This is where the details of the neighboring routers can be found",
"f3": "This is where you can find the topology table",
"f4": "All the routers are in the backbone area"
},
"values": {
"v1": "adjacency database",
"v2": "Shortest Path First",
"v3": "single-area OSPF",
"v4": "DUAL",
"v5": "link-state database",
"v6": "multiarea OSPF"
},
"correct": {
"f1": "v2",
"f2": "v1",
"f3": "v5",
"f4": "v3"
}
},
{
"id": "ccna3-q137",
"type": 2,
"title": "Match the order of precedence to the process logic that an OSPFv3 network router goes through in choosing a router ID. (Not all options are used.)",
"images": [],
"fields": {
"f1": "priority 1",
"f2": "priority 2",
"f3": "priority 3",
"f4": "priority 4"
},
"values": {
"v1": "The router displays a console message to configure the router ID manually",
"v2": "The router uses the highest configured IPv4 address of an active interface",
"v3": "The router chooses the highest IPv6 address that is configured on the router",
"v4": "The router uses the highest configured IPv4 address of a loopback interface",
"v5": "The router uses the explicitly configured router ID if any"
},
"correct": {
"f1": "v5",
"f2": "v4",
"f3": "v2",
"f4": "v1"
}
},
{
"id": "ccna3-q140",
"type": 2,
"title": "Match each OSPF router type description with its name. (Not all options are used.)",
"images": [],
"fields": {
"f1": "All the routers of this type have identical LSDBs",
"f2": "All the routers of this type mainrain separate LSDBs for each area to which they connect",
"f3": "All the routers of this type can import non-OSPF network information to the OSPF network and vice versa using route redistribution"
},
"values": {
"v1": "internal router",
"v2": "backbone router",
"v3": "autonomus system boudary router (ASBR)",
"v4": "area border router (ABR)"
},
"correct": {
"f1": "v1",
"f2": "v4",
"f3": "v3"
}
},
{
"id": "iSLBEp47",
"title": "1. Which routing protocol is able to scale for large networks and utilizes non-backbone areas for\n expansion?",
@ -1477,7 +1631,7 @@
},
{
"id": "ujTNyEQnnK",
"title": "Refer to the exhibit. Which switch will be elected the root bridge and which switch will place a port in\n blocking mode? (Choose two.)",
"title": "104. Refer to the exhibit. Which switch will be elected the root bridge and which switch will place a port in\n blocking mode? (Choose two.)",
"images": [
"https://itexamanswers.net/wp-content/uploads/2017/03/hinh7.jpg"
],
@ -1823,6 +1977,24 @@
"q127-4"
]
},
{
"id": "ccna3-128",
"title": "128. Refer to the exhibit. Which route or routes will be advertised to the router ISP if autosummarization is enabled?",
"images": [
"https://itexamanswers.net/wp-content/uploads/2016/02/i212820v1n1_212820.gif"
],
"type": 0,
"options": {
"q128-0": "10.0.0.0/8",
"q128-1": "10.1.0.0/16",
"q128-2": "10.1.0.0/28",
"q128-3": "10.1.1.0/24",
"q128-4": "10.1.2.0/24",
"q128-5": "10.1.3.0/24",
"q128-6": "10.1.4.0/28"
},
"correct": "q128-0"
},
{
"id": "mSb7LE5740",
"title": "129. What are two reasons to install a single 48-port fixed configuration switch, rather than two 24-port\n fixed configuration switches, in a wiring closet that supports two classrooms? (Choose two.)",

View File

@ -1,6 +1,162 @@
{
"title": "CCNA 2 Final Exam",
"questions": [
{
"id": "asd",
"type": 2,
"title": "Match the description to the EIGRP packet type. (Not all options are used.)",
"images": [],
"fields": {
"f1": "used to propagate routing information to EIGRP neighbors",
"f2": "used to acknowledge the receipt of an EIGTP message that was sent using reliable delivery",
"f3": "used for neighbor discovery and to maintain neighbor adjacencies",
"f4": "send in response to an EIGRP query",
"f5": "used to query routes from neighbors"
},
"values": {
"v1": "hello packets",
"v2": "query packets",
"v3": "reply packets",
"v4": "update packets",
"v5": "acknowledgment packets",
"v6": "database description packets"
},
"correct": {
"f1": "v4",
"f2": "v5",
"f3": "v1",
"f4": "v3",
"f5": "v2"
}
},
{
"id": "ccna3-q38",
"type": 2,
"title": "Match each description to its corresponding LSA type. (Not all options are used.)",
"images": [],
"fields": {
"f1": "generated by the DR on a multiaccess segment and flooded within an area",
"f2": "generated by ABRs and sent between areas",
"f3": "generated by ABRs and sent between areas to advertise the location of an AS",
"f4": "generated by all routers and flooded within an area"
},
"values": {
"v1": "type 1",
"v2": "type 2",
"v3": "type 3",
"v4": "type 4",
"v5": "type 5"
},
"correct": {
"f1": "v2",
"f2": "v3",
"f3": "v4",
"f4": "v1"
}
},
{
"id": "ccna3-q135",
"type": 2,
"title": "Match the order in which the link-state routing process occurs on a router. (Not all options are used.)",
"images": [],
"fields": {
"f1": "step 1",
"f2": "step 2",
"f3": "step 3",
"f4": "step 4",
"f5": "step 5"
},
"values": {
"v1": "Each router is responsible for “saying hello” to its neighbors on directly connected networks.",
"v2": "Each router builds a Link-State Packet (LSP) containing the state of each directly connected link",
"v3": "Each router learns about its own directly connected networks",
"v4": "Each router increments the hop count for the destination network",
"v5": "Each router floods the LSP to all neighbors, who then store all LSPs received in a database",
"v6": "Each router uses the database to construct a complete map of the topology and computes the best"
},
"correct": {
"f1": "v3",
"f2": "v1",
"f3": "v2",
"f4": "v5",
"f5": "v6"
}
},
{
"id": "ccna3-q136",
"type": 2,
"title": " Match the description to the term. (Not all options are used.)",
"images": [],
"fields": {
"f1": "This is the algorithm used by OSPF",
"f2": "This is where the details of the neighboring routers can be found",
"f3": "This is where you can find the topology table",
"f4": "All the routers are in the backbone area"
},
"values": {
"v1": "adjacency database",
"v2": "Shortest Path First",
"v3": "single-area OSPF",
"v4": "DUAL",
"v5": "link-state database",
"v6": "multiarea OSPF"
},
"correct": {
"f1": "v2",
"f2": "v1",
"f3": "v5",
"f4": "v3"
}
},
{
"id": "ccna3-q137",
"type": 2,
"title": "Match the order of precedence to the process logic that an OSPFv3 network router goes through in choosing a router ID. (Not all options are used.)",
"images": [],
"fields": {
"f1": "priority 1",
"f2": "priority 2",
"f3": "priority 3",
"f4": "priority 4"
},
"values": {
"v1": "The router displays a console message to configure the router ID manually",
"v2": "The router uses the highest configured IPv4 address of an active interface",
"v3": "The router chooses the highest IPv6 address that is configured on the router",
"v4": "The router uses the highest configured IPv4 address of a loopback interface",
"v5": "The router uses the explicitly configured router ID if any"
},
"correct": {
"f1": "v5",
"f2": "v4",
"f3": "v2",
"f4": "v1"
}
},
{
"id": "ccna3-q140",
"type": 2,
"title": "Match each OSPF router type description with its name. (Not all options are used.)",
"images": [],
"fields": {
"f1": "All the routers of this type have identical LSDBs",
"f2": "All the routers of this type mainrain separate LSDBs for each area to which they connect",
"f3": "All the routers of this type can import non-OSPF network information to the OSPF network and vice versa using route redistribution"
},
"values": {
"v1": "internal router",
"v2": "backbone router",
"v3": "autonomus system boudary router (ASBR)",
"v4": "area border router (ABR)"
},
"correct": {
"f1": "v1",
"f2": "v4",
"f3": "v3"
}
}
],
"dead": [
{
"id": "quest1",
"type": 1,

View File

@ -1 +1,81 @@
The developer was to lazy to implement this type of question. Sorry :)
<script>
import {onMount} from "svelte";
import randomize from "../../rand.ts";
export let question;
export let showResult = false;
export let isCorrect = false;
let fields = [];
onMount(()=>{
fields = randomize(Object.keys(question.fields).map(e => ({
key: e,
value: question.fields[e]
})));
})
$: values = Object.keys(question.values).map(e => ({
key: e,
value: question.values[e]
}))
let selected = {};
// $: isCorrect = selected === question.correct;
$: console.log(
"Selected:",
selected,
"showResult:",
showResult,
"isCorrect",
isCorrect
);
$: {
isCorrect = fields.every(field=>selected[field.key] === question.correct[field.key]);
}
</script>
{#each fields as field (field.key)}
<div class="input-group">
<label>{field.value}</label>
<select class="inp" bind:value={selected[field.key]}>
<option value={undefined}>-- select --</option>
{#each values as value}
<option value={value.key}>{value.value}</option>
{/each}
</select>
{#if showResult}
<div class="should">{question.values[question.correct[field.key]]}</div>
{/if}
</div>
{/each}
<style>
.should {
color: var(--primary) !important;
margin-left: 1rem;
}
</style>
<!-- {#each options as option}
<div
key={option.key}
class:should={showResult && option.key === question.correct }
>
<label class="input-checkbox" for={option.key}>{@html option.value.replace(/\n/g, "<br>")}
<input
type="radio"
id={option.key}
checked={option.key===selected}
on:click={(evt)=>showResult ?
evt.preventDefault() : selected = option.key}
>
<span></span>
</label>
<br/>
</div>
{/each} -->