Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2012-09-17 18:13:21

  hudys - Użytkownik

hudys
Użytkownik
Skąd: Świętochłowice
Zarejestrowany: 2009-07-09
Serwis

BGP problem :(

Od rana nad tym siedze i do głowy dostaje...
Sytuacja wygląda tak:

Kod:

ISP1        ISP2
eth0         eth1
  |          | Tutaj jeszcze sesji nie ma
  |          |
   ------------
   |   BGP    |
   ------------
         |  
         |
       LAN eth2

eth0: 46.xxx.x.218 gw 46.xxx.x.217
eth1: poki co jeszcze nie dziala na bgp
eth2: 91.xxx.4.2 - adres LAN dla routera BGP (swoja klasa PI /24)

BGP zestawiło sesje z ISP1 pobrał sobie tablice routingu i wygląda to tak

Kod:

...
41.9.0.0        46.xxx.x.217    255.255.192.0   UG    0      0        0 eth0
41.9.64.0       46.xxx.x.217    255.255.192.0   UG    0      0        0 eth0
41.9.128.0      46.xxx.x.217    255.255.192.0   UG    0      0        0 eth0
41.9.192.0      46.xxx.x.217    255.255.192.0   UG    0      0        0 eth0
41.10.0.0       46.xxx.x.217    255.255.192.0   UG    0      0        0 eth0
41.10.64.0      46.xxx.x.217    255.255.192.0   UG    0      0        0 eth0
...

dodałem wpis

Kod:

route add -net 91.223.4.0/24 dev eth2
oraz
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/conf/eth2/proxy_arp

Niestety kompy z klasy 91.xxx.x.0/24 nie mają dostępu do neta, tcpdump pokazuje, że pakiety wychodzą eth2 idą do eth0 i wracają ze świata do eth0, ale nie wlatują już do eth2 :(

Konfiguracja:

bgpd.conf

Kod:

! -*- bgp -*-
!
! BGPd sample configuratin file
!
! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
!
hostname bgp.local
password test123
enable password 123test456
!
!bgp mulitple-instance
!
router bgp 59670
 bgp router-id 91.xxx.x.2
! network 195.xx.xxx.0/23
 network 91.xxx.x.0/24

! INET
 neighbor 46.xxx.x.217 remote-as 12642
! neighbor 46.xxx.x.217 route-map set-nexthop out
! neighbor 46.xxx.x.217 ebgp-multihop
 neighbor 46.xxx.x.217 description INET-BGP
 neighbor 46.xxx.x.217 route-map INETin in
 neighbor 46.xxx.x.217 route-map INETout out
!
 ip prefix-list INETin seq 5 permit any
 ip prefix-list INETout seq 5 permit 91.xxx.x.0/24
 ip prefix-list INETout seq 10 deny any
!
! access-list all permit any
!

route-map INETout permit 5
match ip address prefix-list INETout
set as-path prepend 59670

route-map INETin permit 5
set local-preference 100

!route-map set-nexthop permit 10
! match ip address all
! set ip next-hop 10.0.0.1
!
log file /var/log/quagga/bgpd.log
!
log stdout

zebra.conf

Kod:

! -*- zebra -*-
!
! zebra sample configuration file
!
! $Id: zebra.conf.sample,v 1.1 2002/12/13 20:15:30 paul Exp $
!
hostname gandalf.sacomnet.org
password test123
enable password 123test456
!
! Interface's description.
!
!interface lo
! description test of desc.
!
!interface sit0
! multicast
!
interface eth0
no shutdown
ip address 46.148.0.218/29
!ip forwarding
!
interface eth2
no shutdown
ip address 91.223.4.2/24
ip forwarding
!
! Static default route sample.
!
!ip route 0.0.0.0/0 203.181.89.241

log file /var/log/quagga/zebra.log

Proszę, pomocy :(

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
To nie jest tylko forum, to nasza mała ojczyzna ;-)

[ Generated in 0.009 seconds, 9 queries executed ]

Informacje debugowania

Time (s) Query
0.00008 SET CHARSET latin2
0.00004 SET NAMES latin2
0.00072 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='18.224.73.157' WHERE u.id=1
0.00243 REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '18.224.73.157', 1732558221)
0.00068 SELECT * FROM punbb_online WHERE logged<1732557921
0.00037 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=22000 AND t.moved_to IS NULL
0.00031 SELECT search_for, replace_with FROM punbb_censoring
0.00229 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=22000 ORDER BY p.id LIMIT 0,25
0.00087 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=22000
Total query time: 0.00779 s