# Homework Loopback Interface
###### tags: `Networking` `Smallko` `homework` `loopback`
[TOC]

## What is loopback
loopback interface is a logical interface on the router that won't go down unless you shutter the interface down.
So if one of the interface goes down it's not a problem because you can still reach the loopback interface.

## Routing problem

we couldn't ping 2.2.2.2 of right at 2, because it's not advertised in a routing protocol
### EIGRP
Solve way is to enable [EIGRP](/dFay6GVWSRC37Od6imRRTw)



the neighbor relationship have been establish.
Now router can find the way to reach another router (dynamic routing is my god XD)

```
show ip eigrp neighbors
```


## Ping loopback interface

Now we can ping freely
---
# A triangle of the static routeing




<!-- I thought I need to use script, Otherwise, type those repeatedly cmds which are annoying.
I just like a idiot.
In this case, I didn't use static routing, because I have dug how to set one. (I'm slacker :kissing_smiling_eyes: ) -->
## Dynamic Routing



## Static routing
### Configure static routing
```
ip route <target ip and subnetmask> <via where router port >
```
Example:
### Check routing table
```
show ip route
```
R1-> R2 ,R3

R2->R1 ,R3


R3-> R1,R2


## Ping loopback interface
### Dynamic Routing



### Static Routing



# A square of the static routing(lookback interface)
## Topology and Configuration





Setting static routing
R1 <-> R2
R1
```
#ip route 2.2.2.2 255.255.255.255 10.1.1.2
```
R2
```
ip route 1.1.1.1 255.255.255.255 10.1.1.1
```
R2<->R3
R2
```
ip route 3.3.3.3 255.255.255.255 10.1.2.2
```
R3
```
ip route 2.2.2.2 255.255.255.255 10.1.2.1
```
R3<->R4
R3
```
ip route 4.4.4.4 255.255.255.255 10.1.3.2
```
R4
```
#ip route 3.3.3.3 255.255.255.255 10.1.3.1
```
R4<->R1
R4
```
ip route 3.3.3.3 255.255.255.255 10.1.3.1
```
R1
```
ip route 4.4.4.4 255.255.255.255 10.1.4.1
```
R1->R2->R3
## Routing problems

Why R1 couldn't Receive the packet.
The reason is we haven't tell the packet how to go back, he didn't find the way to go home XD
## Cross route static routing
R1<->R2<->R3
R1
```
ip route 3.3.3.3 255.255.255.255 2.2.2.2
```
R2
```
ip route 1.1.1.1 255.255.255.255 2.2.2.2
```
Ok now, we success, it works, I am a god

Result

R2<->R3<->R4
R2
```
ip route 4.4.4.4 255.255.255.255 3.3.3.3
```
R4
```
ip route 2.2.2.2 255.255.255.255 3.3.3.3
```
Result
