04-22-2019 12:35 PM - edited 04-22-2019 12:37 PM
Hi.... I have 2 routers are connected via one link, in my experiment each routers represents one AS. If this link is subdivided into 2 sub interfaces, can I assign a local Pref. for each sub interface? The idea is that I should have 2 different networks (Autonomous Systems) and they should be connected with 2 links, and then I control the traffic of the update messages to go through one link by changing the local Pref. value.
Any help would be appreciated.
04-22-2019 03:08 PM
Depending on the type of connection it is probably ok to configure subinterfaces and to create 2 connected subnets. But in configuring BGP your router can have only 1 AS number. So I do not see how what you are suggesting about local preference could work.
HTH
Rick
04-22-2019 04:59 PM - edited 04-22-2019 05:04 PM
The idea is to implement the two routers as if they were 2 ASes with 2 routers in each AS and there is 2 links between the ASes. So if each router represents an AS, then I have to make the link between them 2 links (by sub_interface ). This way we created the topology. The test going to be: is making BGP attack from a third AS (router) to change the Local Pref. of one of the two ASes to a higher value than 100 (by adding the TE community 2:2000 to the BGP update/prefix) to make the prefixes announcements to go out of the second link of that AS to the other AS.
04-25-2019 07:06 PM - edited 04-25-2019 07:08 PM
Hi Danty,
You can use VRF to achieve your results. Configure different sub-interfaces in different VRF and run a BGP for each VRF using local-as to present yourself originating in a different AS.
something like below, only posting an idea of configuration
ip vrf A rd 1:1 ip vrf B rd 2:2 interface Gi0/0.1 ip vrf forward A interface Gi0/0.2 ip vrf forward B Router bgp 100 address-family ipv4 vrf A neighbor A.A.A.A remote-as AS1 neighbor A.A.A.A local-AS 100 address-family ipv4 vrf B neighbor B.B.B.B remote-as AS2 neighbor B.B.B.B local-AS 200
Hit me up with Star if you find this helpful.
-
Sebastian
04-26-2019 04:12 AM
Hello @Sebastian Fernandez
I think the OP is suggesting they want Two ASN's on the same router which isnt viable
@Danty Can you please post a topology on what you are trying to achieve
04-28-2019 05:53 AM - edited 04-28-2019 05:54 AM
Hi @paul driver
That's right BGP does not allow more than one AS on the router. However, for presenting different AS to different peers 'local-as' is an option and when used in a VRF context, it almost makes it appear as a another AS on the BGP on a different virtual router(routing) instance. But anyways local-pref won't be forwarded out to eBGP peer.
If @Danty can provide more details with topology he wants to achieve, we all can contribute further with more suitable options/suggestions.
-
Sebastian
04-28-2019 07:05 AM - edited 04-28-2019 07:16 AM
It is not implementing 2 ASs on the same router , it is one AS per router but as if this as has 2 internal routers each with a local pref. value. so instead of having 2 ASs with routers routers in each AS and 2 connections between the ASs , I have only 2 routers to implement this network. I attached the diagram, the one above is the network we should implement with only 2 routers connected via one physical link.
So as in the Diagram, Router B should be AS1 and Router A should be AS2 and idea to be able to implement the one physical link as if it were 2 links running eBGP and each of those to link ends with a different local pref value in the AS.
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