<style> body {text-align: jusitfy}</style>
# Informatik - Laborprotokoll
## Configure Initial Router Settings

| Klasse / Jahrgang | Übungsteilnehmer | Übungsdatum | Abgabedatum |
| ----------------- | ----------------- | ----------- | ----------- |
| 3 AHINF | David Heigl | 15.03.2022 | 29.03.2022 |
| | Stefan Kössner | 22.03.2022 | |
| | Bettina Hallinger | | |
| | Simon Unger | | |
### Inventar / Geräteliste
| Allgemeine Bezeichnung | Hersteller | Typ | Zusätzliche Informationen |
|:----------------------:| ---------- | ------------- |:-------------------------:|
| Notebook | Dell | XPS 15 | - |
| Notebook | Microsoft | Surface Pro 7 | - |
### Bemerkungen
**Hauptverfasser:** David Heigl
---
### Inhalt
1. [Einleitung](#1.-Einleitung)
1. [Durchführung](#2.-Durchführung)
1. [Aufgabenstellung](#2.1-Aufgabenstellung)
1. [Protokoll / Durchführungsbeschreibung](#2.2-Protokoll-/-Durchführungsbeschreibung)
1. [Diskussion der Ergebnisse](#3-.Disukssion-der-Ergebnisse)
## 1. Einleitung
Bei dieser Übung wurde uns aufgetragen, uns in zwei Schritten die Konfiguration eines Routers genauer zu betrachten und weitere Konfigurationen vorzunehmen. Im ersten Schritt geht es darum, die "Inital Configuration", welche den Router auf die Verwedung vorbereitet, zu konfigurieren. Im zweiten Schritt wird der Router mit dem LAN verbunden und es werden statische Routen konfiguriert.
## 2. Durchführung
### 2.1 Aufgabenstellung
#### 2.1.1 Aufgabe 1
In der ersten Aufgabe geht es darum, dass man sich mit der Inital Konfiguration von Cisco Routern beschäftigt.
#### 2.1.2 Aufgabe 2
In der zweiten Aufgabe geht es darum zwei Router mit LANs zu verbinden, indem wir die notwendigen Konfigurationen vornehmen. Es gibt insgesamt vier LANs. Am Ende soll es möglich sein, von einem PC eines LANs jeden PC eines anderen LANs pingen zu können.
### 2.2 Protokoll / Durchführungsbeschreibung
#### 2.2.1 Aufgabe 1
Zuerst haben wir den Router mit dem vorhandenen PC mithilfe eines Konsolenkabels verbunden.
Danach haben wir mit dem `enable` command den privileged EXEC mode betreten. Mithife des `show running-config` Befehles haben wir die Konfiguration angezeigt.
> What is the router’s hostname?
**Hostname:** Router
> How many Fast Ethernet interfaces does the Router have?
**Fast Ethernet Schnittstellen Anzahl:** 4
> How many Gigabit Ethernet interfaces does the Router have?
**Gigabit Ethernet Schnittstellen Anzahl:** 2
> How many Serial interfaces does the router have?
**Serial Schnittstellen Anzahl:** 2
> What is the range of values shown for the vty lines?
**vty Range:** 0 4
Nach diesem Schritt wurden wir dazu aufgefordert, uns die Startup Konfiguration anzeigen zu lassen.
```bash
Router# show startup-config
startup-config is not present
```
> Why does the router respond with the startup-config is not present message?
Der Fehler wird angezeigt, da die running-config in die startup-config noch nie kopiert wurde.
Im nächsten Schritt haben wir den Konfigurationsmodus betreten und mithilfe des `hostname R1` Befehls den Hostnamen auf `R1` gesetzt.
Der `banner motd` Befehl half uns dabei, die sogenannte "Message of the day" zu "Unauthorized access is strictly prohibited" zu setzen.
Die Passwortverschlüsselung konnten wir einfach durch die Befehle `line telndet`, `password <password>` und `service password-encryption` aktivieren.
Um die Konfiguration zu überprüfen, verwenden wir `show running-config`.
Die Funktionalität des Passwortes und des Banners können wir einfach überprüfen indem wir die momentane Sitzung verlassen und eine neue betreten.
> Why should every router have a message-of-the-day (MOTD) banner?
Er sollte unauthorisierte Nutzer warnen und wichtige Nachrichten verbreiten.
> Why would the enable secret password allow access to the privileged EXEC mode and the enable password no longer be valid?
Da `enable secret` höhere Sicherheitsstandards hat.
> If you configure any more passwords on the router, are they displayed in the configuration file as plain text or in encrypted form? Explain.
Ja sind sie. Da der Verschlüsselungs-Service aktiv ist, verschlüsselt er die Passwörter.
Am Schluss können wir die Konfiguration speichern, indem wir den Befehl `copy running-config startup-config` eingeben. Die kürzeste Version von diesem Befehl ist `copy ru st`.
Optional können wir die Konfiguration auch auf den Flash speichern. Dies ist mithilfe des `copy startup-config flash` Befehles möglich.
#### 2.2.2 Aufgabe 2
> Which command displays the statistics for all interfaces configured on a router?
`show interfaces`
> Which command displays the information about the Serial 0/0/0 interface only?
`show interface Serial 0/0/0`
> Enter the command to display the statistics for the Serial 0/0/0 interface on R1 and answer the following questions:
1. What is the IP address configured on R1?
209.165.200.225 / 30
1. What is the bandwidth on the Serial 0/0/0 interface?
1544 Kbit
> Enter the command to display the statistics for the GigabitEthernet 0/0 interface and answer the following questions:
1. What is the IP address on R1?
Es wurde ihm noch keine zugewiesen.
1. What is the MAC address of the GigabitEthernet 0/0 interface?
000d.bd6c.7d01 (bia 000d.bd6c.7d01)
1. What is the bandwidth (BW) of the GigabitEthernet 0/0/0 interface?
1 000 000 Kbit
> Which command displays a brief summary of the current interfaces, interface status and the IP addresses assigned to them?
`show ip interface brief`
> Enter the command on each router and answer the following questions:
1. How many serial interfaces are there on R1 and R2?
R1: 2 interfaces gesamt (Serial0/0/0 → active ; Serial0/0/1 → not active)
R2: 2 interfaces gesamt (Serial0/0/0 → active ; Serial0/0/1 → not active)
1. How many Ethernet interfaces are there on R1 and R2?
R1: 6 interfaces gesammt (2 GigabitEthernet ; 4 FastEthernet)
R2: 2 interfaces gesamt (2 GigabitEthernet)
1. Are all the Ethernet interfaces on R1 the same? If no, explain the differences(s):
Nein die Geschwindigkeit unterscheidet sich.
> What command displays the contents of the routing table?
`show ip route`
> Enter the command on R1 and answer the following questions:
1. How many connected routes are there (uses the C code)?
Es ist eine verbundene Route vorhanden (209.165.200.224 / 30)
1. Which route is listed?
C 209.165.200.224 / 30 is directly connected, Serial0/0/0
1. How does a router handle a packet destined for a network that is not listed in the routing table?
Er verwirft das Paket.
Um mit der Konfiguration von Router 1 zu beginnen, gehen wir durch die altbekannten Schritte durch `enable; configure Terminal`. Jetzt aktiveren wir das Interface `GigabitEthernet 0/0` mit den folgenden Befehlen:
``` bash
interface gigabitethernet 0/0 # Wählt das Interface zur Konfiguration aus
ip address 192.168.10.1 255.255.255.0 # Setzt die Addresse und Netmaske
no shutdown # Aktiviert das Interface
```
Um unserere Konfiguration nachvollziehbar zu machen, fügen wir eine Beschreibung zu unserem Interface hinzu:
```bash
description LAN verbindung S1 # Setzt die Beschreibung
```
Jetzt sollten wir von unseren Router aus PC1 pingen können.
```bash
ping 192.168.10.10 # Ping PC1 mit seiner IP Adresse
```
Jetzt sollen wir laut folgender Adressierungstabelle die restlichen Interfaces konfigurieren:
| Gerät | Interface | IP Adresse | Subnetz Maske |
| ----- |:------------:|:---------------:|:---------------:|
| R1 | G0/0 | 192.168.10.1 | 255.255.255.0 |
| | G0/1 | 192.168.11.1 | 255.255.255.0 |
| | S0/0/0 (DCE) | 209.165.200.225 | 255.255.255.252 |
| R2 | G0/0 | 10.1.1.1 | 255.255.255.0 |
| | G0/1 | 10.1.2.1 | 255.255.255.0 |
| | S0/0/0 | 209.165.200.226 | 255.255.255.252 |
Für jeden dieser Einträge gehen wir folgende Schritte durch:
```bash
int <Interface> # Wählt das Interface aus
ip a <IP Adresse> <Subnetz Maske> # Setzt die Addresse und Netzmaske
no shutdown # Aktiviert das Interface
```
Die Gigabit Interfaces, welche mit den Switches im LAN verbunden werden, erhalten die Beschreibung `LAN Verbindung <Switch Hostname>` und die seriellen Verbindungen `LAN Verbidung zu Netzwerk <Netzadresse>`
Zu guter letzt wird wie immer die Konfiguration zum NVRAM geschrieben: `copy running-confiuration startup-configurtaion`
> How many interfaces on R1 and R2 are configured with IP addresses and in the “up” and “up” state?
R1: 3 interfaces in total (2 GigabitEthernet → 0/0 AND 0/1 ; 1 Serial → 0/0/0)
R2: 3 interfaces in total (2 GigabitEhternet → 0/0 AND 0/1 ; 1 Serial → 0/0/0)
> What part of the interface configuration is NOT displayed in the command output?
The description of each interface
> What commands can you use to verify this part of the configuration?
show interfaces
> Use the show ip route command on both R1 and R2 to view the current routing tables and answer the following questions:
1. How many connected routes (uses the C code) do you see on each router?
R1: Es gibt 3 verbundene Routen
R2: Es gibt 3 verbundene Routen
1. How many OSPF routes (uses the O code) do you see on each router?
R1: Es gibt 2 OSPF Routen
R2: Es gibt 2 OSPF Routen
1. If the router knows all the routes in the network, then the number of connected routes and dynamically learned routes (OSPF) should equal the total number of LANs and WANs.
> How many LANs and WANs are in the topology?
4 LANs ; 1 WAN = 5
> Does this number match the number of C and O routes shown in the routing table?
3 C routes ; 2 O routes = 5 routes
## 3. Diskussion der Ergebnisse
### 3.1 Aufgabe 1
Die Aufgabenstellung ist deutlich und verständlich formuliert worden. Einige Befehle mussten wir selber recherchieren. Dadurch wurde nochmals unser gesamtes Wissen über die Konfiguration eines Cisco Routers geprüft und verstärkt.
### 3.2 Aufgabe 2
Die Übung war leicht durchzuführen, die Aufgabenstellung war klar. Die Router waren so zu konfigurieren, dass am Ende die PCs aller LANs miteinander kommunizieren können. Dafür mussten statische Routen vergeben und Interfaces zugewisen werden.
---
Übung: Configure Initial Router Settings