linux下使用quagga配置ospf协议
环境:三台(VM虚拟机)一、ospf协议 OSPF(Open Shortest Path First开放式最短路径优先)是一个内部网关协议(Interior Gateway Protocol,简称IGP),用于在单一自治系统(autonomous system,AS)内决策路由。是对链路状态路由协议的一种实现,隶属内部网关协议(IGP),故运作于自治系统内部。
·
环境:三台(VM虚拟机)
一、ospf协议
OSPF(Open Shortest Path First开放式最短路径优先)是一个内部网关协议(Interior Gateway Protocol,简称IGP),用于在单一自治系统(autonomous system,AS)内决策路由。是对链路状态路由协议的一种实现,隶属内部网关协议(IGP),故运作于自治系统内部。
PS:这里不过多讲解ospf协议,可在网上自行查找学习
二、配置
首先下载安装软件包,其他yum源以及网络配置就不再介绍了,三台配置也是一样的
下载地址:/components/cache/quagga/
本人这里使用的版本是quagga-
相关依赖包:gcc readline readline-devel
#tar zxf quagga- #yum install -y gcc readline readline-devel #cd quagga- #进入目录进行源码编译安装 #./configure --enable-vtysh--enable-user=root --enable-group=root --enable-vty-group=root # make && make install
修改配置文件:
在/etc/services文件里面添加以下内容:
# vim /etc/services zebrasrv 2600/tcp # zebra service zebra 2601/tcp # zebra vty ripd 2602/tcp # RIPd vty ripngd 2603/tcp # RIPngd vty ospfd 2604/tcp # OSPFd vty bgpd 2605/tcp # BGPd vty ospf6d 2606/tcp # OSPF6d vty ospfapi 2607/tcp # ospfapi isid 2608/tcp # ISISd vty
修改quagga的配置文件:
# mkdir /usr/local/etc/sample # mv /usr/local/etc/*.sample/usr/local/etc/sample/ # mv /usr/local/etc//usr/local/etc/sample/ # cp /usr/local/etc/sample//usr/local/etc/ # cp/usr/local/etc/sample/ /usr/local/etc/ # cp/usr/local/etc/sample/ /usr/local/etc/ # cp /usr/local/etc/sample//usr/local/etc/ # cp /usr/local/etc/sample//usr/local/etc/ # cp/usr/local/etc/sample/ /usr/local/etc/ # cp/usr/local/etc/sample/ /usr/local/etc/
修改ospfd的配置文件:
# vim /usr/local/etc/ ! -*- ospf -*- ! ! OSPFd sample configuration file ! ! hostname ospfd password zebra enable password please-set-at-here router ospf network /24 area 0 #将网段宣告进ospf中 log stdout
三、启动验证
接下来启动即可:
# /usr/local/sbin/ospfd -d # /usr/local/sbin/zebra -d # vtysh Hello, this is Quagga (version ). Copyright 1996-2005 Kunihiro Ishiguro, etal. # show running-config Building configuration... Current configuration: hostname Router hostname ospfd log stdout password zebra enable password zebra enable password please-set-at-here interface eth0 ipv6nd suppress-ra interface lo router ospf network /24 area line vty end # show ip ospf database OSPF Router with ID () Router Link States () Link ID ADV Router Age Seq# CkSum Link count 3 0x80000003 0x0735 1 9 0x80000005 0xf832 1 10 0x80000005 0xf631 1 Net Link States () Link ID ADV Router Age Seq# CkSum 10 0x80000003 0xe5cf
vtysh是quagga进入模拟路由的,进去可以像正常路由器上面命令一样去查看信息。
我这里是启动了三台ospfd进程,配置都是一样的,重复上面步骤即可,赶紧get起来吧!!!
更多推荐
已为社区贡献1条内容
所有评论(0)