BGP peer-group vs peer-session

Can some body explain the difference between peer-group and template peer-session/peer-policy commands of BGP?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Cisco's configuration guides provide the details:

Templates offer more flexibility.  Grouping was an earlier feature, and some attributes cannot be bound to a BGP peer group that can be used with templates.

A peer can directly inherit from one session template.  A session template can inherent from another session template  in a hierarchical arrangement.
For example:   You can have a template A,  and a template B that is based on template A through inheretence (nesting).    Then a peer that template B is applied to,  will include properties defined in both template A and template B, with properties added in template B  overriding  defaults provided by template A.

This notion of  inheretence is unique to templates.   When you use peer groups, a peer is a member of one group, and there is no inheretence  or basing groups off one another.

The BGP update policy is different.   Updates for members of a peer group are grouped together  (at least on routers that do not support Dynamic update peer groups).

This reduces CPU usage on the router, due to BGP scan, but results in restrictions, including:
* All neighbors in the same peer group have to share the same outbound routing policies
* All neighbors in the same peer group must have the same address family.
You cannot have an IPv4 peer and an IPv6 peer in the same peer group.
But if using peer templates,  they could use the same template.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.