12-16-2015 07:36 AM - edited 03-05-2019 02:56 AM
Hello, I am planning on making a BGP link.
I have 2 AS, so 2 iBGP linkk and 1 eBGP link.
The problem is my computer kali and Windows7 can't pping each other. They are block in their LAN.
Here is the configuration of R1 and R2 (R3 and R4 have been made in the same way) :
R1
conf t
hostname R1
!---physical interfaces
interface fastEthernet 1/0
ip address 192.168.1.253 255.255.255.0
no shutdown
exit
ip routing
!--- eBGP link
!--- iBGP link
router bgp 100
neighbor 192.168.1.254 remote-as 100
exit
R2
conf t
hostname R2
!--- physical interfaces
interface fastEthernet 0/0
ip address 20.0.2.1 255.255.255.0
no shutdown
exit
interface fastEthernet 1/0
ip address 192.168.1.254 255.255.255.0
no shutdown
exit
ip routing
!--- eBGP link
router bgp 100
neighbor 20.0.2.2 remote-as 300
exit
!---iBGP link
router bgp 100
neighbor 192.168.1.253 remote-as 100
exit
Here is two wireshark capture on R2 both interface :
F0/0
F1/0
Do you know where is the problem in my configuration ??
12-16-2015 08:27 AM
You need to advertise out the local subnets.
So on R2 -
router bgp 100
network 192.168.1.0 mask 255.255.255.0
and R3 -
router bgp 300
network 192.168.3.0 mask 255.255.255.0
that will mean each AS advertises their routes to each other.
Whether it then works depends on the default gateway of your clients.
If the default gateways are R1 and R4 respectively then it is not necessarily a good design but you would need to add this to your configuration -
on R2 -
router bgp 100
neighbor 192.168.1.253 next-hop-self
on R3 -
router bgp 500
neighbor 192.168.3.254 next-hop-self
you only need the above for the IBGP connections. If you don't have the above then R2 receives an advertisement for 192.168.3.0/24 from R3 and advertises it to R1 with a next hop if R3 but R1 does not know how to reach R3.
So using that command tells R2 to advertise the subnet to R1 with it's own IP address as the next hop and not R3s.
If the default gateways of the clients are R2 and R3 respectively then you don't need the above.
Jon
12-17-2015 02:43 AM
Thank you John for your consequent answer.
I've done these command :
router bgp 100
network 192.168.1.0 mask 255.255.255.0
router bgp 300
network 192.168.3.0 mask 255.255.255.0
Now it works !
And I've changed the default gateway of my computer and apply these commands :
router bgp 100
neighbor 192.168.1.253 next-hop-self
router bgp 500
neighbor 192.168.3.254 next-hop-self
Again it works well. Thanks you very much John !
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide