Cisco router / switch poorten

Router / Switch ports
_____________________

Interface                    -> Data zijde
Con / aux / VTY          -> Configuratie zijde
Port e                         -> Ethernet port (datazijde)
Port fa                        -> Fast ethernet port (datazijde)
Port g                         -> Giga bit port (datazijde)
Port s                         -> Serial port (configuratie zijde)
Port con                     -> Console port (configuratie zijde)
Port aux                     -> Aux port (alleen router) (configuratie zijde)
Port vty                      -> Virtual tele type port (configuratie zijde)

Protocollen

Protocollen
___________

UDP:
-> Connectionless | Limit Error checking | Best-effort delivery | no data recovery

TCP:
-> Connetion Oriented | Full Duplex mode operation | Error checking | Sequencing data packets |
Acknowledgement of receipt | Data recovery

RIP:
-> Routing IP protocol (Distance vector protocol)
-> Kijkt de route op basis van hops
-> per 30 seconden een broadcast van de bekend zijnde netwerken (veel broadcast)

RIP V1:
-> Broadcast | Classfull | No VLMS | Auto Summary | NO Authentication | Send no mask |

RIP V2:
-> Multicast | Classless | VLMS    | No Auto summary | Authentication | Send mask |

STP:
-> Spanning Tree Protocol

OSPF:
-> Routing protocol (Link state routing protocol)
-> Open Shortes Path First
-> Kijkt route op basis van cost (de bandbreedte)
-> Gebruikt het Dijkstra algoritme

EIGRP:
-> Enhanced Interior Gateway Routing Protocol (ontwikkeld door Cisco)
-> Zal bij meerdere routing protocolen de voorkeur krijgen afhankelijk van de Administrator distance)
-> Maakt gebruik van zowel het Link-state routing als van het Distance vector protocol

IS-IS:
-> Routing protocol (link-state protocol)

Spanning tree:
-> protocol voorkomt loopt (broadcast storm) op switch (als redundancy is uitgevoerd)

ARP:
-> Adress Resiolution Protocol (is een broadcast)

CDP:
-> Cisco Discovery Protocol (Discover de Cisco neighbors -> als laag 1 + 2 OK zijn werkt CDP)

802.1x:
-> Authentication protocol

HDLC:
-> Laag 2 protocol

PPP:
-> Point to point Laag 2 protocol

Frame Relay:
-> Laag 2 protocol

ATM:
-> Laag 2 protocol

Cisco CDP protocol

Cisco protocol
______________

CDP
-> Laat Devices zien die direct verbonden zijn (device ID (hostname)
-> Geeft adresslist
-> Indentificeerd de ceonnection port
-> Geeft de supported service van het device weer (capabilities list)
-> Platfom van het device (soort router / switch)

Routing protcollen

Routing protocollen
__________________

Link-state routing:

-> Routing protocol (wordt gebruikt door OSPF / IS-IS, Weet direct een alternatieve route, belast de router meer = nadeel).

Distance vector routing:

-> Routing protocol (Een protocol dat iedere 30 seconden een broadcast doet BV RIP v1, veel dataverkeer).

Hybrid routing:

-> Routing protocol (Een protocol dat tussen de distance vector en linkstate protocol in).

CLassfull routing protocol:

-> RIP v1 / IGRP (Classfull routing protocol stuurt geen Mask mee) (subnetten maar geen VLSM) automatische summeray.

Classless routing protocol:

-> OSPF RIP v2 IS-IS (geen auto summary)(Classfull routing protocol stuurt Mask mee) (kan subnetten en VSLM).

Protocollen:

RIP -> Kijkt de route op basis van hops
RIP -> per 30 seconden een broadcast van de bekend zijnde netwerken (veel broadcast)
RIP V1 -> Broadcast | Classfull | No VLMS | Auto Summary | NO Authentication | Send no mask |
RIP V2 -> Multicast | Classless | VLMS    | No Auto summary | Authentication | Send mask |
OSPF -> Routing protocol (Link state routing protocol) (Open Shortes Path First)
OSPF -> Kijkt route op basis van cost (de bandbreedte)OSPF -> Gebruikt het Dijkstra algoritme
EIGRP-> Enhanced Interior Gateway Routing Protocol (ontwikkeld door Cisco)
EIGRP -> Zal bij meerdere routing protocolen de voorkeur krijgen afhankelijk van de Administrator distance)
EIGRP -> Maakt gebruik van zowel het Link-state routing als van het Distance vector protocol
S-IS -> Routing protocol (link-state protocol)
IGRP -> Interior Gateway Routing Protocol (Distance vector protocol)

Routing protocollen verschillen
_______________________________
RIP V1   -> DV                    -> CF    -> Metric Hops   -> AD = 120       -> ALG = DV alg                 -> IGP
RIP V1   -> DV                    -> CF    -> Metric Hops   -> AD = 120       -> ALG = DV alg                 -> IGP
IGRP      -> DV                    -> CF    -> Metric B/D      -> AD = 100       -> ALG = Dual                    -> IGP
EIRGP    -> Hybrid / ADV    -> CL    -> Metric B/D     -> AD = 90         -> ALG = Dual                    -> IGP
IS-IS     -> LS                      -> CL    -> Metric Cost    -> AD = 115       -> ALG = Dijkstra / SPF     -> IGP
OSPF     -> LS                      -> CL    -> Metric Cost    -> AD = 110      -> ALG = Dijkstra / SPF      -> IGP

DV  = Distance vector
LS  = Linkstate
CF  = Classfull
CL  = Classless

Ezelsbrug
_________

RIP v1 IGRP RIP v2 = Routeren In Rommel (Distance vector & CF)
IS-IS OSPF = Is OK (Linkstate & CL)
EGRP = Eigenwijs (Hybride (tussen distance vector en linkste)

Binair rekenen

Decimal – Binair -Hexidecimaal
_______________________________

Decimaal -> In 10 tallligstelsel
Decimaal -> 0 1 2 3 4 5 6 7 8 9
Hexidecimaal -> In 16 talligstelsel
Hexidecimaal -> 0 1 2 3 4 5 6 7 8 9 A=11 B=12 C=13 D=14 E=15 F=16
Binair  -> In 2 talligstelsel
Binair -> 0 1
Binair -> Binair naar decimal -> binair per positie tot de macht 2 daarna optellen

Omrekenen binair – hexidecimaal – decimaal
___________________________________________

Binair ->  Hexidecimaal ->  decimaal

0001        -> 1        -> 1
0010        -> 2        -> 2
0011        -> 3        -> 3
0100        -> 4        -> 4
0101        -> 5        -> 5
0110        -> 6        -> 6
0111        -> 7        -> 7
1000        -> 8        -> 8
1001        -> 9        -> 9
1010        -> A        -> 10
1011        -> B        -> 11
1100        -> C        -> 12
1101        -> D        -> 13
1110        -> E        -> 14
1111        -> F        -> 15

SUBDEC tabel Geldige Subnet masks bereken (de decimaal op tellen met de opvolgende 128 + 64 = 192)
__________________________________________________________________________________________________

Mask                 128 | 192 | 224 | 240 | 248 | 252 | 254 |255

Decimaal           128 | 64  | 32  | 16  | 8   | 4   | 2     | 1

Aantal subnets    2   | 4   | 8   | 16  | 32  | 64  | 128 |255

Note: SUBDEC tabel = is een niet bestaande naam maar de naam die ik zelf aan de tabel gegeven heb.

Subnet mask binair (zie bovestaande rij decimaal):

Subnet uit 8 bits
128    -> 10000000     -> 128 – 128 = 0
192    -> 11000000     -> 192 – 128 – 64 = 0
224    -> 11100000    -> 224 – 128 – 64 – 32 = 0
240    -> 11110000    -> 240 – 128 – 64 – 32 – 16 = 0
248    -> 11111000    -> 248 – 128 – 64 – 32 – 16 – 8 = 0
252    -> 11111100    -> 252 – 128 – 64 – 32 – 16 – 8 – 4 = 0
254    -> 11111110    -> 254 – 128 – 64 – 32 – 16 – 8 – 4 – 2 = 0
255    -> 11111111    -> 254 – 128 – 64 – 32 – 16 – 8 – 4 – 2 – 1

Voorbeeld Magisch getal subnet berekeningen (per 8 bits 256 gebruiken)

___________________________________________

IP    -> 192.168.18.0
MAsk    -> 255.255.255.224

256 – (Laatse octet subnet mask) = magisch getal
256 – 224 = 32

Subnets zijn dan :
192.168.18.0          Network 0      first ip 1      last ip 30    broadcast 31
192.168.18.32        Network 32    first ip 33    last ip 62    broadcast 63
192.168.18.64        Network 64    first ip 65    last ip 94    broadcast 95
192.168.18.96        Network 96    first ip 97    last ip 126  broadcast 127
192.168.18.128
192.168.18.160
192.168.18.192
192.168.18.224 tot 256)

Zie voor magisch getal de SUBDEC tabel

Mask    Subnet
——————————
256 –     128 =   128
256 –     192 =   64
256 –    224 =    32
256 –    240 =    16
256 –    248 =    8
256 –    252 =    4
256 –    254 =    2
256 –    255 =    1

Aantal subnets berekenen
______________________________

Zie subdec tabel

256 : (door aantal bits gebruikt door sub netmask geteld vanaf links) = Aantal subnetten wat beschikbaar is (bij 8 bits subnet mask)

256 : 128    (1 bit)      = 2
256 : 64      (2 bits)    = 4
256 : 32      (3 bits)    = 8
256 : 16      (4 bits)    = 16
256 : 8        (5 bits)    = 32
256 : 4        (6 bits)    = 64
256 : 2        (7 bits)    = 128

Hier na is er nog maar 1 bit over in de host

Bij 16 bits subnet mask wordt 256 + 256 = 512 (1 bit wordt 128 + 128 = 256)

Subnet
_______________________________

/ berekening = het aantal bits voor de /

xxxxxxxx xxxxxxxx xxxxxxxx | xxxxxxxx     /24 (bits)
xxxxxxxx xxxxxxxx xxxxxxxx   xxx|xxxxx    /27 (bits)
xxxxxxxx xxxxxxxx xxxxxxxx   xxxxxx|xx    /30 (bits)

IP classes

IP Classes D en E zijn vernoemd deze nummers worden niet uitgegeven.

IP Classes
__________

IP Class A -> 1 t/m 126   (private range 10.0.0.0)
IP Class B -> 128 t/m 191 (private range 172.16.0.0 t/m 172.31.0.0)
IP Class C -> 192 t/m 223 (Private range 192.168.0.0)
IP Class D -> Multicast adressen
IP Class E  -> Expirimental (adressen worden niet uitgegeven)\

Class A -> Network.host.host.host
Class B -> Network.network.host.host
Class C -> Network.network.network.host
Loopback Range  -> 127.0.0.0

RFC pagina’s

Cisco config-register

Config register
_______________

Verwijzing naar waar de startup-config staat (default) 0X2102 Bij de waarde 0X2142 slaat startup-config over.

Send break -> Breekt bij de rommon de opstart procedure af

Config-register -> In de config mode kan het config-register veranderd worden

Config-register waardes (die in de config mode kunnen worden ingesteld)

0X2100 -> Use rommon mode
0X2101 -> Automatic boot up van Rom (provides Cisco IOS software subset (bootstrap)
0X2102 -> Verwijzing naar IOS  daarna -> startup-config in config register
0x2142 -> Slaat startup-config over (hierna is het mogelijk om in de auto setup mode te komen)

Cisco wachtwoord op de console

Instellen wachtwoord op de console

router>Enable
Router#config t
Router(config)#
Router(config)#line con 0
Router(config-line)#password [het wachtwoord]
Router(config-line)#login
Router(config-line)#exit (ctrl-z)c
Router(config)#service password-encryption
Router(config)#enable password [het wachtwoord]
Router(config)#end
Router#copy running-config startup-config (afgekort copy run start)
Router>disable

Cisco routers configureren DHCP

De ondestaande opdrachten stellen een DHCP server in.
In het voorbeeld is er vanuit gegaan dat de router 10.130.1.1 als IP nummer heeft.

-> [dhcp pool name] als er nog geen DHCP geconfigureerd is kan hier de naam van de pool ingegeven worden.
-> [dns-server hier moet het IP of meerder IP nummer(s) van de DNS server]
-> [Domain-name indien ernog geen domain-name is gedefineerd (kan deze eerst gedfineerd worden, in de config mode met de onderstaande opdracht).
-> router(config)#ip domain-name [de domain name]
-> Het is verstandig voordat je begint de running-config te kopieren naar de startup-config (laatse opdracht hieronder)

router#config t
Router(config)
Router(config)# service dhcp
router(config)#ip dhcp excluded-address 10.130.1.1 – 10.130.1.99
router(config)#ip dhcp excluded-address 10.130.1.200 – 10.130.1.254
router(config)#
router(config)#ip dhcp pool [dhcp pool naam]
router(dhcp-config)#network 10.130.1.0 255.255.255.0
router(dhcp-config)#default-router 10.130.1.1
router(dhcp-config)#dns-server 4.2.2.2 4.2.2.1
router(dhcp-config)#domain-name [domain-naam]
router(dhcp-config)#
router(dhcp-config)#exit
router(config)#end
router#
router#copy run start