cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
940
Views
0
Helpful
6
Replies

Local Pref. for sub_interfaces in cisco router

Danty
Level 1
Level 1

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.

6 Replies 6

Richard Burts
Hall of Fame
Hall of Fame

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

HTH

Rick

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.

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

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

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

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

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.

Review Cisco Networking for a $25 gift card