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-GigabitEthernet0/0/0]q //退到上一层,系统视图
[AR-1]interface LoopBack 13 //进入环回接口
[AR-1-LoopBack13]ip address 10.10.1.1 24 //配置IP地址和子网掩码
[AR-1-LoopBack13]q //退到上一层,系统视图
[AR-1]ospf 1 router-id 1.1.1.1 //进ospf 1 进程为1.1.1.1
[AR-1-ospf-1]area 0 //进入骨干区域0
[AR-1-ospf-1-area-0.0.0.0]network 192.168.12.0 0.0.0.255 //配置IP地址和反掩码
[AR-1-ospf-1-area-0.0.0.0]network 10.10.1.1 0.0.0.0 //配置IP地址和反掩码为0的地址
[AR-1-ospf-1-area-0.0.0.0]q //返回上一层
[AR-1]bgp 64512 //进入bgp 64512
[AR-1-bgp]router-id 1.1.1.1 //路由器ID为1.1.1.1
[AR-1-bgp]peer 10.10.3.3 as-number 64512 //数量为64512
[AR-1-bgp]peer 10.10.3.3 connect-interface LoopBack 13 //连接环回接口为13
[AR-1-ospf-1]dis bgp peer //查看bgp建立
BGP local router ID : 1.1.1.1
Local AS number : 64512
Total number of peers : 1 Peers in established state : 1Peer V AS MsgRcvd MsgSent OutQ Up/Down State Pre
fRcv10.10.3.3 4 64512 4 5 0 00:02:37 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]int g0/0/0 //切换接口
[AR-2-GigabitEthernet0/0/0]ip address 192.168.23.2 24 //配置IP地址和子网掩码
[AR-2-GigabitEthernet0/0/0]q //退到上一层,系统视图
[AR-2]ospf 1 router-id 2.2.2.2 //进ospf 1 进程为2.2.2.2
[AR-2-ospf-1]area 0 //进入骨干区域0
[AR-2-ospf-1-area-0.0.0.0]network 192.168.12.0 0.0.0.255 //配置IP地址和反掩码
[AR-2-ospf-1-area-0.0.0.0]network 192.168.23.0 0.0.0.255 //配置IP地址和反掩码
[AR-2-ospf-1-area-0.0.0.0]q //退到上一层
system-view //进系统视图
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR-3 //修改主机名为AR-3
[AR-3]int g0/0/1 //进接口
[AR-3-GigabitEthernet0/0/1]ip address 192.168.23.3 24 //配置IP地址和子网掩码
[AR-3-GigabitEthernet0/0/1]q //退到上一层,系统视图
[AR-3]interface LoopBack 13 //进入环回接口
[AR-3-LoopBack13]ip address 10.10.3.3 255.255.255.0 //配置IP地址和子网掩码
[AR-3]ospf 1 router-id 3.3.3.3 //进ospf 1 进程为3.3.3.3
[AR-3-ospf-1]area 0 //进入骨干区域0
[AR-3-ospf-1-area-0.0.0.0]network 192.168.23.0 0.0.0.255 //配置IP地址和反掩码
[AR-3-ospf-1-area-0.0.0.0]network 10.10.3.3 0.0.0.0 //配置IP地址和反掩码为0的地址
[AR-3]bgp 64512 //进入bgp 64512
[AR-3-bgp]router-id 3.3.3.3 //路由器ID为3.3.3.3
[AR-3-bgp]peer 10.10.1.1 as-number 64512 //数量为64512
[AR-3-bgp]peer 10.10.1.1 connect-interface LoopBack 13 //连接环回接口为13
[AR-3]dis bgp peer //查看bgp建立
BGP local router ID : 3.3.3.3
Local AS number : 64512
Total number of peers : 1 Peers in established state : 1Peer V AS MsgRcvd MsgSent OutQ Up/Down State Pre
fRcv10.10.1.1 4 64512 4 4 0 00:02:52 Established 0