Páginas

miércoles, 26 de febrero de 2020

Creación de un bridge en Mikrotik

Bridge en Mikrotik



[admin@MikroTik] > system identity set name=RPortsBridge
[admin@RPortsBridge] > interface bridge 
calea   host  port      add      disable  enable  find     print   set
filter  nat   settings  comment  edit     export  monitor  remove  
[admin@RPortsBridge] > interface bridge add   
admin-mac    auto-mac   fast-forward     name               
ageing-time  comment    forward-delay    priority           
arp          copy-from  max-message-age  protocol-mode      
arp-timeout  disabled   mtu              transmit-hold-count
[admin@RPortsBridge] > interface bridge add name=LAN_Bridge
[admin@RPortsBridge] > interface print
Flags: D - dynamic, X - disabled, R - running, S - slave 
 #     NAME                                TYPE       ACTUAL-MTU L2MTU
 0  R  ether1                              ether            1500
 1  R  ether2                              ether            1500
 2  R  ether3                              ether            1500
 3  R  ether4                              ether            1500
 4  R  LAN_Bridge                          bridge           1500 65535

[admin@RPortsBridge] > interface bridge port add interface=ether
ether1  ether2  ether3  ether4
[admin@RPortsBridge] > interface bridge port add interface=ether1
bridge: LAN_Bridge
[admin@RPortsBridge] > interface bridge port print 
Flags: X - disabled, I - inactive, D - dynamic 
 #    INTERFACE              BRIDGE              PRIORITY  PATH-COST    HORIZON
 0    ether1                 LAN_Bridge              0x80         10       none
[admin@RPortsBridge] > interface bridge port add interface=ether2
bridge: LAN_Bridge
[admin@RPortsBridge] > interface bridge port add interface=ether3 bridge=LAN_Bridge  
[admin@RPortsBridge] > interface bridge port print                              Flags: X - disabled, I - inactive, D - dynamic 
 #    INTERFACE              BRIDGE              PRIORITY  PATH-COST    HORIZON
 0    ether1                 LAN_Bridge              0x80         10       none
 1    ether2                 LAN_Bridge              0x80         10       none
 2    ether3                 LAN_Bridge              0x80         10       none
[admin@RPortsBridge] > interface bridge port add interface=ether4 bridge=LAN_Bridge  
[admin@RPortsBridge] > interface bridge port print                              Flags: X - disabled, I - inactive, D - dynamic 
 #    INTERFACE              BRIDGE              PRIORITY  PATH-COST    HORIZON
 0    ether1                 LAN_Bridge              0x80         10       none
 1    ether2                 LAN_Bridge              0x80         10       none
 2    ether3                 LAN_Bridge              0x80         10       none
 3    ether4                 LAN_Bridge              0x80         10       none
[admin@RPortsBridge] > interface bridge            
calea   host  port      add      disable  enable  find     print   set
filter  nat   settings  comment  edit     export  monitor  remove  
[admin@RPortsBridge] > interface bridge settings 
edit  export  get  print  set
             
[admin@RPortsBridge] > interface bridge settings get use-ip-firewall  
  
[admin@RPortsBridge] > ip address add address=192.168.1.1/24 interface=LAN_Bridge    
accounting   dhcp-relay   hotspot   pool     settings  tftp        
address      dhcp-server  ipsec     proxy    smb       traffic-flow
arp          dns          neighbor  route    socks     upnp        
dhcp-client  firewall     packing   service  ssh       export      
[admin@RPortsBridge] > interface print
Flags: D - dynamic, X - disabled, R - running, S - slave 
 #     NAME                                TYPE       ACTUAL-MTU L2MTU
 0  RS ether1                              ether            1500
 1  RS ether2                              ether            1500
 2  RS ether3                              ether            1500
 3  RS ether4                              ether            1500
 4  R  LAN_Bridge                          bridge           1500 65535
[admin@RPortsBridge] > interface print 
append  count-only  file    follow-only  interval  stats         where         
brief   detail      follow  from         oid       stats-detail  without-paging
[admin@RPortsBridge] > interface print detail 
Flags: D - dynamic, X - disabled, R - running, S - slave 
 0  RS name="ether1" default-name="ether1" type="ether" mtu=1500 
       actual-mtu=1500 mac-address=0C:78:8A:4D:2F:00 fast-path=no 
       last-link-up-time=feb/26/2020 18:28:31 link-downs=

 1  RS name="ether2" default-name="ether2" type="ether" mtu=1500 
       actual-mtu=1500 mac-address=0C:78:8A:4D:2F:01 fast-path=no 
       last-link-up-time=feb/26/2020 18:28:31 link-downs=

 2  RS name="ether3" default-name="ether3" type="ether" mtu=1500 
       actual-mtu=1500 mac-address=0C:78:8A:4D:2F:02 fast-path=no 
       last-link-up-time=feb/26/2020 18:28:31 link-downs=

 3  RS name="ether4" default-name="ether4" type="ether" mtu=1500 
       actual-mtu=1500 mac-address=0C:78:8A:4D:2F:03 fast-path=no 
       last-link-up-time=feb/26/2020 18:28:31 link-downs=

 4  R  name="LAN_Bridge" type="bridge" mtu=auto actual-mtu=1500 l2mtu=65535 
       mac-address=0C:78:8A:4D:2F:00 fast-path=yes 
       last-link-up-time=feb/26/2020 18:32:48 link-downs=
     
[admin@RPortsBridge] > interface bridge set 
LAN_Bridge   arp-timeout  fast-forward     name                 numbers
admin-mac    auto-mac     forward-delay    priority             
ageing-time  comment      max-message-age  protocol-mode        
arp          disabled     mtu              transmit-hold-count 
[admin@RPortsBridge] > interface bridge     
calea   host  port      add      disable  enable  find     print   set
filter  nat   settings  comment  edit     export  monitor  remove  
[admin@RPortsBridge] > interface bridge set 
LAN_Bridge   arp-timeout  fast-forward     name                 numbers
admin-mac    auto-mac     forward-delay    priority             
ageing-time  comment      max-message-age  protocol-mode        
arp          disabled     mtu              transmit-hold-count 


Asignar Admin. Mac Address

[admin@RPortsBridge] > interface bridge set LAN_Bridge admin-mac=0C:78:8A:4D:2F:01
[admin@RPortsBridge] > interface bridge print 
Flags: X - disabled, R - running 
 0  R name="LAN_Bridge" mtu=auto actual-mtu=1500 l2mtu=65535 arp=enabled 
      arp-timeout=auto mac-address=0C:78:8A:4D:2F:00 protocol-mode=rstp 
      fast-forward=yes priority=0x8000 auto-mac=yes 
      admin-mac=0C:78:8A:4D:2F:01 max-message-age=20s forward-delay=15s 
      transmit-hold-count=6 ageing-time=5m 
      
[admin@RPortsBridge] > ip dhcp-server setup  
Select interface to run DHCP server on 

dhcp server interface: LAN_Bridge
Select interface to run DHCP server on

dhcp server interface: ether1
Select network for DHCP addresses

dhcp address space: 192.168.1.0/24
Select gateway for given network

gateway for dhcp network: 192.168.1.1
Select pool of ip addresses given out by DHCP server

addresses to give out: 192.168.1.2-192.168.1.254
Select DNS servers

dns servers: 1.1.1.1
Select lease time

lease time: 10m

[admin@RPortsBridge] > 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  192.168.1.0/24     192.168.1.1     LAN_Bridge                0
[admin@RPortsBridge] > ip route add gateway=192.168.1.1

PC2> ip dhcp
DORA IP 192.168.1.252/24 GW 192.168.1.1

PC2> save
Saving startup configuration to startup.vpc
.  done

PC2> ping 192.168.1.254
84 bytes from 192.168.1.254 icmp_seq=1 ttl=64 time=0.408 ms
84 bytes from 192.168.1.254 icmp_seq=2 ttl=64 time=0.444 ms
84 bytes from 192.168.1.254 icmp_seq=3 ttl=64 time=0.493 ms
^C

PC2> 

Mikrotik es genial!.

No hay comentarios:

Publicar un comentario