Skip to content

Commit 54c4c27

Browse files
committed
README更新
1 parent ffcd727 commit 54c4c27

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

README.md

+19-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# go-curo
22

3-
2022年インターフェイス11月号のソフトウェアルータをgoに移植
3+
2022年インターフェイス11月号のソフトウェアルータをgoに移植してみました。
44

55
## 元ネタ
66

@@ -9,12 +9,24 @@ https://github.com/kametan0730/curo
99

1010
## 実行方法
1111

12+
1. 以下のコマンドでルータをビルドします
13+
14+
```shell
15+
$ go build .
16+
```
17+
18+
2. network namespaceを作るスクリプトを実行します
19+
1220
```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+
```
1723

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章の内容
2032
```

0 commit comments

Comments
 (0)