Skip to main content

Posts

Showing posts from November, 2011

rsync example

The -u switch in rsync does not work between different file systems so it seems. It is supposed to ignore existing files in the destination directory, but it doesn't - well at least it doesn't between UFS and EXT3 in my doings. Using the --size-only switch along side -u is a work around. Example rsync for my reference: rsync -airu --size-only /source/dir /dest/dir -a archive mode -i itemise change summary -r recursive -u ignore existing files man rsync

Mikrotik VRRP

VRRP example: note: the virtual IP must be a /32 address. R1 /interface vrrp add arp=enabled authentication=none disabled=no interface=ether1 interval=1s mtu=1500 name=PW-VRRP  on-backup="" on-master="" password="" preemption-mode=yes priority=100 version=2  vrid=108 /ip address add address=10.10.10.1/24 interface=ether1 /ip address add address=10.10.10.100/32 interface=PW-VRRP R2 /interface vrrp add arp=enabled authentication=none disabled=no interface=ether1 interval=1s mtu=1500 name=PW-VRRP   on-backup="" on-master="" password="" preemption-mode=no priority=90  version=2   vrid=108 /ip address add address=10.10.10.1/24 interface=ether1 /ip address add address=10.10.10.100/32 interface=PW-VRRP

Simple Cisco PBR

Cisco PBR ( Policy Based Routing ) uses route-maps applied to the ingress interface. Suppose you have 2 ISPs,   s0/0 and s0/1. You want traffic from the LAN interface (fa4) to be routed out each gateway depending on traffic type. Here is how you would achieve that. ip access-list extended s0_traffic  permit tcp any any eq www ftp 22  end ! ip access-list extended s1_traffic  permit ip any any  end ! route-map fa4_in permit 10  match ip address s0_traffic  set ip next-hop s0/0  ! route-map fa4_in permit 20  match ip address s1_traffic  set ip next-hop s0/1 ! int fa4 ip policy route-map fa4_in Traffic that doesn't match a route map statement will use the global routing table so you could also just configure the s0/0 ACL and route map, and set up a default route for s0/1.