File tree 1 file changed +19
-7
lines changed
1 file changed +19
-7
lines changed Original file line number Diff line number Diff line change 1
1
# go-curo
2
2
3
- 2022年インターフェイス11月号のソフトウェアルータをgoに移植
3
+ 2022年インターフェイス11月号のソフトウェアルータをgoに移植してみました。
4
4
5
5
## 元ネタ
6
6
@@ -9,12 +9,24 @@ https://github.com/kametan0730/curo
9
9
10
10
## 実行方法
11
11
12
+ 1 . 以下のコマンドでルータをビルドします
13
+
14
+ ``` shell
15
+ $ go build .
16
+ ```
17
+
18
+ 2 . network namespaceを作るスクリプトを実行します
19
+
12
20
``` shell
13
- sudo ./netns-scripts/chapter4-2-netns.sh
14
- go build .
15
- # ルータを起動
16
- sudp ip netns exec route1 ./main --chapter2
21
+ $ sudo ./netns-scripts/chapter4-2-netns.sh
22
+ ```
17
23
18
- # 別のシェルで
19
- sudo ip netns exec host1 ping 192.168.1.1
24
+ 3.ルータを起動します
25
+
26
+ ※章ごとに引数で起動させてルータの挙動を変えます
27
+
28
+ ``` shell
29
+ $ sudo ip netns exec router1 ./main -mode ch1 # 1章の内容
30
+ $ sudo ip netns exec router1 ./main -mode ch2 # 2~4章の内容
31
+ $ sudo ip netns exec router1 ./main -mode ch5 # 5章の内容
20
32
```
You can’t perform that action at this time.
0 commit comments