-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstaticRoutingConfig.txt
134 lines (117 loc) · 5.1 KB
/
staticRoutingConfig.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
## Configuration of R1
======================
Set hostname
--------------
[admin@MikroTik] > system identity set name=R1
Setup Ip Address
-----------------
[admin@R1] > ip address add address=10.10.10.1/30 interface=ether1 disabled=no
[admin@R1] > ip address add address=192.168.1.1/24 interface=ether2 disabled=no
Show Ip Address Information
------------------------------
[admin@R1] > ip address
[admin@R1] /ip address> print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 10.10.10.1/30 10.10.10.0 ether1
1 192.168.1.1/24 192.168.1.0 ether2
Setup Static Routing
----------------------
[admin@R1] > ip route add dst-address=192.168.2.0/24 gateway=10.10.10.2
[admin@R1] > ip route add dst-address=192.168.3.0/24 gateway=10.10.10.2
Show Routing Information
-------------------------
[admin@R1] > ip route
[admin@R1] /ip route> print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADC 10.10.10.0/30 10.10.10.1 ether1 0
1 ADC 192.168.1.0/24 192.168.1.1 ether2 0
2 A S 192.168.2.0/24 10.10.10.2 1
3 A S 192.168.3.0/24 10.10.10.2 1
## Configuration of R2
=======================
Set hostname
--------------
[admin@MikroTik] > system identity set name=R2
Setup Ip Address
-----------------
[admin@R2] > ip address add address=10.10.10.2/30 interface=ether1 disabled=no
[admin@R2] > ip address add address=20.20.20.1/30 interface=ether2 disabled=no
[admin@R2] > ip address add address=192.168.2.1/24 interface=ether3 disabled=no
Show Ip Address Information
----------------------------
[admin@R2] > ip address
[admin@R2] /ip address> print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 10.10.10.2/30 10.10.10.0 ether1
1 20.20.20.1/30 20.20.20.0 ether2
2 192.168.2.1/24 192.168.2.0 ether3
Setup Static Routing
----------------------
[admin@R2] > ip route add dst-address=192.168.1.0/24 gateway=10.10.10.1
[admin@R2] > ip route add dst-address=192.168.3.0/24 gateway=20.20.20.2
Show Routing Information
-------------------------
[admin@R2] > ip route
[admin@R2] /ip route> print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADC 10.10.10.0/30 10.10.10.2 ether1 0
1 ADC 20.20.20.0/30 20.20.20.1 ether2 0
2 A S 192.168.1.0/24 10.10.10.1 1
3 ADC 192.168.2.0/24 192.168.2.1 ether3 0
4 A S 192.168.3.0/24 20.20.20.2 1
## Configuration of R3
=======================
Set hostname
--------------
[admin@MikroTik] > system identity set name=R3
Setup Ip Address
-----------------
[admin@R3] > ip address add address=20.20.20.2/30 interface=ether1 disabled=no
[admin@R3] > ip address add address=192.168.3.1/24 interface=ether2 disabled=no
Show Ip Address Information
----------------------------
[admin@R3] > ip address
[admin@R3] /ip address> print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 20.20.20.2/30 20.20.20.0 ether1
1 192.168.3.1/24 192.168.3.0 ether2
Setup Static Routing
----------------------
[admin@R3] > ip route add dst-address=192.168.1.0/24 gateway=20.20.20.1
[admin@R3] > ip route add dst-address=192.168.2.0/24 gateway=20.20.20.1
Show Routing Information
-------------------------
[admin@R3] > ip route
[admin@R3] /ip route> print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADC 20.20.20.0/30 20.20.20.2 ether1 0
1 A S 192.168.1.0/24 20.20.20.1 1
2 A S 192.168.2.0/24 20.20.20.1 1
3 ADC 192.168.3.0/24 192.168.3.1 ether2 0
## Configuration of PC1
========================
PC1> ip 192.168.1.2/24 192.168.1.1
Checking for duplicate address...
PC1 : 192.168.1.2 255.255.255.0 gateway 192.168.1.1
## Configuration of PC2
========================
PC2> ip 192.168.2.2/24 192.168.2.1
Checking for duplicate address...
PC2 : 192.168.2.2 255.255.255.0 gateway 192.168.2.1
## Configuration of PC3
========================
PC3> ip 192.168.3.2/24 192.168.3.1
Checking for duplicate address...
PC3 : 192.168.3.2 255.255.255.0 gateway 192.168.3.1