When setting up BGP I note that peering succeeed despite not using type external or internal.
Can somone please shed some light on the specific purpose of these options under bgp group stanza.
Can you upload the BGP config that you used in the Juniper device?
Are we talking about an EBGP or IBGP adjacency?
appreciate the reply though i'm unsure what the confusion is about, i mean why you have requested config.
i'm assuming that under protocols bgp > group stanza, that 'type-external' refers to eBGP neigbors, and 'internal' for iBGP.
If this = true, then my question is, is the cmd mandatory i.e. internal/external type?.
I ask this since bgp peers can be successfuly created without.
There are 2 ways for configuring or letting the SRX know if the BGP adjacency is external or internal. Actually as you said, you could bring both EBGP and IBGP adjacencies without using the type command (I recreated it in a lab)
*The SRX will always need to have AS configured and just by using the peer-as command under the neighbors config, the device can tell if it is supposed to create an IBGP/EBGP connection. If the peer-as contains an AS number different than the local AS of the SRX, the firewall knows that it is EBGP. Now if the peer-as contains the same AS number it knows an IBGP neighborship will be established.
*You can also use the type internal command to tell the SRX it will be an IBGP neighbor, if you use the type internal you can skip configuring the peer-as, since the SRX will assume it is the same as its local. If you configure type external (which is the default setting), then a peer-as is mandatory.
In summary, with and without the 'type' command are just two ways of accomplishing the same.
type is optional when the peer-as is specified
junos could find if its an internal or external peer using the peer-as number.
BGP is set to type external by default on JUNOS. you can refer to the following link.https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/type-edit-protocols-bgp.html"
type—Type of group:
external—External group, which allows inter-AS BGP routing
internal—Internal group, which allows intra-AS BGP routing
Default: If you do not specify the BGP group type or assign a peer-as, then Junos OS assigns peer group type external by default.
"Mark as Resolved if it applies