Configure dynamic routing (version 0.93b) using Zebra

xiaoxiao2021-03-06  41

Configure dynamic routing (version 0.93b) using Zebra

Automatically run ZEBRA

# chkconfig -add zebra on

Start Zebra

# Service Zebra Start

Zebra configuration file

Vtysh.conf is a shell configuration file configured for Zebra; Zebra.conf is the main configuration file of Zebra;

Zebra has a separate profile for each routing protocol

Ripd.conf required by RIP

OSPF.conf required by OSPF

BGP.conf required by BGP

Use Zebra to configure a router that supports RIP route protocol

1, start the route selection daemon RIPD

# Touch /etc/zebra/ripd.comf

# Service ripd start

Note: # chkconfig -Add Ripd ON

2. Configure a router that supports RIP routing protocol

Subnet A network segment is 192.168.1.0/24

Subnet B network segment is 192.168.10.0/24

Linux host Eth0 192.168.1.1; Eth1 192.168.10.1

3, // Use VTYSH to configure ZEBRA on Linux host

[root @ Winner Zebra] # vtysh

Hello, this is Zebra (Version 0.93b).

Kunihiro ishigurur.

Winner> enable

Winner #

Winner # Configure Terminal

Winner (config) # Interface Eth0

Winner (config-if) # ip address 192.168.1.1/24

Winner (config-if) # exit

Winner (config) # Interface Eth1

Winner (config-if) # ip address 192.168.10.1/24

Winner (config-if) # exit

Winner (config) # router rip

Winner (config-router) # network 192.168.1.0/24

Winner (config-router) # NetWork 192.168.10.0/24

Winner (config-router) # end

Winner # show interface

Interface Lo

INDEX 1 Metric 1 MTU 16436

INET 127.0.0.1/8

Input Packets 178, Bytes 17859, Dropped 0, MultiCast Packets 0

Input Errors 0, Length 0, Overrun 0, CRC 0, FRAME 0, FIFO 0, MISSED 0

Output Packets 178, Bytes 17859, Dropped 0

Output Errors 0, Aborted 0, Carrier 0, FIFO 0, HeartBeat 0, Window 0

Collisions 0

Interface eth0

Index 2 Metric 1 MTU 1500

HWADDR: 00:

0C

: 29: 32: 44: AB

inet 192.168.1.1/24 Broadcast 192.168.0.255

Input Packets 47622, ​​BYTES 4022418, Dropped 0, Multicast Packets 0

Input Errors 0, Length 0, Overrun 0, CRC 0, Frame 0, FIFO 0, MISSED 0OTPUT Packets 3301, Bytes 479332, Dropped 0

Output Errors 0, Aborted 0, Carrier 0, FIFO 0, HeartBeat 0, Window 0

Collisions 0

Interface Eth1

Index 3 Metric 1 MTU 1500

HWADDR: 00:

0C

: 29: 32: 44: AB

inet 192.168.10.1/24 Broadcast 192.168.0.255

Input Packets 47622, ​​BYTES 4022418, Dropped 0, Multicast Packets 0

Input Errors 0, Length 0, Overrun 0, CRC 0, FRAME 0, FIFO 0, MISSED 0

Output Packets 3301, Bytes 479332, Dropped 0

Output Errors 0, Aborted 0, Carrier 0, FIFO 0, HeartBeat 0, Window 0

Collisions 0

Winner # show ip rip

CODES: R - RIP, C - Connected, O - OSPF, B - BGP

(n) - Normal, (s) - static, (d) - default, (r) - Redistribute,

(i) - Interface

Network next hop metric from time

C (i) 192.168.1.0/24

0.0.0

.0 1 SELF

C (i) 192.168.10.0/24

0.0.0

.0 1 SELF

Winner # Copy Running-Config Startup-Config

Winner # quit

4, test Linux router that supports RIP

(Note) Client Add Route

Windows: Route Add 192.168.10.0 Mask 255.255.255.0 192.168.1.1

Linux: Route Add -Net 192.168.10.0 Netmask 255.255.255.0 GW 192.168.1.1

转载请注明原文地址:https://www.9cbs.com/read-54201.html

New Post(0)