---
# System prepended metadata

title: static route

---

# static route

## トポロジー図
![](https://i.imgur.com/uZQ0st0.jpg)




## R1

```cisco
#初期設定
host R1
int f8
ip add　192.168.0.2 255.255.255.0
no sh
int g0
ip add 192.168.1.1 255.255.255.0
no sh
exit

#ネクストホップ
ip route 192.168.3.0 255.255.255.0 192.168.1.2 
```


## R2
```cisco
#初期設定
host R2
int f0
ip add　192.168.1.2 255.255.255.0
no sh
int f1
ip add 192.168.2.1 255.255.255.0
no sh
exit
#ネクストホップ
ip route 192.168.3.0 255.255.255.0 192.168.1.2
ip route 192.168.0.0 255.255.255.0 192.168.1.1
```


## R3
```cisco
#初期設定
host R3
int f8
ip add 192.168.2.2
no sh
int g0
ip add 192.168.3.1
no sh
exit

#ネクストホップ
ip  route 192.168.0.0 255.255.255.0 192.168.2.1
```


## Laptop1

```cisco
ip add 192.168.0.1

#ping 192.168.3.2
#tracert 192.168.3.2
```

## Laptop2

```cisco
ip add 192.168.3.2

#ping 192.168.0.1
#tracert 192.168.0.1
```


# OSPF


## トポロジー図
![](https://i.imgur.com/iU7qdrC.jpg)


## R1
```cisco
host name R1
int f0
ip add 192.168.0.2 255.255.255.0
no sh
int f1
ip add 192.168.1.1 255.255.255.0
no sh
exit
 
router ospf 65535
network 192.168.0.0 0.0.0.255 area 1
network 192.168.1.0 0.0.0.255 area 1
```

## R2
```cisco
host name R2
int f8
ip add 192.168.1.2 255.255.255.0
no sh
int g0
ip add 192.168.2.1 255.255.255.0
no sh
exit

#OSPF
router ospf 65535
network 192.168.1.0 0.0.0.255 area 1
network 192.168.2.0 0.0.0.255 area 1
```

## R3
```cisco
host name R3
int f8
ip add 192.168.2.2 255.255.255.0
no sh
int g0
ip add 192.168.3.2 255.255.255.0
no sh
exit

#OSPF
router ospf 65535
network 192.168.3.0 0.0.0.255 area 1
network 192.168.2.0 0.0.0.255 area 1
```

### 写真
実際の写真
![](https://i.imgur.com/V8wDVaN.jpg)
