OpenBGP multihoming problem with incoming route



  • I have 2 ISPs connected to my pfSense router with BGP, namely HKBN and HE

    HKBN has good connection to Asia and many countries but has limited bandwidth to US and cost a lot more per mbps.
    HE has good connection to US but not Asia.

    I want to config my traffic from/to US via HE, and my traffic from/to Asia via HKBN.
    I was able to direct outgoing traffic with set localpref but failed to direct incoming traffic with set metric / set med.
    Is there a way to determine route automatically by ping?

    # This file was manually created with the help from Reiner030; use no umlauts/special chars!
    AS 132597
    fib-update yes
    
    network 103.16.26.0/23
    network 2001:df0:465::/48
    
    neighbor 59.148.193.1 {
    descr "HKBNv4"
    announce all
    remote-as 10103
    local-address 59.148.193.2
    set localpref +100
    set metric -10
    }
    
    neighbor 27.50.33.1 {
    descr "HEv4"
    announce all
    remote-as 6939
    local-address 27.50.33.2
    set localpref -100
    set metric +10
    }
    
    neighbor 2001:470:1:215::1 {
    descr "HEv6"
    announce all
    remote-as 6939
    local-address 2001:470:1:215::2
    }
    
    deny from any
    deny to any
    allow from 59.148.193.1
    allow to 59.148.193.1
    allow from 27.50.33.1
    allow to 27.50.33.1
    allow from 2001:470:1:215::1
    allow to 2001:470:1:215::1
    
    # dont forget one empty line after last command to let it work
    

Log in to reply