色粉盒撒娇 发表于 2018-7-25 06:54:30

思科 华为 路由重发布

  思科 华为 路由重发布
  网络拓扑图如下:

  R1 的配置
  R1(config)#int e0/0
  R1(config-if)#ip add 192.168.1.1 255.255.255.0
  R1(config-if)#no shu
  R1(config-if)#int s1/0
  R1(config-if)#ip add 192.168.2.1 255.255.255.0
  R1(config-if)#no shut
  R1(config-if)#exit
  R1(config)#router rip
  R1(config-router)#netw 192.168.1.0
  R1(config-router)#netw 192.168.2.0
  R1(config-router)#exit
  R1(config)#exit
  R1#show ip rout
  R2的配置
  R2(config)#int s0/0
  R2(config-if)#ip add 192.168.2.2 255.255.255.0
  R2(config-if)#no shu
  R2(config-if)#int s0/1
  R2(config-if)#ip add 192.168.3.1 255.255.255.0
  R2(config-if)#no shu
  R2(config-if)#exit
  R2(config)#router rip
  R2(config-router)#network 192.168.2.0
  R2(config-router)#redistribute ospf 1 met 1
  R2(config-router)#redistribute connected
  R2(config)#router ospf 1
  R2(config-router)#network 192.168.3.0 0.0.0.255 area 0
  R2(config)#router ospf 1
  R2(config-router)#re
  R2(config-router)#redistribute rip
  % Only classful networks will be redistributed
  R2(config-router)#redistribute connected
  R3的配置
  R3(config-if)#ip add 192.168.4.2 255.255.255.0
  R3(config-if)#exit
  R3(config)#router ospf 1
  R3(config-router)#network 192.168.3.0 0.0.0.255 area 0
  R3(config-router)#network 192.168.4.0 0.0.0.255 area 0
  华为 在ensp 模拟上与实际做的命令不太相同 配置ospf 很大都是不同
  对于R1配置
  rip
  un sum
  network 192.168.1.0
  network 192.168.2.0
  ip add 192.168.1.1 24
  hernet0/0/0]rip ver 2
  int s0/0/0
  rip ver 2
  ip add 192.168.2.1 24
  sh
  un sh
  dis ip rout
  对于R2配置
  rip
  netw 192.168.2.0
  im ospf 1
  int s0/0/0
  ip add 192.168.2.2 24
  rip ver 2
  sh
  un sh
  rip
  netw 192.168.2.0
  import ospf 1
  int s0/0/1
  int s0/0/1
  ip add 192.168.3.1 24
  ospf
  import-route rip
  area 0
  netw 192.168.3.0 0.0.0.255
  对于R3
  int s0/0/0
  int s0/0/0
  ip add 192.168.3.2 24
  sh
  un sh
  ip add 192.168.4.1 24
  network 192.168.3.0 0.0.0.255
  network 192.168.4.0 0.0.0.255
  #有点像三层交换机
  验证:
  R1上



  注:实际的华为设备ospf协议命令如下:
  int s0/0/0
  ospf enable area 0
  进入端口配置协议
页: [1]
查看完整版本: 思科 华为 路由重发布