Configuration examples

XXXX - your ASN number

192.168.0/24 and 192.168.1/24 - your IPv4 prefixes

2001:DB8:1::/64 and network 2001:DB8:2::/64 - your IPv6 prefixes

Cisco

router bgp XXXX
!
no bgp enforce-first-as
bgp log-neighbor-changes
neighbor LL-IX peer-group
neighbor LL-IX remote-as 59947
neighbor LL-IX transport connection-mode active
 
neighbor LL-IX-6 peer-group
neighbor LL-IX-6 remote-as 59947
neighbor LL-IX-6 transport connection-mode active
 
neighbor 5.101.92.2 peer-group LL-IX
neighbor 5.101.92.2 description rs2.ll-ix.com
neighbor 5.101.92.9 peer-group LL-IX
neighbor 5.101.92.9 description rs1.ll-ix.com
neighbor 2001:678:4fc::9 peer-group LL-IX-6
neighbor 2001:678:4fc::9 description rs1.ll-ix.com
neighbor 2001:678:4fc::2 peer-group LL-IX-6
neighbor 2001:678:4fc::2 description rs2.ll-ix.com
!
address-family ipv4
no neighbor LL-IX-6 activate
neighbor LL-IX activate
neighbor LL-IX next-hop-self
neighbor LL-IX soft-reconfiguration inbound
neighbor LL-IX route-map TO-IX out
no auto-summary
no synchronization
neighbor 5.101.92.2 peer-group LL-IX
neighbor 5.101.92.9 peer-group LL-IX
network 192.168.0.0 mask 255.255.255.0
network 192.168.1.0 mask 255.255.255.0
exit-address-family
!
address-family ipv6
neighbor LL-IX-6 activate
neighbor LL-IX-6 next-hop-self
neighbor LL-IX-6 soft-reconfiguration inbound
neighbor LL-IX-6 route-map TO-IX out
neighbor 2001:678:4fc::9 peer-group LL-IX-6
neighbor 2001:678:4fc::2 peer-group LL-IX-6
network 2001:DB8:1::/64
network 2001:DB8:2::/64
exit-address-family
!
ip prefix-list TO-IX seq 10 permit 192.168.0.0/24
ip prefix-list TO-IX seq 20 permit 192.168.1.0/24
!
ipv6 prefix-list TO-IX seq 10 permit 2001:DB8:1::/64
ipv6 prefix-list TO-IX seq 20 permit 2001:DB8:2::/64
!
route-map TO-IX permit 10
match ip address prefix-list TO-IX
!

Juniper

[email protected]# show protocols bgp

group LL-IX {
    type external;
    log-updown;
    family inet {
        unicast;
    }
    export TO-IX;
    peer-as 59947;
    local-as XXXX;
    neighbor 5.101.92.9 {
        description rs1.ll-ix.com;
    }
    neighbor 5.101.92.2 {
        description rs2.ll-ix.com;
    }
}
group LL-IX-6 {
    type external;
    log-updown;
    family inet6 {
        unicast;
    }
    export TO-IX;
    peer-as 59947;
    local-as XXXX;
    neighbor 2001:678:4fc::9 {
        description rs1.ll-ix.com;
    }
    neighbor 2001:678:4fc::2 {
        description rs2.ll-ix.com;
    }
}

BIRD

Please change the data to your own.
# 185.37.8.1 - client's router ipv4 address
# 185.37.8.0/24 - client's ipv4 net
# 2a10:c947::/32 - client's ipv6 net
# 206447 - client's ASn
# 5.101.92.180 - client's ipv4 address in LL-IX
# 2001:678:4fc::92:180 - client's ipv4 address in LL-IX
log syslog all;
router id 185.37.8.1;

protocol device { }
protocol direct { ipv4; ipv6; }
protocol kernel { ipv4 { export all; }; }
protocol kernel { ipv6 { export all; }; }
protocol static { ipv4; route 185.37.8.0/24  unreachable; }
protocol static { ipv6; route 2a10:c947::/32 unreachable; }

function is_default()    { return net ~ [ 0.0.0.0/0 ]; }
function is_default_v6() { return net ~ [ ::/0      ]; }

function is_martian(){
  return net ~ [ 169.254.0.0/16+, 172.16.0.0/12+, 192.168.0.0/16+, 10.0.0.0/8+, 224.0.0.0/4+, 240.0.0.0/4+, 193.254.225.0/24];
}

function is_martian_v6(){
  return net ~ [ ::/96, ::/128, ::1/128, ::ffff:0.0.0.0/96+, ::224.0.0.0/100+, ::127.0.0.0/104+,                                     
                 ::0.0.0.0/104+, ::255.0.0.0/104+, 0000::/8+, 0200::/7+, 3ffe::/16+, 2001:db8::/32+,
                 2002:e000::/20+, 2002:7f00::/24+, 2002:0000::/24+, 2002:ff00::/24+, 2002:0a00::/24+,
                 2002:ac10::/28+, 2002:c0a8::/32+, fc00::/7+, fe80::/10+, fec0::/10+, ff00::/8+ ];
}

function is_self_net()    { return net ~ [ 185.37.8.0/24  ]; }
function is_self_net_v6() { return net ~ [ 2a10:c947::/32 ]; }
function is_my_asn()      { return bgp_path.last ~ [ 206447 ]; }

filter import_AS59947_v4
{
  if is_martian()  then reject;
  if is_my_asn()   then reject;
  if is_self_net() then reject;
  if is_default()  then reject;
  bgp_local_pref   = 150;
  krt_prefsrc      = 185.37.8.1;
  accept;
}

filter import_AS59947_v6
{
  if is_martian_v6()  then reject;
  if is_my_asn()      then reject;
  if is_self_net_v6() then reject;
  if is_default_v6()  then reject;
  bgp_local_pref      = 150;
  bgp_next_hop        = bgp_next_hop;  
  accept;
}

filter export_AS59947_v4
{
  if is_martian()  then reject;
  if is_default()  then reject;
  if is_self_net() then accept;
  reject;
}

filter export_AS59947_v6
{
  if is_martian_v6()  then reject;
  if is_default_v6()  then reject;
  if is_self_net_v6() then accept;
  reject;
}

protocol bgp RS1_LL_IX_v4 {
  local as           206447;
  connect delay time 40;
  neighbor           5.101.92.9 as 59947;
  source address     5.101.92.180;
  ipv4 {
    next hop self;
    export filter export_AS59947_v4;
    import filter import_AS59947_v4;
  };
}

protocol bgp RS2_LL_IX_v4 {
  local as           206447;
  connect delay time 40;
  neighbor           5.101.92.2 as 59947;
  source address     5.101.92.180;
  ipv4 {
    next hop self;
    export filter export_AS59947_v4;
    import filter import_AS59947_v4;
  };
}

protocol bgp RS1_LL_IX_v6 {
  local as       206447;
  neighbor       2001:678:4fc::9 as 59947;
  source address 2001:678:4fc::92:180;
  ipv6 {
    next hop address  2001:678:4fc::92:180;
    export filter     export_AS59947_v6;
    import filter     import_AS59947_v6;
  };
}

protocol bgp RS2_LL_IX_v6 {
  local as       206447;
  neighbor       2001:678:4fc::2 as 59947;
  source address 2001:678:4fc::92:180;
  ipv6 {
    next hop address  2001:678:4fc::92:180;
    export filter     export_AS59947_v6;
    import filter     import_AS59947_v6;
  };
}

Join