# Routing – statikus, default, OSPF, RIP, EIGRP

## Statikus útvonal

Formátum:

```bash
ip route <cél hálózat> <maszk> <next-hop IP>
```

Példa:

```bash
ip route 192.168.20.0 255.255.255.0 10.0.0.2
```

Kimenő interfésszel:

```bash
ip route 192.168.20.0 255.255.255.0 Serial0/0/0
```

## Default route

```bash
ip route 0.0.0.0 0.0.0.0 <next-hop>
```

Példa:

```bash
ip route 0.0.0.0 0.0.0.0 Serial0/0/1
```

## Lebegő statikus útvonal

Adminisztratív távolság magasabb értékkel:

```bash
ip route 192.168.4.0 255.255.255.0 192.168.9.1 200
```

## OSPF alap

```bash
router ospf 1
network 10.0.0.0 0.255.255.255 area 0
```

Pontosabb hálózatonként:

```bash
router ospf 10
network 10.0.10.0 0.0.0.255 area 0
network 10.0.20.0 0.0.0.255 area 0
```

## OSPF default route hirdetés

Először legyen default route:

```bash
ip route 0.0.0.0 0.0.0.0 Serial0/0/1
```

Majd:

```bash
router ospf 10
default-information originate
```

## OSPF passive-interface

Access LAN felé ne küldjön OSPF hello-t:

```bash
router ospf 10
passive-interface GigabitEthernet0/0.10
```

Mindent passzívra, majd kivétel:

```bash
router ospf 10
passive-interface default
no passive-interface Serial0/0/0
```

## OSPF Router ID

```bash
router ospf 1
router-id 1.1.1.1
```

Utána:

```bash
clear ip ospf process
```

## OSPF MD5 authentication

### Router process alatt area auth

```bash
router ospf 1
area 0 authentication message-digest
```

### Interfészen kulcs

```bash
interface Serial0/0/0
ip ospf message-digest-key 10 md5 secretpassword
```

Mindkét oldalon azonos kulcs kell.

## OSPF ellenőrzés

```bash
show ip ospf
show ip ospf neighbor
show ip ospf interface
show ip protocols
show ip route
debug ip ospf events
```

## RIP v2

```bash
router rip
version 2
no auto-summary
network 10.0.0.0
network 192.168.1.0
```

## RIP default route

```bash
router rip
default-information originate
```

Vagy statikus újrahirdetés:

```bash
router rip
redistribute static
```

## RIP ellenőrzés

```bash
show ip protocols
show ip route
show ip rip database
debug ip rip
undebug all
```

## EIGRP

```bash
router eigrp 100
network 10.0.0.0
no auto-summary
```

Pontosan wildcarddal:

```bash
router eigrp 100
network 10.0.10.0 0.0.0.255
network 10.0.20.0 0.0.0.255
```

## EIGRP bandwidth

Serial link mindkét oldalán:

```bash
interface Serial0/0/0
bandwidth 256
```

## EIGRP MD5 authentication

```bash
key chain discchain
key 1
key-string san-fran
exit
exit
```

Interfészen:

```bash
interface Serial0/0/0
ip authentication mode eigrp 100 md5
ip authentication key-chain eigrp 100 discchain
```

## EIGRP ellenőrzés

```bash
show ip eigrp neighbors
show ip eigrp neighbors detail
show ip eigrp topology
show ip eigrp interfaces detail
show ip eigrp traffic
debug eigrp packet
debug eigrp fsm
```

## Hibakeresési sorrend routingnál

1. Interfészek up/up?

```bash
show ip interface brief
```

2. Van IP cím?

```bash
show run interface <interface>
```

3. Routing tábla tartalmazza a célhálózatot?

```bash
show ip route
```

4. Szomszédság létrejött?

```bash
show ip ospf neighbor
show ip eigrp neighbors
```

5. Ping next-hop?

```bash
ping <next-hop>
```

6. Traceroute

```bash
traceroute <cél IP>
```
