電訊茶室's Archiver

角色 發表於 2015-5-24 01:47

【RouterOS】—— Two routers and four network segments

[i=s] 本帖最後由 角色 於 2015-5-24 02:43 編輯 [/i]

Please take a look at the following diagram.

The objectives of this example are
1. Both PCs can ping each other.
2. Both PCs can be able to access the Internet using hostname.

[attach]3549[/attach]

R1 settings

/ip address[code]
[admin@MikroTik] > ip address print
Flags: X - disabled, I - invalid, D - dynamic
#   ADDRESS            NETWORK         INTERFACE                             
0   192.168.1.1/24     192.168.1.0     ether1                                
1   192.168.2.1/24     192.168.2.0     ether2                                
2   10.0.81.102/24     10.0.81.0       ether5                                
[/code]/ip route[code]
[admin@MikroTik] > /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 A S  0.0.0.0/0                          10.0.81.101               1
1 ADC  10.0.81.0/24       10.0.81.102     ether5                    0
2 ADC  192.168.1.0/24     192.168.1.1     ether1                    0
3 ADC  192.168.2.0/24     192.168.2.1     ether2                    0
4 A S  192.168.3.0/24                     192.168.2.2               1
[/code]/ip dns[code]
[admin@MikroTik] > /ip dns print
                servers: 10.0.81.101
        dynamic-servers:
  allow-remote-requests: yes
    max-udp-packet-size: 4096
   query-server-timeout: 2s
    query-total-timeout: 10s
             cache-size: 2048KiB
          cache-max-ttl: 1w
             cache-used: 156KiB
[/code].
.
R2 settings

/ip address[code]
[admin@MikroTik] > /ip address print
Flags: X - disabled, I - invalid, D - dynamic
#   ADDRESS            NETWORK         INTERFACE                       
0   192.168.2.2/24     192.168.2.0     ether1                          
1   192.168.3.1/24     192.168.3.0     ether2                          
[/code]/ip route[code]
[admin@MikroTik] > /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 A S  0.0.0.0/0                          192.168.2.1               1
1 A S  10.0.81.0/24                       192.168.2.1               1
2 A S  192.168.1.0/24                     192.168.2.1               1
3 ADC  192.168.2.0/24     192.168.2.2     ether1                    0
4 ADC  192.168.3.0/24     192.168.3.1     ether2                    0
[/code]/ip dns[code]
[admin@MikroTik] > /ip dns print
                servers: 192.168.2.1
        dynamic-servers:
  allow-remote-requests: yes
    max-udp-packet-size: 4096
   query-server-timeout: 2s
    query-total-timeout: 10s
             cache-size: 2048KiB
          cache-max-ttl: 1w
             cache-used: 135KiB
[/code]

頁: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.