思科动态两种(OSPF,EIGRP)协议简单配置命令

思科动态两种(OSPF,EIGRP)协议简单配置命令

OSPF协议简单命令配置

开放式最短路径优先
首先要记住两条命令
router ospf 100(100不唯一)
net 网段 反掩码 area id (id=0,为主干区域)

R0路由器配置命令

Router>en
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router ospf 100
Router(config-router)#net 222.66.109.20 0.0.0.3 area 0
Router(config-router)#net 222.66.109.16 0.0.0.3 area 0
Router(config-router)#net 211.100.105.20 0.0.0.3 area 0
Router(config-router)#ex
Router(config)#ex
Router#

每个路由器都需要配置
我只举了一个R0得例子

EIGRP协议命令

增强内部网关路由协议
EIGRP建立邻居必须和邻居又相同的AS号,否则邻居建立不成功,无法通信
同样两条命令
router eigrp AS
network 网段号

R0路由器配置举例

Router>en
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router eigrp 10
Router(config-router)#network 222.66.109.20 0.0.0.3 area 0
Router(config-router)#network 222.66.109.16 0.0.0.3 area 0
Router(config-router)#network 211.100.105.20 0.0.0.3 area 0
Router(config-router)#ex
Router(config)#ex
Router#
每个路由器都需要配置