设为首页 收藏本站
查看: 1561|回复: 0

[经验分享] 华为路由器OSPF多区域配置实验

[复制链接]

尚未签到

发表于 2018-7-27 07:45:51 | 显示全部楼层 |阅读模式
  拓扑:
DSC0000.png

  配置思路:
  1、配置接口地址:
  R1:G0/0/0:192.168.12.1/24             lo0:110.40.6.1/24
  R2:G0/0/0:192.168.12.2/24            G0/0/1:192.168.24.2/24                 G0/0/2:192.168.23.2/24
  R3:G0/0/3:192.168.23.3/24            lo0:10.157.120.1/24
  R4:G0/0/0:192.168.45.4/24            G0/0/1:192.168.24.4/24
  R5:G0/0/0:192.168.45.5/24             lo0:172.40.1.1/24
  2、配置ospf协议
  R1:
  #
  ospf 200 router-id 1.1.1.1
  area 0.0.0.1
  network 192.168.12.0 0.0.0.255
  network 110.40.6.0 0.0.0.255
  #
  R2:
  #
  ospf 200 router-id 2.2.2.2
  area 0.0.0.0
  network 192.168.24.0 0.0.0.255
  area 0.0.0.1
  network 192.168.12.0 0.0.0.255
  area 0.0.0.2
  network 192.168.23.0 0.0.0.255
  #
  R3:
  #
  ospf 200 router-id 3.3.3.3
  area 0.0.0.2
  network 192.168.23.0 0.0.0.255
  network 10.157.120.0 0.0.0.255
  #
  R4:
  #
  ospf 200 router-id 4.4.4.4
  area 0.0.0.0
  network 192.168.24.0 0.0.0.255
  area 0.0.0.3
  network 192.168.45.0 0.0.0.255
  #
  R5:
  #
  ospf 200 router-id 5.5.5.5
  area 0.0.0.3
  network 192.168.45.0 0.0.0.255
  network 172.40.1.0 0.0.0.255
  #
  3、测试网络
  1)在R1上测试R5的回环口
  <EK-chuanshu-WH9312>ping 172.40.1.1
  PING 172.40.1.1: 56  data bytes, press CTRL_C to break
  Reply from 172.40.1.1: bytes=56 Sequence=1 ttl=253 time=400 ms
  Reply from 172.40.1.1: bytes=56 Sequence=2 ttl=253 time=70 ms
  Reply from 172.40.1.1: bytes=56 Sequence=3 ttl=253 time=110 ms
  Reply from 172.40.1.1: bytes=56 Sequence=4 ttl=253 time=80 ms
  Reply from 172.40.1.1: bytes=56 Sequence=5 ttl=253 time=80 ms
  --- 172.40.1.1 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 70/148/400 ms
  <EK-chuanshu-WH9312>
  2)在R1上测试R3的回环口
  <EK-chuanshu-WH9312>ping 10.157.120.1
  PING 10.157.120.1: 56  data bytes, press CTRL_C to break
  Reply from 10.157.120.1: bytes=56 Sequence=1 ttl=254 time=40 ms
  Reply from 10.157.120.1: bytes=56 Sequence=2 ttl=254 time=40 ms
  Reply from 10.157.120.1: bytes=56 Sequence=3 ttl=254 time=40 ms
  Reply from 10.157.120.1: bytes=56 Sequence=4 ttl=254 time=40 ms
  Reply from 10.157.120.1: bytes=56 Sequence=5 ttl=254 time=80 ms
  --- 10.157.120.1 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 40/48/80 ms
  <EK-chuanshu-WH9312>
  3)在R3上测试R1的回环口
  <EK-chuanshu-GZ9312>ping 110.40.6.1
  PING 110.40.6.1: 56  data bytes, press CTRL_C to break
  Reply from 110.40.6.1: bytes=56 Sequence=1 ttl=254 time=160 ms
  Reply from 110.40.6.1: bytes=56 Sequence=2 ttl=254 time=60 ms
  Reply from 110.40.6.1: bytes=56 Sequence=3 ttl=254 time=30 ms
  Reply from 110.40.6.1: bytes=56 Sequence=4 ttl=254 time=70 ms
  Reply from 110.40.6.1: bytes=56 Sequence=5 ttl=254 time=60 ms
  --- 110.40.6.1 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 30/76/160 ms
  <EK-chuanshu-GZ9312>
  3)在R3上测试R5的回环口
  <EK-chuanshu-GZ9312>ping 172.40.1.1
  PING 172.40.1.1: 56  data bytes, press CTRL_C to break
  Reply from 172.40.1.1: bytes=56 Sequence=1 ttl=253 time=80 ms
  Reply from 172.40.1.1: bytes=56 Sequence=2 ttl=253 time=100 ms
  Reply from 172.40.1.1: bytes=56 Sequence=3 ttl=253 time=70 ms
  Reply from 172.40.1.1: bytes=56 Sequence=4 ttl=253 time=60 ms
  Reply from 172.40.1.1: bytes=56 Sequence=5 ttl=253 time=90 ms
  --- 172.40.1.1 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 60/80/100 ms
  <EK-chuanshu-GZ9312>
  本网络配置、测试成功,实验完毕。
  下面是配置文件:
  R1:
  [EK-chuanshu-WH9312]dis cu
  #
  sysname EK-chuanshu-WH9312
  #
  aaa
  authentication-scheme default
  authorization-scheme default
  accounting-scheme default
  domain default
  domain default_admin
  local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
  local-user admin service-type http
  #
  firewall zone Local
  priority 16
  #
  interface Ethernet0/0/0
  #
  interface Ethernet0/0/1
  #
  interface Serial0/0/0
  link-protocol ppp
  #
  interface Serial0/0/1
  link-protocol ppp
  #
  interface Serial0/0/2
  link-protocol ppp
  #
  interface Serial0/0/3
  link-protocol ppp
  #
  interface GigabitEthernet0/0/0
  description --wuhan-to-changsha-DWDM-CH33
  ip address 192.168.12.1 255.255.255.0
  #
  interface GigabitEthernet0/0/1
  #
  interface GigabitEthernet0/0/2
  #
  interface GigabitEthernet0/0/3
  #
  wlan
  #
  interface NULL0
  #
  interface LoopBack0
  ip address 110.40.6.1 255.255.255.0
  #
  ospf 200 router-id 1.1.1.1
  area 0.0.0.1
  network 192.168.12.0 0.0.0.255
  network 110.40.6.0 0.0.0.255
  #
  snmp-agent
  snmp-agent local-engineid 800007DB0354899816153A
  snmp-agent community read  Q!W@E#-WUHAN9312
  snmp-agent sys-info version all
  #
  header shell information &quot;welcome to wuhan9312&quot;
  header login information &quot;welcome to wuhan9312&quot;
  #
  user-interface con 0
  user-interface vty 0 4
  user-interface vty 16 20
  #
  return
  [EK-chuanshu-WH9312]
  R2:
  [EK-chuanshu-CS9312]dis cu
  #
  sysname EK-chuanshu-CS9312
  #
  aaa
  authentication-scheme default
  authorization-scheme default
  accounting-scheme default
  domain default
  domain default_admin
  local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
  local-user admin service-type http
  #
  firewall zone Local
  priority 16
  #
  interface Ethernet0/0/0
  #
  interface Ethernet0/0/1
  #
  interface Serial0/0/0
  link-protocol ppp
  #
  interface Serial0/0/1
  link-protocol ppp
  #
  interface Serial0/0/2
  link-protocol ppp
  #
  interface Serial0/0/3
  link-protocol ppp
  #
  interface GigabitEthernet0/0/0
  description --changsha-to-wuhan-DWDM-CH33
  ip address 192.168.12.2 255.255.255.0
  #
  interface GigabitEthernet0/0/1
  description --changsha-to-yueyang-DWDM-CH33
  ip address 192.168.24.2 255.255.255.0
  #
  interface GigabitEthernet0/0/2
  description -changsha-to-guangzhou-DWDM-CH33
  ip address 192.168.23.2 255.255.255.0
  #
  interface GigabitEthernet0/0/3
  #
  wlan
  #
  interface NULL0
  #
  ospf 200 router-id 2.2.2.2
  area 0.0.0.0
  network 192.168.24.0 0.0.0.255
  area 0.0.0.1
  network 192.168.12.0 0.0.0.255
  area 0.0.0.2
  network 192.168.23.0 0.0.0.255
  #
  snmp-agent
  snmp-agent local-engineid 800007DB03548998A9745A
  snmp-agent community read  Q!W@E#-CHANGSHA9312
  snmp-agent sys-info version all
  #
  header shell information &quot;welcome to changsha9312&quot;
  header login information &quot;welcome to changsha9312&quot;
  #
  user-interface con 0
  user-interface vty 0 4
  user-interface vty 16 20
  #
  return
  [EK-chuanshu-CS9312]
  R3:
  [EK-chuanshu-GZ9312]dis cu
  #
  sysname EK-chuanshu-GZ9312
  #
  aaa
  authentication-scheme default
  authorization-scheme default
  accounting-scheme default
  domain default
  domain default_admin
  local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
  local-user admin service-type http
  #
  firewall zone Local
  priority 16
  #
  interface Ethernet0/0/0
  #
  interface Ethernet0/0/1
  #
  interface Serial0/0/0
  link-protocol ppp
  #
  interface Serial0/0/1
  link-protocol ppp
  #
  interface Serial0/0/2
  link-protocol ppp
  #
  interface Serial0/0/3
  link-protocol ppp
  #
  interface GigabitEthernet0/0/0
  #
  interface GigabitEthernet0/0/1
  #
  interface GigabitEthernet0/0/2
  #
  interface GigabitEthernet0/0/3
  description -guangzhou-to-changsha-DWDM-CH33
  ip address 192.168.23.3 255.255.255.0
  #
  wlan
  #
  interface NULL0
  #
  interface LoopBack0
  ip address 10.157.120.1 255.255.255.0
  #
  ospf 200 router-id 3.3.3.3
  area 0.0.0.2
  network 192.168.23.0 0.0.0.255
  network 10.157.120.0 0.0.0.255
  #
  snmp-agent
  snmp-agent local-engineid 800007DB035489980F5DB2
  snmp-agent community read  Q!W@E#-GUANGZHOU9312
  snmp-agent sys-info version all
  #
  header shell information &quot;welcome to guangzhou9312&quot;
  header login information &quot;welcome to guangzhou9312&quot;
  #
  user-interface con 0
  user-interface vty 0 4
  user-interface vty 16 20
  #
  return
  [EK-chuanshu-GZ9312]
  R4:
  [EK-chuanshu-YY9312]dis cu
  #
  sysname EK-chuanshu-YY9312
  #
  aaa
  authentication-scheme default
  authorization-scheme default
  accounting-scheme default
  domain default
  domain default_admin
  local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
  local-user admin service-type http
  #
  firewall zone Local
  priority 16
  #
  interface Ethernet0/0/0
  #
  interface Ethernet0/0/1
  #
  interface Serial0/0/0
  link-protocol ppp
  #
  interface Serial0/0/1
  link-protocol ppp
  #
  interface Serial0/0/2
  link-protocol ppp
  #
  interface Serial0/0/3
  link-protocol ppp
  #
  interface GigabitEthernet0/0/0
  description -yueyang-to-nanchang-DWDM-CH33
  ip address 192.168.45.4 255.255.255.0
  #
  interface GigabitEthernet0/0/1
  description -yueyang-to-changsha-DWDM-CH33
  ip address 192.168.24.4 255.255.255.0
  #
  interface GigabitEthernet0/0/2
  #
  interface GigabitEthernet0/0/3
  #
  wlan
  #
  interface NULL0
  #
  ospf 200 router-id 4.4.4.4
  area 0.0.0.0
  network 192.168.24.0 0.0.0.255
  area 0.0.0.3
  network 192.168.45.0 0.0.0.255
  #
  snmp-agent
  snmp-agent local-engineid 800007DB03548998A427D8
  snmp-agent community read  Q!W@E#-YUEYANG9312
  snmp-agent sys-info version all
  #
  header shell information &quot;welcome to yueyang9312&quot;
  header login information &quot;welcome to yueyang9312&quot;
  #
  user-interface con 0
  user-interface vty 0 4
  user-interface vty 16 20
  #
  return
  [EK-chuanshu-YY9312]
  R5:
  <EK-chuanshu-NC9312>dis cu
  #
  sysname EK-chuanshu-NC9312
  #
  aaa
  authentication-scheme default
  authorization-scheme default
  accounting-scheme default
  domain default
  domain default_admin
  local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
  local-user admin service-type http
  #
  firewall zone Local
  priority 16
  #
  interface Ethernet0/0/0
  #
  interface Ethernet0/0/1
  #
  interface Serial0/0/0
  link-protocol ppp
  #
  interface Serial0/0/1
  link-protocol ppp
  #
  interface Serial0/0/2
  link-protocol ppp
  #
  interface Serial0/0/3
  link-protocol ppp
  #
  interface GigabitEthernet0/0/0
  description -nanchang-to-yueyang-DWDM-CH33
  ip address 192.168.45.5 255.255.255.0
  #
  interface GigabitEthernet0/0/1
  #
  interface GigabitEthernet0/0/2
  #
  interface GigabitEthernet0/0/3
  #
  wlan
  #
  interface NULL0
  #
  interface LoopBack0
  ip address 172.40.1.1 255.255.255.0
  #
  ospf 200 router-id 5.5.5.5
  area 0.0.0.3
  network 192.168.45.0 0.0.0.255
  network 172.40.1.0 0.0.0.255
  #
  snmp-agent
  snmp-agent local-engineid 800007DB03548998531632
  snmp-agent community read  Q!W@E#-NANCHANG-9312
  snmp-agent sys-info version all
  #
  header shell information &quot;welcome to nanchang9312&quot;
  header login information &quot;welcome to nanchang9312&quot;
  #
  user-interface maximum-vty 15
  user-interface con 0
  user-interface vty 0 14
  user-interface vty 16 20
  #
  return
  <EK-chuanshu-NC9312>

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-541814-1-1.html 上篇帖子: 利用SecureCRT实现网络设备自动备份-华为、H3C篇 下篇帖子: 华为交换机使用SSH方式远程登陆必要的配置
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表