?>/script>'; } ?> rutas estaticas Widgets Magazine

Autor Tema: rutas estaticas  (Leído 9722 veces)

0 Usuarios y 1 Visitante están viendo este tema.

dsna

  • Visitante
rutas estaticas
« en: 12-11-2013, 09:06 (Martes) »
Tengo el siguiente problema:

Necesito que un segmento de red vea una ip en otro segmento - 192.168.4.0/24 que pueda ver/alcanzar a 192.168.5.50
Creo la rutas estática, pero no logro alcanzar las redes.
add disabled=no distance=2 dst-address=192.168.5.0/24 gateway=ether4 pref-src=192.168.4.1 scope=30 target-scope=10

las 2 redes tienen dhcp-server y ambas redes las gestiona el mismo mikrotik ya que hay un balanceo de por medio, agregue unas reglas de ospf, pero la verdad ni se como se ocupan o si aportaran algo a lo que quiero hacer.


ether1 10.0.1.2 y ether2 10.0.2.2 balancean para ether5 192.168.5.1/24
ether3 192.168.0.128/24 es el gw para ether4 192.168.4.1/24


Este es el rsc:

/interface ethernet
set 0 arp=enabled auto-negotiation=yes disabled=no full-duplex=yes l2mtu=1600 \
mac-address=D4:CA:6D:A7:C4:8A mtu=1500 name=ether1 speed=100Mbps
set 1 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1598 mac-address=D4:CA:6D:A7:C4:8B \
master-port=none mtu=1500 name=ether2 speed=100Mbps
set 2 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1598 mac-address=D4:CA:6D:A7:C4:8C \
master-port=none mtu=1500 name=ether3 speed=100Mbps
set 3 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1598 mac-address=D4:CA:6D:A7:C4:8D \
master-port=none mtu=1500 name=ether4 speed=100Mbps
set 4 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1598 mac-address=D4:CA:6D:A7:C4:8E \
master-port=none mtu=1500 name=ether5 speed=100Mbps
/interface pptp-server
add disabled=no name=pptp-in1 user=""
/interface ethernet switch
set 0 mirror-source=none mirror-target=none name=switch1
/ip hotspot profile
set [ find default=yes ] dns-name="" hotspot-address=0.0.0.0 html-directory=\
hotspot http-cookie-lifetime=3d http-proxy=0.0.0.0:0 login-by=\
cookie,http-chap name=default rate-limit="" smtp-server=0.0.0.0 \
split-user-domain=no use-radius=no
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m name=default \
shared-users=1 status-autorefresh=1m transparent-proxy=no
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha1 disabled=no enc-algorithms=3des \
lifetime=30m name=default pfs-group=modp1024
/ip pool
add name=dhcp_pool1 ranges=192.168.5.2-192.168.5.254
add name=dhcp_pool2 ranges=192.168.4.2-192.168.4.254
/ip dhcp-server
add address-pool=dhcp_pool1 authoritative=after-2sec-delay bootp-support=\
static disabled=no interface=ether5 lease-time=3d name=dhcp1
add address-pool=dhcp_pool2 authoritative=after-2sec-delay bootp-support=\
static disabled=no interface=ether4 lease-time=3d name=dhcp2
/ppp profile
set 0 change-tcp-mss=yes name=default only-one=default use-compression=\
default use-encryption=default use-mpls=default use-vj-compression=\
default
add change-tcp-mss=yes local-address=10.0.2.2 name=default-encryption2 \
only-one=default remote-address=10.0.2.4 use-compression=default \
use-encryption=yes use-mpls=default use-vj-compression=default
add change-tcp-mss=yes local-address=10.0.1.2 name=default-encryption1 \
only-one=default remote-address=10.0.1.4 use-compression=default \
use-encryption=yes use-mpls=default use-vj-compression=default
add change-tcp-mss=yes local-address=10.0.3.2 name=default-encryption3 \
only-one=default remote-address=10.0.3.4 use-compression=default \
use-encryption=yes use-mpls=default use-vj-compression=default
set 4 change-tcp-mss=yes name=default-encryption only-one=default \
use-compression=default use-encryption=yes use-mpls=default \
use-vj-compression=default
/queue type
set 0 kind=pfifo name=default pfifo-limit=50
set 1 kind=pfifo name=ethernet-default pfifo-limit=50
set 2 kind=sfq name=wireless-default sfq-allot=1514 sfq-perturb=5
set 3 kind=red name=synchronous-default red-avg-packet=1000 red-burst=20 \
red-limit=60 red-max-threshold=50 red-min-threshold=10
set 4 kind=sfq name=hotspot-default sfq-allot=1514 sfq-perturb=5
set 5 kind=none name=only-hardware-queue
set 6 kind=mq-pfifo mq-pfifo-limit=50 name=multi-queue-ethernet-default
set 7 kind=pfifo name=default-small pfifo-limit=10
/routing bgp instance
set default as=65530 client-to-client-reflection=yes disabled=no \
ignore-as-path-len=no name=default out-filter="" redistribute-connected=\
no redistribute-ospf=no redistribute-other-bgp=no redistribute-rip=no \
redistribute-static=no router-id=0.0.0.0 routing-table=""
/routing ospf instance
set [ find default=yes ] disabled=no distribute-default=never in-filter=\
ospf-in metric-bgp=auto metric-connected=20 metric-default=1 \
metric-other-ospf=auto metric-rip=20 metric-static=20 name=default \
out-filter=ospf-out redistribute-bgp=no redistribute-connected=no \
redistribute-other-ospf=no redistribute-rip=no redistribute-static=no \
router-id=0.0.0.0
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=\
backbone type=default
/snmp community
set [ find default=yes ] addresses=0.0.0.0/0 authentication-password="" \
authentication-protocol=MD5 encryption-password="" encryption-protocol=\
DES name=public read-access=yes security=none write-access=no
/system logging action
set 0 memory-lines=500 memory-stop-on-full=no name=memory target=memory
set 1 disk-file-count=2 disk-file-name=log disk-lines-per-file=1000 \
disk-stop-on-full=no name=disk target=disk
set 2 name=echo remember=yes target=echo
set 3 bsd-syslog=no name=remote remote-port=514 src-address=0.0.0.0 \
syslog-facility=daemon syslog-severity=auto target=remote
/user group
set read name=read policy="local,telnet,ssh,reboot,read,test,winbox,password,w\
eb,sniff,sensitive,api,!ftp,!write,!policy" skin=default
set write name=write policy="local,telnet,ssh,reboot,read,write,test,winbox,pa\
ssword,web,sniff,sensitive,api,!ftp,!policy" skin=default
set full name=full policy="local,telnet,ssh,ftp,reboot,read,write,policy,test,\
winbox,password,web,sniff,sensitive,api" skin=default
/interface bridge settings
set use-ip-firewall=no use-ip-firewall-for-pppoe=no use-ip-firewall-for-vlan=\
no
/interface ethernet switch port
set 0 vlan-header=leave-as-is vlan-mode=fallback
set 1 vlan-header=leave-as-is vlan-mode=fallback
set 2 vlan-header=leave-as-is vlan-mode=fallback
set 3 vlan-header=leave-as-is vlan-mode=fallback
set 4 vlan-header=leave-as-is vlan-mode=fallback
/interface l2tp-server server
set authentication=pap,chap,mschap1,mschap2 default-profile=\
default-encryption enabled=no keepalive-timeout=30 max-mru=1460 max-mtu=\
1460 mrru=disabled
/interface ovpn-server server
set auth=sha1,md5 certificate=none cipher=blowfish128,aes128 default-profile=\
default enabled=no keepalive-timeout=60 mac-address=FE:78:98:22:7D:57 \
max-mtu=1500 mode=ip netmask=24 port=1194 require-client-certificate=no
/interface pptp-server server
set authentication=mschap1,mschap2 default-profile=default-encryption \
enabled=yes keepalive-timeout=30 max-mru=1460 max-mtu=1460 mrru=disabled
/interface sstp-server server
set authentication=pap,chap,mschap1,mschap2 certificate=none default-profile=\
default enabled=no keepalive-timeout=60 max-mru=1500 max-mtu=1500 mrru=\
disabled port=443 verify-client-certificate=no
/ip accounting
set account-local-traffic=no enabled=no threshold=256
/ip accounting web-access
set accessible-via-web=no address=0.0.0.0/0
/ip address
add address=10.0.1.2/24 disabled=no interface=ether1 network=10.0.1.0
add address=10.0.2.2/24 disabled=no interface=ether2 network=10.0.2.0
add address=192.168.5.1/24 disabled=no interface=ether5 network=192.168.5.0
add address=192.168.4.1/24 disabled=no interface=ether4 network=192.168.4.0
add address=192.168.0.128/24 disabled=no interface=ether3 network=192.168.0.0
/ip dhcp-server config
set store-leases-disk=5m
/ip dhcp-server network
add address=192.168.4.0/24 dhcp-option="" dns-server="" gateway=192.168.4.1 \
ntp-server="" wins-server=""
add address=192.168.5.0/25 dhcp-option="" dns-server="" gateway=192.168.5.1 \
ntp-server="" wins-server=""
add address=192.168.5.0/24 dhcp-option="" dns-server=8.8.8.8,8.8.4.4 gateway=\
192.168.5.1 ntp-server="" wins-server=""
add address=192.168.5.128/25 dhcp-option="" dns-server="" gateway=\
192.168.5.254 ntp-server="" wins-server=""
/ip dns
set allow-remote-requests=no cache-max-ttl=1w cache-size=2048KiB \
max-udp-packet-size=4096 servers=8.8.8.8,8.8.4.4
/ip firewall connection tracking
set enabled=yes generic-timeout=10m icmp-timeout=10s tcp-close-timeout=10s \
tcp-close-wait-timeout=10s tcp-established-timeout=1d \
tcp-fin-wait-timeout=10s tcp-last-ack-timeout=10s \
tcp-syn-received-timeout=5s tcp-syn-sent-timeout=5s tcp-syncookie=no \
tcp-time-wait-timeout=10s udp-stream-timeout=3m udp-timeout=10s
/ip firewall mangle
add action=mark-connection chain=prerouting connection-state=new disabled=no \
in-interface=ether1 new-connection-mark=ether1_conn passthrough=yes
add action=mark-connection chain=prerouting connection-state=new disabled=no \
in-interface=ether3 new-connection-mark=ether3_conn passthrough=yes
add action=mark-connection chain=prerouting connection-state=new disabled=no \
in-interface=ether2 new-connection-mark=ether2_conn passthrough=yes
add action=mark-routing chain=output connection-mark=ether1_conn disabled=no \
new-routing-mark=to_ether1 passthrough=yes
add action=mark-routing chain=output connection-mark=ether2_conn disabled=no \
new-routing-mark=to_ether2 passthrough=yes
add action=mark-routing chain=output connection-mark=ether3_conn disabled=no \
new-routing-mark=to_ether3 passthrough=yes
add action=mark-connection chain=prerouting connection-state=new disabled=no \
dst-address-type=!local in-interface=ether5 new-connection-mark=\
ether1_conn passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting connection-state=new disabled=no \
dst-address-type=!local in-interface=ether5 new-connection-mark=\
ether2_conn passthrough=yes per-connection-classifier=both-addresses:2/1
add action=mark-connection chain=prerouting connection-state=new disabled=no \
dst-address-type=!local in-interface=ether4 new-connection-mark=\
ether3_conn passthrough=yes
add action=mark-routing chain=prerouting connection-mark=ether1_conn \
disabled=no in-interface=ether5 new-routing-mark=to_ether1 passthrough=\
yes
add action=mark-routing chain=prerouting connection-mark=ether2_conn \
disabled=no in-interface=ether5 new-routing-mark=to_ether2 passthrough=\
yes
add action=mark-routing chain=prerouting connection-mark=ether3_conn \
disabled=no in-interface=ether4 new-routing-mark=to_ether3 passthrough=\
yes
add action=accept chain=prerouting disabled=no dst-address=10.0.1.0/24 \
in-interface=ether5
add action=accept chain=prerouting disabled=no dst-address=10.0.2.0/24 \
in-interface=ether5
add action=accept chain=prerouting disabled=no dst-address=192.168.0.0/24 \
in-interface=ether4
/ip firewall nat
add action=masquerade chain=srcnat disabled=no out-interface=ether1
add action=masquerade chain=srcnat disabled=no out-interface=ether2
add action=masquerade chain=srcnat disabled=no out-interface=ether3
/ip firewall service-port
set ftp disabled=no ports=21
set tftp disabled=no ports=69
set irc disabled=no ports=6667
set h323 disabled=no
set sip disabled=no ports=5060,5061 sip-direct-media=yes
set pptp disabled=no
/ip hotspot service-port
set ftp disabled=no ports=21
/ip neighbor discovery
set ether1 disabled=no
set ether2 disabled=no
set ether3 disabled=no
set ether4 disabled=no
set ether5 disabled=no
set pptp-in1 disabled=yes
/ip proxy
set always-from-cache=no cache-administrator=webmaster cache-hit-dscp=4 \
cache-on-disk=no enabled=no max-cache-size=unlimited \
max-client-connections=600 max-fresh-time=3d max-server-connections=600 \
parent-proxy=0.0.0.0 parent-proxy-port=0 port=8080 serialize-connections=\
no src-address=0.0.0.0
/ip route
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
10.0.1.1 routing-mark=to_ether1 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=3 dst-address=0.0.0.0/0 gateway=\
10.0.2.1 routing-mark=to_ether2 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
192.168.0.1 routing-mark=to_ether3 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
10.0.1.1 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
192.168.0.1 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=3 dst-address=0.0.0.0/0 gateway=\
10.0.2.1 scope=30 target-scope=10
add disabled=no distance=2 dst-address=192.168.5.0/24 gateway=ether4 \
pref-src=192.168.4.1 scope=30 target-scope=10
/ip service
set telnet address="" disabled=no port=23
set ftp address="" disabled=no port=21
set www address=0.0.0.0/0 disabled=no port=8080
set ssh address="" disabled=no port=22
set www-ssl address="" certificate=none disabled=yes port=443
set api address="" disabled=yes port=8728
set winbox address="" disabled=no port=8291
/ip smb
set allow-guests=yes comment=MikrotikSMB domain=MSHOME enabled=no interfaces=\
all
/ip smb shares
set [ find default=yes ] comment="default share" directory=/pub disabled=no \
max-sessions=10 name=pub
/ip smb users
set [ find default=yes ] disabled=no name=guest password="" read-only=yes
/ip socks
set connection-idle-timeout=2m enabled=no max-connections=200 port=1080
/ip traffic-flow
set active-flow-timeout=30m cache-entries=4k enabled=no \
inactive-flow-timeout=15s interfaces=all
/ip upnp
set allow-disable-external-interface=yes enabled=no show-dummy-rule=yes
/mpls
set dynamic-label-range=16-1048575 propagate-ttl=yes
/mpls interface
set [ find default=yes ] disabled=no interface=all mpls-mtu=1508
/mpls ldp
set distribute-for-default-route=no enabled=no hop-limit=255 loop-detect=no \
lsr-id=0.0.0.0 path-vector-limit=255 transport-address=0.0.0.0 \
use-explicit-null=no
/port firmware
set directory=firmware ignore-directip-modem=no
/queue interface
set ether1 queue=only-hardware-queue
set ether2 queue=only-hardware-queue
set ether3 queue=only-hardware-queue
set ether4 queue=only-hardware-queue
set ether5 queue=only-hardware-queue
/radius incoming
set accept=no port=3799
/routing bfd interface
set [ find default=yes ] disabled=no interface=all interval=0.2s min-rx=0.2s \
multiplier=5
/routing mme
set bidirectional-timeout=2 gateway-class=none gateway-keepalive=1m \
gateway-selection=no-gateway origination-interval=5s preferred-gateway=\
0.0.0.0 timeout=1m ttl=50
/routing ospf interface
add authentication=none authentication-key="" authentication-key-id=1 cost=10 \
dead-interval=40s disabled=no hello-interval=10s instance-id=0 interface=\
ether4 network-type=broadcast passive=no priority=1 retransmit-interval=\
5s transmit-delay=1s use-bfd=no
add authentication=none authentication-key="" authentication-key-id=1 cost=10 \
dead-interval=40s disabled=no hello-interval=10s instance-id=0 interface=\
ether5 network-type=broadcast passive=no priority=1 retransmit-interval=\
5s transmit-delay=1s use-bfd=no
/routing rip
set distribute-default=never garbage-timer=2m metric-bgp=1 metric-connected=1 \
metric-default=1 metric-ospf=1 metric-static=1 redistribute-bgp=no \
redistribute-connected=no redistribute-ospf=no redistribute-static=no \
routing-table=main timeout-timer=3m update-timer=30s
/snmp
set contact="" enabled=no engine-id="" location="" trap-generators="" \
trap-target="" trap-version=1
/system clock
set time-zone-name=America/Santiago
/system clock manual
set dst-delta=+00:00 dst-end="jan/01/1970 00:00:00" dst-start=\
"jan/01/1970 00:00:00" time-zone=+00:00
/system identity
set name=MikroTik
/system logging
set 0 action=memory disabled=no prefix="" topics=info
set 1 action=memory disabled=no prefix="" topics=error
set 2 action=memory disabled=no prefix="" topics=warning
set 3 action=echo disabled=no prefix="" topics=critical
/system note
set note="" show-at-login=yes
/system ntp client
set enabled=yes mode=unicast primary-ntp=200.1.22.6 secondary-ntp=\
200.186.125.195
/system resource irq
set 0 cpu=auto
set 1 cpu=auto
set 2 cpu=auto
/system routerboard settings
set boot-device=nand-if-fail-then-ethernet boot-protocol=bootp cpu-frequency=\
400MHz force-backup-booter=no silent-boot=no
« Última modificación: 12-11-2013, 23:37 (Martes) por dsna »

dsna

  • Visitante
Re: rutas estaticas
« Respuesta #1 en: 13-11-2013, 00:30 (Miércoles) »
Explico algo mas lo que quiero hacer, por si estoy cometiendo algun otro error.


Necesito que los equipos de la red 192.168.5.x/24 y los equipos de la red 192.168.4.x/24 puedan imprimir a la impresora en red 192.168.5.50/24.
Pero que los usuarios de 192.168.5.x/24 solo puedan navegar por ether1 y ether2 (pcc)
Y los usuarios de 192.168.4.x/24 solo naveguen por ether3

este es el rsc algo mas claro

/ip pool
add name=dhcp_pool1 ranges=192.168.5.2-192.168.5.254
add name=dhcp_pool2 ranges=192.168.4.2-192.168.4.254

/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether5 name=dhcp1
add address-pool=dhcp_pool2 disabled=no interface=ether4 name=dhcp2

/ip address
add address=10.0.1.2/24 interface=ether1
add address=10.0.2.2/24 interface=ether2
add address=192.168.5.1/24 interface=ether5
add address=192.168.4.1/24 interface=ether4
add address=192.168.0.128/24 interface=ether3

/ip dhcp-server network
add address=192.168.4.0/24 gateway=192.168.4.1
add address=192.168.5.0/25 gateway=192.168.5.1
add address=192.168.5.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.5.1
add address=192.168.5.128/25 gateway=192.168.5.254

/ip dns
set servers=8.8.8.8,8.8.4.4

/ip firewall mangle
add chain=prerouting dst-address=192.168.4.0/24
add chain=prerouting dst-address=192.168.5.0/24
add action=mark-connection chain=prerouting connection-state=new in-interface=ether1 new-connection-mark=ether1_conn
add action=mark-connection chain=prerouting connection-state=new in-interface=ether2 new-connection-mark=ether2_conn
add action=mark-connection chain=prerouting comment=3 connection-state=new in-interface=ether3 new-connection-mark=ether3_conn
add action=mark-routing chain=output connection-mark=ether1_conn new-routing-mark=to_ether1
add action=mark-routing chain=output connection-mark=ether2_conn new-routing-mark=to_ether2
add action=mark-routing chain=output comment=3 connection-mark=ether3_conn new-routing-mark=to_ether3
add action=mark-connection chain=prerouting connection-state=new dst-address-type=!local in-interface=ether5 new-connection-mark=ether1_conn per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting connection-state=new dst-address-type=!local in-interface=ether5 new-connection-mark=ether2_conn per-connection-classifier=both-addresses:2/1
add action=mark-connection chain=prerouting comment=3 connection-state=new dst-address-type=!local in-interface=ether4 new-connection-mark=ether3_conn
add action=mark-routing chain=prerouting connection-mark=ether1_conn in-interface=ether5 new-routing-mark=to_ether1
add action=mark-routing chain=prerouting connection-mark=ether2_conn in-interface=ether5 new-routing-mark=to_ether2
add action=mark-routing chain=prerouting comment=3 connection-mark=ether3_conn in-interface=ether4 new-routing-mark=to_ether3
add chain=prerouting dst-address=10.0.1.0/24 in-interface=ether5
add chain=prerouting dst-address=10.0.2.0/24 in-interface=ether5
add chain=prerouting dst-address=192.168.0.0/24 in-interface=ether4

/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
add action=masquerade chain=srcnat out-interface=ether2
add action=masquerade chain=srcnat comment=3 disabled=yes out-interface=ether3 src-address-list=192.168.4.0/24
add action=masquerade chain=srcnat comment=3 out-interface=ether3

/ip route
add check-gateway=ping distance=1 gateway=10.0.1.1 routing-mark=to_ether1
add check-gateway=ping distance=1 gateway=10.0.2.1 routing-mark=to_ether2
add check-gateway=ping distance=1 gateway=192.168.0.1 routing-mark=to_ether3
add check-gateway=ping distance=1 gateway=10.0.2.1
add check-gateway=ping distance=1 gateway=10.0.1.1
add check-gateway=ping distance=1 gateway=192.168.0.1
add distance=2 dst-address=192.168.4.0/24 gateway=192.168.5.1
add distance=2 dst-address=192.168.5.0/24 gateway=192.168.4.1