[r1]inter
[r1]interface g
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip ad
[r1-GigabitEthernet0/0/0]ip address 192.168.1.2 26
Oct 10 2022 22:39:17-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]q
[r1]bgp 1
[r1-bgp]peer 192.168.1.1 as-numb
[r1-bgp]peer 192.168.1.1 as-number 2
[r2]interface g
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip addre
[r2-GigabitEthernet0/0/0]ip address 192.168.1.1 26
Oct 10 2022 22:37:25-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]q
[r2]bgp 2
[r2-bgp]peer 192.168.1.2 as-
[r2-bgp]peer 192.168.1.2 as-number 1
[r4]bgp 2
[r4-bgp]peer 192.168.2.1 as
[r4-bgp]peer 192.168.2.1 as-number
[r5]inter
[r5]interface g
[r5]interface GigabitEthernet 0/0/0
[r5-GigabitEthernet0/0/0]ip add
[r5-GigabitEthernet0/0/0]ip address 192.168.2.1 26
[r5-GigabitEthernet0/0/0]
Oct 10 2022 22:52:23-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r5-GigabitEthernet0/0/0]q
[r5]bgp 3
[r5-bgp]peer 192.168.2.2 as-
[r5-bgp]peer 192.168.2.2 as-number 2
然后依次将路由器建立邻里关系
将bgp 工作路由写入
然后全网可达