Quagga服务器安装和配置
使用本地源
一、安装软件包
# yum install quagga-0.99.15-7.el6_3.2.x86_64.rpm 或rpm
# ls /etc/quagga/
bgpd.conf.sample ospfd.conf.sample vtysh.conf zebra.conf.sample
bgpd.conf.sample2 ripd.conf.sample vtysh.conf.sample
ospf6d.conf.sample ripngd.conf.sample zebra.conf
二、服务器基本配置
1、复制配置文件:
]# cp /etc/quagga/zebra.conf.sample /etc/quagga/zebra.conf
cp:是否覆盖"/etc/quagga/zebra.conf"? y
2、启动zebra服务
[root@vn quagga]# service zebra start
3、开机自启动zebra服务
[root@vn quagga]# chkconfig zebra on
[root@vn quagga]# chkconfig --list zebra
zebra 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
4、查看端口号
[root@vn quagga]# netstat -antu|grep 2601
tcp 0 0 127.0.0.1:2601 0.0.0.0:* LISTEN
用127.0.0.1登陆
5、路由器基本配置
(1)进入配置模式:
[root@vn quagga]# telnet 127.0.0.1 2601
Password: 输入连接密码,默认为zebra
Router> 已经进入用户模式
Router> enable
Password: 进入特权模式的密码默认为zebra
Router# 已经进入特权模式
Router# config terminal 进入配置模式
Router(config)#
(2)、设置系统网络名称
Router(config)# hostname Router1
Router1(config)#
(3)、配置密码
Router1(config)# password zebra 配置终端连接密码
Router1(config)# enable password zebra 配置进入特权模式的密码
Router1(config)# service password-encryption 对口令进行加密
(4)、配置接口IP地址
Router1(config)# interface eth0 一定要进入接口模式
Router1(config-if)# ip add 按tab键自动补全
Router1(config-if)# ip address 192.168.0.2/24 设定IP地址,子网掩码
Router1(config-if)# no shutdown 激活网络接口
Router1(config-if)# exit 退出
Router1(config)# interface eth1 添加第二个IP
Router1(config-if)# ip address 192.168.1.2/24 设置IP地址、子网掩码
Router1(config-if)# no shutdown 激活网络接口
Can't up interface 这里需要添加一块虚拟网卡,
注意选择仅与主机共享一个网络(host only)
Router1(config-if)# no shutdown
Router1(config-if)# exit
Router1(config)# exit
Router1# show interface 查看接口信息
Interface eth0 is up, line protocol detection is disabled
index 2 metric 1 mtu 1500
flags: <UP,BROADCAST,RUNNING,MULTICAST>
HWaddr: 00:0c:29:d1:b6:78
inet 192.168.0.2/24 broadcast 192.168.0.255
inet 192.168.121.171/24 broadcast 192.168.121.255
inet6 fe80::20c:29ff:fed1:b678/64
Interface eth1 is up, line protocol detection is disabled
index 3 metric 1 mtu 1500
flags: <UP,BROADCAST,RUNNING,MULTICAST>
inet 192.168.126.128/24 broadcast 192.168.126.255
inet6 fe80::20c:29ff:fed1:b682/64
Interface lo is up, line protocol detection is disabled
index 1 metric 1 mtu 16436
flags: <UP,LOOPBACK,RUNNING>
inet 127.0.0.1/8
inet6 ::1/128
Router1# show interface eth0 单独查看eth0的接口信息
Interface eth0 is up, line protocol detection is disabled
index 2 metric 1 mtu 1500
flags: <UP,BROADCAST,RUNNING,MULTICAST>
HWaddr: 00:0c:29:d1:b6:78
inet 192.168.0.2/24 broadcast 192.168.0.255
inet 192.168.121.171/24 broadcast 192.168.121.255
inet6 fe80::20c:29ff:fed1:b678/64
为eth1配置IP地址(重新打开一个terminal):
[root@vn ~]# ifconfig eth1 192.168.1.2
Router1# show interface eth1
Interface eth1 is up, line protocol detection is disabled
index 3 metric 1 mtu 1500
flags: <UP,BROADCAST,RUNNING,MULTICAST>
inet 192.168.1.2/24 broadcast 192.168.1.255
inet6 fe80::20c:29ff:fed1:b682/64
(5)、显示IP路由表信息
Router1# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
K>* 0.0.0.0/0 via 192.168.121.2, eth0 内核路由表
C>* 127.0.0.0/8 is directly connected, lo 回路
K>* 169.254.0.0/16 is directly connected, eth0
C>* 192.168.0.0/24 is directly connected, eth0 直连网络
C>* 192.168.1.0/24 is directly connected, eth1
C>* 192.168.121.0/24 is directly connected, eth0
(6)、设置和查看访问控制列表
Router1# configure terminal 与方式 Router1# conf t 相同
Router1(config)# access-list private-only permit 192.168.0.0/24 只允许这四个网络进行转发,拒绝其他任何网络
Router1(config)# access-list private-only permit 192.168.1.0/24
Router1(config)# access-list private-only permit 192.168.2.0/24
Router1(config)# access-list private-only permit 192.168.3.0/24
Router1(config)# access-list private-only deny any
Router1(config)# exit
Router1# show ip access-list 查看访问控制列表
ZEBRA:
Zebra IP access list private-only
permit 192.168.0.0/24
permit 192.168.1.0/24
permit 192.168.2.0/24
permit 192.168.3.0/24
deny any
(7)、查看和保存路由器配置
Router1# show running-config 查看当前正在运行的路由配置
Router1# show startup-config 显示下一次启动的配置内容
Router1# copy running-config startup-config 保存到下一次启动的配置文件中
Configuration saved to /etc/quagga/zebra.conf
Router1# exit
Connection closed by foreign host.
[root@vn quagga]# cat /etc/quagga/zebra.conf 这里可以看到配置信息
注意:另一种方法是直接修改/etc/quagga/zebra.conf 配置文件,这是两种方式,根据实际情况自己选择。
Quagga服务器安装和配置相关推荐
- hpe服务器稳定性,hpe服务器安装与配置
hpe服务器安装与配置 内容精选 换一换 Ceph集群可采用TaiShan服务器和x86服务器混合部署的方式和全TaiShan服务器的非混合部署方式.在混合部署场景下,三个Ceph节点中,两台为Tai ...
- FJ集团企业级邮件服务器——Exchange服务器安装与配置(边缘传输服务器)
简单就是力量(power cloaked in simplicity)! Exchange边缘传输服务器角色通常部署在组织外围网络中,它能够最小化攻击面,还可以处理所有面向Internet的邮件流,为 ...
- 阿里云服务器安装并配置nginx代理转发请求
阿里云服务器安装并配置nginx代理转发请求 下载nginx安装包,或者上传nginx安装包,此处我用的是Xmanager工具从本地上传了一个nginx安装包. 安装依赖库 yum -y instal ...
- 《Linux/UNIX OpenLDAP实战指南》——第2章 OpenLDAP服务器安装与配置 2.1OpenLDAP平台支持...
本节书摘来自异步社区<Linux/UNIX OpenLDAP实战指南>一书中的第2章,第2.1节,作者:郭大勇著,更多章节内容可以访问云栖社区"异步社区"公众号查看 第 ...
- 虚拟机上ftp服务器安装与配置文件,Linux下ftp服务器安装与配置实验报告_linuxftp服务器配置实验报告,ftp服务器配置的实验报告...
Linux下ftp服务器安装与配置实验报告,包含实验步骤,实验结果以及总结 GNU nano 2.5.3 File: /etc/vsftpd. conf By default the server w ...
- Windows Server 2012 R2 NAP服务器安装与配置06之 测试NAP DHCP
Windows Server 2012 R2 NAP服务器安装与配置06之 测试NAP DHCP 2014-03-05 20:13:25 标签: windows server 2012 r2 nap ...
- Windows Server 2012 R2 NAP服务器安装与配置02之 NAP的原理与基础安装 2014-02-25 20:45:53
Windows Server 2012 R2 NAP服务器安装与配置02之 NAP的原理与基础安装 2014-02-25 20:45:53 标签: windows server 2012 r2 W ...
- Windows Server 2012 R2 NAP服务器安装与配置02之 NAP的原理与基础安装 2014-02-25 20:45:53 标签:windows server 2012 r2 Win
Windows Server 2012 R2 NAP服务器安装与配置02之 NAP的原理与基础安装 2014-02-25 20:45:53 标签: windows server 2012 r2 W ...
- Windows Server 2012 R2 NAP服务器安装与配置03之 NPS服务器DHCP访问控制配置 2014-02-26 22:39:15 标签:nap windows server 20
Windows Server 2012 R2 NAP服务器安装与配置03之 NPS服务器DHCP访问控制配置 2014-02-26 22:39:15 标签: nap windows server ...
最新文章
- Linux命令:ps,netstat,top
- mysql授权无密码用户_MySQL下新建用户,授权,删除用户,修改密码
- URI is not registered (Settings | Languages Frameworks | Schemas and DTDs)
- createsemaphore 异常_浅析SPC之异常分析
- Flash--元件和实例
- 陈冠希宣布代言小野电子烟 罗永浩:实现了长久以来的心愿
- 使用JSON的RESTful云数据库
- NYOJ-水池数目(dfs)
- HDU2029 Palindromes _easy version【入门】
- matlab 颜色对照表
- 在windows平台上测试自己的人脸检测算法在FDDB数据集
- zhu的Oracle数据库笔记
- CentOS8 图形界面和命令行切换
- docker对已经启动的容器添加目录映射(挂载目录)
- 输入法/非输入法切换 无法取消快捷键问题 以及 shift按键关闭CapsLock问题
- 林期苏曼属性标签编辑_标签设计软件如何设置条码文字分段显示
- java 输入控制_java控制台输入
- Python:天干地支
- 静息态fMRI+图论研究:难治性精神分裂症的脑功能网络
- 真人拳皇项目第三次Scrum总结——史经浩