system-view //进系统视图
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR-1 //修改主机名AR-1
[AR-1]int g0/0/0 //进接口
[AR-1-GigabitEthernet0/0/0]ip address 192.168.12.1 24 //配置IP地址和子网掩码
[AR-1]bgp 64512 //启用BGP制定64512
[AR-1-bgp]peer 192.168.12.2 as-number 64512 //指定邻居的IP地址所在的AS号
[AR-1-bgp]dis bgp peer //验证并查看BGP信息
BGP local router ID : 192.168.12.1
Local AS number : 64512
Total number of peers : 1 Peers in established state : 1Peer V AS MsgRcvd MsgSent OutQ Up/Down State Pre
fRcv192.168.12.2 4 64512 2 2 0 00:00:14 Established 0
system-view //进系统视图
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR-2 //修改主机名为AR-2
[AR-2]int g0/0/1 //进接口
[AR-2-GigabitEthernet0/0/1]ip address 192.168.12.2 24 //配置IP地址和子网掩码
[AR-2-GigabitEthernet0/0/1]q //退到上一层,进入系统视图
[AR-2]bgp 64512 //启用BGP制定64512
[AR-2-bgp]peer 192.168.12.1 as-number 64512 //指定邻居的IP地址所在的AS号
[AR-2-bgp]dis bgp peer ////验证并查看BGP信息
BGP local router ID : 192.168.12.2
Local AS number : 64512
Total number of peers : 1 Peers in established state : 1Peer V AS MsgRcvd MsgSent OutQ Up/Down State Pre
fRcv192.168.12.1 4 64512 3 4 0 00:01:15 Established 0